// 完整写法
watch:{
isHot:{
immediate:false, // 默认是否执行监视
deep:true, // a:{b:c:{}} 如果是多层的那么需要开启deep
handler(newVal,oldVal){
console.log(newVal,oldVal);
}
}
}
// 简写 单层就可以用简写如下
watch:{
isHot(newVal,oldVal){
console.log(newVal,oldVal);
}
}