feat: url模式修改

This commit is contained in:
midfar 2023-03-03 18:18:13 +08:00
parent 05a17e05e2
commit 0585c81d3f

View File

@ -1,4 +1,4 @@
import { createRouter, createWebHashHistory } from 'vue-router'; import { createRouter, createWebHistory } from 'vue-router'; // createWebHashHistory, createWebHistory
/* Layout */ /* Layout */
const Layout = () => import('@/layout'); const Layout = () => import('@/layout');
@ -388,7 +388,8 @@ export const asyncRoutes = [
]; ];
const createTheRouter = () => createRouter({ const createTheRouter = () => createRouter({
history: createWebHashHistory(import.meta.env.BASE_URL), // history: createWebHashHistory(import.meta.env.BASE_URL),
history: createWebHistory(import.meta.env.BASE_URL),
scrollBehavior: () => ({ top: 0 }), scrollBehavior: () => ({ top: 0 }),
routes: constantRoutes routes: constantRoutes
}); });