Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.
 
 
 

98 Zeilen
3.0 KiB

  1. /*
  2. * @Author : jry
  3. * @Description :
  4. * @version : 3.0
  5. * @LastAuthor : jry
  6. * @lastTime : 2025-08-16 16:35:24
  7. * @FilePath : /uview-plus/components/u-album/props.js
  8. */
  9. import { defineMixin } from '../../libs/vue'
  10. import AlbumDefaultProps from './album'
  11. import { registerComponentProps } from '../../libs/config/props.js'
  12. const defProps = registerComponentProps(AlbumDefaultProps)
  13. export const props = defineMixin({
  14. props: {
  15. // 图片地址,Array<String>|Array<Object>形式
  16. urls: {
  17. type: Array,
  18. default: () => defProps.album.urls
  19. },
  20. // 指定从数组的对象元素中读取哪个属性作为图片地址
  21. keyName: {
  22. type: String,
  23. default: () => defProps.album.keyName
  24. },
  25. // 单图时,图片长边的长度
  26. singleSize: {
  27. type: [String, Number],
  28. default: () => defProps.album.singleSize
  29. },
  30. // 多图时,图片边长
  31. multipleSize: {
  32. type: [String, Number],
  33. default: () => defProps.album.multipleSize
  34. },
  35. // 多图时,图片水平和垂直之间的间隔
  36. space: {
  37. type: [String, Number],
  38. default: () => defProps.album.space
  39. },
  40. // 单图时,图片缩放裁剪的模式
  41. singleMode: {
  42. type: String,
  43. default: () => defProps.album.singleMode
  44. },
  45. // 多图时,图片缩放裁剪的模式
  46. multipleMode: {
  47. type: String,
  48. default: () => defProps.album.multipleMode
  49. },
  50. // 最多展示的图片数量,超出时最后一个位置将会显示剩余图片数量
  51. maxCount: {
  52. type: [String, Number],
  53. default: () => defProps.album.maxCount
  54. },
  55. // 是否可以预览图片
  56. previewFullImage: {
  57. type: Boolean,
  58. default: () => defProps.album.previewFullImage
  59. },
  60. // 每行展示图片数量,如设置,singleSize和multipleSize将会无效
  61. rowCount: {
  62. type: [String, Number],
  63. default: () => defProps.album.rowCount
  64. },
  65. // 超出maxCount时是否显示查看更多的提示
  66. showMore: {
  67. type: Boolean,
  68. default: () => defProps.album.showMore
  69. },
  70. // 图片形状,circle-圆形,square-方形
  71. shape: {
  72. type: String,
  73. default: () => defProps.image.shape
  74. },
  75. // 圆角,单位任意
  76. radius: {
  77. type: [String, Number],
  78. default: () => defProps.image.radius
  79. },
  80. // 自适应换行
  81. autoWrap: {
  82. type: Boolean,
  83. default: () => defProps.album.autoWrap
  84. },
  85. // 单位
  86. unit: {
  87. type: [String],
  88. default: () => defProps.album.unit
  89. },
  90. // 阻止点击冒泡
  91. stop: {
  92. type: Boolean,
  93. default: () => defProps.album.stop
  94. }
  95. }
  96. })