文章目录
handler、deep、immediate
watch: {
'userinfo.name' (newVal) {
console.log(newVal)
},
$route: {
handler(newVal) {
this.currentRouterName = newVal.name
},
deep: true,
immediate: true
}
},
handler、deep、immediate
watch: {
'userinfo.name' (newVal) {
console.log(newVal)
},
$route: {
handler(newVal) {
this.currentRouterName = newVal.name
},
deep: true,
immediate: true
}
},