Przeglądaj źródła

🐞 fix:修复路由二级路径

preschooler 9 miesięcy temu
rodzic
commit
25dff95fed
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      src/router/index.ts

+ 1 - 1
src/router/index.ts

@@ -5,7 +5,7 @@ import remainingRouter from './modules/remaining'
 
 // 创建路由实例
 const router = createRouter({
-  history: createWebHistory(), // createWebHashHistory URL带#,createWebHistory URL不带#
+  history: createWebHistory(import.meta.env.VITE_BASE_PATH), // createWebHashHistory URL带#,createWebHistory URL不带#
   strict: true,
   routes: remainingRouter as RouteRecordRaw[],
   scrollBehavior: () => ({ left: 0, top: 0 })