2019-09-25 12:19:57 +08:00
|
|
|
# Select
|
2020-01-21 23:44:15 +08:00
|
|
|
Select something!
|
2019-09-25 12:19:57 +08:00
|
|
|
## Demo
|
|
|
|
```demo
|
|
|
|
basic
|
2020-01-21 23:44:15 +08:00
|
|
|
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
|
2020-01-21 23:44:15 +08:00
|
|
|
many-options
|
|
|
|
custom-option
|
|
|
|
action
|
2019-09-25 12:19:57 +08:00
|
|
|
```
|
2020-02-03 01:00:56 +08:00
|
|
|
## V-model
|
2020-01-21 23:44:15 +08:00
|
|
|
|prop|event|
|
|
|
|
|-|-|
|
|
|
|
|value|change|
|
|
|
|
|
2020-02-03 01:00:56 +08:00
|
|
|
## Props
|
2020-01-21 23:44:15 +08:00
|
|
|
|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'`||
|
2020-01-21 23:44:15 +08:00
|
|
|
|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|
|
2020-01-21 23:44:15 +08:00
|
|
|
|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-01-21 23:44:15 +08:00
|
|
|
|
2020-02-03 01:00:56 +08:00
|
|
|
## Event
|
2020-02-17 09:55:20 +08:00
|
|
|
|Name|Parameters|Description|
|
2020-01-21 23:44:15 +08:00
|
|
|
|-|-|-|
|
|
|
|
|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
|
|
|
|