feat:【antd】bpm form 的迁移

This commit is contained in:
YunaiV
2025-10-20 22:06:36 +08:00
parent fe9928f9bf
commit 0b39a8ff38
14 changed files with 125 additions and 135 deletions

View File

@@ -1,52 +1,7 @@
import type { VbenFormSchema } from '#/adapter/form';
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
import { CommonStatusEnum, DICT_TYPE } from '@vben/constants';
import { getDictOptions } from '@vben/hooks';
import { z } from '#/adapter/form';
/** 新增/修改的表单 */
export function useFormSchema(): VbenFormSchema[] {
return [
{
fieldName: 'id',
component: 'Input',
dependencies: {
triggerFields: [''],
show: () => false,
},
},
{
fieldName: 'name',
label: '表单名称',
component: 'Input',
componentProps: {
placeholder: '请输入表单名称',
},
rules: 'required',
},
{
fieldName: 'status',
label: '状态',
component: 'RadioGroup',
componentProps: {
options: getDictOptions(DICT_TYPE.COMMON_STATUS, 'number'),
buttonStyle: 'solid',
optionType: 'button',
},
rules: z.number().default(CommonStatusEnum.ENABLE),
},
{
fieldName: 'remark',
label: '备注',
component: 'Textarea',
componentProps: {
placeholder: '请输入备注',
},
},
];
}
import { DICT_TYPE } from '@vben/constants';
/** 列表的搜索表单 */
export function useGridFormSchema(): VbenFormSchema[] {