When the vue project is running, why does the address bar always have /-sharp?

1. Why do you open the home page and automatically add /-sharp to the address?
2. Is there any way not to show it? (for example, xxx.com/index)

May.02,2022

1. Using hash routing will bring -sharp
2. You can use history routing to solve this problem, but you need to support


on the server.

find the file initializing vue-router, and add mode: 'history',
as shown in the following figure

clipboard.png

Menu