city-casereport/miniprogram_npm/tdesign-miniprogram/avatar
2023-12-06 14:22:42 +08:00
..
avatar.d.ts 户籍信息录入 2023-12-06 14:22:42 +08:00
avatar.js 户籍信息录入 2023-12-06 14:22:42 +08:00
avatar.json 户籍信息录入 2023-12-06 14:22:42 +08:00
avatar.wxml 户籍信息录入 2023-12-06 14:22:42 +08:00
avatar.wxs 户籍信息录入 2023-12-06 14:22:42 +08:00
avatar.wxss 户籍信息录入 2023-12-06 14:22:42 +08:00
props.d.ts 户籍信息录入 2023-12-06 14:22:42 +08:00
props.js 户籍信息录入 2023-12-06 14:22:42 +08:00
README.en-US.md 户籍信息录入 2023-12-06 14:22:42 +08:00
README.md 户籍信息录入 2023-12-06 14:22:42 +08:00
type.d.ts 户籍信息录入 2023-12-06 14:22:42 +08:00
type.js 户籍信息录入 2023-12-06 14:22:42 +08:00

:: BASE_DOC ::

API

Avatar Props

name type default description required
alt String - show it when url is not valid N
badge-props Object - TypescriptBadgePropsBadge API Documentssee more ts definition N
bordered Boolean false - N
external-classes Array - ['t-class', 't-class-image', 't-class-icon', 't-class-alt', 't-class-content'] N
hide-on-load-failed Boolean false hide image when loading image failed N
icon String / Object - - N
image String - images url N
image-props Object - - N
shape String circle shape。optionscircle/round。TypescriptShapeEnum type ShapeEnum = 'circle' | 'round'see more ts definition N
size String medium size N

Avatar Events

name params description
error - trigger on image load failed

AvatarGroup Props

name type default description required
cascading String 'right-up' multiple images cascading。optionsleft-up/right-up。TypescriptCascadingValue type CascadingValue = 'left-up' | 'right-up'see more ts definition N
collapse-avatar String / Slot - - N
external-classes Array - ['t-class', 't-class-image', 't-class-content'] N
max Number - - N
size String medium size N

CSS Variables

The component provides the following CSS variables, which can be used to customize styles.

Name Default Value Description
--td-avatar-group-margin-left-large -8px -
--td-avatar-group-margin-left-medium -6px -
--td-avatar-group-margin-left-small -4px -
--td-avatar-bg-color @brand-color-light-active -
--td-avatar-border-color #fff -
--td-avatar-border-width-large 8rpx -
--td-avatar-border-width-medium 6rpx -
--td-avatar-border-width-small 4rpx -
--td-avatar-circle-border-radius @radius-circle -
--td-avatar-content-color @brand-color -
--td-avatar-icon-large-font-size 64rpx -
--td-avatar-icon-medium-font-size 48rpx -
--td-avatar-icon-small-font-size 40rpx -
--td-avatar-large-width 128rpx -
--td-avatar-margin-left 0 -
--td-avatar-medium-width 96rpx -
--td-avatar-round-border-radius @radius-default -
--td-avatar-small-width 80rpx -
--td-avatar-text-large-font-size 16px -
--td-avatar-text-medium-font-size @font-size-base -
--td-avatar-text-small-font-size @font-size-s -