2019-10-10 14:30:36 +08:00
|
|
|
# Input
|
2020-01-28 22:26:54 +08:00
|
|
|
Many years ago, people used punched card to input.
|
|
|
|
## Demos
|
2019-10-10 14:30:36 +08:00
|
|
|
```demo
|
|
|
|
basic
|
|
|
|
size
|
|
|
|
round
|
|
|
|
icon
|
|
|
|
password
|
|
|
|
disabled
|
|
|
|
clearable
|
|
|
|
autosize
|
2020-02-10 22:07:02 +08:00
|
|
|
pair
|
2020-02-09 19:34:14 +08:00
|
|
|
input-group
|
2020-03-04 13:57:22 +08:00
|
|
|
passively-activated
|
2020-01-28 22:26:54 +08:00
|
|
|
```
|
|
|
|
## V-model
|
|
|
|
|Prop|Event|
|
|
|
|
|-|-|
|
|
|
|
|value|input|
|
|
|
|
|
|
|
|
## Props
|
2020-02-09 19:34:14 +08:00
|
|
|
### Input Props
|
2020-01-28 22:26:54 +08:00
|
|
|
|Name|Type|Default|Description|
|
|
|
|
|-|-|-|-|
|
|
|
|
|type|`'text' \| 'password' \| 'textarea'`|`'text'`||
|
2020-02-10 22:07:02 +08:00
|
|
|
|pair|`boolean`|`false`|Whether to input pairwise value.|
|
|
|
|
|value|`string \| [string, string]`|`null`|Value of input. When `pair` is `true`, `value` is an array.|
|
2020-01-28 22:26:54 +08:00
|
|
|
|disabled|`boolean`|`false`||
|
|
|
|
|size|`'small' \| 'medium' \| 'large'`|`'medium'`||
|
|
|
|
|rows|`number`|`3`||
|
|
|
|
|round|`boolean`|`false`||
|
|
|
|
|minlength|`number`|`null`||
|
|
|
|
|maxlength|`number`|`null`||
|
|
|
|
|clearable|`boolean`|`false`||
|
2020-02-04 20:45:34 +08:00
|
|
|
|autosize|`boolean \| { minRows?: number, maxRows?: number }`|`false`||
|
2020-01-28 22:26:54 +08:00
|
|
|
|readonly|`boolean`|`false`||
|
2020-02-10 22:07:02 +08:00
|
|
|
|seperator|`string`|`null`|The seperator bewteen pairwise inputs.|
|
|
|
|
|placeholder|`string \| [string, string]`|`null`|Placeholder of input. When `pair` is `true`, placeholder is an array.|
|
2020-01-28 22:26:54 +08:00
|
|
|
|
|
|
|
## Slots
|
2020-02-09 19:34:14 +08:00
|
|
|
### Input Slots
|
2020-01-28 22:26:54 +08:00
|
|
|
|Name|Parameters|Description|
|
|
|
|
|-|-|-|
|
2020-02-10 22:07:02 +08:00
|
|
|
|prefix|`()`||
|
2020-01-28 22:26:54 +08:00
|
|
|
|suffix|`()`||
|
|
|
|
|
2020-02-09 19:34:14 +08:00
|
|
|
### Input Group Slots
|
|
|
|
|Name|Parameters|Description|
|
|
|
|
|-|-|-|
|
|
|
|
|default|`()`||
|
|
|
|
|
|
|
|
### Input Group Label Slots
|
|
|
|
|Name|Parameters|Description|
|
|
|
|
|-|-|-|
|
|
|
|
|default|`()`||
|
|
|
|
|
2020-01-28 22:26:54 +08:00
|
|
|
## Events
|
2020-02-09 19:34:14 +08:00
|
|
|
### Input Events
|
2020-01-28 22:26:54 +08:00
|
|
|
|Name|Parameters|Description|
|
|
|
|
|-|-|-|
|
2020-02-10 22:07:02 +08:00
|
|
|
|input|`(value: string \| [string, string])`||
|
|
|
|
|change|`(value: string \| [string, string])`||
|
2020-01-28 22:26:54 +08:00
|
|
|
|blur|`()`||
|
|
|
|
|focus|`()`||
|
2020-02-10 22:07:02 +08:00
|
|
|
|clear|`()`||
|