import type { FormSchemaGetter } from '#/adapter'; import { DictEnum } from '@vben/constants'; import { getPopupContainer } from '@vben/utils'; import { getDictOptions } from '#/utils/dict'; export const querySchema: FormSchemaGetter = () => [ { component: 'Input', fieldName: 'configName', label: '参数名称', }, { component: 'Input', fieldName: 'configKey', label: '参数键名', }, { component: 'Select', componentProps: { getPopupContainer, options: getDictOptions(DictEnum.SYS_YES_NO), }, fieldName: 'configType', label: '系统内置', }, { component: 'RangePicker', fieldName: 'createTime', label: '创建时间', }, ]; export const modalSchema: FormSchemaGetter = () => [ { component: 'Input', dependencies: { show: () => false, triggerFields: [''], }, fieldName: 'configId', label: '参数主键', }, { component: 'Input', fieldName: 'configName', label: '参数名称', rules: 'required', }, { component: 'Input', fieldName: 'configKey', label: '参数键名', rules: 'required', }, { component: 'Input', 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', fieldName: 'remark', formItemClass: 'items-baseline', label: '备注', }, ];