refactor(components): basicLayout布局组件重构完成:根据NavMode拆分为多个布局组件

This commit is contained in:
Soybean
2021-11-20 20:14:02 +08:00
parent 0e0d559d2f
commit ffe987832f
110 changed files with 743 additions and 1713 deletions

View File

@@ -1,7 +1,8 @@
import { createRouter, createWebHistory, createWebHashHistory } from 'vue-router';
import type { App } from 'vue';
import { routes } from '../routes';
import createRouterGuide from '../permission';
import { getCacheRoutes, transformRouteToMenu } from '@/utils';
import { routes, customRoutes } from '../routes';
import { createRouterGuide } from '../guide';
/** 用于部署vercel托管服务 */
const isStaging = import.meta.env.VITE_HTTP_ENV === 'STAGING';
@@ -16,3 +17,9 @@ export async function setupRouter(app: App) {
createRouterGuide(router);
await router.isReady();
}
/** 缓存的路由对应vue页面的名称 */
export const cacheRoutes = getCacheRoutes(routes);
/** 菜单 */
export const menus = transformRouteToMenu(customRoutes);