监控$route无效

必须是在当前页面的路由有子路由时,才能监控到,不然无效

 beforeRouteUpdate (to, from, next) {
      console.log(to)
      console.log(from)
      next()
    }



    watch: {
      $route (to, from) {
        console.log(to)
        console.log(from)
      }
    }
原文地址:https://www.cnblogs.com/zhaobao1830/p/13540988.html