ant-design-vue/components/avatar/index.zh-CN.md
tangjinzhou 2ee3d43534
Feat css var (#5327)
* style: affix & util

* feat(alert): add customIcon slot

* feat(anchor): ts type

* style: auto-complete

* feat: avatar add crossOrigin & maxPopoverTrigger

* style(backTop): v-show instead v-if

* style: badge

* style: breadcrumb

* feat: button add global size

* feat: update i18n

* feat: picker add disabledTime

* test: update snap

* doc: update img url

* style: fix Card tabs of left position

* doc: update cascader doc

* feat: collapse

* style: comment

* style: configprovider

* feat: date-picker add soem icon slot

* style: update descriptions style

* feat: add divider orientationMargin

* doc: update drawer

* feat: dropdown add destroyPopupOnHide & loading

* style: update empty

* feat: form add labelWrap

* style: update grid

* test: update grid snap

* fix: image ts error

* fix: mentions cannot select, close #5233

* doc: update pagination change info, close #5293

* fix: table dynamic expand error, close #5295

* style: remove not use

* release 3.0.0-beta.11

* doc: update typo

* feat: input add showCount

* feat: inputNumber add prefix slot

* style: update layout

* style: update list

* feat: add locale i18

* style: update locale ts

* style: update mentions

* feat: menu divider add dashed

* perf: menu

* perf: menu animate

* feat: modal method add wrapClassName

* style: update pageheader

* feat: update pagination ts

* feat: confirm add showCancel & promise

* doc: update popover

* style: update progress

* style: radio

* style: update rate、result、row

* feat: select add fieldNames

* feat: add skeleton button & input

* feat: spin tip support slot

* style: slider & space

* stype: update steps ts type

* style: update switch

* feat: table add tree filter

* test: update input sanp

* feat: table add filterMode...

* fix: tree autoExpandParent bug

* test: update input snap

* doc: tabs add destroyInactiveTabPane

* style: update tag

* style: update timeline & time-picker

* fix: Tooltip arrowPointAtCenter 1px shift bug

* feat: typography add enterEnterIcon triggerType

* doc: update tree-select

* fix: deps and TypeScript types

* style: udpate transfer

* style: update style

* doc: add colorScheme

* chore: add css var builg

* doc: sort api

* style: lint code

* doc: add css var

* test: update snap

* chore: add pre script

* chore: update lint

* perf: collapse animate

* perf: collapse tree

* perf: typography shaking when edit

* doc: update auto-complete demo

* fix: table tree not have animate

* feat: deprecated dropdown center placement

* feat: deprecated dropdown center placement

* test: update snap
2022-03-12 09:56:32 +08:00

1.8 KiB

category subtitle type title cover
Components 头像 数据展示 Avatar https://gw.alipayobjects.com/zos/antfincdn/aBcnbw68hP/Avatar.svg

用来代表用户或事物,支持图片、图标或字符展示。

设计师专属

安装 Kitchen Sketch 插件 💎,一键填充高逼格头像和文本。

API

Avatar

参数 说明 类型 默认值 版本
alt 图像无法显示时的替代文本 string -
crossOrigin CORS 属性设置 'anonymous' | 'use-credentials' | '' - 3.0
draggable 图片是否允许拖动 boolean | 'true' | 'false' - 2.2.0
gap 字符类型距离左右两侧边界单位像素 number 4 2.2.0
icon 设置头像的图标类型,可设为 Icon 的 type 或 VNode VNode | slot -
loadError 图片加载失败的事件,返回 false 会关闭组件默认的 fallback 行为 () => boolean -
shape 指定头像的形状 circle | square circle
size 设置头像的大小 number | large | small | default | { xs: number, sm: number, ...} default 2.2.0
src 图片类头像的资源地址 string -
srcset 设置图片类头像响应式资源地址 string -

Avatar.Group (2.2.0)

参数 说明 类型 默认值 版本
maxCount 显示的最大头像个数 number -
maxPopoverPlacement 多余头像气泡弹出位置 top | bottom top
maxPopoverTrigger 设置多余头像 Popover 的触发方式 hover | focus | click hover 3.0
maxStyle 多余头像样式 CSSProperties -
size 设置头像的大小 number | large | small | default | { xs: number, sm: number, ...} default