From d79d95b05ae97fd0b08a7121ef4d5c650e30f8db Mon Sep 17 00:00:00 2001 From: bqy_fe <1743369777@qq.com> Date: Fri, 8 Apr 2022 22:29:36 +0800 Subject: [PATCH] docs(cascader): type definition --- components/cascader/index.en-US.md | 6 +++--- components/cascader/index.zh-CN.md | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/components/cascader/index.en-US.md b/components/cascader/index.en-US.md index df8282a3aa..a73344edff 100644 --- a/components/cascader/index.en-US.md +++ b/components/cascader/index.en-US.md @@ -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 value,Need 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\[] | - | | diff --git a/components/cascader/index.zh-CN.md b/components/cascader/index.zh-CN.md index 5233f6fb63..bb2deb148a 100644 --- a/components/cascader/index.zh-CN.md +++ b/components/cascader/index.zh-CN.md @@ -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