Fields
Fields can be used in a form as descendants of the form, or independently (see the change
event).
All fields accept the following properties:
label
string
required
name
string
required
field's identifiervalue
mixed
optional
required
boolean
optional
disabled
boolean
optional
hide-label
boolean
optional
rules
object
optional
See validation option b
Fields share a fieldType
property which can be programmatically used to determine the type of the component.
Fields have beforeField
and afterField
slots, which allow you to add custom HTML.
Methods
Methods can be called by applying a v-ref to the relevant component and fetching it from the $refs
object.
setValue(value)
Programatically set a value on a field. The view will be updated accordingly.reset()
reset the field to an empty value, and set dirty tofalse
focus()
Properties
dirty
pristine
errors
An array of errors