Skip to content

Commit f33c050

Browse files
committed
修改为hash路由
1 parent fe4d2c1 commit f33c050

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/router/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Router, createRouter, createWebHistory } from 'vue-router'
1+
import { Router, createRouter, createWebHashHistory } from 'vue-router'
22

33
/** 自动导入 src/router/modules 下的静态路由
44
* import.meta.glob使用说明:https://cn.vitejs.dev/guide/features#glob-import
@@ -27,7 +27,7 @@ Object.keys(modules).forEach((key) => {
2727
* hash模式使用createWebHashHistory(): https://router.vuejs.org/zh/api/#Functions-createWebHashHistory
2828
*/
2929
export const router: Router = createRouter({
30-
history: createWebHistory(),
30+
history: createWebHashHistory(),
3131
routes,
3232
strict: true,
3333
scrollBehavior(_to, from, savedPosition) {

0 commit comments

Comments
 (0)