!24 refactor(menu): 菜单管理中隐藏的菜单显示灰色

Merge pull request !24 from NicholasLD/N/A
This commit is contained in:
不寻俗
2025-07-25 07:27:35 +00:00
committed by Gitee

View File

@ -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>;
}