解决vite设置了base,导致页面无法打开的bug,子理由被重定向

pull/320/head^2
pingtianxia 2023-11-12 21:42:10 +08:00
parent eb9f8c9f6f
commit 1ad665ca9d
1 changed files with 1 additions and 1 deletions

View File

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