Vue3报错Uncaught Error:Catch all routes (“*“) must now be defined using a param with a custom regexp.


In the process of writing a Vue3 project, when the page exists, it jumps to the corresponding page; when the page does not exist, it jumps to the 404 page. However, when an incorrect route name is entered in the path, the console will output an error message. The error content is as follows:

Insert image description here

Insert image description here
In Vue3 projects, it cannot be written like in Vue2 and requires regular verification.
Insert image description here
Now, when you visit the page that does not exist, you can see that the 404 page is displayed.
Insert image description here

Guess you like

Origin blog.csdn.net/m0_52043522/article/details/130390254