mirror of
https://github.com/m-xlsea/ruoyi-plus-soybean.git
synced 2025-09-23 23:39:47 +08:00
refactor(menu): 菜单管理中隐藏的菜单显示灰色
Signed-off-by: NicholasLD <nicholasld505@gmail.com>
This commit is contained in:
@ -113,6 +113,15 @@ function renderLabel({ option }: { option: TreeOption }) {
|
||||
if (label?.startsWith('route.') || label?.startsWith('menu.')) {
|
||||
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>;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user