vue 监听路由的变化

watch: {
    $route: 'routeHandle'
},
methods:{
    routeHandle(route){
      //handle some code
    }
}
原文地址:https://www.cnblogs.com/fyjz/p/14481851.html