1、监视的对象
ss:{
ss1:"",
},
2、添加计算属性
computed: {
ss8(){
return JSON.parse(JSON.stringify(this.ss))
}
},
3、添加监视器
watch:{
ss8:{
handler:(newValue,oldValue)=>{
console.log("新值")
console.log(newValue.ss1)
console.log("旧值")
console.log(oldValue.ss1)
},
deep:true
}
},