From 6503617c226dc3d69ebf6291da34e0fd89286f19 Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Tue, 4 Jun 2024 18:14:06 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=95=B0=E6=8D=AE=E5=A4=A7=E5=B1=8F):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=83=A8=E5=88=86=E5=A4=9A=E9=80=89=E6=97=A0?= =?UTF-8?q?=E6=B3=95=E9=80=89=E4=B8=AD=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/data-visualization/canvas/CanvasCore.vue | 5 +++++ .../src/components/data-visualization/canvas/ComposeShow.vue | 2 +- .../src/components/data-visualization/canvas/Shape.vue | 1 - 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/core/core-frontend/src/components/data-visualization/canvas/CanvasCore.vue b/core/core-frontend/src/components/data-visualization/canvas/CanvasCore.vue index 7d48537771..800f5a30c1 100644 --- a/core/core-frontend/src/components/data-visualization/canvas/CanvasCore.vue +++ b/core/core-frontend/src/components/data-visualization/canvas/CanvasCore.vue @@ -1380,6 +1380,11 @@ const groupAreaClickChange = async () => { groupAreaCom.style.top = areaData.value.style.top groupAreaCom.style.width = areaData.value.style.width groupAreaCom.style.height = areaData.value.style.height + dvMainStore.setClickComponentStatus(true) + dvMainStore.setCurComponent({ + component: groupAreaCom, + index: dvMainStore.componentData.length - 1 + }) } else if (groupAreaCom) { groupAreaHis.forEach(ele => { dvMainStore.deleteComponentById(ele.id) diff --git a/core/core-frontend/src/components/data-visualization/canvas/ComposeShow.vue b/core/core-frontend/src/components/data-visualization/canvas/ComposeShow.vue index 2004f9f1e1..0b1041a12e 100644 --- a/core/core-frontend/src/components/data-visualization/canvas/ComposeShow.vue +++ b/core/core-frontend/src/components/data-visualization/canvas/ComposeShow.vue @@ -37,7 +37,7 @@ const handleMouseDown = e => { return } const index = areaData.value.components.findIndex(component => component === props.element) - if (index != -1) { + if (index != -1 && props.element.component !== 'GroupArea') { areaData.value.components.splice(index, 1) e.stopPropagation() } diff --git a/core/core-frontend/src/components/data-visualization/canvas/Shape.vue b/core/core-frontend/src/components/data-visualization/canvas/Shape.vue index a8559c8291..b34d2bc013 100644 --- a/core/core-frontend/src/components/data-visualization/canvas/Shape.vue +++ b/core/core-frontend/src/components/data-visualization/canvas/Shape.vue @@ -424,7 +424,6 @@ const handleInnerMouseDownOnShape = e => { if (curComponent.value && curComponent.value.id !== element.value.id) { areaDataPush(curComponent.value) } - dvMainStore.setCurComponent({ component: null, index: null }) e.stopPropagation() return }