|
|
|
|
|
|
|
|
max_length: content.max_length, |
|
|
max_length: content.max_length, |
|
|
options: [], |
|
|
options: [], |
|
|
is_context_var, |
|
|
is_context_var, |
|
|
|
|
|
hide: content.hide, |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
else if (type === 'number') { |
|
|
else if (type === 'number') { |
|
|
|
|
|
|
|
|
required: content.required, |
|
|
required: content.required, |
|
|
type, |
|
|
type, |
|
|
options: [], |
|
|
options: [], |
|
|
|
|
|
hide: content.hide, |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
else if (type === 'select') { |
|
|
else if (type === 'select') { |
|
|
|
|
|
|
|
|
type: 'select', |
|
|
type: 'select', |
|
|
options: content.options, |
|
|
options: content.options, |
|
|
is_context_var, |
|
|
is_context_var, |
|
|
|
|
|
hide: content.hide, |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
else if (type === 'file') { |
|
|
else if (type === 'file') { |
|
|
|
|
|
|
|
|
allowed_file_upload_methods: content.allowed_file_upload_methods, |
|
|
allowed_file_upload_methods: content.allowed_file_upload_methods, |
|
|
number_limits: 1, |
|
|
number_limits: 1, |
|
|
}, |
|
|
}, |
|
|
|
|
|
hide: content.hide, |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
else if (type === 'file-list') { |
|
|
else if (type === 'file-list') { |
|
|
|
|
|
|
|
|
allowed_file_upload_methods: content.allowed_file_upload_methods, |
|
|
allowed_file_upload_methods: content.allowed_file_upload_methods, |
|
|
number_limits: content.max_length, |
|
|
number_limits: content.max_length, |
|
|
}, |
|
|
}, |
|
|
|
|
|
hide: content.hide, |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
else { |
|
|
else { |
|
|
|
|
|
|
|
|
icon: content.icon, |
|
|
icon: content.icon, |
|
|
icon_background: content.icon_background, |
|
|
icon_background: content.icon_background, |
|
|
is_context_var, |
|
|
is_context_var, |
|
|
|
|
|
hide: content.hide, |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
required: item.required !== false, // default true |
|
|
required: item.required !== false, // default true |
|
|
max_length: item.max_length, |
|
|
max_length: item.max_length, |
|
|
default: '', |
|
|
default: '', |
|
|
|
|
|
hide: item.hide, |
|
|
}, |
|
|
}, |
|
|
} as any) |
|
|
} as any) |
|
|
return |
|
|
return |
|
|
|
|
|
|
|
|
variable: item.key, |
|
|
variable: item.key, |
|
|
required: item.required !== false, // default true |
|
|
required: item.required !== false, // default true |
|
|
default: '', |
|
|
default: '', |
|
|
|
|
|
hide: item.hide, |
|
|
}, |
|
|
}, |
|
|
} as any) |
|
|
} as any) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
required: item.required !== false, // default true |
|
|
required: item.required !== false, // default true |
|
|
options: item.options, |
|
|
options: item.options, |
|
|
default: '', |
|
|
default: '', |
|
|
|
|
|
hide: item.hide, |
|
|
}, |
|
|
}, |
|
|
} as any) |
|
|
} as any) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
required: item.required, |
|
|
required: item.required, |
|
|
icon: item.icon, |
|
|
icon: item.icon, |
|
|
icon_background: item.icon_background, |
|
|
icon_background: item.icon_background, |
|
|
|
|
|
hide: item.hide, |
|
|
}, |
|
|
}, |
|
|
} as any) |
|
|
} as any) |
|
|
} |
|
|
} |