This commit is contained in:
yangmf_0726 committed 2025-09-26 15:01:31 +08:00
1 parent b5ef61a601
commit 82b68c3a79
1 file changed
+2 -2
+2 -2
View File
@@ -1,11 +1,11 @@
import type { App } from 'vue'
import type { RouteRecordRaw } from 'vue-router'
import { createRouter, createWebHistory } from 'vue-router'
import { createRouter, createWebHashHistory } from 'vue-router'
import remainingRouter from './modules/remaining'
// 创建路由实例
const router = createRouter({
history: createWebHistory(import.meta.env.VITE_BASE_PATH), // createWebHashHistory URL带#,createWebHistory URL不带#
history: createWebHashHistory(import.meta.env.VITE_BASE_PATH), // 改为 Hash 模式
strict: true,
routes: remainingRouter as RouteRecordRaw[],
scrollBehavior: () => ({ left: 0, top: 0 })