feat: 新增加载提示

This commit is contained in:
奔跑的面条
2022-12-20 16:54:04 +08:00
parent 65127ced7f
commit 1fb57ad1ff
6 changed files with 67 additions and 3 deletions
@@ -24,6 +24,8 @@ export const useChartLayoutStore = defineStore({
chartType: ChartModeEnum.SINGLE,
// 图层类型(默认图片)
layerType: LayerModeEnum.THUMBNAIL,
// 当前加载数量
percentage: 0,
// 防止值不存在
...storageChartLayout
}),
@@ -42,6 +44,9 @@ export const useChartLayoutStore = defineStore({
},
getLayerType(): LayerModeEnum {
return this.layerType
},
getPercentage(): number {
return this.percentage
}
},
actions: {
@@ -54,6 +59,11 @@ export const useChartLayoutStore = defineStore({
setTimeout(() => {
chartEditStore.computedScale()
}, 500)
},
setItemUnHandle<T extends keyof ChartLayoutType, K extends ChartLayoutType[T]>(key: T, value: K): void {
this.$patch(state => {
state[key] = value
})
}
}
})