Skip to content

Commit e37f2f6

Browse files
author
sunss
committed
perf: 路由模式由 hash调整为 history
1 parent a9d8353 commit e37f2f6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/router/index.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
import { createRouter, createWebHashHistory } from 'vue-router';
1+
import { createRouter, createWebHistory } from 'vue-router';
22
import routes from './router.config';
33

44
// app router
55
export const router = createRouter({
66
// 解决 二级路径存在时,路径地址路由不匹配的问题
77
// https://juejin.cn/post/7051826951463370760#heading-27
8-
history: createWebHashHistory(import.meta.env.BASE_URL),
8+
history: createWebHistory(import.meta.env.BASE_URL),
99
routes,
1010
strict: true,
1111
scrollBehavior: () => ({ left: 0, top: 0 }),

0 commit comments

Comments
 (0)