x-next 1.9.0 → 1.10.1
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/AI_USAGE.md +69 -7
- package/CHANGELOG.md +36 -0
- package/dist/_utils/chart/scale.d.ts +1 -1
- package/dist/components/_components/chart/axis-labels.d.ts +8 -0
- package/dist/components/_components/select-view/select-view.d.ts +9 -0
- package/dist/components/form-select/Select.d.ts +18 -5
- package/dist/components/form-select/SelectOptionGroup.vue.d.ts +1 -0
- package/dist/components/form-select/hooks/use-options.d.ts +1 -1
- package/dist/components/form-select/hooks/use-select.d.ts +1 -1
- package/dist/components/form-select/index.d.ts +42 -11
- package/dist/components/form-select/interface.d.ts +8 -0
- package/dist/components/link/Link.vue.d.ts +1 -1
- package/dist/components/link/index.d.ts +3 -3
- package/dist/components/pagination/page-options.vue.d.ts +60 -32
- package/dist/components/trigger/interface.d.ts +2 -0
- package/dist/components/virtual-list-v2/interface.d.ts +3 -0
- package/dist/components/virtual-list-v2/virtual-list.vue.d.ts +336 -1
- package/dist/es/_hooks/use-component-ref.js +9 -9
- package/dist/es/_utils/chart/scale.js +44 -39
- package/dist/es/components/_components/chart/ChartAxis.js +61 -36
- package/dist/es/components/_components/chart/axis-labels.js +26 -0
- package/dist/es/components/_components/select-view/select-view.js +89 -78
- package/dist/es/components/button/Button.js +23 -23
- package/dist/es/components/form-input-tag/InputTag.js +1 -1
- package/dist/es/components/form-select/Select.js +367 -318
- package/dist/es/components/form-select/SelectOption.vue.js +5 -3
- package/dist/es/components/form-select/SelectOption.vue2.js +54 -49
- package/dist/es/components/form-select/SelectOptionGroup.vue.js +17 -13
- package/dist/es/components/form-select/SelectOptionGroup.vue2.js +8 -5
- package/dist/es/components/form-select/hooks/use-options.js +40 -40
- package/dist/es/components/form-select/hooks/use-select.js +76 -71
- package/dist/es/components/trigger/Trigger.js +174 -183
- package/dist/es/components/virtual-list-v2/virtual-list.vue.js +22 -23
- package/dist/es/components/virtual-list-v2/virtual-list.vue2.js +67 -53
- package/dist/es/icons/icon.js +37 -36
- package/dist/es/icons/index.js +6 -8
- package/dist/es/icons/public/lucide-names.js +167 -0
- package/dist/es/icons/public/lucide.js +75 -188
- package/dist/es/index.js +152 -148
- package/dist/es/style.css +1 -1
- package/dist/icons/index.d.ts +3 -3
- package/dist/icons/names.d.ts +2 -2
- package/dist/icons/public/lucide-names.d.ts +32 -0
- package/dist/icons/public/lucide.d.ts +2 -2
- package/dist/index.cjs +3 -62
- package/dist/index.umd.js +3 -62
- package/dist/style/base.css +1 -1
- package/dist/style/button.css +1 -1
- package/dist/style/form-select.css +1 -1
- package/dist/style.css +1 -1
- package/package.json +3 -2
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
1
|
+
import { defineComponent as Ee, toRefs as Oe, computed as P, inject as Be, ref as i, provide as Fe, reactive as Ae, watch as F, nextTick as I, onMounted as Le, onUpdated as ke, onDeactivated as De, onBeforeUnmount as ze, createVNode as c, Fragment as Ve, Teleport as je, mergeProps as Ne, Transition as We, withDirectives as xe, vShow as Ie } from "vue";
|
|
2
|
+
import { getElementScrollRect as ne, getPopupStyle as $e, getTransformOrigin as Ge, getArrowStyle as He, getScrollElements as Ue } from "./utils.js";
|
|
3
3
|
import ue from "../../_container/resize-observer-v2.js";
|
|
4
|
-
import { on as
|
|
5
|
-
import { isEmptyChildren as
|
|
6
|
-
import
|
|
7
|
-
import { triggerInjectionKey as
|
|
8
|
-
import { throttleByRaf as
|
|
9
|
-
import
|
|
10
|
-
import { useResizeObserver as
|
|
11
|
-
import
|
|
12
|
-
import { useTeleportContainer as
|
|
13
|
-
import { useFirstElement as
|
|
14
|
-
import { omit as
|
|
15
|
-
import { getClassNameMixin as
|
|
16
|
-
const
|
|
4
|
+
import { on as $, off as ae } from "../../_utils/dom.js";
|
|
5
|
+
import { isEmptyChildren as Ke, mergeFirstChild as Xe } from "../../_utils/vue-eco.js";
|
|
6
|
+
import Ye from "../../_hooks/use-pick-slots.js";
|
|
7
|
+
import { triggerInjectionKey as ie } from "./context.js";
|
|
8
|
+
import { throttleByRaf as _e } from "../../_utils/throttle-by-raf.js";
|
|
9
|
+
import qe from "../../_hooks/use-popup-manager.js";
|
|
10
|
+
import { useResizeObserver as Je } from "../../_hooks/use-resize-observer.js";
|
|
11
|
+
import Qe from "../../_container/client-only.js";
|
|
12
|
+
import { useTeleportContainer as Ze } from "../../_hooks/use-teleport-container.js";
|
|
13
|
+
import { useFirstElement as eo } from "../../_hooks/use-first-element.js";
|
|
14
|
+
import { omit as oo } from "../../_utils/omit.js";
|
|
15
|
+
import { getClassNameMixin as to } from "../../_utils/config.js";
|
|
16
|
+
const lo = ["onClick", "onMouseenter", "onMouseleave", "onFocusin", "onFocusout", "onContextmenu"], So = /* @__PURE__ */ Ee({
|
|
17
17
|
name: "Trigger",
|
|
18
18
|
inheritAttrs: !1,
|
|
19
19
|
props: {
|
|
@@ -328,276 +328,267 @@ const oo = ["onClick", "onMouseenter", "onMouseleave", "onFocusin", "onFocusout"
|
|
|
328
328
|
* @slot content
|
|
329
329
|
*/
|
|
330
330
|
setup(o, {
|
|
331
|
-
emit:
|
|
332
|
-
slots:
|
|
331
|
+
emit: C,
|
|
332
|
+
slots: f,
|
|
333
333
|
attrs: n
|
|
334
334
|
}) {
|
|
335
335
|
const {
|
|
336
|
-
popupContainer:
|
|
337
|
-
} = Oe(o),
|
|
336
|
+
popupContainer: se
|
|
337
|
+
} = Oe(o), b = to("trigger"), ce = P(() => oo(n, lo)), m = P(() => [].concat(o.trigger)), A = /* @__PURE__ */ new Set(), u = Be(ie, void 0), {
|
|
338
338
|
children: M,
|
|
339
|
-
firstElement:
|
|
340
|
-
} =
|
|
339
|
+
firstElement: g
|
|
340
|
+
} = eo(), v = i(), G = i(o.defaultPopupVisible), E = i(o.position), H = i({}), U = i({}), K = i({}), S = i(!1), re = i(), r = i({
|
|
341
341
|
top: 0,
|
|
342
342
|
left: 0
|
|
343
|
-
})
|
|
344
|
-
let O = null, E = null;
|
|
345
|
-
const l = P(() => o.popupVisible ?? H.value), {
|
|
343
|
+
}), L = /* @__PURE__ */ new Map(), l = P(() => o.popupVisible ?? G.value), {
|
|
346
344
|
teleportContainer: de,
|
|
347
|
-
containerRef:
|
|
348
|
-
} =
|
|
349
|
-
popupContainer:
|
|
345
|
+
containerRef: k
|
|
346
|
+
} = Ze({
|
|
347
|
+
popupContainer: se,
|
|
350
348
|
visible: l,
|
|
351
349
|
documentContainer: !0
|
|
352
350
|
}), {
|
|
353
|
-
zIndex:
|
|
354
|
-
} =
|
|
351
|
+
zIndex: fe
|
|
352
|
+
} = qe("popup", {
|
|
355
353
|
visible: l
|
|
356
354
|
});
|
|
357
|
-
let
|
|
358
|
-
const
|
|
359
|
-
|
|
360
|
-
},
|
|
355
|
+
let T = 0, p = !1;
|
|
356
|
+
const me = () => {
|
|
357
|
+
T && (window.clearTimeout(T), T = 0);
|
|
358
|
+
}, D = (e) => {
|
|
361
359
|
if (o.alignPoint) {
|
|
362
360
|
const {
|
|
363
361
|
pageX: t,
|
|
364
|
-
pageY:
|
|
362
|
+
pageY: a
|
|
365
363
|
} = e;
|
|
366
|
-
|
|
367
|
-
top:
|
|
364
|
+
r.value = {
|
|
365
|
+
top: a,
|
|
368
366
|
left: t
|
|
369
367
|
};
|
|
370
368
|
}
|
|
371
|
-
},
|
|
369
|
+
}, X = () => {
|
|
372
370
|
S.value = !0;
|
|
373
|
-
},
|
|
374
|
-
if (!
|
|
371
|
+
}, y = () => {
|
|
372
|
+
if (!g.value || !v.value || !k.value)
|
|
375
373
|
return;
|
|
376
|
-
const e =
|
|
377
|
-
top:
|
|
378
|
-
bottom:
|
|
379
|
-
left:
|
|
380
|
-
right:
|
|
381
|
-
scrollTop:
|
|
382
|
-
scrollBottom:
|
|
383
|
-
scrollLeft:
|
|
384
|
-
scrollRight:
|
|
374
|
+
const e = k.value.getBoundingClientRect(), t = o.alignPoint ? {
|
|
375
|
+
top: r.value.top,
|
|
376
|
+
bottom: r.value.top,
|
|
377
|
+
left: r.value.left,
|
|
378
|
+
right: r.value.left,
|
|
379
|
+
scrollTop: r.value.top,
|
|
380
|
+
scrollBottom: r.value.top,
|
|
381
|
+
scrollLeft: r.value.left,
|
|
382
|
+
scrollRight: r.value.left,
|
|
385
383
|
width: 0,
|
|
386
384
|
height: 0
|
|
387
|
-
} : ne(
|
|
385
|
+
} : ne(g.value, e), a = () => (
|
|
388
386
|
// @ts-ignore
|
|
389
|
-
ne(
|
|
390
|
-
), d =
|
|
391
|
-
style:
|
|
392
|
-
position:
|
|
387
|
+
ne(v.value, e)
|
|
388
|
+
), d = a(), {
|
|
389
|
+
style: h,
|
|
390
|
+
position: w
|
|
393
391
|
} = $e(o.position, e, t, d, {
|
|
394
392
|
offset: o.popupOffset,
|
|
395
393
|
translate: o.popupTranslate,
|
|
396
394
|
customStyle: o.popupStyle,
|
|
397
395
|
autoFitPosition: o.autoFitPosition
|
|
398
396
|
});
|
|
399
|
-
o.autoFitTransformOrigin && (
|
|
400
|
-
transformOrigin: Ge(
|
|
401
|
-
}), o.autoFitPopupMinWidth ?
|
|
402
|
-
|
|
397
|
+
o.autoFitTransformOrigin && (U.value = {
|
|
398
|
+
transformOrigin: Ge(w)
|
|
399
|
+
}), o.autoFitPopupMinWidth ? h.minWidth = `${t.width}px` : o.autoFitPopupWidth && (h.width = `${t.width}px`), E.value !== w && (E.value = w), H.value = h, o.showArrow ? I(() => {
|
|
400
|
+
K.value = He(w, t, a(), {
|
|
403
401
|
customStyle: o.arrowStyle
|
|
404
|
-
}),
|
|
405
|
-
}) :
|
|
406
|
-
},
|
|
407
|
-
const
|
|
408
|
-
if (e === l.value && !
|
|
402
|
+
}), X();
|
|
403
|
+
}) : X();
|
|
404
|
+
}, s = (e, t) => {
|
|
405
|
+
const a = T !== 0;
|
|
406
|
+
if (e === l.value && !a)
|
|
409
407
|
return;
|
|
410
408
|
const d = () => {
|
|
411
|
-
e && (S.value = !1),
|
|
412
|
-
|
|
409
|
+
e && (S.value = !1), G.value = e, C("update:popupVisible", e), C("popupVisibleChange", e), e && I(() => {
|
|
410
|
+
y();
|
|
413
411
|
});
|
|
414
412
|
};
|
|
415
|
-
if (
|
|
416
|
-
e !== l.value && (
|
|
413
|
+
if (me(), t) {
|
|
414
|
+
e !== l.value && (T = window.setTimeout(d, t));
|
|
417
415
|
return;
|
|
418
416
|
}
|
|
419
|
-
e === l.value &&
|
|
420
|
-
},
|
|
417
|
+
e === l.value && a || d();
|
|
418
|
+
}, ve = (e) => {
|
|
421
419
|
var t;
|
|
422
|
-
(t = n.onClick) == null || t.call(n, e), !(o.disabled || l.value && !o.clickToClose) && (
|
|
423
|
-
},
|
|
420
|
+
(t = n.onClick) == null || t.call(n, e), !(o.disabled || l.value && !o.clickToClose) && (m.value.includes("click") ? (D(e), s(!l.value)) : m.value.includes("contextMenu") && l.value && s(!1));
|
|
421
|
+
}, Y = (e) => {
|
|
424
422
|
var t;
|
|
425
|
-
(t = n.onMouseenter) == null || t.call(n, e), !(o.disabled || !
|
|
423
|
+
(t = n.onMouseenter) == null || t.call(n, e), !(o.disabled || !m.value.includes("hover")) && (D(e), s(!0, o.mouseEnterDelay));
|
|
424
|
+
}, _ = (e) => {
|
|
425
|
+
u == null || u.onMouseenter(e), Y(e);
|
|
426
426
|
}, q = (e) => {
|
|
427
|
-
|
|
427
|
+
var t;
|
|
428
|
+
(t = n.onMouseleave) == null || t.call(n, e), !(o.disabled || !m.value.includes("hover")) && s(!1, o.mouseLeaveDelay);
|
|
428
429
|
}, J = (e) => {
|
|
430
|
+
u == null || u.onMouseleave(e), q(e);
|
|
431
|
+
}, pe = (e) => {
|
|
429
432
|
var t;
|
|
430
|
-
(t = n.
|
|
431
|
-
}, Q = (e) => {
|
|
432
|
-
u == null || u.onMouseleave(e), J(e);
|
|
433
|
+
(t = n.onFocusin) == null || t.call(n, e), !(o.disabled || !m.value.includes("focus")) && s(!0, o.focusDelay);
|
|
433
434
|
}, ye = (e) => {
|
|
434
435
|
var t;
|
|
435
|
-
(t = n.
|
|
436
|
+
(t = n.onFocusout) == null || t.call(n, e), !(o.disabled || !m.value.includes("focus")) && o.blurToClose && s(!1);
|
|
436
437
|
}, he = (e) => {
|
|
437
438
|
var t;
|
|
438
|
-
(t = n.
|
|
439
|
-
}, we = (e) => {
|
|
440
|
-
var t;
|
|
441
|
-
(t = n.onContextmenu) == null || t.call(n, e), !(o.disabled || !p.value.includes("contextMenu") || l.value && !o.clickToClose) && (V(e), a(!l.value), e.preventDefault());
|
|
439
|
+
(t = n.onContextmenu) == null || t.call(n, e), !(o.disabled || !m.value.includes("contextMenu") || l.value && !o.clickToClose) && (D(e), s(!l.value), e.preventDefault());
|
|
442
440
|
};
|
|
443
|
-
Fe(
|
|
444
|
-
onMouseenter:
|
|
445
|
-
onMouseleave:
|
|
441
|
+
Fe(ie, Ae({
|
|
442
|
+
onMouseenter: _,
|
|
443
|
+
onMouseleave: J,
|
|
446
444
|
addChildRef: (e) => {
|
|
447
|
-
|
|
445
|
+
A.add(e), u == null || u.addChildRef(e);
|
|
448
446
|
},
|
|
449
447
|
removeChildRef: (e) => {
|
|
450
|
-
|
|
448
|
+
A.delete(e), u == null || u.removeChildRef(e);
|
|
451
449
|
}
|
|
452
450
|
}));
|
|
453
|
-
const
|
|
454
|
-
|
|
455
|
-
},
|
|
451
|
+
const z = () => {
|
|
452
|
+
ae(document.documentElement, "mousedown", j), p = !1;
|
|
453
|
+
}, V = Ye(f, "content"), we = P(() => {
|
|
456
454
|
var e;
|
|
457
|
-
return o.hideEmpty &&
|
|
458
|
-
}),
|
|
459
|
-
var t,
|
|
460
|
-
if (!((t =
|
|
461
|
-
for (const
|
|
462
|
-
if ((d =
|
|
455
|
+
return o.hideEmpty && Ke((e = V.value) == null ? void 0 : e.call(V));
|
|
456
|
+
}), j = (e) => {
|
|
457
|
+
var t, a, d;
|
|
458
|
+
if (!((t = g.value) != null && t.contains(e.target) || (a = v.value) != null && a.contains(e.target))) {
|
|
459
|
+
for (const h of A)
|
|
460
|
+
if ((d = h.value) != null && d.contains(e.target))
|
|
463
461
|
return;
|
|
464
|
-
|
|
462
|
+
z(), s(!1);
|
|
465
463
|
}
|
|
466
|
-
},
|
|
467
|
-
const [
|
|
468
|
-
scrollTop:
|
|
469
|
-
scrollLeft:
|
|
464
|
+
}, Ce = (e, t) => {
|
|
465
|
+
const [a, d] = e, {
|
|
466
|
+
scrollTop: h,
|
|
467
|
+
scrollLeft: w
|
|
470
468
|
} = t;
|
|
471
|
-
return Math.abs(
|
|
472
|
-
},
|
|
473
|
-
if (l.value)
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
}
|
|
485
|
-
l.value
|
|
469
|
+
return Math.abs(h - a) >= o.scrollToCloseDistance || Math.abs(w - d) >= o.scrollToCloseDistance;
|
|
470
|
+
}, Q = (e) => {
|
|
471
|
+
if (!l.value) return;
|
|
472
|
+
const t = L.get(e);
|
|
473
|
+
o.scrollToClose && t && Ce(t, e) ? s(!1) : o.updateAtScroll && oe();
|
|
474
|
+
}, Z = (e) => Q(e.currentTarget), ee = () => Q(document.scrollingElement ?? document.documentElement), oe = _e(() => {
|
|
475
|
+
l.value && y();
|
|
476
|
+
});
|
|
477
|
+
let R = [], N = !1;
|
|
478
|
+
const te = () => {
|
|
479
|
+
for (const e of R)
|
|
480
|
+
e.removeEventListener("scroll", Z);
|
|
481
|
+
N && (ae(window, "scroll", ee), N = !1), R = [], L.clear(), oe.cancel();
|
|
482
|
+
}, W = () => {
|
|
483
|
+
if (te(), !l.value || !(o.updateAtScroll || o.scrollToClose)) return;
|
|
484
|
+
R = Ue(g.value);
|
|
485
|
+
const e = document.scrollingElement ?? document.documentElement;
|
|
486
|
+
for (const t of [...R, e])
|
|
487
|
+
L.set(t, [t.scrollTop, t.scrollLeft]);
|
|
488
|
+
for (const t of R)
|
|
489
|
+
t.addEventListener("scroll", Z, {
|
|
490
|
+
passive: !0
|
|
491
|
+
});
|
|
492
|
+
$(window, "scroll", ee, {
|
|
493
|
+
passive: !0
|
|
494
|
+
}), N = !0;
|
|
495
|
+
}, x = () => {
|
|
496
|
+
l.value && y();
|
|
486
497
|
}, be = () => {
|
|
487
|
-
x(),
|
|
498
|
+
x(), C("resize");
|
|
488
499
|
}, ge = (e) => {
|
|
489
500
|
o.preventFocus && e.preventDefault();
|
|
490
501
|
};
|
|
491
|
-
u == null || u.addChildRef(
|
|
492
|
-
const
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
t.addEventListener("scroll", F);
|
|
500
|
-
} else if (r) {
|
|
501
|
-
for (const t of r)
|
|
502
|
-
t.removeEventListener("scroll", F);
|
|
503
|
-
r = void 0;
|
|
504
|
-
}
|
|
505
|
-
}
|
|
506
|
-
e && (S.value = !1, L.value = !0);
|
|
507
|
-
}), I(y, (e) => {
|
|
508
|
-
e && l.value && !S.value && $(() => m());
|
|
509
|
-
}), I(() => [o.autoFitPopupWidth, o.autoFitPopupMinWidth], () => {
|
|
510
|
-
l.value && m();
|
|
502
|
+
u == null || u.addChildRef(v);
|
|
503
|
+
const Se = P(() => l.value ? o.openedClass : void 0);
|
|
504
|
+
F(l, (e) => {
|
|
505
|
+
o.clickOutsideToClose && (!e && p ? z() : e && !p && ($(document.documentElement, "mousedown", j), p = !0)), W(), e && (S.value = !1, O.value = !0);
|
|
506
|
+
}), F(() => [o.updateAtScroll, o.scrollToClose, g.value], W), F(v, (e) => {
|
|
507
|
+
e && l.value && !S.value && I(() => y());
|
|
508
|
+
}), F(() => [o.autoFitPopupWidth, o.autoFitPopupMinWidth], () => {
|
|
509
|
+
l.value && y();
|
|
511
510
|
});
|
|
512
511
|
const {
|
|
513
|
-
createResizeObserver:
|
|
512
|
+
createResizeObserver: Te,
|
|
514
513
|
destroyResizeObserver: Re
|
|
515
|
-
} =
|
|
516
|
-
elementRef:
|
|
514
|
+
} = Je({
|
|
515
|
+
elementRef: k,
|
|
517
516
|
onResize: x
|
|
518
517
|
});
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
r = le(T.value);
|
|
522
|
-
for (const e of r)
|
|
523
|
-
e.addEventListener("scroll", F);
|
|
524
|
-
}
|
|
518
|
+
Le(() => {
|
|
519
|
+
Te(), l.value && (O.value = !0, y(), o.clickOutsideToClose && !p && ($(document.documentElement, "mousedown", j), p = !0), W());
|
|
525
520
|
}), ke(() => {
|
|
526
|
-
l.value &&
|
|
521
|
+
l.value && y();
|
|
527
522
|
}), De(() => {
|
|
528
|
-
|
|
523
|
+
s(!1);
|
|
529
524
|
}), ze(() => {
|
|
530
|
-
|
|
531
|
-
for (const e of r)
|
|
532
|
-
e.removeEventListener("scroll", F);
|
|
533
|
-
r = void 0;
|
|
534
|
-
}
|
|
525
|
+
u == null || u.removeChildRef(v), Re(), p && z(), te();
|
|
535
526
|
});
|
|
536
|
-
const
|
|
537
|
-
|
|
527
|
+
const O = i(l.value), B = i(!1), le = () => {
|
|
528
|
+
B.value = !0;
|
|
538
529
|
}, Pe = () => {
|
|
539
|
-
|
|
530
|
+
B.value = !1, l.value && C("show");
|
|
540
531
|
}, Me = () => {
|
|
541
|
-
|
|
532
|
+
B.value = !1, l.value || (O.value = !1, C("hide"));
|
|
542
533
|
};
|
|
543
534
|
return () => {
|
|
544
535
|
var e;
|
|
545
|
-
return M.value = ((e =
|
|
546
|
-
class:
|
|
547
|
-
onClick:
|
|
548
|
-
onMouseenter:
|
|
549
|
-
onMouseleave:
|
|
550
|
-
onFocusin:
|
|
551
|
-
onFocusout:
|
|
552
|
-
onContextmenu:
|
|
536
|
+
return M.value = ((e = f.default) == null ? void 0 : e.call(f)) ?? [], Xe(M.value, {
|
|
537
|
+
class: Se.value,
|
|
538
|
+
onClick: ve,
|
|
539
|
+
onMouseenter: Y,
|
|
540
|
+
onMouseleave: q,
|
|
541
|
+
onFocusin: pe,
|
|
542
|
+
onFocusout: ye,
|
|
543
|
+
onContextmenu: he
|
|
553
544
|
}), c(Ve, null, [o.autoFixPosition ? c(ue, {
|
|
554
545
|
onResize: be
|
|
555
546
|
}, {
|
|
556
547
|
default: () => [M.value]
|
|
557
|
-
}) : M.value, c(
|
|
548
|
+
}) : M.value, c(Qe, null, {
|
|
558
549
|
default: () => [c(je, {
|
|
559
550
|
to: de.value,
|
|
560
551
|
disabled: !o.renderToBody
|
|
561
552
|
}, {
|
|
562
|
-
default: () => [(!o.unmountOnClose || l.value ||
|
|
553
|
+
default: () => [(!o.unmountOnClose || l.value || O.value) && !we.value && c(ue, {
|
|
563
554
|
onResize: x
|
|
564
555
|
}, {
|
|
565
556
|
default: () => [c("div", Ne({
|
|
566
|
-
ref:
|
|
567
|
-
class: [
|
|
557
|
+
ref: v,
|
|
558
|
+
class: [b.element("popup"), b.modifier(`position-${E.value}`)],
|
|
568
559
|
style: {
|
|
569
|
-
...
|
|
570
|
-
zIndex:
|
|
560
|
+
...H.value,
|
|
561
|
+
zIndex: fe.value,
|
|
571
562
|
...l.value && !S.value ? {
|
|
572
563
|
visibility: "hidden"
|
|
573
564
|
} : {},
|
|
574
|
-
pointerEvents:
|
|
565
|
+
pointerEvents: B.value ? "none" : "auto"
|
|
575
566
|
},
|
|
576
|
-
"trigger-placement":
|
|
577
|
-
onMouseenter:
|
|
578
|
-
onMouseleave:
|
|
567
|
+
"trigger-placement": E.value,
|
|
568
|
+
onMouseenter: _,
|
|
569
|
+
onMouseleave: J,
|
|
579
570
|
onMousedown: ge
|
|
580
571
|
}, ce.value), [c(We, {
|
|
581
572
|
name: o.animationName,
|
|
582
573
|
duration: o.duration,
|
|
583
574
|
appear: !0,
|
|
584
|
-
onBeforeEnter:
|
|
575
|
+
onBeforeEnter: le,
|
|
585
576
|
onAfterEnter: Pe,
|
|
586
|
-
onBeforeLeave:
|
|
577
|
+
onBeforeLeave: le,
|
|
587
578
|
onAfterLeave: Me
|
|
588
579
|
}, {
|
|
589
580
|
default: () => {
|
|
590
581
|
var t;
|
|
591
582
|
return [xe(c("div", {
|
|
592
|
-
class:
|
|
593
|
-
style:
|
|
583
|
+
class: b.element("popup-wrapper"),
|
|
584
|
+
style: U.value
|
|
594
585
|
}, [c("div", {
|
|
595
|
-
class: [
|
|
586
|
+
class: [b.element("content"), o.contentClass],
|
|
596
587
|
style: o.contentStyle
|
|
597
|
-
}, [(t =
|
|
598
|
-
ref:
|
|
599
|
-
class: [
|
|
600
|
-
style:
|
|
588
|
+
}, [(t = f.content) == null ? void 0 : t.call(f)]), o.showArrow && c("div", {
|
|
589
|
+
ref: re,
|
|
590
|
+
class: [b.element("arrow"), o.arrowClass],
|
|
591
|
+
style: K.value
|
|
601
592
|
}, null)]), [[Ie, l.value]])];
|
|
602
593
|
}
|
|
603
594
|
})])]
|
|
@@ -608,5 +599,5 @@ const oo = ["onClick", "onMouseenter", "onMouseleave", "onFocusin", "onFocusout"
|
|
|
608
599
|
}
|
|
609
600
|
});
|
|
610
601
|
export {
|
|
611
|
-
|
|
602
|
+
So as default
|
|
612
603
|
};
|
|
@@ -1,38 +1,37 @@
|
|
|
1
1
|
import d from "./virtual-list.vue2.js";
|
|
2
|
-
import { resolveComponent as m, openBlock as t, createBlock as
|
|
3
|
-
import
|
|
4
|
-
function
|
|
2
|
+
import { resolveComponent as m, openBlock as t, createBlock as o, resolveDynamicComponent as r, mergeProps as s, withCtx as n, createElementBlock as p, Fragment as f, renderList as g, renderSlot as u } from "vue";
|
|
3
|
+
import y from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
function c(e, $, C, P, S, h) {
|
|
5
5
|
const a = m("VirtualListItem");
|
|
6
|
-
return t(),
|
|
7
|
-
ref: "
|
|
8
|
-
class:
|
|
9
|
-
style:
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
(t(), n(s(e.mergedComponent.list), l(e.listAttrs, {
|
|
6
|
+
return t(), o(r(e.displayScrollbar ? "ScrollbarComponent" : e.mergedComponent.container), s({
|
|
7
|
+
ref: "wrapperComRef",
|
|
8
|
+
class: e.className.block,
|
|
9
|
+
style: e.style
|
|
10
|
+
}, e.scrollbarProps, { onScroll: e.onScroll }), {
|
|
11
|
+
default: n(() => [
|
|
12
|
+
(t(), o(r(e.mergedComponent.list), s(e.listAttrs, {
|
|
14
13
|
style: e.paddingPosition === "list" ? {
|
|
15
14
|
paddingTop: `${e.frontPadding}px`,
|
|
16
15
|
paddingBottom: `${e.behindPadding}px`
|
|
17
16
|
} : {}
|
|
18
17
|
}), {
|
|
19
|
-
default:
|
|
20
|
-
(t(),
|
|
18
|
+
default: n(() => [
|
|
19
|
+
(t(), o(r(e.mergedComponent.content), s({ ref: "contentRef" }, e.contentAttrs, {
|
|
21
20
|
style: e.paddingPosition === "content" ? {
|
|
22
21
|
paddingTop: `${e.frontPadding}px`,
|
|
23
22
|
paddingBottom: `${e.behindPadding}px`
|
|
24
23
|
} : {}
|
|
25
24
|
}), {
|
|
26
|
-
default:
|
|
27
|
-
(t(!0),
|
|
28
|
-
key:
|
|
25
|
+
default: n(() => [
|
|
26
|
+
(t(!0), p(f, null, g(e.currentList, (i, l) => (t(), o(a, {
|
|
27
|
+
key: i[e.itemKey] ?? e.start + l,
|
|
29
28
|
"has-item-size": e.hasItemSize,
|
|
30
29
|
"set-item-size": e.setItemSize
|
|
31
30
|
}, {
|
|
32
|
-
default:
|
|
33
|
-
|
|
34
|
-
item:
|
|
35
|
-
index: e.start +
|
|
31
|
+
default: n(() => [
|
|
32
|
+
u(e.$slots, "item", {
|
|
33
|
+
item: i,
|
|
34
|
+
index: e.start + l
|
|
36
35
|
})
|
|
37
36
|
]),
|
|
38
37
|
_: 2
|
|
@@ -45,9 +44,9 @@ function z(e, h, C, P, S, k) {
|
|
|
45
44
|
}, 16, ["style"]))
|
|
46
45
|
]),
|
|
47
46
|
_: 3
|
|
48
|
-
},
|
|
47
|
+
}, 16, ["class", "style", "onScroll"]);
|
|
49
48
|
}
|
|
50
|
-
const
|
|
49
|
+
const B = /* @__PURE__ */ y(d, [["render", c]]);
|
|
51
50
|
export {
|
|
52
|
-
|
|
51
|
+
B as default
|
|
53
52
|
};
|