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.

43 lines
1.3 KiB

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