Skip to content

Commit 0c80321

Browse files
authored
docs(cascader): type definition (#5462)
1 parent 9b554c9 commit 0c80321

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

components/cascader/index.en-US.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Cascade selection box.
2929
| dropdownClassName | additional className of popup overlay | string | - | 3.0 |
3030
| dropdownStyle | additional style of popup overlay | CSSProperties | {} | 3.0 |
3131
| expandIcon | Customize the current item expand icon | slot | - | 3.0 |
32-
| expandTrigger | expand current item when click or hover, one of 'click' 'hover' | string | 'click' | |
32+
| expandTrigger | expand current item when click or hover | `click` \| `hover` | 'click' | |
3333
| fieldNames | custom field name for label and value and children | object | `{ label: 'label', value: 'value', children: 'children' }` | |
3434
| 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 | |
3535
| loadData | To load option lazily, and it cannot work with `showSearch` | `(selectedOptions) => void` | - | |
@@ -40,10 +40,10 @@ Cascade selection box.
4040
| open | set visible of cascader popup | boolean | - | 3.0 |
4141
| options | data options of cascade | [Option](#option)\[] | - | |
4242
| placeholder | input placeholder | string | 'Please select' | |
43-
| placement | use preset popup align config from builtinPlacements`bottomLeft` `bottomRight` `topLeft` `topRight` | string | `bottomLeft` | 3.0 |
43+
| placement | Use preset popup align config from builtinPlacements | `bottomLeft` \| `bottomRight` \| `topLeft` \| `topRight` | `bottomLeft` | 3.0 |
4444
| searchValue | Set search value,Need work with `showSearch` | string | - | 3.0 |
4545
| showSearch | Whether show search input in single mode. | boolean \| [object](#showsearch) | false | |
46-
| size | input size, one of `large` `default` `small` | string | `default` | |
46+
| size | input size | `large` \| `default` \| `small` | `default` | |
4747
| suffixIcon | The custom suffix icon | string \| VNode \| slot | - | |
4848
| tagRender | Customize tag render when `multiple` | slot | - | 3.0 |
4949
| value(v-model) | selected value | string\[] \| number\[] | - | |

components/cascader/index.zh-CN.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ cover: https://gw.alipayobjects.com/zos/alicdn/UdS8y8xyZ/Cascader.svg
3131
| dropdownClassName | 自定义浮层类名 | string | - | 3.0 |
3232
| dropdownStyle | 自定义浮层样式 | CSSProperties | {} | 3.0 |
3333
| expandIcon | 自定义次级菜单展开图标 | slot | - | 3.0 |
34-
| expandTrigger | 次级菜单的展开方式,可选 'click' 和 'hover' | string | 'click' | |
34+
| expandTrigger | 次级菜单的展开方式 | `click` \| `hover` | 'click' | |
3535
| fieldNames | 自定义 options 中 label name children 的字段 | object | `{ label: 'label', value: 'value', children: 'children' }` | |
3636
| getPopupContainer | 菜单渲染父节点。默认渲染到 body 上,如果你遇到菜单滚动定位问题,试试修改为滚动的区域,并相对其定位。 | Function(triggerNode) | () => document.body | |
3737
| loadData | 用于动态加载选项,无法与 `showSearch` 一起使用 | `(selectedOptions) => void` | - | |
@@ -42,12 +42,12 @@ cover: https://gw.alipayobjects.com/zos/alicdn/UdS8y8xyZ/Cascader.svg
4242
| open | 控制浮层显隐 | boolean | - | 3.0 |
4343
| options | 可选项数据源 | [Option](#option)\[] | - | |
4444
| placeholder | 输入框占位文本 | string | '请选择' | |
45-
| placement | 浮层预设位置`bottomLeft` `bottomRight` `topLeft` `topRight` | string | `bottomLeft` | 3.0 |
45+
| placement | 浮层预设位置 | `bottomLeft` \| `bottomRight` \| `topLeft` \| `topRight` | `bottomLeft` | 3.0 |
4646
| searchValue | 设置搜索的值,需要与 `showSearch` 配合使用 | string | - | 3.0 |
4747
| showSearch | 在选择框中显示搜索框 | boolean \| [object](#showsearch) | false | |
48-
| size | 输入框大小,可选 `large` `default` `small` | string | `default` | |
48+
| size | 输入框大小 | `large` \| `default` \| `small` | `default` | |
4949
| suffixIcon | 自定义的选择框后缀图标 | string \| VNode \| slot | - | |
50-
| tagRender | 自定义 tag 内容,多选时生效 | (props) => ReactNode | - | 3.0 |
50+
| tagRender | 自定义 tag 内容,多选时生效 | slot | - | 3.0 |
5151
| value(v-model) | 指定选中项 | string\[] \| number\[] | - | |
5252

5353
### showSearch

0 commit comments

Comments
 (0)