Skip to content

DynamicForm Parameter Description

AdDynamicForm Props

PropertyDescriptionTypeDefaultRequired
itemsArray of dynamic form item configurations, where each item is a DyFormItemDyFormItem[]Yes
formConfigAntd Form configuration, such as labelPlacement, size, labelWidth, etc.FormProps-No
gridConfigRow configuration used when preset="grid", such as gutter, align, justify, etc.RowProps{ gutter: 10 }No
rulesAdditional form validation rules passed in, which will be merged with the built-in rules in itemsRulesMapNo
presetRendering layout mode: fullRow for a standard vertical form; grid for grid layout (used with gridConfig)'fullRow' | 'grid''fullRow'No
validateTriggerForm validation trigger mode'string' | 'null'onBlurNo

Preset Validation

preset only accepts 'fullRow' or 'grid'. Otherwise, an error will be logged in the console and false will be returned.

Ref

MethodParametersReturn TypeDescription
reset(v?: any)v = null → resets the form data to a new statevoidReset form data
validator-Promise<object>Validates the form and returns the form result
getResult(t = 'res')t = 'res' → gets the current final result
t = 'ori' → gets the rendered array
object / arrayGets the internal form data structure

Slots (Function)

NameParametersDescription
header-Named slot for the header
footer-Named slot for the footer