ant-design/components/avatar/demo/badge.md
2019-04-19 23:33:10 +01:00

477 B

order title
3
zh-CN en-US
带徽标的头像 With Badge

zh-CN

通常用于消息提示。

en-US

Usually used for reminders and notifications.

import { Avatar, Badge } from 'antd';

ReactDOM.render(
  <div>
    <span style={{ marginRight: 24 }}>
      <Badge count={1}><Avatar shape="square" icon="user" /></Badge>
    </span>
    <span>
      <Badge dot><Avatar shape="square" icon="user" /></Badge>
    </span>
  </div>,
  mountNode
);