mirror of
https://github.com/m-xlsea/ruoyi-plus-soybean.git
synced 2025-09-24 07:49:47 +08:00
feat(projects): 迁移多页签
This commit is contained in:
@ -75,19 +75,19 @@ const routes: AuthRoute.Route[] = [
|
||||
}
|
||||
];
|
||||
|
||||
const routeHome: AuthRoute.RoutePath = '/dashboard/analysis';
|
||||
function dataMiddleware(data: AuthRoute.Route[]): ApiRoute.Route {
|
||||
const routeHomeName: AuthRoute.RouteKey = 'dashboard_analysis';
|
||||
|
||||
function sortRoutes() {
|
||||
routes.sort((next, pre) => Number(next.meta?.order) - Number(pre.meta?.order));
|
||||
function sortRoutes(sorts: AuthRoute.Route[]) {
|
||||
return sorts.sort((next, pre) => Number(next.meta?.order) - Number(pre.meta?.order));
|
||||
}
|
||||
|
||||
return {
|
||||
routes: sortRoutes(data),
|
||||
home: routeHomeName
|
||||
};
|
||||
}
|
||||
|
||||
sortRoutes();
|
||||
|
||||
const data: ApiRoute.Route = {
|
||||
routes,
|
||||
home: routeHome
|
||||
};
|
||||
|
||||
const apis: MockMethod[] = [
|
||||
{
|
||||
url: '/mock/getUserRoutes',
|
||||
@ -96,7 +96,7 @@ const apis: MockMethod[] = [
|
||||
return {
|
||||
code: 200,
|
||||
message: 'ok',
|
||||
data
|
||||
data: dataMiddleware(routes)
|
||||
};
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user