#
luxiaotao1123
2024-02-29 2a7553ab6aa15c1b17cdd8d4b75c2ce99d65dda3
zy-asrs-flow/src/services/route.js
@@ -62,9 +62,15 @@
            break;
        }
    }
    const rootMenu = { routes: [] }
    addHomeMenu(remoteMenu);
    addUserSettingMenu(remoteMenu);
    patchRouteItems(proLayout, remoteMenu);
    patchRouteItems(rootMenu, remoteMenu);
    console.log(rootMenu);
    proLayout.children = proLayout.children.concat(rootMenu.routes);
    proLayout.routes = proLayout.routes.concat(rootMenu.routes);
}
function patchRouteItems(parent, children) {
@@ -77,7 +83,6 @@
                path: menu.path,
                element: <Component />,
            }
            parent.children.push(newRoute);
            parent.routes.push(newRoute);
        } else {
            // parent