Skip to content

Commit eef66b1

Browse files
committed
doc: sort api
1 parent d3a1be0 commit eef66b1

File tree

103 files changed

+836
-833
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

103 files changed

+836
-833
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -78,3 +78,4 @@ report.html
7878
site/src/router/demoRoutes.js
7979

8080
components/version/version.tsx
81+
~component-api.json

components/affix/index.zh-CN.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ cover: https://gw.alipayobjects.com/zos/alicdn/tX6-md4H6/Affix.svg
2424

2525
### 事件
2626

27-
| 事件名称 | 说明 | 回调参数 | 版本 |
27+
| 事件名称 | 说明 | 回调参数 | 版本 | |
2828
| -------- | ---------------------------- | --------------------------- | ---- | --- |
2929
| change | 固定状态改变时触发的回调函数 | (affixed?: boolean) => void | - | |
3030

components/alert/index.en-US.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ Alert component for feedback.
1919
| afterClose | Called when close animation is finished | () => void | - | |
2020
| banner | Whether to show as banner | boolean | false | |
2121
| closable | Whether Alert can be closed | boolean | | |
22-
| closeText | Close text to show | string\|slot | - | |
2322
| closeIcon | Custom close icon | slot | <CloseOutlined /> | 3.0 |
23+
| closeText | Close text to show | string\|slot | - | |
2424
| description | Additional content of Alert | string\|slot | - | |
2525
| icon | Custom icon, effective when `showIcon` is `true` | vnode \| slot | - | |
2626
| message | Content of Alert | string\|slot | - | |

components/alert/index.zh-CN.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ cover: https://gw.alipayobjects.com/zos/alicdn/8emPa3fjl/Alert.svg
2020
| afterClose | 关闭动画结束后触发的回调函数 | () => void | - | |
2121
| banner | 是否用作顶部公告 | boolean | false | |
2222
| closable | 默认不显示关闭按钮 | boolean || |
23-
| closeText | 自定义关闭按钮 | string\|slot || |
2423
| closeIcon | 自定义关闭 Icon | slot | <CloseOutlined /> | 3.0 |
24+
| closeText | 自定义关闭按钮 | string\|slot || |
2525
| description | 警告提示的辅助性文字介绍 | string\|slot || |
2626
| icon | 自定义图标,`showIcon``true` 时有效 | vnode\|slot | - | |
2727
| message | 警告提示内容 | string\|slot || |

