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

67 lines
1.3 KiB
Markdown
Raw Normal View History

2019-09-25 12:19:57 +08:00
# Select
Select something!
2019-09-25 12:19:57 +08:00
## Demo
```demo
basic
size
2019-09-25 12:19:57 +08:00
multiple
events
filterable
remote
remote-multiple
2019-11-14 02:18:36 +08:00
clearable
scroll-event
2020-01-21 18:21:19 +08:00
group
many-options
custom-option
action
2019-09-25 12:19:57 +08:00
```
2020-02-03 01:00:56 +08:00
## V-model
|prop|event|
|-|-|
|value|change|
2020-02-03 01:00:56 +08:00
## Props
|Name|Type|Default|Description|
|-|-|-|-|
|loading|`boolean`|`false`||
|clearable|`boolean`|`false`||
|value|`Array \| string \| number`|`false`||
2020-02-05 23:14:00 +08:00
|placeholder|`string`|`'Please Select'`||
|multiple|`boolean`|`false`||
|size|`'small' \| 'medium' \| 'large'`|`'medium'`||
|disabled|`boolean`|`false`||
2020-02-04 10:44:04 +08:00
|options|`Array<SelectOption \| SelectOptionGroup>`|`[]`||
2020-02-17 09:55:20 +08:00
|remote|`boolean`|`false`|If you want to async get options|
|filter|`(pattern: string, option: Object) => boolean`|`null`||
2020-02-03 01:00:56 +08:00
## API
### SelectOption Type
|Property|Type|Description|
|-|-|-|
|label|`string`||
|value|`string \| number`|Should be unique in options.|
|disabled|`boolean`||
|render|`function`||
### SelectOptionGroup Type
|Property|Type|Description|
|-|-|-|
|type|`'group'`||
|name|`string`||
|children|`Array<SelectOption>`||
## Slots
2020-02-17 09:55:20 +08:00
|Name|Parameters|Description|
|-|-|-|
|action|`()`||
2020-02-03 01:00:56 +08:00
## Event
2020-02-17 09:55:20 +08:00
|Name|Parameters|Description|
|-|-|-|
|change|`(value: Array \| string \| number \| null)`||
|search|`(value: string)`||
|blur|`()`|When picker of select blur|
|scroll|`(e: Event)`|When select menu scrolls|
2019-11-14 02:18:36 +08:00