mirror of
https://github.com/soybeanjs/soybean-admin.git
synced 2025-12-26 15:00:16 +08:00
refactor(projects): 单独路由逻辑重构、路由转换函数优化
This commit is contained in:
@@ -1,10 +0,0 @@
|
||||
import type { RouteRecordRaw } from 'vue-router';
|
||||
import { transformAuthRouteToVueRoute } from '@/utils';
|
||||
|
||||
export function userRoutesMiddleware(data: ApiRoute.Route | null) {
|
||||
if (!data) return [];
|
||||
|
||||
const routes: RouteRecordRaw[] = data.routes.map(item => transformAuthRouteToVueRoute(item));
|
||||
|
||||
return routes;
|
||||
}
|
||||
@@ -1 +1 @@
|
||||
export * from './auth';
|
||||
export {};
|
||||
|
||||
Reference in New Issue
Block a user