style(uv-count-to): 优化文本样式处理逻辑
将手动拼接样式改为使用$util.objToStyle统一处理,提升代码可读性和规范性
This commit is contained in:
@@ -75,11 +75,11 @@ export default {
|
||||
return this.startVal > this.endVal
|
||||
},
|
||||
textStyle() {
|
||||
return {
|
||||
return this.$util.objToStyle({
|
||||
fontSize: this.fontSize + 'px',
|
||||
fontWeight: this.bold ? 'bold' : 'normal',
|
||||
color: this.color
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
||||
Reference in New Issue
Block a user