data: {
percentge: ""
},
watch:{
percentage: function (curVal, oldVal) {
this.changePercent(curVal)
}
},
methods: {
changePercent: function (curVal) {
this.$nextTick(() => {
this.percentage = curVal
}
},
as shown in the figure, I am listening for a percentage, and then I have such a button in dom. If the percentage is 10, the button will be displayed, but although the percentage is 10, the properties of the button still do not take effect. I feel that the percentage of dom has not been updated
.