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.

61 lines
2.0 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. // 图片地址,Array<String>|Array<Object>形式
  6. urls: {
  7. type: Array,
  8. default: () => defProps.album.urls
  9. },
  10. // 指定从数组的对象元素中读取哪个属性作为图片地址
  11. keyName: {
  12. type: String,
  13. default: () => defProps.album.keyName
  14. },
  15. // 单图时,图片长边的长度
  16. singleSize: {
  17. type: [String, Number],
  18. default: () => defProps.album.singleSize
  19. },
  20. // 多图时,图片边长
  21. multipleSize: {
  22. type: [String, Number],
  23. default: () => defProps.album.multipleSize
  24. },
  25. // 多图时,图片水平和垂直之间的间隔
  26. space: {
  27. type: [String, Number],
  28. default: () => defProps.album.space
  29. },
  30. // 单图时,图片缩放裁剪的模式
  31. singleMode: {
  32. type: String,
  33. default: () => defProps.album.singleMode
  34. },
  35. // 多图时,图片缩放裁剪的模式
  36. multipleMode: {
  37. type: String,
  38. default: () => defProps.album.multipleMode
  39. },
  40. // 最多展示的图片数量,超出时最后一个位置将会显示剩余图片数量
  41. maxCount: {
  42. type: [String, Number],
  43. default: () => defProps.album.maxCount
  44. },
  45. // 是否可以预览图片
  46. previewFullImage: {
  47. type: Boolean,
  48. default: () => defProps.album.previewFullImage
  49. },
  50. // 每行展示图片数量,如设置,singleSize和multipleSize将会无效
  51. rowCount: {
  52. type: [String, Number],
  53. default: () => defProps.album.rowCount
  54. },
  55. // 超出maxCount时是否显示查看更多的提示
  56. showMore: {
  57. type: Boolean,
  58. default: () => defProps.album.showMore
  59. }
  60. }
  61. })