mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-01 11:39:28 +08:00
31 lines
1.1 KiB
Markdown
31 lines
1.1 KiB
Markdown
# Select
|
|
|
|
- category: Components
|
|
- chinese: 选择框
|
|
- order: 3
|
|
|
|
---
|
|
|
|
类似 select2 的选择器
|
|
|
|
```html
|
|
<Select>
|
|
<Option value="lucy">lucy</Option>
|
|
</Select>
|
|
```
|
|
|
|
## API
|
|
|
|
| 参数 | 说明 | 类型 | 默认值 |
|
|
|----------|----------------|----------|--------------|
|
|
| value | specify the default selected item(s) | string/Array<String> | 无 |
|
|
| multiple | can select more than one option | | false |
|
|
| filterOption | whether filter options by input value | | true |
|
|
| tags | when tagging is enabled the user can select from pre-existing options or create a new tag by picking the first choice, which is what the user has typed into the search box so far. | |false |
|
|
| allowClear | show clear button | | false |
|
|
| combobox | enable combobox mode(can not set multiple at the same time) | | false |
|
|
| onSelect | called when a option is selected. param is option's value | function | 无 |
|
|
| onDeselect | called when a option is deselected. param is option's value. only called for multiple or tags | function | 无 |
|
|
| onChange | called when select an option or input value change(combobox) | function | 无 |
|
|
|