随手记:没空记详细
newVal,oldVal 可以查看到最新路由和上一条路由详细
watch: {
$route: {
handler(newVal,oldVal) {
console.log(newVal, oldVal)
if(oldVal.path == '/organization/serviceManagement/list') {
if(this.cacheId != newVal.query.id) {
this.cacheId = newVal.query.id;
this.queryParams.id = newVal.query.id;
this.getList();
}
}
}
},
deep: true,
},