|
|
@@ -13,7 +13,7 @@ const isDev = process.env.NODE_ENV === 'development'; |
|
|
|
const loopMenuItem = (menus: MenuDataItem[]): MenuDataItem[] => { |
|
|
|
return menus?.map(({ icon, routes, ...item }) => ({ |
|
|
|
...item, |
|
|
|
icon: icon && React.createElement(Icon[icon as string]), |
|
|
|
icon: icon && React.createElement(Icon && (Icon as any)[item.icon]), |
|
|
|
routes: routes && loopMenuItem(routes), |
|
|
|
})); |
|
|
|
}; |
|
|
|