watch: {
  $route(to,from) {
  }
}

 

在任意组件中监听路由,当路由发生变化时,可进行某些操作。

posted on 2020-10-27 14:06  occc  阅读(1086)  评论(0编辑  收藏  举报