mirror of
https://github.com/soybeanjs/soybean-admin.git
synced 2025-12-26 06:40:17 +08:00
refactor(projects): 优化路由声明,添加路由模块导入,规范路相关文件夹
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
import { createRouter, createWebHistory, createWebHashHistory } from 'vue-router';
|
||||
import type { App } from 'vue';
|
||||
import { getCacheRoutes, transformRouteToMenu } from '@/utils';
|
||||
import { routes, customRoutes } from '../routes';
|
||||
import { createRouterGuide } from '../guide';
|
||||
import { routes } from '../routes';
|
||||
import { createRouterGuide } from '../guard';
|
||||
|
||||
/** 用于部署vercel托管服务 */
|
||||
const isStaging = import.meta.env.VITE_HTTP_ENV === 'STAGING';
|
||||
@@ -18,8 +17,5 @@ export async function setupRouter(app: App) {
|
||||
await router.isReady();
|
||||
}
|
||||
|
||||
/** 缓存的路由对应vue页面的名称 */
|
||||
export const cacheRoutes = getCacheRoutes(routes);
|
||||
|
||||
/** 菜单 */
|
||||
export const menus = transformRouteToMenu(customRoutes);
|
||||
export { default as cacheRoutes } from './cache';
|
||||
export { default as menus } from './menus';
|
||||
|
||||
Reference in New Issue
Block a user