# Avatar 头像
用来代表用户或事物，支持图片、图标或字符展示。

### 基本使用
头像有四种尺寸，两种形状可选。

@[demo](./demo/basic.vue)


### 类型
支持三种类型：图片、Icon 以及字符，其中 Icon 和字符型可以自定义图标颜色及背景色。

@[demo](./demo/type.vue)


### 自动调整字符大小
对于字符型的头像，当字符串较长时，字体大小可以根据头像宽度自动调整。

@[demo](./demo/dynamic.vue)



## Avatar Props

| 参数 | 说明 | 类型 | 默认值 |
| --- | --- | --- | --- |
| icon | 设置头像的图标类型，参考 `Icon` 组件 | string | - |
| shape | 指定头像的形状 | circle/square | circle |
| size | 设置头像的大小 | large/medium/small/default | default |
| src | 图片类头像的资源地址 | string | - |
| text | 文本 | string | - |
