From bb9066da9907b847f98bfaec271fab9c8a9a7a51 Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Mon, 14 Oct 2024 14:08:01 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix(=E6=95=B0=E6=8D=AE=E5=A4=A7=E5=B1=8F?= =?UTF-8?q?=E3=80=81=E4=BB=AA=E8=A1=A8=E6=9D=BF):=20=E4=BF=AE=E5=A4=8DTab?= =?UTF-8?q?=E5=86=85=E7=BB=84=E4=BB=B6=E5=B0=8F=E5=B0=BA=E5=AF=B8=E7=A7=BB?= =?UTF-8?q?=E5=8A=A8=E5=8F=AF=E8=83=BD=E6=9C=AA=E4=BF=9D=E5=AD=98=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/components/data-visualization/canvas/Shape.vue | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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 cce3dbea96..4165129d83 100644 --- a/core/core-frontend/src/components/data-visualization/canvas/Shape.vue +++ b/core/core-frontend/src/components/data-visualization/canvas/Shape.vue @@ -865,7 +865,13 @@ const componentBackgroundStyle = computed(() => { innerPadding, borderRadius } = element.value.commonBackground - const style = { padding: innerPadding * scale.value + 'px', borderRadius: borderRadius + 'px' } + const innerPaddingTarget = ['Group', 'DeTabs'].includes(element.value.component) + ? 0 + : innerPadding + const style = { + padding: innerPaddingTarget * scale.value + 'px', + borderRadius: borderRadius + 'px' + } let colorRGBA = '' if (backgroundColorSelect && backgroundColor) { colorRGBA = backgroundColor From 300e62192126a4ce32f487cbab65d26e073a2cb2 Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Mon, 14 Oct 2024 14:14:44 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix(=E6=95=B0=E6=8D=AE=E5=A4=A7=E5=B1=8F?= =?UTF-8?q?=E3=80=81=E4=BB=AA=E8=A1=A8=E6=9D=BF):=20=E4=BF=AE=E5=A4=8Dtab,?= =?UTF-8?q?=E5=88=86=E7=BB=84=E5=86=85=E9=83=A8=E7=BB=84=E4=BB=B6=E5=BF=AB?= =?UTF-8?q?=E6=8D=B7=E9=94=AE=E7=A7=BB=E5=8A=A8=E6=9C=AA=E4=BF=9D=E5=AD=98?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/core-frontend/src/utils/DeShortcutKey.ts | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/core/core-frontend/src/utils/DeShortcutKey.ts b/core/core-frontend/src/utils/DeShortcutKey.ts index dc6a7758bb..b15c514134 100644 --- a/core/core-frontend/src/utils/DeShortcutKey.ts +++ b/core/core-frontend/src/utils/DeShortcutKey.ts @@ -6,6 +6,8 @@ import { composeStoreWithOut } from '@/store/modules/data-visualization/compose' import { lockStoreWithOut } from '@/store/modules/data-visualization/lock' import { storeToRefs } from 'pinia' import { getCurInfo } from '@/store/modules/data-visualization/common' +import { isGroupCanvas, isTabCanvas } from '@/utils/canvasUtils' +import { groupStyleRevert } from '@/utils/style' const dvMainStore = dvMainStoreWithOut() const composeStore = composeStoreWithOut() @@ -191,10 +193,14 @@ function move(keyCode) { } function groupAreaAdaptor(leftOffset = 0, topOffset = 0) { - if (curComponent.value.component === 'GroupArea') { - composeStore.areaData.components.forEach(component => { - component.style.top = component.style.top + topOffset - component.style.left = component.style.left + leftOffset + const canvasId = curComponent.value.canvasId + const parentNode = document.querySelector('#editor-' + canvasId) + + //如果当前画布是Group内部画布 则对应组件定位在resize时要还原到groupStyle中 + if (isGroupCanvas(canvasId) || isTabCanvas(canvasId)) { + groupStyleRevert(curComponent.value, { + width: parentNode.offsetWidth, + height: parentNode.offsetHeight }) } }