feat: 【ANTD】代码生成时,可选择生成批量删除接口

pull/109/head
puhui999 2025-05-19 12:52:14 +08:00
parent d7d6d0544a
commit 2e0c7e23e9
2 changed files with 14 additions and 1 deletions

View File

@ -21,6 +21,7 @@ export namespace InfraCodegenApi {
createTime: Date;
updateTime: Date;
templateType: number;
deleteBatch: boolean;
parentMenuId: number;
}

View File

@ -11,6 +11,7 @@ import { useAccess } from '@vben/access';
import { IconifyIcon } from '@vben/icons';
import { handleTree } from '@vben/utils';
import { z } from '#/adapter/form';
import { getDataSourceConfigList } from '#/api/infra/data-source-config';
import { getMenuList } from '#/api/system/menu';
import { $t } from '#/locales';
@ -157,6 +158,17 @@ export function useGenerationInfoBaseFormSchema(): VbenFormSchema[] {
},
rules: 'selectRequired',
},
{
component: 'RadioGroup',
fieldName: 'deleteBatch',
label: '批量删除?',
help: '是否生成批量删除接口',
componentProps: {
options: getDictOptions(DICT_TYPE.INFRA_BOOLEAN_STRING, 'boolean'),
class: 'w-full',
},
rules: z.boolean().default(false),
},
{
fieldName: 'parentMenuId',
label: '上级菜单',
@ -350,7 +362,7 @@ export function useGenerationInfoSubTableFormSchema(
},
{
label: '一对一',
value: 'false',
value: false,
},
],
},