裂变星小程序-25.03.04
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.

68 lines
1.3 KiB

1 month ago
  1. export default {
  2. props: {
  3. // 瀑布流数据
  4. // #ifdef VUE2
  5. value: {
  6. type: Array,
  7. default: () => []
  8. },
  9. // #endif
  10. // #ifdef VUE3
  11. modelValue: {
  12. type: Array,
  13. default: () => []
  14. },
  15. // #endif
  16. // 数据的id值,根据id值对数据执行删除操作
  17. // 如数据为:{id: 1, name: 'uv-ui'},那么该值设置为id
  18. idKey: {
  19. type: String,
  20. default: 'id'
  21. },
  22. // 每次插入数据的事件间隔,间隔越长能保证两列高度相近,但是用户体验不好,单位ms
  23. addTime: {
  24. type: Number,
  25. default: 200
  26. },
  27. // 瀑布流的列数,默认2,最高为5
  28. columnCount: {
  29. type: [Number, String],
  30. default: 2
  31. },
  32. // 列与列的间隙,默认20
  33. columnGap: {
  34. type: [Number, String],
  35. default: 20
  36. },
  37. // 左边和列表的间隙
  38. leftGap: {
  39. type: [Number, String],
  40. default: 0
  41. },
  42. // 右边和列表的间隙
  43. rightGap: {
  44. type: [Number, String],
  45. default: 0
  46. },
  47. // 是否显示滚动条,仅nvue生效
  48. showScrollbar: {
  49. type: [Boolean],
  50. default: false
  51. },
  52. // 列宽,nvue生效
  53. columnWidth: {
  54. type: [Number, String],
  55. default: 'auto'
  56. },
  57. // 瀑布流的宽度,nvue生效
  58. width: {
  59. type: [Number, String],
  60. default: ''
  61. },
  62. // 瀑布流的高度,nvue生效
  63. height: {
  64. type: [Number, String],
  65. default: ''
  66. },
  67. ...uni.$uv?.props?.waterfall
  68. }
  69. }