fix: 文件组件大小设置在移动端无效问题

This commit is contained in:
wangjiahao 2022-01-25 10:48:53 +08:00
parent 5da64a2c29
commit 5c511339c8
2 changed files with 6 additions and 6 deletions

View File

@ -150,11 +150,7 @@ export default {
height: '100%' height: '100%'
} }
} else { } else {
if (this.terminal === 'pc') { return getStyle(style, ['top', 'left', 'width', 'height', 'rotate'])
return getStyle(style, ['top', 'left', 'width', 'height', 'rotate'])
} else {
return getStyle(style, ['top', 'left', 'width', 'height', 'rotate', 'fontSize'])
}
} }
}, },

View File

@ -297,7 +297,11 @@ export default {
component.style[key] = this.format(component.style[key], this.scaleHeight) component.style[key] = this.format(component.style[key], this.scaleHeight)
} }
if (this.needToChangeWidth.includes(key)) { 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)
}
} }
}) })
}) })