diff --git a/apps/web-antd/src/views/system/menu/data.ts b/apps/web-antd/src/views/system/menu/data.ts index 0cc5a6a86..8b2af2806 100644 --- a/apps/web-antd/src/views/system/menu/data.ts +++ b/apps/web-antd/src/views/system/menu/data.ts @@ -218,6 +218,28 @@ export function useFormSchema(): VbenFormSchema[] { }, rules: z.number().default(CommonStatusEnum.ENABLE), }, + { + fieldName: 'visible', + label: '显示状态', + component: 'RadioGroup', + componentProps: { + options: [ + { label: '显示', value: true }, + { label: '隐藏', value: false }, + ], + buttonStyle: 'solid', + optionType: 'button', + }, + rules: 'required', + defaultValue: true, + help: '选择隐藏时,路由将不会出现在侧边栏,但仍然可以访问', + dependencies: { + triggerFields: ['type'], + show: (values) => { + return [SystemMenuTypeEnum.MENU].includes(values.type); + }, + }, + }, { fieldName: 'alwaysShow', label: '总是显示',