|
@@ -18,7 +18,7 @@ const loopMenuItem = (menus: MenuDataItem[]): MenuDataItem[] => { |
|
|
return menus?.map(({ icon, routes, ...item }) => ( |
|
|
return menus?.map(({ icon, routes, ...item }) => ( |
|
|
{ |
|
|
{ |
|
|
...item, |
|
|
...item, |
|
|
icon: (icon as string).trim() ? React.createElement((Icon as any)[icon as string]):React.createElement((Icon as any)['SettingOutlined']), |
|
|
|
|
|
|
|
|
icon: (icon as string) =='' ? React.createElement((Icon as any)[icon as string]):React.createElement((Icon as any)['SettingOutlined']), |
|
|
routes: routes && loopMenuItem(routes), |
|
|
routes: routes && loopMenuItem(routes), |
|
|
})); |
|
|
})); |
|
|
}; |
|
|
}; |
|
|