props.js 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. import defprops from '../../libs/config/props';
  2. export default {
  3. props: {
  4. // 控制打开或者关闭
  5. show: {
  6. type: Boolean,
  7. default: defprops.swipeActionItem.show
  8. },
  9. // 标识符,如果是v-for,可用index索引值
  10. name: {
  11. type: [String, Number],
  12. default: defprops.swipeActionItem.name
  13. },
  14. // 是否禁用
  15. disabled: {
  16. type: Boolean,
  17. default: defprops.swipeActionItem.disabled
  18. },
  19. // 是否自动关闭其他swipe按钮组
  20. autoClose: {
  21. type: Boolean,
  22. default: defprops.swipeActionItem.autoClose
  23. },
  24. // 滑动距离阈值,只有大于此值,才被认为是要打开菜单
  25. threshold: {
  26. type: Number,
  27. default: defprops.swipeActionItem.threshold
  28. },
  29. // 右侧按钮内容
  30. options: {
  31. type: Array,
  32. default() {
  33. return uni.$u.props.swipeActionItem.rightOptions
  34. }
  35. },
  36. // 动画过渡时间,单位ms
  37. duration: {
  38. type: [String, Number],
  39. default: defprops.swipeActionItem.duration
  40. }
  41. }
  42. }