refactor: 优化字体大小限制,防止过滤组件标题被隐藏

This commit is contained in:
wangjiahao 2022-09-28 15:18:43 +08:00
parent 7a58d274a7
commit bd38da01db

View File

@ -35,6 +35,9 @@ export function getStyle(style, filter = []) {
if (key === 'backgroundColor') {
result[key] = colorRgb(style[key], style.opacity)
}
if(key=== 'fontSize' && result[key] < 12){
result[key] = 12
}
if (needUnit.includes(key)) {
result[key] += 'px'
}