mirror of
https://github.com/m-xlsea/ruoyi-plus-soybean.git
synced 2025-09-24 07:49:47 +08:00
!24 refactor(menu): 菜单管理中隐藏的菜单显示灰色
Merge pull request !24 from NicholasLD/N/A
This commit is contained in:
@ -113,6 +113,15 @@ function renderLabel({ option }: { option: TreeOption }) {
|
|||||||
if (label?.startsWith('route.') || label?.startsWith('menu.')) {
|
if (label?.startsWith('route.') || label?.startsWith('menu.')) {
|
||||||
label = $t(label as App.I18n.I18nKey);
|
label = $t(label as App.I18n.I18nKey);
|
||||||
}
|
}
|
||||||
|
// 隐藏的菜单显示灰色
|
||||||
|
if (option.visible === '1') {
|
||||||
|
return (
|
||||||
|
<div class="flex items-center gap-4px text-gray-400">
|
||||||
|
{label}
|
||||||
|
<SvgIcon icon="codex:hidden" class="text-21px" />
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
return <div>{label}</div>;
|
return <div>{label}</div>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user