标签:imm 方法 handler ons pre his iat 深度遍历 ret
watch:{
obj:{
handler(newV,oldV){
console.log('obj changed')
},
deep: true,//深度遍历
immediate: true//默认false,设置为true会立即执行
}
}
watch: {
"dataobj.name": {
handler(newV, oldV) {
console.log("obj changed");
}
}
}
computed(){
ar(){
return this.obj.name
}
},
watch:{
ar(newV,oldV){
console.log('changed')
}
}
标签:imm 方法 handler ons pre his iat 深度遍历 ret
原文地址:https://www.cnblogs.com/samsara-yx/p/12454054.html