components/anchor/index.en-US.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -21,25 +21,25 @@ For displaying anchor hyperlinks on page and jumping between them.
2121
| affix | Fixed mode of Anchor | boolean | true | |
2222
| bounds | Bounding distance of anchor area | number | 5(px) | |
2323
| getContainer | Scrolling container | () => HTMLElement | () => window | |
24+
| getCurrentAnchor | Customize the anchor highlight | () => string | - | 1.5.0 |
2425
| offsetBottom | Pixels to offset from bottom when calculating position of scroll | number | - | |
2526
| offsetTop | Pixels to offset from top when calculating position of scroll | number | 0 | |
2627
| showInkInFixed | Whether show ink-balls when `:affix="false"` | boolean | false | |
28+
| targetOffset | Anchor scroll offset, default as `offsetTop`, [example](#components-anchor-demo-targetOffset) | number | `offsetTop` | 1.5.0 |
2729
| wrapperClass | The class name of the container | string | - | |
2830
| wrapperStyle | The style of the container | object | - | |
29-
| getCurrentAnchor | Customize the anchor highlight | () => string | - | 1.5.0 |
30-
| targetOffset | Anchor scroll offset, default as `offsetTop`, [example](#components-anchor-demo-targetOffset) | number | `offsetTop` | 1.5.0 |
3131

3232
### Events
3333

34-
| Events Name | Description | Arguments | Version |
34+
| Events Name | Description | Arguments | Version | |
3535
| --- | --- | --- | --- | --- |
36-
| click | set the handler to handle `click` event | Function(e: Event, link: Object) | |
3736
| change | Listening for anchor link change | (currentActiveLink: string) => void | | 1.5.0 |
37+
| click | set the handler to handle `click` event | Function(e: Event, link: Object) | | |
3838

3939
### Link Props
4040

4141
| Property | Description | Type | Default | Version |
4242
| -------- | ----------------------------------------- | ------------ | ------- | ------- |
4343
| href | target of hyperlink | string | | |
44-
| title | content of hyperlink | string\|slot | | |
4544
| target | Specifies where to display the linked URL | string | | 1.5.0 |
45+
| title | content of hyperlink | string\|slot | | |

components/anchor/index.zh-CN.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -22,25 +22,25 @@ cover: https://gw.alipayobjects.com/zos/alicdn/_1-C1JwsC/Anchor.svg
2222
| affix | 固定模式 | boolean | true | |
2323
| bounds | 锚点区域边界 | number | 5(px) | |
2424
| getContainer | 指定滚动的容器 | () => HTMLElement | () => window | |
25+
| getCurrentAnchor | 自定义高亮的锚点 | () => string | - | 1.5.0 |
2526
| offsetBottom | 距离窗口底部达到指定偏移量后触发 | number | | |
2627
| offsetTop | 距离窗口顶部达到指定偏移量后触发 | number | | |
2728
| showInkInFixed | `:affix="false"` 时是否显示小圆点 | boolean | false | |
29+
| targetOffset | 锚点滚动偏移量,默认与 offsetTop 相同,[例子](#components-anchor-demo-targetOffset) | number | `offsetTop` | 1.5.0 |
2830
| wrapperClass | 容器的类名 | string | - | |
2931
| wrapperStyle | 容器样式 | object | - | |
30-
| getCurrentAnchor | 自定义高亮的锚点 | () => string | - | 1.5.0 |
31-
| targetOffset | 锚点滚动偏移量,默认与 offsetTop 相同,[例子](#components-anchor-demo-targetOffset) | number | `offsetTop` | 1.5.0 |
3232

3333
### 事件
3434

35-
| 事件名称 | 说明 | 回调参数 | 版本 |
35+
| 事件名称 | 说明 | 回调参数 | 版本 | |
3636
| -------- | ---------------------- | ----------------------------------- | ---- | ----- |
37-
| click | `click` 事件的 handler | Function(e: Event, link: Object) | |
3837
| change | 监听锚点链接改变 | (currentActiveLink: string) => void | | 1.5.0 |
38+
| click | `click` 事件的 handler | Function(e: Event, link: Object) | | |
3939

4040
### Link Props
4141

4242
| 成员 | 说明 | 类型 | 默认值 | 版本 |
4343
| ------ | -------------------------------- | ------------ | ------ | ----- |
4444
| href | 锚点链接 | string | | |
45-
| title | 文字内容 | string\|slot | | |
4645
| target | 该属性指定在何处显示链接的资源。 | string | | 1.5.0 |
46+
| title | 文字内容 | string\|slot | | |

components/auto-complete/index.en-US.md

+12-12
Original file line numberDiff line numberDiff line change
@@ -26,32 +26,32 @@ The differences with Select are:
2626

2727
| Property | Description | Type | Default | Version |
2828
| --- | --- | --- | --- | --- |
29+
| #default (for customize input element) | customize input element | HTMLInputElement / HTMLTextAreaElement | `<Input />` | |
2930
| allowClear | Show clear button, effective in multiple mode only. | boolean | false | |
3031
| autofocus | get focus when component mounted | boolean | false | |
3132
| backfill | backfill selected item the input when using keyboard | boolean | false | |
32-
| #default (for customize input element) | customize input element | HTMLInputElement / HTMLTextAreaElement | `<Input />` | |
33-
| options | Data source for autocomplete | [DataSourceItemType](https://github.com/vueComponent/ant-design-vue/blob/724d53b907e577cf5880c1e6742d4c3f924f8f49/components/auto-complete/index.vue#L9)\[] | | |
34-
| option | custom render option by slot | v-slot:option="{value, label, [disabled, key, title]}" | - | 3.0 |
35-
| dropdownMenuStyle | additional style applied to dropdown menu | object | | 1.5.0 |
3633
| defaultActiveFirstOption | Whether active first option by default | boolean | true | |
34+
| defaultOpen | Initial open state of dropdown | boolean | - | |
3735
| disabled | Whether disabled select | boolean | false | |
3836
| dropdownMatchSelectWidth | Determine whether the dropdown menu and the select input are the same width. Default set `min-width` same as input. Will ignore when value less than select width. `false` will disable virtual scroll | boolean \| number | true | |
37+
| dropdownMenuStyle | additional style applied to dropdown menu | object | | 1.5.0 |
3938
| 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 | |
39+
| open | Controlled open state of dropdown | boolean | - | |
40+
| option | custom render option by slot | v-slot:option="{value, label, [disabled, key, title]}" | - | 3.0 |
41+
| options | Data source for autocomplete | [DataSourceItemType](https://github.com/vueComponent/ant-design-vue/blob/724d53b907e577cf5880c1e6742d4c3f924f8f49/components/auto-complete/index.vue#L9)\[] | | |
4042
| placeholder | placeholder of input | string | - | |
4143
| v-model:value | selected option | string\|string\[]\|{ key: string, label: string\|vNodes }\|Array&lt;{ key: string, label: string\|vNodes }> | - | |
42-
| defaultOpen | Initial open state of dropdown | boolean | - | |
43-
| open | Controlled open state of dropdown | boolean | - | |
4444

4545
### events
4646

47-
| Events Name | Description | Arguments | Version |
47+
| Events Name | Description | Arguments | Version | |
4848
| --- | --- | --- | --- | --- |
49-
| change | Called when select an option or input value change, or value of input is changed | function(value) | |
50-
| blur | Called when leaving the component. | function() | |
51-
| focus | Called when entering the component | function() | |
49+
| blur | Called when leaving the component. | function() | | |
50+
| change | Called when select an option or input value change, or value of input is changed | function(value) | | |
51+
| dropdownVisibleChange | Call when dropdown open | function(open) | | |
52+
| focus | Called when entering the component | function() | | |
5253
| search | Called when searching items. | function(value) | - | |
53-
| select | Called when a option is selected. param is option's value and option instance. | function(value, option) | |
54-
| dropdownVisibleChange | Call when dropdown open | function(open) | |
54+
| select | Called when a option is selected. param is option's value and option instance. | function(value, option) | | |
5555

5656
## Methods
5757

components/auto-complete/index.zh-CN.md

+14-14
Original file line numberDiff line numberDiff line change
@@ -27,39 +27,39 @@ cover: https://gw.alipayobjects.com/zos/alicdn/qtJm4yt45/AutoComplete.svg
2727

2828
| 参数 | 说明 | 类型 | 默认值 | 版本 |
2929
| --- | --- | --- | --- | --- |
30+
| #default (自定义输入框) | 自定义输入框 | HTMLInputElement / HTMLTextAreaElement | `<Input />` | |
3031
| allowClear | 支持清除, 单选模式有效 | boolean | false | |
3132
| autofocus | 自动获取焦点 | boolean | false | |
3233
| backfill | 使用键盘选择选项的时候把选中项回填到输入框中 | boolean | false | |
33-
| #default (自定义输入框) | 自定义输入框 | HTMLInputElement / HTMLTextAreaElement | `<Input />` | |
34-
| options | 自动完成的数据源 | [DataSourceItemType](https://github.com/vueComponent/ant-design-vue/blob/724d53b907e577cf5880c1e6742d4c3f924f8f49/components/auto-complete/index.vue#L9)\[] | | |
35-
| option | 通过 option 插槽,自定义节点 | v-slot:option="{value, label, [disabled, key, title]}" | - | 3.0 |
36-
| dropdownMenuStyle | dropdown 菜单自定义样式 | object | | 1.5.0 |
3734
| defaultActiveFirstOption | 是否默认高亮第一个选项。 | boolean | true | |
35+
| defaultOpen | 是否默认展开下拉菜单 | boolean | - | |
3836
| disabled | 是否禁用 | boolean | false | |
3937
| dropdownMatchSelectWidth | 下拉菜单和选择器同宽。默认将设置 `min-width`,当值小于选择框宽度时会被忽略。false 时会关闭虚拟滚动 | boolean \| number | true | |
38+
| dropdownMenuStyle | dropdown 菜单自定义样式 | object | | 1.5.0 |
4039
| filterOption | 是否根据输入项进行筛选。当其为一个函数时,会接收 `inputValue` `option` 两个参数,当 `option` 符合筛选条件时,应返回 `true`,反之则返回 `false`| boolean or function(inputValue, option) | true | |
40+
| open | 是否展开下拉菜单 | boolean | - | |
41+
| option | 通过 option 插槽,自定义节点 | v-slot:option="{value, label, [disabled, key, title]}" | - | 3.0 |
42+
| options | 自动完成的数据源 | [DataSourceItemType](https://github.com/vueComponent/ant-design-vue/blob/724d53b907e577cf5880c1e6742d4c3f924f8f49/components/auto-complete/index.vue#L9)\[] | | |
4143
| placeholder | 输入框提示 | string \| slot | - | |
4244
| v-model:value | 指定当前选中的条目 | string\|string\[]\|{ key: string, label: string\|vNodes }\|Array&lt;{ key: string, label: string\|vNodes }> || |
43-
| defaultOpen | 是否默认展开下拉菜单 | boolean | - | |
44-
| open | 是否展开下拉菜单 | boolean | - | |
4545

4646
### 事件
4747

4848
| 事件名称 | 说明 | 回调参数 | 版本 |
4949
| --- | --- | --- | --- |
50-
| change | 选中 option,或 input 的 value 变化时,调用此函数 | function(value) |
51-
| blur | 失去焦点时的回调 | function() |
52-
| focus | 获得焦点时的回调 | function() |
53-
| search | 搜索补全项的时候调用 | function(value) |
54-
| select | 被选中时调用,参数为选中项的 value 值 | function(value, option) |
55-
| dropdownVisibleChange | 展开下拉菜单的回调 | function(open) |
50+
| blur | 失去焦点时的回调 | function() | |
51+
| change | 选中 option,或 input 的 value 变化时,调用此函数 | function(value) | |
52+
| dropdownVisibleChange | 展开下拉菜单的回调 | function(open) | |
53+
| focus | 获得焦点时的回调 | function() | |
54+
| search | 搜索补全项的时候调用 | function(value) | |
55+
| select | 被选中时调用,参数为选中项的 value 值 | function(value, option) | |
5656

5757
## 方法
5858

5959
| 名称 | 描述 | 版本 |
6060
| ------- | -------- | ---- |
61-
| blur() | 移除焦点 |
62-
| focus() | 获取焦点 |
61+
| blur() | 移除焦点 | |
62+
| focus() | 获取焦点 | |
6363

6464
## FAQ
6565

components/avatar/index.en-US.md

+9-9
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,16 @@ Avatars can be used to represent people or objects. It supports images, `Icon`s,
1313

1414
| Property | Description | Type | Default | Version |
1515
| --- | --- | --- | --- | --- |
16-
| icon | the `Icon` type for an icon avatar, see `Icon` Component | VNode \| slot | - |
17-
| shape | the shape of avatar | `circle` \| `square` | `circle` |
18-
| size | The size of the avatar | number \| `large` \| `small` \| `default` \| { xs: number, sm: number, ...} | `default` | 2.2.0 |
19-
| src | the address of the image for an image avatar | string | - |
20-
| srcset | a list of sources to use for different screen resolutions | string | - |
21-
| alt | This attribute defines the alternative text describing the image | string | - |
22-
| gap | Letter type unit distance between left and right sides | number | 4 | 2.2.0 |
23-
| draggable | Whether the picture is allowed to be dragged | boolean \| `'true'` \| `'false'` | - | 2.2.0 |
16+
| alt | This attribute defines the alternative text describing the image | string | - | |
2417
| crossOrigin | CORS settings attributes | `'anonymous'` \| `'use-credentials'` \| `''` | - | 3.0 |
25-
| loadError | handler when img load error, return false to prevent default fallback behavior | () => boolean | - |
18+
| draggable | Whether the picture is allowed to be dragged | boolean \| `'true'` \| `'false'` | - | 2.2.0 |
19+
| gap | Letter type unit distance between left and right sides | number | 4 | 2.2.0 |
20+
| icon | the `Icon` type for an icon avatar, see `Icon` Component | VNode \| slot | - | |
21+
| loadError | handler when img load error, return false to prevent default fallback behavior | () => boolean | - | |
22+
| shape | the shape of avatar | `circle` \| `square` | `circle` | |
23+
| size | The size of the avatar | number \| `large` \| `small` \| `default` \| { xs: number, sm: number, ...} | `default` | 2.2.0 |
24+
| src | the address of the image for an image avatar | string | - | |
25+
| srcset | a list of sources to use for different screen resolutions | string | - | |
2626

2727
### Avatar.Group (2.2.0)
2828

components/avatar/index.zh-CN.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,16 @@ cover: https://gw.alipayobjects.com/zos/antfincdn/aBcnbw68hP/Avatar.svg
1818

1919
| 参数 | 说明 | 类型 | 默认值 | 版本 |
2020
| --- | --- | --- | --- | --- |
21-
| icon | 设置头像的图标类型,可设为 Icon 的 `type` 或 VNode | VNode \| slot | - |
21+
| alt | 图像无法显示时的替代文本 | string | - | |
22+
| crossOrigin | CORS 属性设置 | `'anonymous'` \| `'use-credentials'` \| `''` | - | 3.0 |
23+
| draggable | 图片是否允许拖动 | boolean \| `'true'` \| `'false'` | - | 2.2.0 |
24+
| gap | 字符类型距离左右两侧边界单位像素 | number | 4 | 2.2.0 |
25+
| icon | 设置头像的图标类型,可设为 Icon 的 `type` 或 VNode | VNode \| slot | - | |
26+
| loadError | 图片加载失败的事件,返回 false 会关闭组件默认的 fallback 行为 | () => boolean | - | |
2227
| shape | 指定头像的形状 | `circle` \| `square` | `circle` | |
2328
| size | 设置头像的大小 | number \| `large` \| `small` \| `default` \| { xs: number, sm: number, ...} | `default` | 2.2.0 |
24-
| src | 图片类头像的资源地址 | string | - |
25-
| srcset | 设置图片类头像响应式资源地址 | string | - |
26-
| alt | 图像无法显示时的替代文本 | string | - |
27-
| gap | 字符类型距离左右两侧边界单位像素 | number | 4 | 2.2.0 |
28-
| draggable | 图片是否允许拖动 | boolean \| `'true'` \| `'false'` | - | 2.2.0 |
29-
| loadError | 图片加载失败的事件,返回 false 会关闭组件默认的 fallback 行为 | () => boolean | - |
30-
| crossOrigin | CORS 属性设置 | `'anonymous'` \| `'use-credentials'` \| `''` | - | 3.0 |
29+
| src | 图片类头像的资源地址 | string | - | |
30+
| srcset | 设置图片类头像响应式资源地址 | string | - | |
3131

3232
### Avatar.Group (2.2.0)
3333

components/badge/index.zh-CN.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,12 @@ cover: https://gw.alipayobjects.com/zos/antfincdn/6%26GF9WHwvY/Badge.svg
3131
| color | 自定义小圆点的颜色 | string | - | 1.5.0 |
3232
| count | 展示的数字,大于 overflowCount 时显示为 `${overflowCount}+`,为 0 时隐藏 | number \| string \| slot | | |
3333
| dot | 不展示数字,只有一个小红点 | boolean | false | |
34+
| numberStyle | 设置状态点的样式 | object | '' | |
3435
| offset | 设置状态点的位置偏移,格式为 [x, y] | [number\|string, number\|string] | - | |
3536
| overflowCount | 展示封顶的数字值 | number | 99 | |
3637
| showZero | 当数值为 0 时,是否展示 Badge | boolean | false | |
3738
| status | 设置 Badge 为状态点 | Enum{ 'success', 'processing, 'default', 'error', 'warning' } | '' | |
3839
| text | 在设置了 `status` 的前提下有效,设置状态点的文本 | string | '' | |
39-
| numberStyle | 设置状态点的样式 | object | '' | |
4040
| title | 设置鼠标放在状态点上时显示的文字 | string | `count` | |
4141

4242
### Badge.Ribbon (2.0.1+)

components/breadcrumb/index.en-US.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ A breadcrumb displays the current location within a hierarchy. It allows going b
3131

3232
#### Events
3333

34-
| Events Name | Description | Arguments | Version |
34+
| Events Name | Description | Arguments | Version | |
3535
| ----------- | ----------------------------- | -------------------- | ------- | ----- |
3636
| click | handler to handle click event | (e:MouseEvent)=>void | - | 1.5.0 |
3737

components/breadcrumb/index.zh-CN.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ cover: https://gw.alipayobjects.com/zos/alicdn/9Ltop8JwH/Breadcrumb.svg
3232

3333
#### 事件
3434

35-
| 事件名称 | 说明 | 回调参数 | 版本 |
35+
| 事件名称 | 说明 | 回调参数 | 版本 | |
3636
| -------- | -------- | -------------------- | ---- | ----- |
3737
| click | 单击事件 | (e:MouseEvent)=>void | - | 1.5.0 |
3838

0 commit comments

Comments
 (0)