You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
508 B

8 years ago
---
order: 3
title:
zh-CN: 带徽标的头像
en-US: With Badge
---
## zh-CN
通常用于消息提示。
## en-US
Usually used for reminders and notifications.
8 years ago
```jsx
8 years ago
import { Avatar, Badge } from 'antd';
ReactDOM.render(
<div>
<span style={{ marginRight: 24 }}>
<Badge count={1}>
<Avatar shape="square" icon="user" />
</Badge>
8 years ago
</span>
<span>
<Badge dot>
<Avatar shape="square" icon="user" />
</Badge>
8 years ago
</span>
</div>,
mountNode,
);
```