Browse Source

update select doc

pull/5755/head
afc163 8 years ago
parent
commit
8a1c875123
  1. 6
      components/select/index.en-US.md
  2. 8
      components/select/index.zh-CN.md

6
components/select/index.en-US.md

@ -26,9 +26,9 @@ A Selector similar to Select2.
| value | Current selected option. | string\|string[] | - |
| defaultValue | Initial selected option. | string\|string[] | - |
| mode | Set mode of Select (Support after 2.9) | 'multiple' \| 'tags' \| 'combobox' | - |
| multiple | Allow multiple select(Deprecated after 2.9) | boolean | false |
| 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.(Deprecated after 2.9) | boolean |false |
| combobox | Enable combobox mode(can not set multiple at the same time).(Deprecated after 2.9) | boolean | false |
| multiple | Allow multiple select (Deprecated after 2.9, use `mode` instead) | boolean | false |
| 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. (Deprecated after 2.9, use `mode` instead) | boolean |false |
| combobox | Enable combobox mode (can not set multiple at the same time). (Deprecated after 2.9, use `mode` instead) | boolean | false |
| allowClear | Show clear button. | boolean | false |
| filterOption | If true, filter options by input, if function, filter options against it. The function will receive two arguments, `inputValue` and `option`, if the function returns `true`, the option will be included in the filtered set; Otherwise, it will be excluded. | boolean or function(inputValue, option) | true |
| onSelect | Called when a option is selected, the params are option's value (or key) and option instance. | function(value, option) | - |

8
components/select/index.zh-CN.md

@ -26,10 +26,10 @@ title: Select
|----------|----------------|----------|--------------|
| value | 指定当前选中的条目 | string\|string[] | - |
| defaultValue | 指定默认选中的条目 | string\|string[] | - |
| mode | 设置 Select 的模式(2.9 之后支持) | 'multiple' \| 'tags' \| 'combobox' | - |
| multiple | 支持多选(2.9 之后废弃) | boolean | false |
| tags | 可以把随意输入的条目作为 tag,输入项不需要与下拉选项匹配(2.9 之后废弃) | boolean |false |
| combobox | 输入框自动提示模式(2.9 之后废弃) | boolean | false |
| mode | 设置 Select 的模式(2.9 之后支持) | 'multiple' \| 'tags' \| 'combobox' | - |
| multiple | 支持多选(2.9 之后废弃,请使用 `mode` | boolean | false |
| tags | 可以把随意输入的条目作为 tag,输入项不需要与下拉选项匹配(2.9 之后废弃,请使用 `mode`) | boolean | false |
| combobox | 输入框自动提示模式(2.9 之后废弃,请使用 `mode` | boolean | false |
| allowClear | 支持清除 | boolean | false |
| filterOption | 是否根据输入项进行筛选。当其为一个函数时,会接收 `inputValue` `option` 两个参数,当 `option` 符合筛选条件时,应返回 `true`,反之则返回 `false`。 | boolean or function(inputValue, option) | true |
| onSelect | 被选中时调用,参数为选中项的 value (或 key) 值 | function(value, option) | - |

Loading…
Cancel
Save