diff --git a/components/select/index.en-US.md b/components/select/index.en-US.md index 0205a5da5..ca27c7386 100644 --- a/components/select/index.en-US.md +++ b/components/select/index.en-US.md @@ -38,7 +38,7 @@ Select component to select value from options. | dropdownRender | Customize dropdown content | ({menuNode: VNode, props}) => VNode \| v-slot | - | | | dropdownStyle | style of dropdown menu | object | - | | | fieldNames | Customize node label, value, options field name | object | { label: `label`, value: `value`, options: `options` } | 3.0 | -| 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 | | +| 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` \| `function(inputValue, option)` | true | | | filterSort | Sort function for search options sorting, see [Array.sort](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort)'s compareFunction | (optionA: Option, optionB: Option) => number | - | 3.0 | | firstActiveValue | Value of action option by default | string\|string\[] | - | | | getPopupContainer | Parent Node which the selector should be rendered to. Default to `body`. When position issues happen, try to modify it into scrollable content and position it relative. | function(triggerNode) | () => document.body | | diff --git a/components/select/index.zh-CN.md b/components/select/index.zh-CN.md index 46ef2c382..3d9da7c3b 100644 --- a/components/select/index.zh-CN.md +++ b/components/select/index.zh-CN.md @@ -39,14 +39,14 @@ cover: https://gw.alipayobjects.com/zos/alicdn/_0XzgOis7/Select.svg | dropdownRender | 自定义下拉框内容 | ({menuNode: VNode, props}) => VNode \| v-slot | - | | | dropdownStyle | 下拉菜单的 style 属性 | object | - | | | fieldNames | 自定义节点 label、value、options 的字段 | object | { label: `label`, value: `value`, options: `options` } | 3.0 | -| filterOption | 是否根据输入项进行筛选。当其为一个函数时,会接收 `inputValue` `option` 两个参数,当 `option` 符合筛选条件时,应返回 `true`,反之则返回 `false`。 | boolean or function(inputValue, option) | true | | +| filterOption | 是否根据输入项进行筛选。当其为一个函数时,会接收 `inputValue` `option` 两个参数,当 `option` 符合筛选条件时,应返回 `true`,反之则返回 `false`。 | `boolean` \| `function(inputValue, option)` | true | | | filterSort | 搜索时对筛选结果项的排序函数, 类似[Array.sort](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort)里的 compareFunction | (optionA: Option, optionB: Option) => number | - | 3.0 | | firstActiveValue | 默认高亮的选项 | string\|string\[] | - | | | getPopupContainer | 菜单渲染父节点。默认渲染到 body 上,如果你遇到菜单滚动定位问题,试试修改为滚动的区域,并相对其定位。 | Function(triggerNode) | () => document.body | | | labelInValue | 是否把每个选项的 label 包装到 value 中,会把 Select 的 value 类型从 `string` 变为 `{key: string, label: vNodes, originLabel: any}` 的格式, originLabel(3.1) 保持原始类型,如果通过 a-select-option children 构造的节点,该值是是个函数(即 a-select-option 的默认插槽) | boolean | false | | | listHeight | 设置弹窗滚动高度 | number | 256 | | | maxTagCount | 最多显示多少个 tag | number | - | | -| maxTagPlaceholder | 隐藏 tag 时显示的内容 | slot/function(omittedValues) | - | | +| maxTagPlaceholder | 隐藏 tag 时显示的内容 | slot \| function(omittedValues) | - | | | maxTagTextLength | 最大显示的 tag 文本长度 | number | - | | | menuItemSelectedIcon | 自定义当前选中的条目图标 | VNode \| slot | - | | | mode | 设置 Select 的模式为多选或标签 | 'multiple' \| 'tags' \| 'combobox' | - | | @@ -105,10 +105,10 @@ cover: https://gw.alipayobjects.com/zos/alicdn/_0XzgOis7/Select.svg ### OptGroup props -| 参数 | 说明 | 类型 | 默认值 | -| ----- | ---- | --------------------------- | ------ | -| key | | string | - | -| label | 组名 | string\|\|function(h)\|slot | 无 | +| 参数 | 说明 | 类型 | 默认值 | +| ----- | ---- | ------------------------- | ------ | +| key | | string | - | +| label | 组名 | string\|function(h)\|slot | 无 | ## FAQ