vue-popup-plus-plugin-preset 1.3.4 → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,129 +1,291 @@
1
1
  import { Component } from 'vue';
2
+ import { ExtractComponentPropTypes } from 'vue-popup-plus';
3
+ import { Placement } from 'vue-popup-plus';
2
4
  import { PopupPlugin } from 'vue-popup-plus';
5
+ import { Version } from 'vue-popup-plus';
6
+
7
+ export declare const album: PopupPlugin<GlobalOption>;
3
8
 
4
9
  declare type AlbumOption = {
5
10
  /**
6
11
  * 数据源
12
+ *
7
13
  * - 支持主流图片资源和视频资源
8
14
  */
9
15
  sources: Array<string>;
10
16
  /**
11
17
  * 默认选中的媒体索引
18
+ *
12
19
  * - 默认值为 `0`
13
20
  */
14
21
  defaultIndex?: number;
15
22
  /**
16
- * 是否禁用当前索引和总索引
23
+ * 是否禁用计数器
24
+ *
17
25
  * - 默认值为 `false`
18
26
  */
19
- countDisabled?: boolean;
27
+ disableCounter?: boolean;
20
28
  /**
21
29
  * 是否禁用媒体名称
30
+ *
22
31
  * - 默认值为 `false`
23
32
  */
24
- nameDisabled?: boolean;
33
+ disableName?: boolean;
25
34
  /**
26
- * 是否禁用纯模式
35
+ * 是否禁用纯净预览
36
+ *
27
37
  * - 默认值为 `false`
28
38
  */
29
- pureDisabled?: boolean;
39
+ disablePure?: boolean;
30
40
  /**
31
41
  * 是否禁用下载功能
42
+ *
32
43
  * - 默认值为 `false`
33
44
  * - 注意:下载功能仅在资源地址支持跨域时生效
34
45
  */
35
- downloadDisabled?: boolean;
46
+ disableDownload?: boolean;
36
47
  /**
37
48
  * 是否禁用缩放功能
49
+ *
38
50
  * - 默认值为 `false`
39
51
  */
40
- scaleDisabled?: boolean;
52
+ disableScale?: boolean;
41
53
  /**
42
54
  * 是否禁用拖动功能
55
+ *
43
56
  * - 默认值为 `false`
44
57
  */
45
- dragDisabled?: boolean;
58
+ disableDrag?: boolean;
59
+ /**
60
+ * 遮罩层是否模糊
61
+ *
62
+ * - 默认值:`true`
63
+ */
64
+ maskBlur?: boolean;
46
65
  };
47
66
 
67
+ declare const alert_2: PopupPlugin<GlobalOption>;
68
+ export { alert_2 as alert }
69
+
48
70
  declare type AlertOption = {
49
71
  /**
50
72
  * 提示框标题
73
+ *
51
74
  * - 默认值:`提示`
52
75
  */
53
76
  title?: string;
54
77
  /**
55
78
  * 标题栏是否显示关闭按钮
79
+ *
56
80
  * - 默认值:`true`
57
81
  */
58
82
  headerClose?: boolean;
59
83
  /**
60
84
  * 确认按钮文本
85
+ *
61
86
  * - 默认值:`确定`
62
87
  */
63
88
  confirmText?: string;
64
89
  /**
65
90
  * 是否可拖动
91
+ *
66
92
  * - 默认值:`false`
67
93
  */
68
94
  draggable?: boolean;
69
95
  /**
70
96
  * 是否可拖动超出窗口边界
97
+ *
71
98
  * - 默认值:`false`
72
99
  */
73
100
  dragOverflow?: boolean;
74
101
  /**
75
102
  * 遮罩层是否模糊
103
+ *
76
104
  * - 默认值:`true`
77
105
  */
78
106
  maskBlur?: boolean;
79
107
  };
80
108
 
