refactor(projects): 菜单列表新增禁用菜单样式

This commit is contained in:
xlsea
2025-07-26 12:55:19 +08:00
parent f89835578c
commit e538355f2b

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.status === '1') {
return (
<div class="flex items-center gap-4px text-error-200">
{label}
<SvgIcon icon="ri:prohibited-line" class="text-16px" />
</div>
);
}
// 隐藏的菜单显示灰色
if (option.visible === '1') {
return (