@@ -512,11 +512,11 @@ Form component allows you to verify your data, helping you find and correct erro
...
@@ -512,11 +512,11 @@ Form component allows you to verify your data, helping you find and correct erro
### Custom validation rules
### Custom validation rules
This example shows how to customize your own validation rules to finish a two-factor password verification. And you can you `status-feedback` to add validate status icon。
This example shows how to customize your own validation rules to finish a two-factor password verification.
:::demo
:::demo Here we use `status-icon` to reflect validation result as an icon.
::: demo To add icons in Input, you can simply use `prefix-icon` and `suffix-icon` attributes. Also, the `prefix` and `suffix` named slots works as well.
|rows | number of rows of textarea, only works when `type` is 'textarea' | number | — | 2 |
|rows | number of rows of textarea, only works when `type` is 'textarea' | number | — | 2 |
|autosize | whether textarea has an adaptive height, only works when `type` is 'textarea'. Can accept an object, e.g. { minRows: 2, maxRows: 6 } | boolean/object | — | false |
|autosize | whether textarea has an adaptive height, only works when `type` is 'textarea'. Can accept an object, e.g. { minRows: 2, maxRows: 6 } | boolean/object | — | false |
|auto-complete | same as `auto-complete` in native input | string | on/off | off |
|auto-complete | same as `auto-complete` in native input | string | on/off | off |
...
@@ -637,11 +638,19 @@ Search data from server-side.
...
@@ -637,11 +638,19 @@ Search data from server-side.
|form | same as `form` in native input | string | — | — |
|form | same as `form` in native input | string | — | — |
| on-icon-click | hook function when clicking on the input icon | function | — | — |
| on-icon-click | hook function when clicking on the input icon | function | — | — |
### Input slot
| Name | Description |
|------|--------|
| prefix | content as Input prefix |
| suffix | content as Input suffix |
| prepend | content to prepend before Input |
| append | content to append after Input |
### Input Events
### Input Events
| Event Name | Description | Parameters |
| Event Name | Description | Parameters |
|----| ----| ----|
|----| ----| ----|
|click | triggers when the icon inside Input is clicked | (event: Event) |