`<div :style="styleObject"></div>`
data() { return { styleObject: {} }, methods: { test() { this.styleObject = { border: this.borderWidth + ' solid' } }
当我的borderWidth更新后,更触发test()后,div中的border并不会变化,这是为什么呢?
test () { this.$set(this.styleobject, 'border', this.borderWidth + ' solid') }
1.4m articles
1.4m replys
5 comments
57.0k users