After the new path of vue router next, the question is returned.

it was originally / home, after I intercepted next ({path:"/ home", query: {code: "0001"}})
and then click the browser to return home

again.
Mar.10,2021

official document routing guard

  • next: Function: must call this method to resolve the hook. The execution effect depends on the calling parameters of the next method.

    • next (): proceeds to the next hook in the pipe. If all the hooks have been executed, the navigation status is confirmed (confirmed).
    • next (false): interrupts the current navigation. If the URL of the browser changes (either manually by the user or by the browser back button), the URL address is reset to the address corresponding to the from route.
    • next ('/') or next ({path:'/'}): jump to a different address. The current navigation is interrupted, and then a new navigation is carried out. You can pass objects anywhere to next, and allow you to set options such as replace: true, name: 'home', and any options used in router-link 's to prop or router.push.
    • next (error): (2.4.0+) if the parameter passed in next is an Error instance, the navigation is terminated and the error is passed to the callback registered by router.onError ().

interrupts the current navigation of next ({obj}) is , and then makes a new navigation. so an entry is added to the history record. Either next () confirms the current navigation, or next ({path:'/ home', query: {code: '0001'}, replace:true}) means to replace the history record instead of the new push record.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3d3ae-2c38d.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3d3ae-2c38d.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?