I won't say much nonsense, let's just read the code~
<van-field label="Select a Department" :value="" readonly right-icon="arrow" @click="$({ name: 'tree' })" />
Just jump back with replace on the next page
Supplementary knowledge:After the vue-router mode is packaged and published, the route cannot be routed through the address in the address bar after the vue-router mode is packaged and published.
After the project is packaged and published, you cannot route and jump through the address in the address bar. If you enter the address bar, you can access it directly 404.
This project is published using nginx, so there is only the configuration method of nginx here.
Modify nginx configuration file
server { listen 8080; server_name localhost; #charset koi8-r; #access_log logs/ main; location / { try_files $uri $uri/ /;#must have root /home/dist/;#The packaged project path, folder index ; } }
The above operation of routing jump in vue that does not include history is all the content shared by the editor. I hope it can give you a reference and I hope you can support me more.