import { PropType } from 'vue' import { commonProps } from '../../common' export const avatarProps = { // 序号 index: { type: [Number, String], default: 0 }, // 头像类型 // square 带圆角正方形 circle 圆形 shape: { type: String as PropType<'circle' | 'square'>, default: 'circle' }, // 大小 // sm 小头像 lg 大头像 xl 加大头像 // 如果为其他则认为是直接设置大小 size: { type: [Number, String] as PropType, default: '' }, // 是否显示阴影 shadow: { type: Boolean, default: false }, // 是否显示边框 border: { type: Boolean, default: false }, // 边框颜色 borderColor: { type: String, default: 'rgba(0, 0, 0, 0.1)' }, // 边框大小, rpx borderSize: { type: Number, default: 2 }, // 头像路径 src: { type: String, default: '' }, // 文字 text: { type: String, default: '' }, // 图标 icon: { type: String, default: '' }, // 当设置为显示头像信息时, // 图片的裁剪模式 imgMode: { type: String, default: 'aspectFill' }, // 是否显示角标 badge: { type: Boolean, default: false }, // 设置显示角标后,角标大小 badgeSize: { type: Number, default: 0 }, // 角标背景颜色 badgeBgColor: { type: String, default: '#AAAAAA' }, // 角标字体颜色 badgeColor: { type: String, default: '#FFFFFF' }, // 角标图标 badgeIcon: { type: String, default: '' }, // 角标文字,优先级比icon高 badgeText: { type: String, default: '' }, // 角标坐标 // [top, right] badgePosition: { type: Array as PropType>, default() { return [0, 0] } }, ...commonProps }