From 151ec139046e0107855ffc4dfdb16f2c6b1ef842 Mon Sep 17 00:00:00 2001 From: MTrun <1262327911@qq.com> Date: Mon, 24 Jan 2022 14:28:31 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=E4=B8=80=E7=82=B9?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B=E9=94=99=E8=AF=AF=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/store/modules/chartEditStore/chartEditStore.d.ts | 4 ++-- src/store/modules/chartEditStore/chartEditStore.ts | 5 ++--- .../components/ContentEdit/components/EditBottom/index.vue | 2 +- src/views/chart/components/ContentEdit/index.vue | 3 +-- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/store/modules/chartEditStore/chartEditStore.d.ts b/src/store/modules/chartEditStore/chartEditStore.d.ts index 0ff5cb41..9b70917b 100644 --- a/src/store/modules/chartEditStore/chartEditStore.d.ts +++ b/src/store/modules/chartEditStore/chartEditStore.d.ts @@ -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 // 大屏高度 diff --git a/src/store/modules/chartEditStore/chartEditStore.ts b/src/store/modules/chartEditStore/chartEditStore.ts index ccf08101..585f5762 100644 --- a/src/store/modules/chartEditStore/chartEditStore.ts +++ b/src/store/modules/chartEditStore/chartEditStore.ts @@ -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 } }, diff --git a/src/views/chart/components/ContentEdit/components/EditBottom/index.vue b/src/views/chart/components/ContentEdit/components/EditBottom/index.vue index dfa68c0b..6264a89e 100644 --- a/src/views/chart/components/ContentEdit/components/EditBottom/index.vue +++ b/src/views/chart/components/ContentEdit/components/EditBottom/index.vue @@ -68,7 +68,7 @@ const themeColor = ref(designStore.getAppTheme) const chartEditStore = getChartEditStore() const chartEditStoreEnum = getChartEditStoreEnum() -const { lockScale, scale, userScale } = toRefs(chartEditStore.getEditCanvas) +const { lockScale, scale } = toRefs(chartEditStore.getEditCanvas) // 缩放选项 let filterOptions = reactive([ diff --git a/src/views/chart/components/ContentEdit/index.vue b/src/views/chart/components/ContentEdit/index.vue index 54b4b8a6..6ddacfeb 100644 --- a/src/views/chart/components/ContentEdit/index.vue +++ b/src/views/chart/components/ContentEdit/index.vue @@ -19,7 +19,7 @@