From 9c0fc7a5fe5ad9606dbd3f4fd096e8e955e3a562 Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Tue, 23 Jan 2024 13:33:04 +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=E7=BB=84=E5=90=88=E4=BB=A5=E5=90=8E=EF=BC=8C?= =?UTF-8?q?=E6=89=8B=E5=8A=A8=E7=BC=96=E8=BE=91=E7=BB=84=E5=90=88W/H?= =?UTF-8?q?=EF=BC=8C=E6=94=B9=E5=8F=98=E7=9A=84=E5=8F=AA=E6=9C=89=E7=BB=84?= =?UTF-8?q?=E5=90=88=E6=A1=86=EF=BC=8C=E7=BB=84=E5=90=88=E5=86=85=E7=9A=84?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E6=97=A0=E5=A4=A7=E5=B0=8F=E5=8F=98=E5=8C=96?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/visualization/common/ComponentPosition.vue | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/core/core-frontend/src/components/visualization/common/ComponentPosition.vue b/core/core-frontend/src/components/visualization/common/ComponentPosition.vue index 9422d12811..1216dc57ea 100644 --- a/core/core-frontend/src/components/visualization/common/ComponentPosition.vue +++ b/core/core-frontend/src/components/visualization/common/ComponentPosition.vue @@ -27,6 +27,7 @@ import { storeToRefs } from 'pinia' import { dvMainStoreWithOut } from '@/store/modules/data-visualization/dvMain' import _ from 'lodash' import { snapshotStoreWithOut } from '@/store/modules/data-visualization/snapshot' +import { groupSizeStyleAdaptor } from '@/utils/style' const snapshotStore = snapshotStoreWithOut() const dvMainStore = dvMainStoreWithOut() @@ -73,6 +74,13 @@ const onPositionChange = key => { curComponent.value.style[key] = Math.round( (positionMounted.value[key] * canvasStyleData.value.scale) / 100 ) + + if (curComponent.value.component === 'Group') { + //如果当前组件是Group分组 则要进行内部组件深度计算 + const parentNode = document.querySelector('#editor-canvas-main') + groupSizeStyleAdaptor(curComponent.value) + } + snapshotStore.recordSnapshotCache() }