mirror of
https://github.com/m-xlsea/ruoyi-plus-soybean.git
synced 2025-09-24 07:49:47 +08:00
refactor(projects): 菜单列表新增禁用菜单样式
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.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') {
|
if (option.visible === '1') {
|
||||||
return (
|
return (
|
||||||
|
Reference in New Issue
Block a user