Răsfoiți Sursa

修改路由模式

st 2 luni în urmă
părinte
comite
83b8b5ed31
1 a modificat fișierele cu 2 adăugiri și 2 ștergeri
  1. 2 2
      src/router/index.ts

+ 2 - 2
src/router/index.ts

@@ -1,10 +1,10 @@
-import { createRouter, createWebHistory } from 'vue-router'
+import { createRouter, createWebHashHistory } from 'vue-router'
 import { useRouteStore } from '@/stores'
 import { constantRoutes, systemRoutes } from '@/router/route'
 import { setupRouterGuard } from '@/router/guard'
 
 const router = createRouter({
-  history: createWebHistory(import.meta.env.BASE_URL),
+  history: createWebHashHistory(import.meta.env.BASE_URL),
   routes: [...constantRoutes, ...systemRoutes],
   scrollBehavior: () => ({ left: 0, top: 0 }),
 })