build: Add vite-plugin-html plugin

This commit is contained in:
kailong321200875
2022-02-19 15:57:41 +08:00
parent 7411dbc9fd
commit d5b6e2a777
13 changed files with 315 additions and 19 deletions

View File

@@ -60,18 +60,17 @@ export const usePermissionStore = defineStore({
const routerMap: AppRouteRecordRaw[] = cloneDeep(asyncRouterMap)
// 动态路由404一定要放到最后面
this.addRouters = routerMap
// .concat([
// {
// path: '/:path(.*)*',
// redirect: '/404',
// name: '404',
// meta: {
// hidden: true,
// breadcrumb: false
// }
// }
// ])
this.addRouters = routerMap.concat([
{
path: '/:path(.*)*',
redirect: '/404',
name: '404Page',
meta: {
hidden: true,
breadcrumb: false
}
}
])
// 渲染菜单的所有路由
this.routers = cloneDeep(constantRouterMap).concat(routerMap)
resolve()