-
zhangwei
2025-03-10 309cc3fe6303d8464951063e89fc9d623915501e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
import { AllowedComponentProps, VNodeProps } from './_common'
 
declare interface PopupProps {
  /**
   * 是否展示弹窗
   * @default false
   */
  show?: boolean
  /**
   * 是否显示遮罩
   * @default true
   */
  overlay?: boolean
  /**
   * 弹出方向
   * @default 'bottom'
   */
  mode?: 'top' | 'right' | 'left'| 'bottom' | 'center'
  /**
   * 遮罩打开或收起的动画过渡时间,单位ms
   * @default 300
   */
  duration?: number
  /**
   * 是否显示关闭图标
   * @default false
   */
  closeable?: boolean
  /**
   * 遮罩自定义样式,一般用于修改遮罩颜色,如:{background: 'rgba(3, 100, 219, 0.5)'}
   */
  overlayStyle?: unknown
  /**
   * 遮罩透明度,0-1之间,勿与overlayStyle共用
   * @default 0.5
   */
  overlayOpacity?: number | string
  /**
   * 点击遮罩是否关闭弹窗(注意:关闭事件需要自行处理,只会在开启closeOnClickOverlay后点击遮罩层执行close回调)
   * @default true
   */
  closeOnClickOverlay?: boolean
  /**
   * 弹出层的z-index值
   * @default 10075
   */
  zIndex?: number | string
  /**
   * 是否为留出底部安全距离
   * @default true
   */
  safeAreaInsetBottom?: boolean
  /**
   * 是否留出顶部安全距离(状态栏高度)
   * @default false
   */
  safeAreaInsetTop?: boolean
  /**
   * 自定义关闭图标位置,top-left为左上角,top-right为右上角,bottom-left为左下角,bottom-right为右下角
   */
  closeIconPos?: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right'
  /**
   * 设置圆角值,仅对mode = top | bottom | center有效
   * @default 0
   */
  round?: number | string
  /**
   * 当mode=center时 是否开启缩放
   * @default true
   */
  zoom?: boolean
  /**
   * 背景色,一般用于特殊弹窗内容场景,设置为transparent可去除默认的白色背景
   */
  bgColor?: string
  /**
   * 用户自定义样式
   */
  customStyle?: unknown
  /**
   * 弹出层打开
   */
  onOpen?: () => any
  /**
   * 弹出层收起
   */
  onClose?: () => any
}
 
declare interface PopupSlots {
  ['default']?: () => any
}
 
declare interface _Popup {
  new (): {
    $props: AllowedComponentProps &
      VNodeProps &
      PopupProps
    $slots: PopupSlots
  }
}
 
export declare const Popup: _Popup