props.js 816 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. import { defineProps } from '../../libs/util/props';
  2. export default defineProps('draggable', {
  3. // 数据列表
  4. list: {
  5. type: Array,
  6. default: []
  7. },
  8. // 列数
  9. column: {
  10. type: Number,
  11. default: 2
  12. },
  13. // 宽高比,填写这项时gridHeight失效
  14. aspectRatio: {
  15. type: Number,
  16. default: null
  17. },
  18. // 项目高度
  19. itemHeight: {
  20. type: [Number, String],
  21. default: 60
  22. },
  23. // 阻尼系数
  24. damping: {
  25. type: Number,
  26. default: 50
  27. },
  28. // 摩擦系数
  29. friction: {
  30. type: Number,
  31. default: 2
  32. },
  33. // 是否使用手柄拖拽
  34. handle: {
  35. type: Boolean,
  36. default: false
  37. },
  38. // 是否禁用
  39. disabled: {
  40. type: Boolean,
  41. default: false
  42. },
  43. // 是否长按拖拽
  44. longpress: {
  45. type: Boolean,
  46. default: false
  47. },
  48. // 是否显示关闭按钮
  49. closeable: {
  50. type: Boolean,
  51. default: false
  52. }
  53. })