props.js 1.0 KB

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