2022年3月12日
Vue生命周期篇-watch(学习笔记)
监视属性watch:
1.当被监视的属性变化时, 回调函数自动调用, 进行相关操作
2.监视的属性必须存在,才能进行监视!!
3.监视的两种写法:
(1).new Vue时传入watch配置
(2).通过vm.$watch监视
watch:{
//正常写法
/* isHot:{
// immediate:true, //初始化时让handler调用一下
// deep:true,//深度监视
handler(newValue,oldValue){
console.log('isHot被修改了',newValue,oldValue)
}
}, */
//简写
/* isHot(newValue,oldValue){
console.log('isHot被修改了',newValue,oldValue,this)
} */
}
//正常写法
/* vm.$watch('isHot',{
immediate:true, //初始化时让handler调用一下
deep:true,//深度监视
handler(newValue,oldValue){
console.log('isHot被修改了',newValue,oldValue)
}
}) */
//简写
/* vm.$watch('isHot',(newValue,oldValue)=>{
console.log('isHot被修改了',newValue,oldValue,this)
}) */
We were extremely lucky to have almost 2 amazing years with the most beautiful, gentle and affectionate little girl in the world do i need a doctor prescription to buy priligy As a CaCC, TMEM16A is activated by intracellular Ca 2, and the current is characterized by voltage dependent activation, strong outward rectification, and a deactivating tail current on depolarization at low intracellular Ca 2 concentrations, and voltage independent activation and linear current voltage relationship at high Ca 2 i 12