Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
 
 
 

58 строки
1.7 KiB

  1. import { defineMixin } from '../../libs/vue'
  2. import AvatarGroupDefaultProps from './avatarGroup'
  3. import { registerComponentProps } from '../../libs/config/props.js'
  4. const defProps = registerComponentProps(AvatarGroupDefaultProps)
  5. export const props = defineMixin({
  6. props: {
  7. // 头像图片组
  8. urls: {
  9. type: Array,
  10. default: () => defProps.avatarGroup.urls
  11. },
  12. // 最多展示的头像数量
  13. maxCount: {
  14. type: [String, Number],
  15. default: () => defProps.avatarGroup.maxCount
  16. },
  17. // 头像形状
  18. shape: {
  19. type: String,
  20. default: () => defProps.avatarGroup.shape
  21. },
  22. // 图片裁剪模式
  23. mode: {
  24. type: String,
  25. default: () => defProps.avatarGroup.mode
  26. },
  27. // 超出maxCount时是否显示查看更多的提示
  28. showMore: {
  29. type: Boolean,
  30. default: () => defProps.avatarGroup.showMore
  31. },
  32. // 头像大小
  33. size: {
  34. type: [String, Number],
  35. default: () => defProps.avatarGroup.size
  36. },
  37. // 指定从数组的对象元素中读取哪个属性作为图片地址
  38. keyName: {
  39. type: String,
  40. default: () => defProps.avatarGroup.keyName
  41. },
  42. // 头像之间的遮挡比例
  43. gap: {
  44. type: [String, Number],
  45. validator(value) {
  46. return value >= 0 && value <= 1
  47. },
  48. default: () => defProps.avatarGroup.gap
  49. },
  50. // 需额外显示的值
  51. extraValue: {
  52. type: [Number, String],
  53. default: () => defProps.avatarGroup.extraValue
  54. }
  55. }
  56. })