From 4536aacab4fe66b88cf8b584a2fa47bd7debb3b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=98=89=E8=B1=AA?= <42510293+ziyujiahao@users.noreply.github.com> Date: Tue, 12 Aug 2025 14:21:41 +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=B7=91=E9=A9=AC=E7=81=AF=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E9=A2=84=E8=A7=88=E5=AD=97=E4=BD=93=E5=92=8C=E7=BC=96=E8=BE=91?= =?UTF-8?q?=E5=AD=97=E4=BD=93=E5=A4=A7=E5=B0=8F=E4=B8=8D=E4=B8=80=E8=87=B4?= =?UTF-8?q?=E9=97=AE=E9=A2=98#16323=20(#16678)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../utils/changeComponentsSizeWithScale.ts | 29 +++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/core/core-frontend/src/utils/changeComponentsSizeWithScale.ts b/core/core-frontend/src/utils/changeComponentsSizeWithScale.ts index be0632ce7c..47d384c385 100644 --- a/core/core-frontend/src/utils/changeComponentsSizeWithScale.ts +++ b/core/core-frontend/src/utils/changeComponentsSizeWithScale.ts @@ -61,6 +61,7 @@ function changeComponentsSizeWithScaleCircle(componentDataCopy, scale) { changeComponentsSizeWithScaleCircle(tabItem.componentData, scale) }) } else { + changeComponentsSizeWithScaleCircle(componentInner.propValue, scale) groupItemStyleAdaptor(componentInner, parentStyle) } }) @@ -117,7 +118,7 @@ export function changeRefComponentsSizeWithScale(componentDataRef, canvasStyleDa canvasStyleDataRef.scale = scale } -export function changeRefComponentsSizeWithScalePoint( +export function changeRefComponentsSizeWithScalePointCircle( componentDataRef, canvasStyleDataRef, scaleWidth, @@ -126,7 +127,6 @@ export function changeRefComponentsSizeWithScalePoint( ) { componentDataRef.forEach(component => { Object.keys(component.style).forEach(key => { - if (key === 'fontSize' && component.style[key] === '') return if (needToChangeDirectionAttrs.width.includes(key)) { // 根据原来的比例获取样式原来的尺寸 // 再用原来的尺寸 * 现在的比例得出新的尺寸 @@ -143,7 +143,32 @@ export function changeRefComponentsSizeWithScalePoint( ) } }) + if (component.component === 'Group') { + changeRefComponentsSizeWithScalePointCircle( + component.propValue, + canvasStyleDataRef, + scaleWidth, + scaleHeight, + outScale + ) + } }) +} + +export function changeRefComponentsSizeWithScalePoint( + componentDataRef, + canvasStyleDataRef, + scaleWidth, + scaleHeight, + outScale +) { + changeRefComponentsSizeWithScalePointCircle( + componentDataRef, + canvasStyleDataRef, + scaleWidth, + scaleHeight, + outScale + ) canvasStyleDataRef.scale = scaleWidth canvasStyleDataRef.scaleWidth = scaleWidth canvasStyleDataRef.scaleHeight = scaleHeight