revert: hash模式

This commit is contained in:
midfar 2023-03-09 10:58:00 +08:00
parent 8bb882287f
commit 23e2000e3a

View File

@ -1,4 +1,4 @@
import { createRouter, createWebHistory } from 'vue-router'; // createWebHashHistory, createWebHistory import { createRouter, createWebHashHistory } from 'vue-router'; // createWebHashHistory, createWebHistory
/* Layout */ /* Layout */
const Layout = () => import('@/layout'); const Layout = () => import('@/layout');
@ -388,10 +388,10 @@ export const asyncRoutes = [
]; ];
const createTheRouter = () => createRouter({ const createTheRouter = () => createRouter({
// history: createWebHashHistory(import.meta.env.BASE_URL), history: createWebHashHistory(import.meta.env.BASE_URL),
// 注意,如果要配置 HTML5 模式则需要修改nginx配置参考资料 // 注意,如果要配置 HTML5 模式则需要修改nginx配置参考资料
// https://router.vuejs.org/zh/guide/essentials/history-mode.html // https://router.vuejs.org/zh/guide/essentials/history-mode.html
history: createWebHistory(import.meta.env.BASE_URL), // history: createWebHistory(import.meta.env.BASE_URL),
scrollBehavior: () => ({ top: 0 }), scrollBehavior: () => ({ top: 0 }),
routes: constantRoutes routes: constantRoutes
}); });