fix: 修改类型

This commit is contained in:
mtruning
2022-01-23 19:22:54 +08:00
parent 5db0119bb6
commit 3e4b3001ef
3 changed files with 12 additions and 7 deletions
@@ -44,7 +44,7 @@ export const useChartEditStoreStore = defineStore({
},
actions: {
// * 设置数据项
setEditCanvasItem<T extends keyof EditCanvasType>(key: T, value: any) {
setEditCanvasItem<T extends keyof EditCanvasType, K extends EditCanvasType[T]>(key: T, value: K) {
this.editCanvas[key] = value
},
// * 设置页面样式属性
@@ -111,7 +111,7 @@ export const useChartEditStoreStore = defineStore({
this.setScale(parseFloat(scaleHeight.toFixed(5)))
}
} else {
window['$message'].warning('找不到元素')
window['$message'].warning('请先创建画布,再进行缩放')
}
},
// * 监听缩放
@@ -139,4 +139,4 @@ export const useChartEditStoreStore = defineStore({
}
}
}
})
})