This commit is contained in:
gyq 2025-11-05 09:20:48 +08:00
commit 1a4a8515c3
1 changed files with 1 additions and 1 deletions

View File

@ -676,7 +676,7 @@ export const constantRoutes: RouteRecordRaw[] = [
*
*/
const router = createRouter({
history: createWebHistory(),
history: createWebHashHistory(), //使用哈希模式,避免前端路由和后端请求地址冲突问题,比如前端路由 /order/index 后端路由 /order* 会冲突导致刷新页面成了请求
routes: constantRoutes,
// 刷新时,滚动条位置还原
scrollBehavior: () => ({ left: 0, top: 0 }),