feat: 上传前判断大小、新文件插入第一位

This commit is contained in:
lan
2024-06-15 17:27:28 +08:00
parent 4dfb75204d
commit c6fe556e76
15 changed files with 193 additions and 18 deletions
+7
View File
@@ -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 };
});
+2 -2
View File
@@ -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();
}