109
+ declare const confirm_2: PopupPlugin<GlobalOption>;
110
+ export { confirm_2 as confirm }
111
+
81
112
  declare type ConfirmOption = {
82
113
  /**
83
114
  * 确认框标题
115
+ *
84
116
  * - 默认值:`确认`
85
117
  */
86
118
  title?: string;
87
119
  /**
88
120
  * 标题栏是否显示关闭按钮
121
+ *
89
122
  * - 默认值:`false`
90
123
  */
91
124
  headerClose?: boolean;
92
125
  /**
93
126
  * 确认按钮文本
127
+ *
94
128
  * - 默认值:`确定`
95
129
  */
96
130
  confirmText?: string;
97
131
  /**
98
132
  * 取消按钮文本
133
+ *
99
134
  * - 默认值:`取消`
100
135
  */
101
136
  cancelText?: string;
102
137
  /**
103
138
  * 是否可拖动
139
+ *
104
140
  * - 默认值:`false`
105
141
  */
106
142
  draggable?: boolean;
107
143
  /**
108
144
  * 是否可拖动超出窗口边界
145
+ *
109
146
  * - 默认值:`false`
110
147
  */
111
148
  dragOverflow?: boolean;
112
149
  /**
113
150
  * 遮罩层是否模糊
151
+ *
114
152
  * - 默认值:`true`
115
153
  */
116
154
  maskBlur?: boolean;
117
155
  };
118
156
 
119
- declare const _default: PopupPlugin;
120
- export default _default;
157
+ export declare const dialog: PopupPlugin<GlobalOption>;
158
+
159
+ declare type DialogOption<TComponent extends Component = Component> = {
160
+ /**
161
+ * 对话框标题
162
+ *
163
+ * - 默认值为 `对话`
164
+ */
165
+ title?: string;
166
+ /**
167
+ * 对话框内容组件
168
+ */
169
+ component: TComponent;
170
+ /**
171
+ * 对话框内容组件props
172
+ */
173
+ componentProps?: ExtractComponentPropTypes<TComponent>;
174
+ /**
175
+ * 对话框渲染完成时调用的回调函数
176
+ */
177
+ onMounted?: () => void;
178
+ /**
179
+ * 是否显示对话框标题栏
180
+ *
181
+ * - 默认值为 `true`
182
+ */
183
+ header?: boolean;
184
+ /**
185
+ * 标题栏是否显示关闭按钮
186
+ *
187
+ * - 默认值:`true`
188
+ */
189
+ headerClose?: boolean;
190
+ /**
191
+ * 对话框宽度
192
+ *
193
+ * - 默认值为 `auto`
194
+ * - 支持 `string` 或 `number` 类型
195
+ */
196
+ width?: string | number;
197
+ /**
198
+ * 对话框最大宽度
199
+ *
200
+ * - 默认值为 `100%`
201
+ * - 支持 `string` 或 `number` 类型
202
+ */
203
+ maxWidth?: string | number;
204
+ /**
205
+ * 对话框最小宽度
206
+ *
207
+ * - 默认值为 `auto`
208
+ * - 支持 `string` 或 `number` 类型
209
+ */
210
+ minWidth?: string | number;
211
+ /**
212
+ * 对话框高度
213
+ *
214
+ * - 默认值为 `auto`
215
+ * - 支持 `string` 或 `number` 类型
216
+ */
217
+ height?: string | number;
218
+ /**
219
+ * 对话框最大高度
220
+ *
221
+ * - 默认值为 `100%`
222
+ * - 支持 `string` 或 `number` 类型
223
+ */
224
+ maxHeight?: string | number;
225
+ /**
226
+ * 对话框最小高度
227
+ *
228
+ * - 默认值为 `auto`
229
+ * - 支持 `string` 或 `number` 类型
230
+ */
231
+ minHeight?: string | number;
232
+ /**
233
+ * 对话框位置
234
+ *
235
+ * - 默认值为 `center`
236
+ * @since 1.5.0
237
+ */
238
+ placement?: Placement;
239
+ /**
240
+ * 是否显示对话框遮罩层
241
+ *
242
+ * - 默认值为 `true`
243
+ */
244
+ mask?: boolean;
245
+ /**
246
+ * 是否点击遮罩层关闭对话框
247
+ *
248
+ * - 默认值为 `false`
249
+ */
250
+ maskClickClose?: boolean;
251
+ /**
252
+ * 是否可拖拽
253
+ *
254
+ * - 默认值为 `false`
255
+ */
256
+ draggable?: boolean;
257
+ /**
258
+ * 是否可拖拽溢出屏幕
259
+ *
260
+ * - 默认值为 `false`
261
+ */
262
+ dragOverflow?: boolean;
263
+ /**
264
+ * 遮罩层是否模糊
265
+ *
266
+ * - 默认值:`true`
267
+ */
268
+ maskBlur?: boolean;
269
+ };
270
+
271
+ declare type GlobalOption = {
272
+ /**
273
+ * 插件弹出层皮肤
274
+ * - 默认为 `modern` 现代皮肤
275
+ * - 可选值包括:
276
+ * - `modern` 现代皮肤
277
+ * - `classic` 经典皮肤
278
+ */
279
+ skin?: Skin;
280
+ };
121
281
 
