You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

54 lines
1.6 KiB

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