作者:小虎 | 来源:互联网 | 2023-10-10 14:12
12345678910111213141516new Vue({ el:'html', data(){ return{ ... needreceipt:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
| new Vue({
el:'html',
data(){
return{
...
needreceipt:true,
...
}
},
watch:{
'needreceipt':function (val) {
console.log(val);
}
},
...
}) |
label中的内容正确变化,为什么watch里的function不会执行