自定义表单相关

This commit is contained in:
2026-06-02 11:38:56 +08:00
parent 38e15ed562
commit d3a315525e

View File

@@ -1412,8 +1412,9 @@ const onSubmit = () => {
const processedFormFields = state.formFields
.filter((f) => String(f.key || '').trim() !== '')
.map((f) => ({
label: f.label?.trim() || f.key,
key: String(f.key).trim(),
value: f.defaultValue || '',
label: f.label?.trim() || f.key,
type: f.type,
defaultValue: f.defaultValue || '',
required: Boolean(f.required),
@@ -1427,7 +1428,7 @@ const onSubmit = () => {
options: (f.type === 'select' || f.type === 'radio') && f.options
? f.options.filter(opt => String(opt.label || '').trim() !== '' || String(opt.value || '').trim() !== '')
: undefined,
}));
})) as unknown as ModelFormEntry[];
const submitData: CreateModelParams = {
modelName: state.ruleForm.modelName,