From 0abcbbae53e5ffa2ca97cfab0adcf2ec70913558 Mon Sep 17 00:00:00 2001 From: MTrun <1262327911@qq.com> Date: Fri, 11 Mar 2022 08:45:04 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=8E=BB=E9=99=A4=E6=A8=A1=E6=80=81?= =?UTF-8?q?=E5=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../chartEditStore/chartEditStore.d.ts | 3 --- .../modules/chartEditStore/chartEditStore.ts | 2 -- .../components/EditRange/index.vue | 19 +++++-------------- .../chart/ContentEdit/hooks/useDrag.hook.ts | 5 ----- 4 files changed, 5 insertions(+), 24 deletions(-) diff --git a/src/store/modules/chartEditStore/chartEditStore.d.ts b/src/store/modules/chartEditStore/chartEditStore.d.ts index fcb64202..7dbe0e73 100644 --- a/src/store/modules/chartEditStore/chartEditStore.d.ts +++ b/src/store/modules/chartEditStore/chartEditStore.d.ts @@ -10,7 +10,6 @@ export enum EditCanvasTypeEnum { SCALE = 'scale', USER_SCALE = 'userScale', LOCK_SCALE = 'lockScale', - IS_CREATE = 'isCreate', IS_DRAG= 'isDrag', } @@ -27,8 +26,6 @@ export type EditCanvasType = { [EditCanvasTypeEnum.USER_SCALE]: number // 锁定缩放 [EditCanvasTypeEnum.LOCK_SCALE]: boolean - // 初始化创建 - [EditCanvasTypeEnum.IS_CREATE]: boolean // 拖拽中 [EditCanvasTypeEnum.IS_DRAG]: boolean } diff --git a/src/store/modules/chartEditStore/chartEditStore.ts b/src/store/modules/chartEditStore/chartEditStore.ts index c819f229..f2a619eb 100644 --- a/src/store/modules/chartEditStore/chartEditStore.ts +++ b/src/store/modules/chartEditStore/chartEditStore.ts @@ -37,8 +37,6 @@ export const useChartEditStore = defineStore({ userScale: 1, // 锁定缩放 lockScale: false, - // 初始化 - isCreate: false, // 拖拽中 isDrag: false }, diff --git a/src/views/chart/ContentEdit/components/EditRange/index.vue b/src/views/chart/ContentEdit/components/EditRange/index.vue index 086b1a50..2179c4ce 100644 --- a/src/views/chart/ContentEdit/components/EditRange/index.vue +++ b/src/views/chart/ContentEdit/components/EditRange/index.vue @@ -5,11 +5,9 @@ @mousedown="mousedownHandleUnStop($event, undefined)" > + + - - - -
diff --git a/src/views/chart/ContentEdit/hooks/useDrag.hook.ts b/src/views/chart/ContentEdit/hooks/useDrag.hook.ts index 566de81f..5bf4e01e 100644 --- a/src/views/chart/ContentEdit/hooks/useDrag.hook.ts +++ b/src/views/chart/ContentEdit/hooks/useDrag.hook.ts @@ -27,9 +27,6 @@ export const handleDrag = async (e: DragEvent) => { return } - // 设置拖拽状态 - chartEditStore.setEditCanvas(EditCanvasTypeEnum.IS_CREATE, false) - const dropData: Exclude = JSON.parse( drayDataString ) @@ -55,8 +52,6 @@ export const handleDragOver = (e: DragEvent) => { e.preventDefault() e.stopPropagation() - // 设置拖拽状态 - chartEditStore.setEditCanvas(EditCanvasTypeEnum.IS_CREATE, true) if (e.dataTransfer) e.dataTransfer.dropEffect = 'copy' }