2024-09-12 08:25:38 +08:00
|
|
|
import type { FormSchemaGetter } from '#/adapter';
|
|
|
|
|
|
|
|
import { DictEnum } from '@vben/constants';
|
|
|
|
|
|
|
|
import { getDictOptions } from '#/utils/dict';
|
|
|
|
|
|
|
|
export const modalSchema: FormSchemaGetter = () => [
|
|
|
|
{
|
|
|
|
component: 'Input',
|
|
|
|
dependencies: {
|
|
|
|
show: () => false,
|
|
|
|
triggerFields: [''],
|
|
|
|
},
|
|
|
|
fieldName: 'configId',
|
|
|
|
label: '参数主键',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
component: 'Input',
|
|
|
|
componentProps: {
|
|
|
|
placeholder: '请输入',
|
|
|
|
},
|
|
|
|
fieldName: 'configName',
|
|
|
|
label: '参数名称',
|
|
|
|
rules: 'required',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
component: 'Input',
|
|
|
|
componentProps: {
|
|
|
|
placeholder: '请输入',
|
|
|
|
},
|
|
|
|
fieldName: 'configKey',
|
|
|
|
label: '参数键名',
|
|
|
|
rules: 'required',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
component: 'Input',
|
|
|
|
componentProps: {
|
|
|
|
placeholder: '请输入',
|
|
|
|
},
|
|
|
|
fieldName: 'configValue',
|
|
|
|
label: '参数键值',
|
|
|
|
rules: 'required',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
component: 'RadioGroup',
|
|
|
|
componentProps: {
|
|
|
|
buttonStyle: 'solid',
|
|
|
|
options: getDictOptions(DictEnum.SYS_YES_NO),
|
|
|
|
optionType: 'button',
|
|
|
|
},
|
|
|
|
defaultValue: 'N',
|
|
|
|
fieldName: 'configType',
|
|
|
|
label: '是否内置',
|
|
|
|
rules: 'required',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
component: 'Textarea',
|
|
|
|
componentProps: {
|
|
|
|
placeholder: '请输入',
|
|
|
|
},
|
|
|
|
fieldName: 'remark',
|
2024-09-12 21:56:21 +08:00
|
|
|
formItemClass: 'items-baseline',
|
2024-09-12 08:25:38 +08:00
|
|
|
label: '备注',
|
|
|
|
},
|
|
|
|
];
|