Monitor changes in the routing vue page

beforeRouteEnter (to, from, Next) {
       // corresponding to rendering the assembly in a route is called before Confirm 
      // No! can! Examples this` acquisition component ` 
      @ because when the hook before the execution component instance has not been created 
    }, 
    beforeRouteUpdate (to, from, Next) { 
      // a route change in the current, but when the component is called multiplexed 
      // way of example said dynamic parameter with respect to the path of a / foo /: id, the time between jumps / foo / 1 and / foo / 2, and 
      // since foo renders the same components, and therefore may be multiplexed component instance . And this hook will be called in this case. 
      // access component instance this` ` 
    }, 
    beforeRouteLeave (to, from, Next) { 
      // called when the navigation route of the assembly away from the corresponding 
      // access component instance this`` 
    },

 

Guess you like

Origin www.cnblogs.com/LChenglong/p/11202532.html