2017-05-28 14:20:59 +08:00
|
|
|
---
|
|
|
|
order: 0
|
|
|
|
title:
|
|
|
|
zh-CN: 基本
|
|
|
|
en-US: Basic
|
|
|
|
---
|
|
|
|
|
|
|
|
## zh-CN
|
|
|
|
|
|
|
|
头像有三种尺寸,两种形状可选。
|
|
|
|
|
|
|
|
## en-US
|
|
|
|
|
|
|
|
Three sizes and two shapes are available.
|
|
|
|
|
|
|
|
````jsx
|
2017-06-19 12:13:33 +08:00
|
|
|
import { Avatar } from 'antd';
|
2017-05-28 14:20:59 +08:00
|
|
|
|
|
|
|
ReactDOM.render(
|
|
|
|
<div>
|
2017-06-19 12:13:33 +08:00
|
|
|
<div>
|
|
|
|
<Avatar size="large" icon="user" />
|
|
|
|
<Avatar icon="user" />
|
|
|
|
<Avatar size="small" icon="user" />
|
|
|
|
</div>
|
|
|
|
<div>
|
|
|
|
<Avatar shape="square" size="large" icon="user" />
|
|
|
|
<Avatar shape="square" icon="user" />
|
|
|
|
<Avatar shape="square" size="small" icon="user" />
|
|
|
|
</div>
|
2017-05-28 14:20:59 +08:00
|
|
|
</div>
|
|
|
|
, mountNode);
|
|
|
|
````
|
2017-06-19 12:13:33 +08:00
|
|
|
|
|
|
|
<style>
|
|
|
|
#components-avatar-demo-basic .ant-avatar {
|
|
|
|
margin-top: 16px;
|
|
|
|
margin-right: 16px;
|
|
|
|
}
|
|
|
|
</style>
|