From 8ef13b6325664bf1e766187102fcafd430605f78 Mon Sep 17 00:00:00 2001 From: MTrun <1262327911@qq.com> Date: Wed, 2 Feb 2022 14:18:39 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=E6=8B=96=E6=8B=BD?= =?UTF-8?q?=E4=B9=8B=E5=90=8E=E6=9C=AA=E9=80=89=E4=B8=AD=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/chart/ContentEdit/hooks/useDrop.hook.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/views/chart/ContentEdit/hooks/useDrop.hook.ts b/src/views/chart/ContentEdit/hooks/useDrop.hook.ts index efcea879..f09f2fc2 100644 --- a/src/views/chart/ContentEdit/hooks/useDrop.hook.ts +++ b/src/views/chart/ContentEdit/hooks/useDrop.hook.ts @@ -26,11 +26,11 @@ export const handleDrop = async (e: DragEvent) => { drayDataString ) // 创建新图表组件 - let newComponent = await createComponent(dropData) + let newComponent:CreateComponentType = await createComponent(dropData) newComponent.setPosition(e.offsetX - newComponent.attr.w / 2, e.offsetY - newComponent.attr.h / 2) chartEditStore.addComponentList(newComponent) - + chartEditStore.setTargetSelectChart(newComponent.id) loadingFinish() } catch (error) { loadingError()