## Field ### Install ``` javascript import { Field } from 'vant'; Vue.component(Field.name, Field); ``` ### Usage #### Basic Usage The value of filed is bound with v-model. :::demo Basic Usage ```html ``` ::: #### Custom Type Use `type` prop to custom diffrent type fileds. :::demo Custom Type ```html ``` ::: #### Disabled :::demo Disabled ```html ``` ::: #### Error Info :::demo Error Info ```html ``` ::: #### Auto resize Textarea Filed can be auto resize when has `autosize` prop :::demo Auto resize ```html ``` ::: ### API | Attribute | Description | Type | Default | Accepted Values | |-----------|-----------|-----------|-------------|-------------| | type | Filed type | `String` | `text` | `number` `email`
`textarea` `tel`
`datetime` `date`
`password` `url` | | value | Filed value | `String` | - | - | | label | Filed label | `String` | - | - | | disabled | Disable field | `Boolean` | `false` | - | | error | Whether to show error info | `Boolean` | `false` | - | | autosize | Textarea auto resize | `Boolean` | `false` | - | | icon | Right side Icon name | `String` | - | - | ### Event | Event | Description | Parameters | |-----------|-----------|-----------| | focus | Triggered when filed get focused | - | | blur | Triggered when blur filed | - | | click-icon | Triggered when click the icon of filed | - | ### Slot | name | Description | |-----------|-----------| | icon | Custom icon |