naive-ui/demo/documentation/components/select/enUS/index.md
2020-02-03 01:00:56 +08:00

67 lines
1.2 KiB
Markdown

# Select
Select something!
## Demo
```demo
basic
size
multiple
events
filterable
remote
remote-multiple
clearable
scroll-event
group
many-options
custom-option
action
```
## V-model
|prop|event|
|-|-|
|value|change|
## Props
|Name|Type|Default|Description|
|-|-|-|-|
|loading|`boolean`|`false`||
|clearable|`boolean`|`false`||
|value|`Array \| string \| number`|`false`||
|placeholder||||
|multiple|`boolean`|`false`||
|size|`'small' \| 'medium' \| 'large'`|`'medium'`||
|disabled|`boolean`|`false`||
|options|`Array<SelectOption \| SelectOptionGroup />`|`[]`||
|remote|`boolearn`|`false`|If you want to async get options|
|filter|`(pattern: string, option: Object) => boolean`|`null`||
## 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
|Name|Description|
|-|-|
|empty||
## Event
|Name|Parameter|Description|
|-|-|-|
|change|`(value: Array \| string \| number \| null)`||
|search|`(value: string)`||
|blur|`()`|When picker of select blur|
|scroll|`(e: Event)`|When select menu scrolls|