自定义表单相关
This commit is contained in:
@@ -1412,8 +1412,9 @@ const onSubmit = () => {
|
|||||||
const processedFormFields = state.formFields
|
const processedFormFields = state.formFields
|
||||||
.filter((f) => String(f.key || '').trim() !== '')
|
.filter((f) => String(f.key || '').trim() !== '')
|
||||||
.map((f) => ({
|
.map((f) => ({
|
||||||
label: f.label?.trim() || f.key,
|
|
||||||
key: String(f.key).trim(),
|
key: String(f.key).trim(),
|
||||||
|
value: f.defaultValue || '',
|
||||||
|
label: f.label?.trim() || f.key,
|
||||||
type: f.type,
|
type: f.type,
|
||||||
defaultValue: f.defaultValue || '',
|
defaultValue: f.defaultValue || '',
|
||||||
required: Boolean(f.required),
|
required: Boolean(f.required),
|
||||||
@@ -1427,7 +1428,7 @@ const onSubmit = () => {
|
|||||||
options: (f.type === 'select' || f.type === 'radio') && f.options
|
options: (f.type === 'select' || f.type === 'radio') && f.options
|
||||||
? f.options.filter(opt => String(opt.label || '').trim() !== '' || String(opt.value || '').trim() !== '')
|
? f.options.filter(opt => String(opt.label || '').trim() !== '' || String(opt.value || '').trim() !== '')
|
||||||
: undefined,
|
: undefined,
|
||||||
}));
|
})) as unknown as ModelFormEntry[];
|
||||||
|
|
||||||
const submitData: CreateModelParams = {
|
const submitData: CreateModelParams = {
|
||||||
modelName: state.ruleForm.modelName,
|
modelName: state.ruleForm.modelName,
|
||||||
|
|||||||
Reference in New Issue
Block a user