|
@@ -26,28 +26,16 @@ export interface DocxList {
|
|
|
|
|
|
|
|
|
|
|
|
|
export const useDocxStore = defineStore('docx', {
|
|
export const useDocxStore = defineStore('docx', {
|
|
|
-
|
|
|
|
|
state: () => {
|
|
state: () => {
|
|
|
- let DocxList = ref<DocxList[]>([])
|
|
|
|
|
let taskList = ref<any>([])
|
|
let taskList = ref<any>([])
|
|
|
-
|
|
|
|
|
let userInfo = JSON.parse(localStorage.getItem('userInfo'))
|
|
let userInfo = JSON.parse(localStorage.getItem('userInfo'))
|
|
|
- const storedDocxList = localStorage.getItem('docxList');
|
|
|
|
|
- DocxList = JSON.parse(storedDocxList);
|
|
|
|
|
taskList = JSON.parse(localStorage.getItem('taskList'))
|
|
taskList = JSON.parse(localStorage.getItem('taskList'))
|
|
|
- return { DocxList,taskList,userInfo };
|
|
|
|
|
|
|
+ return { taskList,userInfo };
|
|
|
},
|
|
},
|
|
|
-
|
|
|
|
|
actions: {
|
|
actions: {
|
|
|
- async saveDocxList() {
|
|
|
|
|
- localStorage.setItem('docxList', JSON.stringify(this.DocxList));
|
|
|
|
|
- },
|
|
|
|
|
async saveTaskList() {
|
|
async saveTaskList() {
|
|
|
localStorage.setItem('taskList', JSON.stringify(this.taskList));
|
|
localStorage.setItem('taskList', JSON.stringify(this.taskList));
|
|
|
},
|
|
},
|
|
|
-
|
|
|
|
|
},
|
|
},
|
|
|
persist: true
|
|
persist: true
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
});
|
|
});
|