From 82b68c3a79a92a6c3e52a80b7ed23dcab57ee589 Mon Sep 17 00:00:00 2001 From: yangmf_0726 <13243152557@163.com> Date: Fri, 26 Sep 2025 15:01:31 +0800 Subject: [PATCH] 11 --- src/router/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/router/index.ts b/src/router/index.ts index b818421c..c4ff3998 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -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 })