fix: 修改一点类型错误的问题

This commit is contained in:
MTrun
2022-01-24 14:28:31 +08:00
parent d7965c5857
commit 151ec13904
4 changed files with 6 additions and 8 deletions
+2 -2
View File
@@ -12,8 +12,8 @@ export enum EditCanvasTypeEnum {
}
export type EditCanvasType = {
// 编辑区域 DOM
[EditCanvasTypeEnum.EDITLAYOUTDOM]?: HTMLElement
[EditCanvasTypeEnum.EDITCONTENTDON]?: HTMLElement
[EditCanvasTypeEnum.EDITLAYOUTDOM]: HTMLElement | null
[EditCanvasTypeEnum.EDITCONTENTDON]: HTMLElement | null
// 大屏宽度
[EditCanvasTypeEnum.WIDTH]: number
// 大屏高度
@@ -12,8 +12,8 @@ export const useChartEditStoreStore = defineStore({
state: (): chartEditStoreType => ({
editCanvas: {
// 编辑区域 Dom
editLayoutDom: undefined,
editContentDom: undefined,
editLayoutDom: null,
editContentDom: null,
// 默认宽度
width: 1920,
// 默认高度
@@ -54,7 +54,6 @@ export const useChartEditStoreStore = defineStore({
): void {
const dom = this.getEditCanvas.editContentDom
if (dom) {
// @ts-ignore
dom.style[key] = value
}
},