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' }