随手记:没空记详细
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,
},













![[CISCN 2019初赛]Love Math 详细题解](https://i-blog.csdnimg.cn/direct/c7fcd6a31e024fbcadf7668ac40aebab.png)





