Fields

Fields can be used in a form as its descendants, or independently (see the change event).

All fields accept the following properties:

  • label string required
  • name string required
  • value 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 before and after slots, which allow you to add custom HTML.

Methods

Methods can be called by applying a ref to the relevant component and fetching it from the $refs object.

  • setValue(value)
  • getValue()
  • reset() reset the field to an empty value, and set dirty to false
  • focus()

Properties

  • dirty
  • pristine
  • errors An array of errors

results matching ""

    No results matching ""