122
282
  export declare interface IAlbum {
123
283
  /**
124
284
  * 显示媒体相册
285
+ *
125
286
  * - 如果需要等待用户关闭媒体相册,需要通过 `await` 调用,等待执行结束后继续执行后续代码
126
287
  * - 使用示例:
288
+ *
127
289
  * ```ts
128
290
  * // 显示媒体相册,默认选中第二张媒体,即使用户不关闭媒体相册,也不会阻塞后续代码执行
129
291
  * popup.album({
@@ -131,7 +293,7 @@ export declare interface IAlbum {
131
293
  * 'https://example.com/image1.jpg',
132
294
  * 'https://example.com/video1.mp4',
133
295
  * ],
134
- * defaultIndex: 1
296
+ * defaultIndex: 1,
135
297
  * })
136
298
  *
137
299
  * // 只有用户关闭了媒体相册,才会继续执行后续代码
@@ -149,8 +311,11 @@ export declare interface IAlbum {
149
311
  export declare interface IAlert {
150
312
  /**
151
313
  * 显示提示框
152
- * - 如果需要等待用户点击确认按钮后继续执行后续代码,需要通过 `await` 调用,等待执行结束后继续执行后续代码
314
+ *
315
+ * - 如果需要等待用户点击确认按钮后继续执行后续代码,需要通过 `await`
316
+ * 调用,等待执行结束后继续执行后续代码
153
317
  * - 使用示例:
318
+ *
154
319
  * ```ts
155
320
  * popup.alert('删除成功')
156
321
  * // 即使用户不点击确定按钮,也不会阻塞后续代码执行
@@ -165,9 +330,11 @@ export declare interface IAlert {
165
330
  export declare interface IConfirm {
166
331
  /**
167
332
  * 显示确认框
168
- * - 如果需要获取点击的按钮是确定还是取消,需要通过 `await` 调用获得一个 `boolean` 类型的返回值,
169
- * 确认按钮点击时返回 `true`,取消按钮点击时返回 `false`
333
+ *
334
+ * - 如果需要获取点击的按钮是确定还是取消,需要通过 `await` 调用获得一个 `boolean`
335
+ * 类型的返回值,确认按钮点击时返回 `true`,取消按钮点击时返回 `false`
170
336
  * - 使用示例:
337
+ *
171
338
  * ```ts
172
339
  * if (await popup.confirm('确定删除吗?')) {
173
340
  * // 确认删除
@@ -182,37 +349,74 @@ export declare interface IConfirm {
182
349
  export declare interface IDialog {
183
350
  /**
184
351
  * 显示对话框
185
- * - 对话框内部组件可通过调用 `this.$emit('close', payload)` 关闭对话框,payload 为关闭时传递的参数
186
- * - 如需获取对话框关闭时传递的参数,可在调用 `dialog` 方法时使用 `await` 关键字等待 Promise resolve 后获取
352
+ *
353
+ * - 对话框内部组件可通过调用 `dialog.close(payload)`
354
+ * 关闭对话框,payload 为关闭时传递的参数
355
+ * - 如需获取对话框关闭时传递的参数,可在调用 `dialog` 方法时使用 `await` 关键字等待
356
+ * Promise resolve 后获取
187
357
  * - 对话框关闭时,无论是否传递了参数,Promise 都将 resolve,因此需要在调用时判断是否有返回参数
188
358
  */
189
- <T extends any = any>(options: PopupDialogOption): Promise<T | void>;
359
+ <T extends any = any, TComponent extends Component = Component>(options: DialogOption<TComponent>): Promise<T | void>;
360
+ /**
361
+ * 关闭对话框
362
+ *
363
+ * - 将会关闭最后一个创建的对话框
364
+ * - 如果当前没有对话框正在显示,则不会有任何效果,调试模式下会抛出警告
365
+ * - 可传递任意类型的参数,该参数将会被传递给打开对话框时的 Promise resolve 函数
366
+ * @param payload 关闭时传递的参数
367
+ */
368
+ close<T extends any = any>(payload?: T): Promise<void>;
190
369
  }
