data: {
percentge: ''
},
watch:{
percentage: function (curVal, oldVal) {
this.changePercent(curVal)
}
},
methods: {
changePercent: function (curVal) {
this.$nextTick(() => {
this.percentage = curVal
}
},
如图,我监听一个百分比,然后我再dom中有这样一个按钮,如果百分比是10,按钮就会显示,但是虽然百分比为10,按钮的属性仍然没有生效,感觉dom的percentage并没有更新啊
disabled是布尔值吧,你这个写的是字符串“true”、“false”