How to eliminate the operation method of automatically adding # to the project address after using vue-cli to generate the project

1. I haven’t touched the project displayed on the vue page for a long time. I started it today and found that after entering the URL of the page to be accessed as before, the system will automatically add # to you, resulting in the page not being displayed correctly. Directly above the picture:

 

2. Based on this, the solution is to change the routing configuration to history mode in the index.js file of the project, directly above:

 

Guess you like

Origin blog.csdn.net/hacker_NO_007/article/details/108182861