2017-06-09 15:00:44 +08:00
|
|
|
---
|
|
|
|
order: 3
|
|
|
|
title:
|
|
|
|
zh-CN: 带徽标的头像
|
|
|
|
en-US: With Badge
|
|
|
|
---
|
|
|
|
|
|
|
|
## zh-CN
|
|
|
|
|
|
|
|
通常用于消息提示。
|
|
|
|
|
|
|
|
## en-US
|
|
|
|
|
2019-04-20 06:33:10 +08:00
|
|
|
Usually used for reminders and notifications.
|
2017-06-09 15:00:44 +08:00
|
|
|
|
2019-05-07 14:57:32 +08:00
|
|
|
```jsx
|
2017-06-09 15:00:44 +08:00
|
|
|
import { Avatar, Badge } from 'antd';
|
|
|
|
|
|
|
|
ReactDOM.render(
|
|
|
|
<div>
|
|
|
|
<span style={{ marginRight: 24 }}>
|
2019-05-07 14:57:32 +08:00
|
|
|
<Badge count={1}>
|
|
|
|
<Avatar shape="square" icon="user" />
|
|
|
|
</Badge>
|
2017-06-09 15:00:44 +08:00
|
|
|
</span>
|
|
|
|
<span>
|
2019-05-07 14:57:32 +08:00
|
|
|
<Badge dot>
|
|
|
|
<Avatar shape="square" icon="user" />
|
|
|
|
</Badge>
|
2017-06-09 15:00:44 +08:00
|
|
|
</span>
|
2018-06-27 15:55:04 +08:00
|
|
|
</div>,
|
2019-05-07 14:57:32 +08:00
|
|
|
mountNode,
|
2018-11-28 15:00:03 +08:00
|
|
|
);
|
2019-05-07 14:57:32 +08:00
|
|
|
```
|