跳到主要内容

eo-avatar

<eo-avatar>

头像

Examples​

Type​

Playground

Size​

Playground

Shape​

Playground

Properties​

NameDescriptionTypeDefaultRequired
size

尺寸

AvatarSize "medium"
gapSize

头像和名称间距大小

"medium" | "large" "medium"
shape

形状

"circle" | "round-square" "circle"
src

图片地址

string
alt

图像无法显示时的替代文本

string
icon

图标

GeneralIconProps
name

用户名

string
bordered

是否有边框

boolean
showName

是否展示名称

boolean

Parts​

NameDescription
avatar

头像容器

avatar-img

显示为图片时的头像容器

avatar-icon

显示为图标时的头像容器

avatar-text

显示为文本时的头像容器

name

用户名

Type references​

AvatarSize​

"large" | "medium" | "small" | "xs"