Vue routing jumps to open a new page/window (you also need to pass parameters to the new page)

Vue is a single-page application (SPA). Sometimes the requirement may be to open a new page by clicking on our Vue project page, but the route may be a sub-route of the home page route, and jump through the normal this.$router.push Going does not open a new page, but opens the page at the same place as the specified sub-routes, such as the details button function in the page.

method:

 Or use other methods to jump and pass parameters, the idea is the same, such as this.$router.push(path:'path', query:"), or use the name of the route with params to jump, etc.

Guess you like

Origin blog.csdn.net/m0_61676604/article/details/130962703