watch不仅仅可以监听动态变化的值,也可以监听初始值。
watch: {
textdesc: {
immediate:true,
handler(newValue) {
this.textDesc = newValue;
console.log(newValue, '监听')
}
},
},
watch不仅仅可以监听动态变化的值,也可以监听初始值。
watch: {
textdesc: {
immediate:true,
handler(newValue) {
this.textDesc = newValue;
console.log(newValue, '监听')
}
},
},