191
370
 
192
371
  export declare interface ILoading {
193
372
  /**
194
373
  * 显示加载遮罩
195
- * - 返回关闭加载遮罩的方法,调用后关闭加载遮罩
374
+ *
375
+ * - 全局只会显示一个加载遮罩,每次调用时会先进行判断是否有已存在的加载遮罩
376
+ * 如果有,则会先关闭已存在的加载遮罩,再显示新的加载遮罩
377
+ *
196
378
  * - 使用示例:
379
+ *
197
380
  * ```ts
198
- * const stopLoading = popup.loading()
381
+ * // 显示加载遮罩
382
+ * popup.loading()
199
383
  * // 关闭加载遮罩
200
- * stopLoading()
384
+ * popup.loading.close()
385
+ *
386
+ * // 如果需要等待关闭动画结束,可通过 await 调用
387
+ * await popup.loading.close()
201
388
  * ```
202
389
  */
203
- (option?: LoadingOption): () => void;
390
+ (option?: LoadingOption): void;
391
+ /**
392
+ * 关闭加载遮罩
393
+ *
394
+ * - 使用示例:
395
+ *
396
+ * ```ts
397
+ * // 关闭加载遮罩
398
+ * popup.loading.close()
399
+ *
400
+ * // 如果需要等待关闭动画结束,可通过 await 调用
401
+ * await popup.loading.close()
402
+ * ```
403
+ */
404
+ close(): Promise<void>;
204
405
  }
205
406
 
206
407
  export declare interface IPrompt {
207
408
  /**
208
409
  * 显示提示输入
410
+ *
209
411
  * - 可以在提示用户的同时,获取用户输入的内容,支持输入框和文本域
210
412
  * - 第一个参数为提示文本,如果不需要渲染提示文本,传入 `false` 即可
211
- * - 第二个参数为输入框默认值,第三个参数为选项对象,可以自定义输入框类型、标题、最大长度、占位符、确认按钮文本、取消按钮文本等,具体可以参考 {@link PromptOption}
212
- * - 获取输入的内容,需要通过 `await` 调用,等待执行结束后返回用户输入的内容,类型为 `string` | `void`,如果用户点击了取消按钮或者直接关闭弹出层,则返回 `undefined`
413
+ * - 第二个参数为选项对象,可以自定义输入框默认值、类型、标题、最大长度、
414
+ * 占位符、确认按钮文本、取消按钮文本等,具体可以参考 {@link PromptOption}
415
+ * - 获取输入的内容,需要通过 `await` 调用,等待执行结束后返回用户输入的内容,类型为 `string`
416
+ * | `void`,如果用户点击了取消按钮或者直接关闭弹出层,则返回 `undefined`
213
417
  * - 使用示例:
214
- * ```ts
215
418
  *
419
+ * ```ts
216
420
  * const name = await popup.prompt('请输入您的姓名')
217
421
  * if (name === undefined) {
218
422
  * console.log('用户取消了输入')
@@ -221,16 +425,20 @@ export declare interface IPrompt {
221
425
  * }
222
426
  * ```
223
427
  */
224
- (message: string | boolean, defaultValue?: string, options?: PromptOption): Promise<string | void>;
428
+ (message: string | boolean, options?: PromptOption): Promise<string | void>;
225
429
  }
