The vue router route has jumped, but the page has not changed

above
app.js

router.js

index.vue

menu.vue

http://localhost:8080/-sharp/index

http://localhost:8080/-sharp/menu

Click the jump button, the route has jumped normally, but the page has not changed. Please give me some advice

The

error message is clear. Your component is named menu , which has the same name as the html tag < menu >. Vue does not allow this.
you can change the component name of the menu page to something else


since the page of "/" has no parent-child relationship with the component you need to jump to, you should refer to the component path of the jump from children to the outside, and place it separately. If you need to be a routing nesting relationship between parent and child components, Remember to add < router-view > < / router-view >


to the page of the parent component where appropriate. Use the absolute path to see


.

1. Solve the problem of reporting errors;
2. Take the route out of the children, as follows

clipboard.png

Menu