Commit 9c6b5eb6 by 芋道源码 Committed by Gitee

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

Merge pull request !544 from 半栈幼儿员/hotfix/router
parents 3c346024 25dff95f
...@@ -5,7 +5,7 @@ import remainingRouter from './modules/remaining' ...@@ -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 })
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment