props.js 2.4 KB

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