Closed luna825 closed 4 years ago
// umi运行时配置,routes前加路由后 export function patchRoutes({ routes }) { routes.unshift({ path: '/foo', exact: true, component: require('@/extraRoutes/foo').default, }); } // layout/index.tsx 中如下代码不能正确得到menu信息了 const menus = patchMenus(getMenuDataFromRoutes(_routes[0].routes)); // _routes[0] 已经变为新加的 /foo了
ant-design-pro-layout中有大量的api可以避免这个问题。。。尴尬!!