docs(cascader): type definition (#5462)

pull/5469/head
bqy_fe 3 years ago committed by GitHub
parent 9b554c9295
commit 0c803216e5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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

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

Loading…
Cancel
Save