Field

Props

Prop nameDescriptionTypeValuesDefault
formThe form instance that created by createFormForm-undefined
nameField namestring-
rulesFieldRule list
Tips: Do not visit form's error state in the validator function, because the validate will change error state, it will causes an infinite loop of calls.
FieldRule[]-() => []
depsFunction to generate dependent value. It run in watchEffect, so if the return value change, the field will revalidate.
Tips: Do not visit form's error state in the function, because the validate will change error state, it will causes an infinite loop of calls.
() => any-undefined
debounceField validate debounce time, millseconds.number-undefined
valueThe initial value of the field, it will override the initValues of createForm.any-undefined
defaultValueThe default value of the field, used to determine whether field is dirty and reset field. it will override the initValues of createForm.any-undefined
transformTransform value before pass to validate.(v: any) => any-undefined
touchTypeWhen to mark the field is touched, default is 'BLUR', means that the field will be touched after bulur event.stringFOCUS, BLUR'BLUR'
changeTypeWhen to change the field value, default is 'ONCHANGE', means that the field will setValue when input really event.stringONINPUT, ONCHANGE'ONCHANGE'
isEqualCompare value and defaultValue, checkout them wether is append.(v: any) => any-undefined

Slots

NameDescriptionBindings
defaultField default slotfield mixed - see FieldScope