修改为hash模式

This commit is contained in:
MerCry 2026-02-10 02:33:25 +08:00
parent 5f66bf5627
commit 85efb6f0e3
1 changed files with 1 additions and 2 deletions

View File

@ -177,8 +177,7 @@ Router.prototype.replace = function push(location) {
} }
export default new Router({ export default new Router({
mode: 'history', // 去掉url中的# mode: 'hash', // 使用 hash 模式URL 会有 #
base: process.env.NODE_ENV === 'production' ? '/' : '/',
scrollBehavior: () => ({ y: 0 }), scrollBehavior: () => ({ y: 0 }),
routes: constantRoutes routes: constantRoutes
}) })