fix: 文本组件自适应问题 #5471

This commit is contained in:
dataeaseShu
2023-06-19 10:48:51 +08:00
parent ac23ca3d66
commit e4af21dae6

View File

@@ -680,7 +680,7 @@ export default {
component.style[key] = this.format(component.style[key], this.scaleHeight)
}
if (this.needToChangeWidth.includes(key)) {
if ((key === 'fontSize' || key === 'activeFontSize') && (this.terminal === 'mobile' || component.type === 'custom')) {
if ((key === 'fontSize' || key === 'activeFontSize') && (this.terminal === 'mobile' || ['custom', 'v-text'].includes(component.type))) {
// do nothing 移动端字符大小无需按照比例缩放,当前保持不变(包括 v-text 和 过滤组件)
} else {
component.style[key] = this.format(component.style[key], this.scaleWidth)