Skip to content

Commit

Permalink
docs: explain Avatar fallback strategy (#35415)
Browse files Browse the repository at this point in the history
The original description was unclear, incomplete, and confusing, requiring a look at the code to understand it, so I revised it to a more understandable version.
  • Loading branch information
parabolazz committed May 7, 2022
1 parent d07dcd4 commit 9b56ad8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions components/avatar/demo/fallback.md
Expand Up @@ -8,11 +8,11 @@ debug: true

## zh-CN

图片不存在时,会回退到 `src`
图片不存在时,如果 `src` 本身是个 ReactElement,会尝试回退到 `src`,否则尝试回退到 `icon`,最后回退到显示 `children`

## en-US

图片不存在时,会回退到 `src`
图片不存在时,如果 `src` 本身是个 ReactElement,会尝试回退到 `src`,否则尝试回退到 `icon`,最后回退到显示 `children`

```tsx
import { Avatar } from 'antd';
Expand Down

0 comments on commit 9b56ad8

Please sign in to comment.