226
430
 
227
431
  export declare interface IToast {
228
432
  /**
229
433
  * 显示消息
434
+ *
230
435
  * - 第一个参数为消息内容
231
- * - 第二个参数为消息选项,可自定义消息显示时间,默认值为 2000 毫秒
232
- * - 如果需要等待消息消失后继续执行后续代码,需要通过 `await` 调用,等待执行结束后继续执行后续代码
436
+ * - 第二个参数为消息选项,可自定义消息显示时间,默认值为 `2000` 毫秒
437
+ * ,如果设置为 `0` ,则消息不会自动关闭
438
+ * - 如果需要等待消息消失后继续执行后续代码,需要通过 `await` 调用,
439
+ * 等待执行结束后继续执行后续代码
233
440
  * - 使用示例:
441
+ *
234
442
  * ```ts
235
443
  * popup.toast('这是一条消息')
236
444
  * // 不会阻塞后续代码执行
@@ -240,153 +448,135 @@ export declare interface IToast {
240
448
  * ```
241
449
  */
242
450
  (content: string, options?: ToastOption): Promise<void>;
243
- }
244
-
245
- declare type LoadingOption = {
246
- iconSize?: number;
247
- };
248
-
249
- declare type PopupDialogOption = {
250
451
  /**
251
- * 对话框标题
252
- * - 默认值为 `对话`
452
+ * 显示成功消息
253
453
  */
254
- title?: string;
454
+ success(content: string, options?: ToastOptionWithoutTheme): Promise<void>;
255
455
  /**
256
- * 对话框内容组件
456
+ * 显示信息消息
257
457
  */
258
- component: Component;
458
+ info(content: string, options?: ToastOptionWithoutTheme): Promise<void>;
259
459
  /**
260
- * 对话框内容组件props
460
+ * 显示警告消息
261
461
  */
262
- componentProps?: Record<string, any>;
462
+ warning(content: string, options?: ToastOptionWithoutTheme): Promise<void>;
263
463
  /**
264
- * 对话框渲染完成时调用的回调函数
464
+ * 显示错误消息
265
465
  */
266
- onMounted?: () => void;
267
- /**
268
- * 是否显示对话框标题栏
269
- * - 默认值为 `true`
270
- */
271
- header?: boolean;
272
- /**
273
- * 标题栏是否显示关闭按钮
274
- * - 默认值:`true`
275
- */
276
- headerClose?: boolean;
277
- /**
278
- * 对话框宽度
279
- * - 默认值为 `auto`
280
- * - 支持 `string` 或 `number` 类型
281
- */
282
- width?: string | number;
283
- /**
284
- * 对话框最大宽度
285
- * - 默认值为 `100%`
286
- * - 支持 `string` 或 `number` 类型
287
- */
288
- maxWidth?: string | number;
289
- /**
290
- * 对话框最小宽度
291
- * - 默认值为 `auto`
292
- * - 支持 `string` 或 `number` 类型
293
- */
294
- minWidth?: string | number;
466
+ danger(content: string, options?: ToastOptionWithoutTheme): Promise<void>;
467
+ }
468
+
469
+ export declare const loading: PopupPlugin<GlobalOption>;
470
+
471
+ declare type LoadingOption = {
295
472
  /**
296
- * 对话框高度
297
- * - 默认值为 `auto`
298
- * - 支持 `string` 或 `number` 类型
473
+ * 加载遮罩主题
474
+ *
475
+ * - 默认值:'primary'
476
+ * - 具体的可选主题请参考 {@link Theme }
299
477
  */
300
- height?: string | number;
478
+ theme?: Theme;
301
479
  /**
302
- * 对话框最大高度
303
- * - 默认值为 `100%`
304
- * - 支持 `string` 或 `number` 类型
480
+ * 加载遮罩标题文本
481
+ *
482
+ * - 默认值:''
483
+ * @since 1.3.3
305
484
  */
306
- maxHeight?: string | number;
485
+ title?: string;
307
486
  /**
308
- * 对话框最小高度
309
- * - 默认值为 `auto`
310
- * - 支持 `string` 或 `number` 类型
487
+ * 加载遮罩图标大小
488
+ *
489
+ * - 默认值:60
311
490
  */
312
- minHeight?: string | number;
491
+ iconSize?: number;
313
492
  /**
314
- * 是否显示对话框遮罩层
315
- * - 默认值为 `true`
493
+ * 是否显示遮罩层
494
+ *
495
+ * - 默认值:`true`
496
+ * @since 1.5.0
316
497
  */
317
498
  mask?: boolean;
318
- /**
319
- * 是否点击遮罩层关闭对话框
320
- * - 默认值为 `false`
321
- */
322
- maskClickClose?: boolean;
323
- /**
324
- * 是否可拖拽
325
- * - 默认值为 `false`
326
- */
327
- draggable?: boolean;
328
- /**
329
- * 是否可拖拽溢出屏幕
330
- * - 默认值为 `false`
331
- */
332
- dragOverflow?: boolean;
333
499
  /**
334
500
  * 遮罩层是否模糊
501
+ *
335
502
  * - 默认值:`true`
503
+ * @since 1.3.3
336
504
  */
337
505
  maskBlur?: boolean;
338
506
  };
