!544 【修复】修复路由二级路径VITE_BASE_PATH支持

Merge pull request !544 from 半栈幼儿员/hotfix/router
pull/543/MERGE
芋道源码 2024-09-08 10:43:41 +00:00 committed by Gitee
commit 9c6b5eb600
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 1 additions and 1 deletions

View File

@ -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 })