ant-design/components/avatar/demo/fallback.md
陈帅 f928baf52a
fix: Optimize the display of elements of the block type. (#25903)
* add flex style

* add new demo

* update snapshot

* Merge branch feature into fix-descriptions

* update snapshot

* update snapshot
2020-08-06 14:32:13 +08:00

32 lines
452 B
Markdown

---
order: 99
title:
zh-CN: 图片不存在时
en-US: Fallback
debug: true
---
## zh-CN
图片不存在时,会回退到 `src`
## en-US
图片不存在时,会回退到 `src`
```tsx
import { Avatar } from 'antd';
ReactDOM.render(
<>
<Avatar shape="circle" src="http://abc.com/not-exist.jpg">
A
</Avatar>
<Avatar shape="circle" src="http://abc.com/not-exist.jpg">
ABC
</Avatar>
</>,
mountNode,
);
```