From 5c511339c8f610f3c1af98d7ce8a8de674404dbd Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Tue, 25 Jan 2022 10:48:53 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=96=87=E4=BB=B6=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E5=A4=A7=E5=B0=8F=E8=AE=BE=E7=BD=AE=E5=9C=A8=E7=A7=BB=E5=8A=A8?= =?UTF-8?q?=E7=AB=AF=E6=97=A0=E6=95=88=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../canvas/components/Editor/ComponentWrapper.vue | 6 +----- .../src/components/canvas/components/Editor/Preview.vue | 6 +++++- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/frontend/src/components/canvas/components/Editor/ComponentWrapper.vue b/frontend/src/components/canvas/components/Editor/ComponentWrapper.vue index 86b7d657fe..bfb04d56e0 100644 --- a/frontend/src/components/canvas/components/Editor/ComponentWrapper.vue +++ b/frontend/src/components/canvas/components/Editor/ComponentWrapper.vue @@ -150,11 +150,7 @@ export default { height: '100%' } } else { - if (this.terminal === 'pc') { - return getStyle(style, ['top', 'left', 'width', 'height', 'rotate']) - } else { - return getStyle(style, ['top', 'left', 'width', 'height', 'rotate', 'fontSize']) - } + return getStyle(style, ['top', 'left', 'width', 'height', 'rotate']) } }, diff --git a/frontend/src/components/canvas/components/Editor/Preview.vue b/frontend/src/components/canvas/components/Editor/Preview.vue index 534a6fa3dc..ce4d28cf6c 100644 --- a/frontend/src/components/canvas/components/Editor/Preview.vue +++ b/frontend/src/components/canvas/components/Editor/Preview.vue @@ -297,7 +297,11 @@ export default { component.style[key] = this.format(component.style[key], this.scaleHeight) } if (this.needToChangeWidth.includes(key)) { - component.style[key] = this.format(component.style[key], this.scaleWidth) + if (component.type === 'v-text' && key === 'fontSize' && this.terminal === 'mobile') { + // do nothing 移动端字符大小无需按照比例缩放,当前保持不变 + } else { + component.style[key] = this.format(component.style[key], this.scaleWidth) + } } }) })