Selaa lähdekoodia

路由模式修改为hash模式

tongshangming 1 vuosi sitten
vanhempi
commit
47b0fb1084
1 muutettua tiedostoa jossa 3 lisäystä ja 3 poistoa
  1. 3 3
      src/router/index.ts

+ 3 - 3
src/router/index.ts

@@ -1,11 +1,11 @@
-import { createRouter, createWebHistory } from 'vue-router'
+import { createRouter, createWebHashHistory } from 'vue-router'
 import constantRouter from './constantRouter'
 import createRouterGuard from './guard'
 export { default as asyncRouter } from './asyncRouter'
 
 const router = createRouter({
-  history: createWebHistory(import.meta.env.BASE_URL),
-  routes: [...constantRouter]
+  history: createWebHashHistory(import.meta.env.BASE_URL),
+  routes: [...constantRouter],
 })
 
 createRouterGuard(router)