naive-ui/demo/documentation/components/input/enUS/index.md

67 lines
1.4 KiB
Markdown
Raw Normal View History

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
pair
2020-02-09 19:34:14 +08:00
input-group
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'`||
|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`||
|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|
|-|-|-|
|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|
|-|-|-|
|input|`(value: string \| [string, string])`||
|change|`(value: string \| [string, string])`||
2020-01-28 22:26:54 +08:00
|blur|`()`||
|focus|`()`||
|clear|`()`||