feat: 上传前判断大小、新文件插入第一位
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
import { defineStore } from 'pinia';
|
||||
import {ref} from "vue";
|
||||
|
||||
export const useConfigStore = defineStore('config', () => {
|
||||
const config:any = ref(JSON.parse(localStorage.getItem('config') || '{}') || {}); // 配置
|
||||
return { config };
|
||||
});
|
||||
@@ -9,12 +9,12 @@ export const useFileDataStore = defineStore('fileData', () => {
|
||||
localStorage.setItem('shareData', JSON.stringify(shareData));
|
||||
}
|
||||
function addReceiveData(data:any) {
|
||||
receiveData.push(data);
|
||||
receiveData.unshift(data);
|
||||
save();
|
||||
}
|
||||
|
||||
function addShareData(data:any) {
|
||||
shareData.push(data);
|
||||
shareData.unshift(data);
|
||||
save();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user