Browse Source

docs(Avatar): add draggable api (#30073)

* docs(Avatar): add draggable api

* docs(Avatar): add draggable api
pull/30085/head
xiejiahe 4 years ago
committed by GitHub
parent
commit
eca9767ba0
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      components/avatar/index.en-US.md
  2. 1
      components/avatar/index.zh-CN.md

1
components/avatar/index.en-US.md

@ -20,6 +20,7 @@ Avatars can be used to represent people or objects. It supports images, `Icon`s,
| size | The size of the avatar | number \| `large` \| `small` \| `default` \| { xs: number, sm: number, ...} | `default` | 4.7.0 | | size | The size of the avatar | number \| `large` \| `small` \| `default` \| { xs: number, sm: number, ...} | `default` | 4.7.0 |
| src | The address of the image for an image avatar or image element | string \| ReactNode | - | ReactNode: 4.8.0 | | src | The address of the image for an image avatar or image element | string \| ReactNode | - | ReactNode: 4.8.0 |
| srcSet | A list of sources to use for different screen resolutions | string | - | | | srcSet | A list of sources to use for different screen resolutions | string | - | |
| draggable | Whether the picture is allowed to be dragged | boolean \| `'true'` \| `'false'` | - | |
| onError | Handler when img load error, return false to prevent default fallback behavior | () => boolean | - | | | onError | Handler when img load error, return false to prevent default fallback behavior | () => boolean | - | |
> Tip: You can set `icon` or `children` as the fallback for image load error, with the priority of `icon` > `children` > Tip: You can set `icon` or `children` as the fallback for image load error, with the priority of `icon` > `children`

1
components/avatar/index.zh-CN.md

@ -25,6 +25,7 @@ cover: https://gw.alipayobjects.com/zos/antfincdn/aBcnbw68hP/Avatar.svg
| size | 设置头像的大小 | number \| `large` \| `small` \| `default` \| { xs: number, sm: number, ...} | `default` | 4.7.0 | | size | 设置头像的大小 | number \| `large` \| `small` \| `default` \| { xs: number, sm: number, ...} | `default` | 4.7.0 |
| src | 图片类头像的资源地址或者图片元素 | string \| ReactNode | - | ReactNode: 4.8.0 | | src | 图片类头像的资源地址或者图片元素 | string \| ReactNode | - | ReactNode: 4.8.0 |
| srcSet | 设置图片类头像响应式资源地址 | string | - | | | srcSet | 设置图片类头像响应式资源地址 | string | - | |
| draggable | 图片是否允许拖动 | boolean \| `'true'` \| `'false'` | - | |
| onError | 图片加载失败的事件,返回 false 会关闭组件默认的 fallback 行为 | () => boolean | - | | | onError | 图片加载失败的事件,返回 false 会关闭组件默认的 fallback 行为 | () => boolean | - | |
> Tip:你可以设置 `icon``children` 作为图片加载失败的默认 fallback 行为,优先级为 `icon` > `children` > Tip:你可以设置 `icon``children` 作为图片加载失败的默认 fallback 行为,优先级为 `icon` > `children`

Loading…
Cancel
Save