@v-c/trigger 0.0.13 → 0.0.15
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.
- package/dist/Popup/Arrow.cjs +60 -89
- package/dist/Popup/Arrow.js +58 -88
- package/dist/Popup/Mask.cjs +53 -64
- package/dist/Popup/Mask.js +49 -63
- package/dist/Popup/PopupContent.cjs +22 -27
- package/dist/Popup/PopupContent.js +18 -26
- package/dist/Popup/index.cjs +312 -366
- package/dist/Popup/index.js +304 -362
- package/dist/UniqueProvider/UniqueContainer.cjs +133 -150
- package/dist/UniqueProvider/UniqueContainer.js +128 -148
- package/dist/UniqueProvider/index.cjs +151 -216
- package/dist/UniqueProvider/index.js +144 -213
- package/dist/UniqueProvider/useTargetState.cjs +39 -39
- package/dist/UniqueProvider/useTargetState.js +37 -39
- package/dist/_virtual/rolldown_runtime.cjs +21 -0
- package/dist/context.cjs +17 -28
- package/dist/context.js +17 -33
- package/dist/hooks/useAction.cjs +19 -25
- package/dist/hooks/useAction.js +17 -25
- package/dist/hooks/useAlign.cjs +388 -592
- package/dist/hooks/useAlign.js +383 -590
- package/dist/hooks/useDelay.cjs +21 -24
- package/dist/hooks/useDelay.js +20 -25
- package/dist/hooks/useOffsetStyle.cjs +34 -37
- package/dist/hooks/useOffsetStyle.js +32 -37
- package/dist/hooks/useWatch.cjs +38 -34
- package/dist/hooks/useWatch.js +36 -34
- package/dist/hooks/useWinClick.cjs +54 -64
- package/dist/hooks/useWinClick.js +51 -63
- package/dist/index.cjs +591 -694
- package/dist/index.js +580 -690
- package/dist/interface.cjs +0 -1
- package/dist/interface.js +0 -1
- package/dist/util.cjs +65 -82
- package/dist/util.js +66 -87
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -1,700 +1,597 @@
|
|
|
1
|
-
"
|
|
2
|
-
|
|
3
|
-
const
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
1
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
+
const require_rolldown_runtime = require("./_virtual/rolldown_runtime.cjs");
|
|
3
|
+
const require_context = require("./context.cjs");
|
|
4
|
+
const require_useAction = require("./hooks/useAction.cjs");
|
|
5
|
+
const require_util = require("./util.cjs");
|
|
6
|
+
const require_useAlign = require("./hooks/useAlign.cjs");
|
|
7
|
+
const require_useDelay = require("./hooks/useDelay.cjs");
|
|
8
|
+
const require_useWatch = require("./hooks/useWatch.cjs");
|
|
9
|
+
const require_useWinClick = require("./hooks/useWinClick.cjs");
|
|
10
|
+
const require_index = require("./Popup/index.cjs");
|
|
11
|
+
const require_index$1 = require("./UniqueProvider/index.cjs");
|
|
12
|
+
let vue = require("vue");
|
|
13
|
+
let __v_c_portal = require("@v-c/portal");
|
|
14
|
+
__v_c_portal = require_rolldown_runtime.__toESM(__v_c_portal);
|
|
15
|
+
let __v_c_resize_observer = require("@v-c/resize-observer");
|
|
16
|
+
__v_c_resize_observer = require_rolldown_runtime.__toESM(__v_c_resize_observer);
|
|
17
|
+
let __v_c_util = require("@v-c/util");
|
|
18
|
+
let __v_c_util_dist_Dom_shadow = require("@v-c/util/dist/Dom/shadow");
|
|
19
|
+
let __v_c_util_dist_props_util = require("@v-c/util/dist/props-util");
|
|
20
|
+
let __v_c_util_dist_vnode = require("@v-c/util/dist/vnode");
|
|
19
21
|
function _isSlot(s) {
|
|
20
|
-
|
|
22
|
+
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !(0, vue.isVNode)(s);
|
|
21
23
|
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
24
|
+
var defaults = {
|
|
25
|
+
prefixCls: "vc-trigger-popup",
|
|
26
|
+
action: "hover",
|
|
27
|
+
mouseLeaveDelay: .1,
|
|
28
|
+
maskClosable: true,
|
|
29
|
+
builtinPlacements: {},
|
|
30
|
+
popupVisible: void 0,
|
|
31
|
+
defaultPopupVisible: void 0
|
|
30
32
|
};
|
|
31
|
-
function generateTrigger(PortalComponent =
|
|
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
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
required: false,
|
|
590
|
-
default: void 0
|
|
591
|
-
},
|
|
592
|
-
maskMotion: {
|
|
593
|
-
type: Object,
|
|
594
|
-
required: false,
|
|
595
|
-
default: void 0
|
|
596
|
-
},
|
|
597
|
-
mouseEnterDelay: {
|
|
598
|
-
type: Number,
|
|
599
|
-
required: false,
|
|
600
|
-
default: void 0
|
|
601
|
-
},
|
|
602
|
-
mouseLeaveDelay: {
|
|
603
|
-
type: Number,
|
|
604
|
-
required: false,
|
|
605
|
-
default: void 0
|
|
606
|
-
},
|
|
607
|
-
focusDelay: {
|
|
608
|
-
type: Number,
|
|
609
|
-
required: false,
|
|
610
|
-
default: void 0
|
|
611
|
-
},
|
|
612
|
-
blurDelay: {
|
|
613
|
-
type: Number,
|
|
614
|
-
required: false,
|
|
615
|
-
default: void 0
|
|
616
|
-
},
|
|
617
|
-
popup: {
|
|
618
|
-
type: [String, Number, null, Array, Function],
|
|
619
|
-
required: true,
|
|
620
|
-
skipCheck: true,
|
|
621
|
-
default: void 0
|
|
622
|
-
},
|
|
623
|
-
popupPlacement: {
|
|
624
|
-
type: String,
|
|
625
|
-
required: false,
|
|
626
|
-
default: void 0
|
|
627
|
-
},
|
|
628
|
-
builtinPlacements: {
|
|
629
|
-
type: Object,
|
|
630
|
-
required: false,
|
|
631
|
-
default: void 0
|
|
632
|
-
},
|
|
633
|
-
popupAlign: {
|
|
634
|
-
type: Object,
|
|
635
|
-
required: false,
|
|
636
|
-
default: void 0
|
|
637
|
-
},
|
|
638
|
-
popupClassName: {
|
|
639
|
-
type: String,
|
|
640
|
-
required: false,
|
|
641
|
-
default: void 0
|
|
642
|
-
},
|
|
643
|
-
uniqueContainerClassName: {
|
|
644
|
-
type: String,
|
|
645
|
-
required: false,
|
|
646
|
-
default: void 0
|
|
647
|
-
},
|
|
648
|
-
uniqueContainerStyle: {
|
|
649
|
-
type: null,
|
|
650
|
-
required: false,
|
|
651
|
-
default: void 0
|
|
652
|
-
},
|
|
653
|
-
popupStyle: {
|
|
654
|
-
type: null,
|
|
655
|
-
required: false,
|
|
656
|
-
default: void 0
|
|
657
|
-
},
|
|
658
|
-
getPopupClassNameFromAlign: {
|
|
659
|
-
type: Function,
|
|
660
|
-
required: false,
|
|
661
|
-
default: void 0
|
|
662
|
-
},
|
|
663
|
-
onPopupClick: {
|
|
664
|
-
type: Function,
|
|
665
|
-
required: false,
|
|
666
|
-
default: void 0
|
|
667
|
-
},
|
|
668
|
-
alignPoint: {
|
|
669
|
-
type: Boolean,
|
|
670
|
-
required: false,
|
|
671
|
-
default: void 0
|
|
672
|
-
},
|
|
673
|
-
fresh: {
|
|
674
|
-
type: Boolean,
|
|
675
|
-
required: false,
|
|
676
|
-
default: void 0
|
|
677
|
-
},
|
|
678
|
-
unique: {
|
|
679
|
-
type: Boolean,
|
|
680
|
-
required: false,
|
|
681
|
-
default: void 0
|
|
682
|
-
},
|
|
683
|
-
arrow: {
|
|
684
|
-
type: [Boolean, Object],
|
|
685
|
-
required: false,
|
|
686
|
-
default: void 0
|
|
687
|
-
},
|
|
688
|
-
mobile: {
|
|
689
|
-
type: Object,
|
|
690
|
-
required: false,
|
|
691
|
-
default: void 0
|
|
692
|
-
}
|
|
693
|
-
}, defaults)
|
|
694
|
-
});
|
|
33
|
+
function generateTrigger(PortalComponent = __v_c_portal.default) {
|
|
34
|
+
return /* @__PURE__ */ (0, vue.defineComponent)((props, { expose, slots, attrs }) => {
|
|
35
|
+
const mergedAutoDestroy = (0, vue.computed)(() => props.autoDestroy ?? false);
|
|
36
|
+
const openUncontrolled = (0, vue.computed)(() => props.popupVisible === void 0);
|
|
37
|
+
const isMobile = (0, vue.computed)(() => !!props.mobile);
|
|
38
|
+
const subPopupElements = (0, vue.ref)({});
|
|
39
|
+
const parentContext = require_context.useTriggerContext();
|
|
40
|
+
const context = (0, vue.computed)(() => {
|
|
41
|
+
return { registerSubPopup(id$1, subPopupEle) {
|
|
42
|
+
if (subPopupEle) subPopupElements.value[id$1] = subPopupEle;
|
|
43
|
+
else delete subPopupElements.value[id$1];
|
|
44
|
+
parentContext?.value.registerSubPopup(id$1, subPopupEle);
|
|
45
|
+
} };
|
|
46
|
+
});
|
|
47
|
+
const uniqueContext = require_context.useUniqueContext();
|
|
48
|
+
const id = (0, vue.useId)();
|
|
49
|
+
const popupEle = (0, vue.shallowRef)(null);
|
|
50
|
+
const externalPopupRef = (0, vue.shallowRef)(null);
|
|
51
|
+
const setPopupRef = (node) => {
|
|
52
|
+
const element = (0, __v_c_util_dist_vnode.resolveToElement)(node);
|
|
53
|
+
externalPopupRef.value = element;
|
|
54
|
+
if (popupEle.value !== element) popupEle.value = element;
|
|
55
|
+
parentContext?.value?.registerSubPopup(id, element ?? null);
|
|
56
|
+
};
|
|
57
|
+
const targetEle = (0, vue.shallowRef)(null);
|
|
58
|
+
const externalForwardRef = (0, vue.shallowRef)(null);
|
|
59
|
+
const setTargetRef = (node) => {
|
|
60
|
+
const element = (0, __v_c_util_dist_vnode.resolveToElement)(node);
|
|
61
|
+
if (element && targetEle.value !== element) {
|
|
62
|
+
targetEle.value = element;
|
|
63
|
+
externalForwardRef.value = element;
|
|
64
|
+
} else if (!element) {
|
|
65
|
+
targetEle.value = null;
|
|
66
|
+
externalForwardRef.value = null;
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
const originChildProps = (0, vue.reactive)({});
|
|
70
|
+
const baseActionProps = (0, vue.shallowRef)({});
|
|
71
|
+
const hoverActionProps = (0, vue.shallowRef)({});
|
|
72
|
+
const cloneProps = (0, vue.computed)(() => ({
|
|
73
|
+
...baseActionProps.value,
|
|
74
|
+
...hoverActionProps.value
|
|
75
|
+
}));
|
|
76
|
+
const inPopupOrChild = (ele) => {
|
|
77
|
+
const childDOM = targetEle.value;
|
|
78
|
+
return childDOM?.contains(ele) || childDOM && (0, __v_c_util_dist_Dom_shadow.getShadowRoot)(childDOM)?.host === ele || ele === childDOM || popupEle.value?.contains(ele) || popupEle.value && (0, __v_c_util_dist_Dom_shadow.getShadowRoot)(popupEle.value)?.host === ele || ele === popupEle.value || Object.values(subPopupElements.value).some((subPopupEle) => subPopupEle?.contains(ele) || ele === subPopupEle);
|
|
79
|
+
};
|
|
80
|
+
const innerArrow = (0, vue.computed)(() => {
|
|
81
|
+
return props.arrow ? { ...props?.arrow !== true ? props?.arrow : {} } : null;
|
|
82
|
+
});
|
|
83
|
+
const internalOpen = (0, vue.shallowRef)(props?.defaultPopupVisible ?? false);
|
|
84
|
+
if (props.popupVisible !== void 0) internalOpen.value = props.popupVisible;
|
|
85
|
+
const mergedOpen = (0, vue.computed)(() => {
|
|
86
|
+
return props?.popupVisible ?? internalOpen.value;
|
|
87
|
+
});
|
|
88
|
+
const setMergedOpen = (nextOpen) => {
|
|
89
|
+
if (openUncontrolled.value) internalOpen.value = nextOpen;
|
|
90
|
+
};
|
|
91
|
+
const isOpen = () => mergedOpen.value;
|
|
92
|
+
(0, vue.watch)(() => props.popupVisible, async (nextVisible) => {
|
|
93
|
+
if (nextVisible !== void 0) {
|
|
94
|
+
await (0, vue.nextTick)();
|
|
95
|
+
internalOpen.value = nextVisible;
|
|
96
|
+
}
|
|
97
|
+
});
|
|
98
|
+
const getUniqueOptions = (delay = 0) => {
|
|
99
|
+
return {
|
|
100
|
+
popup: props.popup,
|
|
101
|
+
target: targetEle.value,
|
|
102
|
+
delay,
|
|
103
|
+
prefixCls: props.prefixCls,
|
|
104
|
+
popupClassName: props.popupClassName,
|
|
105
|
+
uniqueContainerClassName: props.uniqueContainerClassName,
|
|
106
|
+
uniqueContainerStyle: props.uniqueContainerStyle,
|
|
107
|
+
popupStyle: props.popupStyle,
|
|
108
|
+
popupPlacement: props.popupPlacement,
|
|
109
|
+
builtinPlacements: props.builtinPlacements,
|
|
110
|
+
popupAlign: props.popupAlign,
|
|
111
|
+
zIndex: props.zIndex,
|
|
112
|
+
mask: props.mask,
|
|
113
|
+
maskClosable: props.maskClosable,
|
|
114
|
+
popupMotion: props.popupMotion,
|
|
115
|
+
maskMotion: props.maskMotion,
|
|
116
|
+
arrow: innerArrow.value,
|
|
117
|
+
getPopupContainer: props.getPopupContainer,
|
|
118
|
+
getPopupClassNameFromAlign: props.getPopupClassNameFromAlign,
|
|
119
|
+
id
|
|
120
|
+
};
|
|
121
|
+
};
|
|
122
|
+
(0, vue.watch)([mergedOpen, targetEle], () => {
|
|
123
|
+
if (uniqueContext && props.unique && targetEle.value && !openUncontrolled.value && !parentContext?.value) if (mergedOpen.value) {
|
|
124
|
+
const enterDelay = props.mouseEnterDelay ?? 0;
|
|
125
|
+
uniqueContext?.show(getUniqueOptions(enterDelay), isOpen);
|
|
126
|
+
} else uniqueContext?.hide(props.mouseLeaveDelay || 0);
|
|
127
|
+
});
|
|
128
|
+
const openRef = (0, vue.shallowRef)(mergedOpen.value);
|
|
129
|
+
const lastTriggerRef = (0, vue.shallowRef)([]);
|
|
130
|
+
lastTriggerRef.value = [];
|
|
131
|
+
(0, vue.watchEffect)(() => {
|
|
132
|
+
openRef.value = mergedOpen.value;
|
|
133
|
+
if (!mergedOpen.value) lastTriggerRef.value = [];
|
|
134
|
+
});
|
|
135
|
+
const internalTriggerOpen = (nextOpen) => {
|
|
136
|
+
setMergedOpen(nextOpen);
|
|
137
|
+
if ((lastTriggerRef.value[lastTriggerRef.value.length - 1] ?? mergedOpen.value) !== nextOpen) {
|
|
138
|
+
lastTriggerRef.value.push(nextOpen);
|
|
139
|
+
props?.onOpenChange?.(nextOpen);
|
|
140
|
+
props?.onPopupVisibleChange?.(nextOpen);
|
|
141
|
+
}
|
|
142
|
+
};
|
|
143
|
+
const delayInvoke = require_useDelay.default();
|
|
144
|
+
const triggerOpen = (nextOpen, delay = 0) => {
|
|
145
|
+
if (props.popupVisible !== void 0) {
|
|
146
|
+
delayInvoke(() => {
|
|
147
|
+
internalTriggerOpen(nextOpen);
|
|
148
|
+
}, delay);
|
|
149
|
+
return;
|
|
150
|
+
}
|
|
151
|
+
if (uniqueContext && props.unique && openUncontrolled.value && !parentContext?.value) {
|
|
152
|
+
if (nextOpen) uniqueContext?.show(getUniqueOptions(delay), isOpen);
|
|
153
|
+
else uniqueContext.hide(delay);
|
|
154
|
+
return;
|
|
155
|
+
}
|
|
156
|
+
delayInvoke(() => {
|
|
157
|
+
internalTriggerOpen(nextOpen);
|
|
158
|
+
}, delay);
|
|
159
|
+
};
|
|
160
|
+
const inMotion = (0, vue.shallowRef)(false);
|
|
161
|
+
(0, vue.watch)(mergedOpen, async () => {
|
|
162
|
+
await (0, vue.nextTick)();
|
|
163
|
+
if (mergedOpen.value) inMotion.value = true;
|
|
164
|
+
});
|
|
165
|
+
const motionPrepareResolve = (0, vue.shallowRef)();
|
|
166
|
+
const mousePos = (0, vue.ref)(null);
|
|
167
|
+
const setMousePosByEvent = (event) => {
|
|
168
|
+
mousePos.value = [event.clientX, event.clientY];
|
|
169
|
+
};
|
|
170
|
+
const [ready, offsetX, offsetY, offsetR, offsetB, arrowX, arrowY, scaleX, scaleY, alignInfo, onAlign] = require_useAlign.default(mergedOpen, popupEle, (0, vue.computed)(() => props?.alignPoint && mousePos.value !== null ? mousePos.value : targetEle.value), (0, vue.computed)(() => props?.popupPlacement), (0, vue.computed)(() => props?.builtinPlacements), (0, vue.computed)(() => props?.popupAlign), props?.onPopupAlign, isMobile);
|
|
171
|
+
const [showActions, hideActions] = require_useAction.default((0, vue.computed)(() => props.action), (0, vue.computed)(() => props.showAction), (0, vue.computed)(() => props.hideAction));
|
|
172
|
+
const clickToShow = (0, vue.computed)(() => showActions.value?.has("click"));
|
|
173
|
+
const clickToHide = (0, vue.computed)(() => hideActions.value?.has("click") || hideActions.value?.has("contextmenu"));
|
|
174
|
+
const triggerAlign = () => {
|
|
175
|
+
if (!inMotion.value) onAlign();
|
|
176
|
+
};
|
|
177
|
+
const onScroll = () => {
|
|
178
|
+
if (openRef.value && props?.alignPoint && clickToHide.value) triggerOpen(false);
|
|
179
|
+
};
|
|
180
|
+
require_useWatch.default(mergedOpen, targetEle, popupEle, triggerAlign, onScroll);
|
|
181
|
+
(0, vue.watch)([mousePos, () => props.popupPlacement], async () => {
|
|
182
|
+
await (0, vue.nextTick)();
|
|
183
|
+
triggerAlign();
|
|
184
|
+
});
|
|
185
|
+
(0, vue.watch)(() => JSON.stringify(props.popupAlign), async () => {
|
|
186
|
+
await (0, vue.nextTick)();
|
|
187
|
+
const { builtinPlacements, popupPlacement } = props;
|
|
188
|
+
if (mergedOpen.value && !builtinPlacements?.[popupPlacement]) triggerAlign();
|
|
189
|
+
});
|
|
190
|
+
const alignedClassName = (0, vue.computed)(() => {
|
|
191
|
+
return (0, __v_c_util.classNames)(require_util.getAlignPopupClassName(props.builtinPlacements, props.prefixCls, alignInfo.value, props.alignPoint), props?.getPopupClassNameFromAlign?.(alignInfo.value));
|
|
192
|
+
});
|
|
193
|
+
expose({
|
|
194
|
+
nativeElement: externalForwardRef,
|
|
195
|
+
popupElement: externalPopupRef,
|
|
196
|
+
forceAlign: triggerAlign
|
|
197
|
+
});
|
|
198
|
+
const targetWidth = (0, vue.shallowRef)(0);
|
|
199
|
+
const targetHeight = (0, vue.shallowRef)(0);
|
|
200
|
+
const syncTargetSize = () => {
|
|
201
|
+
if (props.stretch && targetEle.value) {
|
|
202
|
+
const rect = targetEle.value.getBoundingClientRect();
|
|
203
|
+
targetWidth.value = rect.width;
|
|
204
|
+
targetHeight.value = rect.height;
|
|
205
|
+
}
|
|
206
|
+
};
|
|
207
|
+
const onTargetResize = () => {
|
|
208
|
+
syncTargetSize();
|
|
209
|
+
triggerAlign();
|
|
210
|
+
};
|
|
211
|
+
const onVisibleChanged = (visible) => {
|
|
212
|
+
inMotion.value = false;
|
|
213
|
+
onAlign();
|
|
214
|
+
props?.afterOpenChange?.(visible);
|
|
215
|
+
props?.afterPopupVisibleChange?.(visible);
|
|
216
|
+
};
|
|
217
|
+
const onPrepare = () => {
|
|
218
|
+
return new Promise((resolve) => {
|
|
219
|
+
syncTargetSize();
|
|
220
|
+
motionPrepareResolve.value = resolve;
|
|
221
|
+
});
|
|
222
|
+
};
|
|
223
|
+
(0, vue.watch)([motionPrepareResolve], () => {
|
|
224
|
+
if (motionPrepareResolve.value) {
|
|
225
|
+
onAlign();
|
|
226
|
+
motionPrepareResolve.value();
|
|
227
|
+
motionPrepareResolve.value = void 0;
|
|
228
|
+
}
|
|
229
|
+
});
|
|
230
|
+
function wrapperAction(target, eventName, nextOpen, delay, callback, ignoreCheck) {
|
|
231
|
+
target[eventName] = (event, ...args) => {
|
|
232
|
+
if (!ignoreCheck || !ignoreCheck()) {
|
|
233
|
+
callback?.(event);
|
|
234
|
+
triggerOpen(nextOpen, delay);
|
|
235
|
+
}
|
|
236
|
+
originChildProps[eventName]?.(event, ...args);
|
|
237
|
+
};
|
|
238
|
+
}
|
|
239
|
+
const touchToShow = (0, vue.computed)(() => showActions.value?.has("touch"));
|
|
240
|
+
const touchToHide = (0, vue.computed)(() => hideActions.value?.has("touch"));
|
|
241
|
+
const touchedRef = (0, vue.shallowRef)(false);
|
|
242
|
+
(0, vue.watchEffect)(() => {
|
|
243
|
+
const nextCloneProps = {};
|
|
244
|
+
if (touchToShow.value || touchToHide.value) nextCloneProps.onTouchstart = (...args) => {
|
|
245
|
+
touchedRef.value = true;
|
|
246
|
+
if (openRef.value && touchToHide.value) triggerOpen(false);
|
|
247
|
+
else if (!openRef.value && touchToShow.value) triggerOpen(true);
|
|
248
|
+
originChildProps.onTouchstart?.(...args);
|
|
249
|
+
};
|
|
250
|
+
if (clickToShow.value || clickToHide.value) nextCloneProps.onClick = (event, ...args) => {
|
|
251
|
+
if (openRef.value && clickToHide.value) triggerOpen(false);
|
|
252
|
+
else if (!openRef.value && clickToShow.value) {
|
|
253
|
+
setMousePosByEvent(event);
|
|
254
|
+
triggerOpen(true);
|
|
255
|
+
}
|
|
256
|
+
originChildProps?.onClick?.(event, ...args);
|
|
257
|
+
touchedRef.value = false;
|
|
258
|
+
};
|
|
259
|
+
baseActionProps.value = nextCloneProps;
|
|
260
|
+
});
|
|
261
|
+
const onPopupPointerDown = require_useWinClick.default(mergedOpen, (0, vue.computed)(() => clickToHide.value || touchToHide.value), targetEle, popupEle, (0, vue.computed)(() => props.mask), (0, vue.computed)(() => props.maskClosable), inPopupOrChild, triggerOpen);
|
|
262
|
+
const hoverToShow = (0, vue.computed)(() => showActions.value?.has("hover"));
|
|
263
|
+
const hoverToHide = (0, vue.computed)(() => hideActions.value?.has("hover"));
|
|
264
|
+
let onPopupMouseEnter;
|
|
265
|
+
let onPopupMouseLeave;
|
|
266
|
+
const ignoreMouseTrigger = () => {
|
|
267
|
+
return touchedRef.value;
|
|
268
|
+
};
|
|
269
|
+
(0, vue.watchEffect)(() => {
|
|
270
|
+
const { mouseEnterDelay, mouseLeaveDelay, alignPoint, focusDelay, blurDelay } = props;
|
|
271
|
+
const nextHoverProps = {};
|
|
272
|
+
if (hoverToShow.value) {
|
|
273
|
+
const onMouseEnterCallback = (event) => {
|
|
274
|
+
setMousePosByEvent(event);
|
|
275
|
+
};
|
|
276
|
+
wrapperAction(nextHoverProps, "onMouseenter", true, mouseEnterDelay, onMouseEnterCallback, ignoreMouseTrigger);
|
|
277
|
+
wrapperAction(nextHoverProps, "onPointerenter", true, mouseEnterDelay, onMouseEnterCallback, ignoreMouseTrigger);
|
|
278
|
+
onPopupMouseEnter = (event) => {
|
|
279
|
+
if ((mergedOpen.value || inMotion.value) && popupEle?.value?.contains(event.target)) triggerOpen(true, mouseEnterDelay);
|
|
280
|
+
};
|
|
281
|
+
if (alignPoint) nextHoverProps.onMouseMove = (event) => {
|
|
282
|
+
originChildProps.onMousemove?.(event);
|
|
283
|
+
};
|
|
284
|
+
} else onPopupMouseEnter = void 0;
|
|
285
|
+
if (hoverToHide.value) {
|
|
286
|
+
wrapperAction(nextHoverProps, "onMouseleave", false, mouseLeaveDelay, void 0, ignoreMouseTrigger);
|
|
287
|
+
wrapperAction(nextHoverProps, "onPointerleave", false, mouseLeaveDelay, void 0, ignoreMouseTrigger);
|
|
288
|
+
onPopupMouseLeave = (event) => {
|
|
289
|
+
const { relatedTarget } = event;
|
|
290
|
+
if (relatedTarget && inPopupOrChild(relatedTarget)) return;
|
|
291
|
+
triggerOpen(false, mouseLeaveDelay);
|
|
292
|
+
};
|
|
293
|
+
} else onPopupMouseLeave = void 0;
|
|
294
|
+
if (showActions.value.has("focus")) wrapperAction(nextHoverProps, "onFocus", true, focusDelay);
|
|
295
|
+
if (hideActions.value.has("focus")) wrapperAction(nextHoverProps, "onBlur", false, blurDelay);
|
|
296
|
+
if (showActions.value.has("contextmenu")) nextHoverProps.onContextmenu = (event, ...args) => {
|
|
297
|
+
if (openRef.value && hideActions.value.has("contextmenu")) triggerOpen(false);
|
|
298
|
+
else {
|
|
299
|
+
setMousePosByEvent(event);
|
|
300
|
+
triggerOpen(true);
|
|
301
|
+
}
|
|
302
|
+
event.preventDefault();
|
|
303
|
+
originChildProps.onContextmenu?.(event, ...args);
|
|
304
|
+
};
|
|
305
|
+
hoverActionProps.value = nextHoverProps;
|
|
306
|
+
});
|
|
307
|
+
const rendedRef = (0, vue.shallowRef)(false);
|
|
308
|
+
(0, vue.watchEffect)(() => {
|
|
309
|
+
rendedRef.value ||= props.forceRender || mergedOpen.value || inMotion.value;
|
|
310
|
+
});
|
|
311
|
+
return () => {
|
|
312
|
+
const child = (0, __v_c_util_dist_props_util.filterEmpty)(slots?.default?.() ?? [])?.[0];
|
|
313
|
+
const mergedChildrenProps = {
|
|
314
|
+
...originChildProps,
|
|
315
|
+
...cloneProps.value
|
|
316
|
+
};
|
|
317
|
+
const passedProps = {};
|
|
318
|
+
[
|
|
319
|
+
"onContextmenu",
|
|
320
|
+
"onClick",
|
|
321
|
+
"onMousedown",
|
|
322
|
+
"onTouchstart",
|
|
323
|
+
"onMouseenter",
|
|
324
|
+
"onMouseleave",
|
|
325
|
+
"onFocus",
|
|
326
|
+
"onBlur"
|
|
327
|
+
].forEach((eventName) => {
|
|
328
|
+
if (attrs[eventName]) passedProps[eventName] = (...args) => {
|
|
329
|
+
mergedChildrenProps[eventName]?.(...args);
|
|
330
|
+
attrs[eventName](...args);
|
|
331
|
+
};
|
|
332
|
+
});
|
|
333
|
+
const arrowPos = {
|
|
334
|
+
x: arrowX.value,
|
|
335
|
+
y: arrowY.value
|
|
336
|
+
};
|
|
337
|
+
const triggerNode = (0, vue.createVNode)(child, {
|
|
338
|
+
...mergedChildrenProps,
|
|
339
|
+
...passedProps,
|
|
340
|
+
ref: setTargetRef
|
|
341
|
+
});
|
|
342
|
+
const { unique, prefixCls, popup, popupClassName, popupStyle, zIndex, fresh, onPopupClick, mask, popupMotion, maskMotion, forceRender, getPopupContainer, stretch, mobile } = props;
|
|
343
|
+
return (0, vue.createVNode)(vue.Fragment, null, [(0, vue.createVNode)(__v_c_resize_observer.default, {
|
|
344
|
+
"disabled": !mergedOpen.value,
|
|
345
|
+
"onResize": onTargetResize
|
|
346
|
+
}, _isSlot(triggerNode) ? triggerNode : { default: () => [triggerNode] }), rendedRef.value && targetEle.value && (!uniqueContext || !unique) && (0, vue.createVNode)(require_context.TriggerContextProvider, context.value, { default: () => [(0, vue.createVNode)(require_index.default, {
|
|
347
|
+
"portal": PortalComponent,
|
|
348
|
+
"ref": setPopupRef,
|
|
349
|
+
"prefixCls": prefixCls,
|
|
350
|
+
"popup": popup,
|
|
351
|
+
"className": (0, __v_c_util.classNames)(popupClassName, !isMobile.value && alignedClassName.value),
|
|
352
|
+
"style": popupStyle,
|
|
353
|
+
"target": targetEle.value,
|
|
354
|
+
"onMouseEnter": onPopupMouseEnter,
|
|
355
|
+
"onMouseLeave": onPopupMouseLeave,
|
|
356
|
+
"onPointerEnter": onPopupMouseEnter,
|
|
357
|
+
"zIndex": zIndex,
|
|
358
|
+
"open": mergedOpen.value,
|
|
359
|
+
"keepDom": inMotion.value,
|
|
360
|
+
"fresh": fresh,
|
|
361
|
+
"onClick": onPopupClick,
|
|
362
|
+
"onPointerDownCapture": onPopupPointerDown,
|
|
363
|
+
"mask": mask,
|
|
364
|
+
"motion": popupMotion,
|
|
365
|
+
"maskMotion": maskMotion,
|
|
366
|
+
"onVisibleChanged": onVisibleChanged,
|
|
367
|
+
"onPrepare": onPrepare,
|
|
368
|
+
"forceRender": forceRender,
|
|
369
|
+
"autoDestroy": mergedAutoDestroy.value,
|
|
370
|
+
"getPopupContainer": getPopupContainer,
|
|
371
|
+
"align": alignInfo.value,
|
|
372
|
+
"arrow": innerArrow.value,
|
|
373
|
+
"arrowPos": arrowPos,
|
|
374
|
+
"ready": ready.value,
|
|
375
|
+
"offsetX": offsetX.value,
|
|
376
|
+
"offsetY": offsetY.value,
|
|
377
|
+
"offsetR": offsetR.value,
|
|
378
|
+
"offsetB": offsetB.value,
|
|
379
|
+
"onAlign": triggerAlign,
|
|
380
|
+
"stretch": stretch,
|
|
381
|
+
"targetWidth": targetWidth.value / scaleX.value,
|
|
382
|
+
"targetHeight": targetHeight.value / scaleY.value,
|
|
383
|
+
"mobile": mobile
|
|
384
|
+
}, null)] })]);
|
|
385
|
+
};
|
|
386
|
+
}, { props: /* @__PURE__ */ (0, vue.mergeDefaults)({
|
|
387
|
+
action: {
|
|
388
|
+
type: [String, Array],
|
|
389
|
+
required: false,
|
|
390
|
+
default: void 0
|
|
391
|
+
},
|
|
392
|
+
showAction: {
|
|
393
|
+
type: Array,
|
|
394
|
+
required: false,
|
|
395
|
+
default: void 0
|
|
396
|
+
},
|
|
397
|
+
hideAction: {
|
|
398
|
+
type: Array,
|
|
399
|
+
required: false,
|
|
400
|
+
default: void 0
|
|
401
|
+
},
|
|
402
|
+
prefixCls: {
|
|
403
|
+
type: String,
|
|
404
|
+
required: false,
|
|
405
|
+
default: void 0
|
|
406
|
+
},
|
|
407
|
+
zIndex: {
|
|
408
|
+
type: Number,
|
|
409
|
+
required: false,
|
|
410
|
+
default: void 0
|
|
411
|
+
},
|
|
412
|
+
onPopupAlign: {
|
|
413
|
+
type: Function,
|
|
414
|
+
required: false,
|
|
415
|
+
default: void 0
|
|
416
|
+
},
|
|
417
|
+
stretch: {
|
|
418
|
+
type: String,
|
|
419
|
+
required: false,
|
|
420
|
+
default: void 0
|
|
421
|
+
},
|
|
422
|
+
popupVisible: {
|
|
423
|
+
type: Boolean,
|
|
424
|
+
required: false,
|
|
425
|
+
default: void 0
|
|
426
|
+
},
|
|
427
|
+
defaultPopupVisible: {
|
|
428
|
+
type: Boolean,
|
|
429
|
+
required: false,
|
|
430
|
+
default: void 0
|
|
431
|
+
},
|
|
432
|
+
onOpenChange: {
|
|
433
|
+
type: Function,
|
|
434
|
+
required: false,
|
|
435
|
+
default: void 0
|
|
436
|
+
},
|
|
437
|
+
afterOpenChange: {
|
|
438
|
+
type: Function,
|
|
439
|
+
required: false,
|
|
440
|
+
default: void 0
|
|
441
|
+
},
|
|
442
|
+
onPopupVisibleChange: {
|
|
443
|
+
type: Function,
|
|
444
|
+
required: false,
|
|
445
|
+
default: void 0
|
|
446
|
+
},
|
|
447
|
+
afterPopupVisibleChange: {
|
|
448
|
+
type: Function,
|
|
449
|
+
required: false,
|
|
450
|
+
default: void 0
|
|
451
|
+
},
|
|
452
|
+
getPopupContainer: {
|
|
453
|
+
type: Function,
|
|
454
|
+
required: false,
|
|
455
|
+
default: void 0
|
|
456
|
+
},
|
|
457
|
+
forceRender: {
|
|
458
|
+
type: Boolean,
|
|
459
|
+
required: false,
|
|
460
|
+
default: void 0
|
|
461
|
+
},
|
|
462
|
+
autoDestroy: {
|
|
463
|
+
type: Boolean,
|
|
464
|
+
required: false,
|
|
465
|
+
default: void 0
|
|
466
|
+
},
|
|
467
|
+
mask: {
|
|
468
|
+
type: Boolean,
|
|
469
|
+
required: false,
|
|
470
|
+
default: void 0
|
|
471
|
+
},
|
|
472
|
+
maskClosable: {
|
|
473
|
+
type: Boolean,
|
|
474
|
+
required: false,
|
|
475
|
+
default: void 0
|
|
476
|
+
},
|
|
477
|
+
popupMotion: {
|
|
478
|
+
type: Object,
|
|
479
|
+
required: false,
|
|
480
|
+
default: void 0
|
|
481
|
+
},
|
|
482
|
+
maskMotion: {
|
|
483
|
+
type: Object,
|
|
484
|
+
required: false,
|
|
485
|
+
default: void 0
|
|
486
|
+
},
|
|
487
|
+
mouseEnterDelay: {
|
|
488
|
+
type: Number,
|
|
489
|
+
required: false,
|
|
490
|
+
default: void 0
|
|
491
|
+
},
|
|
492
|
+
mouseLeaveDelay: {
|
|
493
|
+
type: Number,
|
|
494
|
+
required: false,
|
|
495
|
+
default: void 0
|
|
496
|
+
},
|
|
497
|
+
focusDelay: {
|
|
498
|
+
type: Number,
|
|
499
|
+
required: false,
|
|
500
|
+
default: void 0
|
|
501
|
+
},
|
|
502
|
+
blurDelay: {
|
|
503
|
+
type: Number,
|
|
504
|
+
required: false,
|
|
505
|
+
default: void 0
|
|
506
|
+
},
|
|
507
|
+
popup: {
|
|
508
|
+
type: [
|
|
509
|
+
String,
|
|
510
|
+
Number,
|
|
511
|
+
null,
|
|
512
|
+
Boolean,
|
|
513
|
+
Array,
|
|
514
|
+
Function
|
|
515
|
+
],
|
|
516
|
+
required: true,
|
|
517
|
+
skipCheck: true,
|
|
518
|
+
default: void 0
|
|
519
|
+
},
|
|
520
|
+
popupPlacement: {
|
|
521
|
+
type: String,
|
|
522
|
+
required: false,
|
|
523
|
+
default: void 0
|
|
524
|
+
},
|
|
525
|
+
builtinPlacements: {
|
|
526
|
+
type: Object,
|
|
527
|
+
required: false,
|
|
528
|
+
default: void 0
|
|
529
|
+
},
|
|
530
|
+
popupAlign: {
|
|
531
|
+
type: Object,
|
|
532
|
+
required: false,
|
|
533
|
+
default: void 0
|
|
534
|
+
},
|
|
535
|
+
popupClassName: {
|
|
536
|
+
type: String,
|
|
537
|
+
required: false,
|
|
538
|
+
default: void 0
|
|
539
|
+
},
|
|
540
|
+
uniqueContainerClassName: {
|
|
541
|
+
type: String,
|
|
542
|
+
required: false,
|
|
543
|
+
default: void 0
|
|
544
|
+
},
|
|
545
|
+
uniqueContainerStyle: {
|
|
546
|
+
type: null,
|
|
547
|
+
required: false,
|
|
548
|
+
default: void 0
|
|
549
|
+
},
|
|
550
|
+
popupStyle: {
|
|
551
|
+
type: null,
|
|
552
|
+
required: false,
|
|
553
|
+
default: void 0
|
|
554
|
+
},
|
|
555
|
+
getPopupClassNameFromAlign: {
|
|
556
|
+
type: Function,
|
|
557
|
+
required: false,
|
|
558
|
+
default: void 0
|
|
559
|
+
},
|
|
560
|
+
onPopupClick: {
|
|
561
|
+
type: Function,
|
|
562
|
+
required: false,
|
|
563
|
+
default: void 0
|
|
564
|
+
},
|
|
565
|
+
alignPoint: {
|
|
566
|
+
type: Boolean,
|
|
567
|
+
required: false,
|
|
568
|
+
default: void 0
|
|
569
|
+
},
|
|
570
|
+
fresh: {
|
|
571
|
+
type: Boolean,
|
|
572
|
+
required: false,
|
|
573
|
+
default: void 0
|
|
574
|
+
},
|
|
575
|
+
unique: {
|
|
576
|
+
type: Boolean,
|
|
577
|
+
required: false,
|
|
578
|
+
default: void 0
|
|
579
|
+
},
|
|
580
|
+
arrow: {
|
|
581
|
+
type: [Boolean, Object],
|
|
582
|
+
required: false,
|
|
583
|
+
default: void 0
|
|
584
|
+
},
|
|
585
|
+
mobile: {
|
|
586
|
+
type: Object,
|
|
587
|
+
required: false,
|
|
588
|
+
default: void 0
|
|
589
|
+
}
|
|
590
|
+
}, defaults) });
|
|
695
591
|
}
|
|
696
|
-
|
|
697
|
-
|
|
592
|
+
var Trigger = generateTrigger(__v_c_portal.default);
|
|
593
|
+
var src_default = Trigger;
|
|
698
594
|
exports.Trigger = Trigger;
|
|
699
|
-
exports.
|
|
595
|
+
exports.UniqueProvider = require_index$1.default;
|
|
596
|
+
exports.default = src_default;
|
|
700
597
|
exports.generateTrigger = generateTrigger;
|