props.js 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. import { defineMixin } from '../../libs/vue'
  2. import defProps from '../../libs/config/props.js'
  3. export const props = defineMixin({
  4. props: {
  5. // 操作菜单是否展示 (默认false)
  6. show: {
  7. type: Boolean,
  8. default: () => defProps.actionSheet.show
  9. },
  10. // 标题
  11. title: {
  12. type: String,
  13. default: () => defProps.actionSheet.title
  14. },
  15. // 选项上方的描述信息
  16. description: {
  17. type: String,
  18. default: () => defProps.actionSheet.description
  19. },
  20. // 数据
  21. actions: {
  22. type: Array,
  23. default: () => defProps.actionSheet.actions
  24. },
  25. // 取消按钮的文字,不为空时显示按钮
  26. cancelText: {
  27. type: String,
  28. default: () => defProps.actionSheet.cancelText
  29. },
  30. // 点击某个菜单项时是否关闭弹窗
  31. closeOnClickAction: {
  32. type: Boolean,
  33. default: () => defProps.actionSheet.closeOnClickAction
  34. },
  35. // 处理底部安全区(默认true)
  36. safeAreaInsetBottom: {
  37. type: Boolean,
  38. default: () => defProps.actionSheet.safeAreaInsetBottom
  39. },
  40. // 小程序的打开方式
  41. openType: {
  42. type: String,
  43. default: () => defProps.actionSheet.openType
  44. },
  45. // 点击遮罩是否允许关闭 (默认true)
  46. closeOnClickOverlay: {
  47. type: Boolean,
  48. default: () => defProps.actionSheet.closeOnClickOverlay
  49. },
  50. // 圆角值
  51. round: {
  52. type: [Boolean, String, Number],
  53. default: () => defProps.actionSheet.round
  54. },
  55. // 选项区域最大高度
  56. wrapMaxHeight: {
  57. type: [String],
  58. default: () => defProps.actionSheet.wrapMaxHeight
  59. },
  60. }
  61. })