fix: 解决保存时候可能数据获取不完整的bug

This commit is contained in:
奔跑的面条
2023-09-13 10:43:11 +08:00
parent b4e018ee96
commit 52f74d7b91
5 changed files with 50 additions and 50 deletions
@@ -161,17 +161,17 @@ export const useChartEditStore = defineStore({
},
getComponentList(): Array<CreateComponentType | CreateComponentGroupType> {
return this.componentList
},
// 获取需要存储的数据项
}
},
actions: {
// * 获取需要存储的数据项
getStorageInfo(): ChartEditStorage {
return {
[ChartEditStoreEnum.EDIT_CANVAS_CONFIG]: this.getEditCanvasConfig,
[ChartEditStoreEnum.COMPONENT_LIST]: this.getComponentList,
[ChartEditStoreEnum.REQUEST_GLOBAL_CONFIG]: this.getRequestGlobalConfig
}
}
},
actions: {
},
// * 设置 editCanvas 数据项
setEditCanvas<T extends keyof EditCanvasType, K extends EditCanvasType[T]>(key: T, value: K) {
this.editCanvas[key] = value