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.

81 lines
2.6 KiB

5 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.popup.show
  9. },
  10. // 是否显示遮罩
  11. overlay: {
  12. type: Boolean,
  13. default: () => defProps.popup.overlay
  14. },
  15. // 弹出的方向,可选值为 top bottom right left center
  16. mode: {
  17. type: String,
  18. default: () => defProps.popup.mode
  19. },
  20. // 动画时长,单位ms
  21. duration: {
  22. type: [String, Number],
  23. default: () => defProps.popup.duration
  24. },
  25. // 是否显示关闭图标
  26. closeable: {
  27. type: Boolean,
  28. default: () => defProps.popup.closeable
  29. },
  30. // 自定义遮罩的样式
  31. overlayStyle: {
  32. type: [Object, String],
  33. default: () => defProps.popup.overlayStyle
  34. },
  35. // 点击遮罩是否关闭弹窗
  36. closeOnClickOverlay: {
  37. type: Boolean,
  38. default: () => defProps.popup.closeOnClickOverlay
  39. },
  40. // 层级
  41. zIndex: {
  42. type: [String, Number],
  43. default: () => defProps.popup.zIndex
  44. },
  45. // 是否为iPhoneX留出底部安全距离
  46. safeAreaInsetBottom: {
  47. type: Boolean,
  48. default: () => defProps.popup.safeAreaInsetBottom
  49. },
  50. // 是否留出顶部安全距离(状态栏高度)
  51. safeAreaInsetTop: {
  52. type: Boolean,
  53. default: () => defProps.popup.safeAreaInsetTop
  54. },
  55. // 自定义关闭图标位置,top-left为左上角,top-right为右上角,bottom-left为左下角,bottom-right为右下角
  56. closeIconPos: {
  57. type: String,
  58. default: () => defProps.popup.closeIconPos
  59. },
  60. // 是否显示圆角
  61. round: {
  62. type: [Boolean, String, Number],
  63. default: () => defProps.popup.round
  64. },
  65. // mode=center,也即中部弹出时,是否使用缩放模式
  66. zoom: {
  67. type: Boolean,
  68. default: () => defProps.popup.zoom
  69. },
  70. // 弹窗背景色,设置为transparent可去除白色背景
  71. bgColor: {
  72. type: String,
  73. default: () => defProps.popup.bgColor
  74. },
  75. // 遮罩的透明度,0-1之间
  76. overlayOpacity: {
  77. type: [Number, String],
  78. default: () => defProps.popup.overlayOpacity
  79. }
  80. }
  81. })