revert: hash模式
This commit is contained in:
parent
8bb882287f
commit
23e2000e3a
|
@ -1,4 +1,4 @@
|
|||
import { createRouter, createWebHistory } from 'vue-router'; // createWebHashHistory, createWebHistory
|
||||
import { createRouter, createWebHashHistory } from 'vue-router'; // createWebHashHistory, createWebHistory
|
||||
|
||||
/* Layout */
|
||||
const Layout = () => import('@/layout');
|
||||
|
@ -388,10 +388,10 @@ export const asyncRoutes = [
|
|||
];
|
||||
|
||||
const createTheRouter = () => createRouter({
|
||||
// history: createWebHashHistory(import.meta.env.BASE_URL),
|
||||
history: createWebHashHistory(import.meta.env.BASE_URL),
|
||||
// 注意,如果要配置 HTML5 模式,则需要修改nginx配置,参考资料:
|
||||
// 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 }),
|
||||
routes: constantRoutes
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue
Block a user