mirror of
https://github.com/ant-design/ant-design.git
synced 2025-07-31 20:36:35 +08:00

* refactor: avatar code * fix: Fix Avatar fallback bug close #25801 * add blank * update demo
486 B
486 B
order | title | debug | ||||
---|---|---|---|---|---|---|
99 |
|
true |
zh-CN
图片不存在时,会回退到 src
。
en-US
图片不存在时,会回退到 src
。
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,
);