123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 |
- import { defineMixin } from '../../libs/vue'
- import defProps from '../../libs/config/props.js'
- import test from '../../libs/function/test';
- export const props = defineMixin({
- props: {
-
- src: {
- type: String,
- default: () => defProps.avatar.src
- },
-
- shape: {
- type: String,
- default: () => defProps.avatar.shape
- },
-
- size: {
- type: [String, Number],
- default: () => defProps.avatar.size
- },
-
- mode: {
- type: String,
- default: () => defProps.avatar.mode
- },
-
- text: {
- type: String,
- default: () => defProps.avatar.text
- },
-
- bgColor: {
- type: String,
- default: () => defProps.avatar.bgColor
- },
-
- color: {
- type: String,
- default: () => defProps.avatar.color
- },
-
- fontSize: {
- type: [String, Number],
- default: () => defProps.avatar.fontSize
- },
-
- icon: {
- type: String,
- default: () => defProps.avatar.icon
- },
-
- mpAvatar: {
- type: Boolean,
- default: () => defProps.avatar.mpAvatar
- },
-
- randomBgColor: {
- type: Boolean,
- default: () => defProps.avatar.randomBgColor
- },
-
- defaultUrl: {
- type: String,
- default: () => defProps.avatar.defaultUrl
- },
-
- colorIndex: {
- type: [String, Number],
-
- validator(n) {
- return test.range(n, [0, 19]) || n === ''
- },
- default: () => defProps.avatar.colorIndex
- },
-
- name: {
- type: String,
- default: () => defProps.avatar.name
- }
- }
- })
|