Optimize code

This commit is contained in:
2024-01-08 13:43:47 +08:00
parent d526d913b9
commit 88c66bd7a7
12 changed files with 68 additions and 70 deletions

View File

@@ -13,15 +13,17 @@ const SystemFramework: React.FC = () => {
<Sidebar title={'系统配置'}>
<Sidebar.ItemList>
{getSystemRouteJson().map((value) => {
return value.menu ? (
<Sidebar.Item
end={value.id === 'system' ? true : undefined}
path={value.absolutePath}
icon={value.icon}
text={value.name}
key={value.id}
/>
) : undefined
return (
value.menu && (
<Sidebar.Item
end={value.id === 'system' ? true : undefined}
path={value.absolutePath}
icon={value.icon}
text={value.name}
key={value.id}
/>
)
)
})}
</Sidebar.ItemList>
</Sidebar>