首先,我們將mode設(shè)置為history,但不配置后端。然后,假如我們的路由是長這個樣子的: 1 2 3 4 const routes = [ {path:'/home', component: Home}, {path:'/', redirect:'/home'} ]; 我們用nginx部署項目,然后在地址欄輸入http://localhost:8080(這里配置的端口是8080),你會發(fā)現(xiàn)地址欄之后會變?yōu)閔ttp:/...
www.dbjr.com.cn/article/1622...htm 2025-5-31