props.js 794 B

1234567891011121314151617181920212223242526272829303132333435
  1. import { defineProps } from '../../libs/util/props';
  2. export default defineProps('waterfall', {
  3. // #ifdef VUE2
  4. value: {
  5. // 瀑布流数据
  6. type: Array,
  7. default: []
  8. },
  9. // #endif
  10. // #ifdef VUE3
  11. modelValue: {
  12. // 瀑布流数据
  13. type: Array,
  14. default: []
  15. },
  16. // #endif
  17. // 每次向结构插入数据的时间间隔,间隔越长,越能保证两列高度相近,但是对用户体验越不好
  18. // 单位ms
  19. addTime: {
  20. type: [Number, String],
  21. default: 200
  22. },
  23. // id值,用于清除某一条数据时,根据此idKey名称找到并移除,如数据为{idx: 22, name: 'lisa'}
  24. // 那么该把idKey设置为idx
  25. idKey: {
  26. type: String,
  27. default: 'id'
  28. },
  29. // 瀑布流的列数,不可动态修改
  30. column: {
  31. type: [Number, String],
  32. default: 2
  33. }
  34. })