339
507
 
508
+ export declare const plugin: PopupPlugin<GlobalOption>;
509
+
510
+ declare const prompt_2: PopupPlugin<GlobalOption>;
511
+ export { prompt_2 as prompt }
512
+
340
513
  declare type PromptOption = {
514
+ /**
515
+ * 提示输入框默认值
516
+ *
517
+ * - 默认值:`''`
518
+ */
519
+ defaultValue?: string;
341
520
  /**
342
521
  * 提示输入框类型
522
+ *
343
523
  * - 支持的类型包括:
344
- * - `input`:单行输入框
345
- * - `textarea`:多行文本域
524
+ *
525
+ * - `input`:单行输入框
526
+ * - `textarea`:多行文本域
346
527
  */
347
528
  type?: PromptType;
348
529
  /**
349
530
  * 提示输入框标题
531
+ *
350
532
  * - 默认值:`提示输入`
351
533
  */
352
534
  title?: string;
353
535
  /**
354
536
  * 标题栏是否显示关闭按钮
537
+ *
355
538
  * - 默认值:`true`
356
539
  */
357
540
  headerClose?: boolean;
358
541
  /**
359
542
  * 提示输入框最大长度
543
+ *
360
544
  * - 默认值:`null`
361
545
  */
362
546
  maxLength?: number | null;
363
547
  /**
364
548
  * 提示输入框占位符
549
+ *
365
550
  * - 默认值:`请输入`
366
551
  */
367
552
  placeholder?: string;
368
553
  /**
369
554
  * 确认按钮文本
555
+ *
370
556
  * - 默认值:`确定`
371
557
  */
372
558
  confirmText?: string;
373
559
  /**
374
560
  * 取消按钮文本
561
+ *
375
562
  * - 默认值:`取消`
376
563
  */
377
564
  cancelText?: string;
378
565
  /**
379
566
  * 提示输入框是否可拖拽
567
+ *
380
568
  * - 默认值:`false`
381
569
  */
382
570
  draggable?: boolean;
383
571
  /**
384
572
  * 提示输入框是否可拖拽溢出屏幕
573
+ *
385
574
  * - 默认值:`false`
386
575
  */
387
576
  dragOverflow?: boolean;
388
577
  /**
389
578
  * 遮罩层是否模糊
579
+ *
390
580
  * - 默认值:`true`
391
581
  */
392
582
  maskBlur?: boolean;
@@ -394,22 +584,54 @@ declare type PromptOption = {
394
584
 
395
585
  declare type PromptType = 'input' | 'textarea';
396
586
 
587
+ declare type Skin = 'classic' | 'modern';
588
+
589
+ declare type Theme = 'primary' | 'info' | 'success' | 'warning' | 'danger';
590
+
591
+ export declare const toast: PopupPlugin<GlobalOption>;
592
+
397
593
  declare type ToastOption = {
398
594
  /**
399
595
  * 消息主题
596
+ *
400
597
  * - 默认值: 'default'
401
- * - 具体的可选主题请参考 {@link ToastTheme }
598
+ * - 具体的可选主题请参考 {@link Theme }
402
599
  */
403
- theme?: ToastTheme;
600
+ theme?: Theme;
404
601
  /**
405
602
  * 消息显示时间,单位毫秒
603
+ *
406
604
  * - 默认值: 2000 毫秒
407
- * @default 2000
408
605
  */
409
606
  duration?: number;
607
+ /**
608
+ * 消息位置
609
+ *
610
+ * - 默认值为 `center`
611
+ * @since 1.5.0
612
+ */
613
+ placement?: Placement;
614
+ /**
615
+ * 是否显示关闭按钮
616
+ *
617
+ * - 默认值: `false`
618
+ * - 当持续时间为 `0` 时,关闭按钮将会强制显示
619
+ * @since 1.5.0
620
+ */
621
+ showClose?: boolean;
622
+ /**
623
+ * 是否开启鼠标悬停持续显示
624
+ *
625
+ * - 默认值: `true`
626
+ * - 当持续时间为 `0` 时,该参数无效
627
+ * @since 1.5.0
628
+ */
629
+ hoverWait?: boolean;
410
630
  };
411
631
 
412
- declare type ToastTheme = 'default' | 'primary' | 'info' | 'success' | 'warning' | 'danger';
632
+ declare type ToastOptionWithoutTheme = Omit<ToastOption, 'theme'>;
633
+
634
+ export declare const version: Version;
413
635
 
414
636
  export { }
415
637
 
@@ -430,34 +652,34 @@ declare module 'vue-popup-plus' {
430
652
 
431
653
  declare module 'vue-popup-plus' {
432
654
  interface PopupCustomProperties {
433
- prompt: IPrompt;
655
+ confirm: IConfirm;
434
656
  }
435
657
  }
436
658
 
437
659
 
438
660
  declare module 'vue-popup-plus' {
439
661
  interface PopupCustomProperties {
440
- loading: ILoading;
662
+ dialog: IDialog;
441
663
  }
442
664
  }
443
665
 
444
666
 
445
667
  declare module 'vue-popup-plus' {
446
668
  interface PopupCustomProperties {
447
- toast: IToast;
669
+ prompt: IPrompt;
448
670
  }
449
671
  }
450
672
 
451
673
 
452
674
  declare module 'vue-popup-plus' {
453
675
  interface PopupCustomProperties {
454
- dialog: IDialog;
676
+ loading: ILoading;
455
677
  }
456
678
  }
457
679
 
458
680
 
459
681
  declare module 'vue-popup-plus' {
460
682
  interface PopupCustomProperties {
461
- confirm: IConfirm;
683
+ toast: IToast;
462
684
  }
463
685
  }