`<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') }
2.1m questions
2.1m answers
60 comments
57.0k users