fix: 将导出列表分成三个模块
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 4m40s
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 4m40s
This commit is contained in:
@@ -331,8 +331,7 @@ function buildRouteMap(routes: AppRouteRecord[], parentPath = ''): Map<string, A
|
||||
*/
|
||||
function convertBackendMenuToRoute(
|
||||
menu: any,
|
||||
routeMap: Map<string, AppRouteRecord>,
|
||||
parentPath = ''
|
||||
routeMap: Map<string, AppRouteRecord>
|
||||
): AppRouteRecord | null {
|
||||
const menuUrl = menu.url || '/'
|
||||
const matchedRoute = routeMap.get(menuUrl)
|
||||
@@ -343,7 +342,7 @@ function convertBackendMenuToRoute(
|
||||
// 如果当前菜单没有匹配的路由,但有 children,尝试递归处理 children
|
||||
if (menu.children && menu.children.length > 0) {
|
||||
const children = menu.children
|
||||
.map((child: any) => convertBackendMenuToRoute(child, routeMap, menuUrl))
|
||||
.map((child: any) => convertBackendMenuToRoute(child, routeMap))
|
||||
.filter((child: AppRouteRecord | null) => child !== null)
|
||||
|
||||
// 如果子菜单有有效的路由,返回一个包含子菜单的占位路由
|
||||
@@ -387,7 +386,7 @@ function convertBackendMenuToRoute(
|
||||
// 递归处理后端返回的 children
|
||||
if (menu.children && menu.children.length > 0) {
|
||||
const children = menu.children
|
||||
.map((child: any) => convertBackendMenuToRoute(child, routeMap, menuUrl))
|
||||
.map((child: any) => convertBackendMenuToRoute(child, routeMap))
|
||||
.filter((child: AppRouteRecord | null) => child !== null)
|
||||
|
||||
if (children.length > 0) {
|
||||
|
||||
Reference in New Issue
Block a user