Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 
 

105 righe
3.2 KiB

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