feat:新增吸附修改的全局设置

This commit is contained in:
mtruning
2022-03-05 22:11:25 +08:00
parent 1028ea0302
commit b2e255bb42
7 changed files with 68 additions and 20 deletions
@@ -39,8 +39,10 @@ export const useChartLayoutStore = defineStore({
}
},
actions: {
setItem(key: string, value: boolean): void {
;(this as any)[key] = value
setItem<T extends keyof ChartLayoutType, K extends ChartLayoutType[T]>(key: T, value: K): void {
this.$patch(state => {
state[key]= value
});
setLocalStorage(GO_CHART_LAYOUT_STORE, this.$state)
// 重新计算拖拽区域缩放比例
setTimeout(() => {