Vue2 route jumps, the page does not jump

Due to lack of solid learning, the problems I encountered here may be solved with routing guards, but I will not, only simple entry-level solutions

Original code:

 

 After modification:

 There are also changes in main.js, complete (no problem if you don’t make up)

Solution: Add a routing exit (this page is tiao to a new page, so it is more suitable to write it in the App, and write a life cycle hook in the App, which means that the home page will be displayed as soon as the page is loaded, and it will be displayed when clicking Jump to this exit page, showing the registration page)

Guess you like

Origin blog.csdn.net/Daisy_ls/article/details/125814769