Vue detects routing changes and does not respond.

    watch:{
      "$route" (to, from) {
        console.log(to)
      },
      "page1.madName"(val){
          console.log(val)
      }
    },

listen for route jump in the component, the jump is normal, but no change is detected

Mar.26,2021

listen $route.path try; or use deep listening


1. Check that the code is correct. The watch statement is not repeatedly defined, resulting in the block of the statement.
2. Check whether the routing path of the page has been redirected, instead of just changing the parameter


you should use ide/advanced/navigation-guards.html-sharp%E7%BB%84%E4%BB%B6%E5%86%85%E7%9A%84%E5%AE%88%E5%8D%AB" rel=" nofollow noreferrer "> route guard to monitor the route

Menu