From 34fc670bbbdb3ed30f151a8be302202a1946c8b6 Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Tue, 6 May 2025 11:39:40 +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=E8=B0=83=E6=95=B4=E8=A7=86=E7=AA=97=E5=A4=A7?= =?UTF-8?q?=E5=B0=8F=E4=BC=9A=E5=AF=BC=E8=87=B4tab=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E5=86=85=E7=9A=84=E5=9B=BE=E8=A1=A8=E5=A4=A7=E5=B0=8F=E5=8F=91?= =?UTF-8?q?=E7=94=9F=E5=8F=98=E5=8C=96=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/utils/changeComponentsSizeWithScale.ts | 12 +++++++++++- core/core-frontend/src/utils/style.ts | 2 +- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/core/core-frontend/src/utils/changeComponentsSizeWithScale.ts b/core/core-frontend/src/utils/changeComponentsSizeWithScale.ts index 6e7272ac96..99e3b147bd 100644 --- a/core/core-frontend/src/utils/changeComponentsSizeWithScale.ts +++ b/core/core-frontend/src/utils/changeComponentsSizeWithScale.ts @@ -2,7 +2,7 @@ import { deepCopy } from './utils' import { divide, multiply } from 'mathjs' import { dvMainStoreWithOut } from '@/store/modules/data-visualization/dvMain' import { storeToRefs } from 'pinia' -import { groupSizeStyleAdaptor } from '@/utils/style' +import { groupItemStyleAdaptor, groupSizeStyleAdaptor } from '@/utils/style' import { nextTick } from 'vue' const dvMainStore = dvMainStoreWithOut() @@ -54,6 +54,16 @@ function changeComponentsSizeWithScaleCircle(componentDataCopy, scale) { if (['Group'].includes(component.component)) { groupSizeStyleAdaptor(component) + const parentStyle = component.style + component.propValue.forEach(componentInner => { + if (['DeTabs'].includes(componentInner.component)) { + componentInner.propValue.forEach(tabItem => { + changeComponentsSizeWithScaleCircle(tabItem.componentData, scale) + }) + } else { + groupItemStyleAdaptor(componentInner, parentStyle) + } + }) } else if (['DeTabs'].includes(component.component)) { component.propValue.forEach(tabItem => { changeComponentsSizeWithScaleCircle(tabItem.componentData, scale) diff --git a/core/core-frontend/src/utils/style.ts b/core/core-frontend/src/utils/style.ts index c20465a9f1..f41a61c444 100644 --- a/core/core-frontend/src/utils/style.ts +++ b/core/core-frontend/src/utils/style.ts @@ -274,7 +274,7 @@ function dataVTabSizeStyleAdaptor(tabComponent) { }) } -function groupItemStyleAdaptor(component, parentStyle) { +export function groupItemStyleAdaptor(component, parentStyle) { // 分组还原逻辑 // 当发上分组缩放是,要将内部组件按照比例转换 const styleScale = component.groupStyle