x-next 1.8.4 → 1.10.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.
- package/AI_USAGE.md +67 -7
- package/CHANGELOG.md +44 -0
- package/dist/_styles/palette-aliases.d.ts +1 -0
- package/dist/_utils/chart/scale.d.ts +1 -1
- package/dist/components/_components/chart/axis-labels.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/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/_styles/palette-aliases.js +30 -1
- package/dist/es/_utils/chart/scale.js +44 -39
- package/dist/es/_utils/palette.js +37 -35
- 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/button/Button.js +23 -23
- package/dist/es/components/form-select/Select.js +142 -141
- 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/heatmap.css +1 -1
- package/dist/style.css +1 -1
- package/package.json +3 -2
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as Ne, toRefs as
|
|
1
|
+
import { defineComponent as Ne, toRefs as Re, useId as je, computed as i, ref as p, watch as U, nextTick as De, watchEffect as Te, createVNode as m, mergeProps as L, isVNode as _e } from "vue";
|
|
2
2
|
import { isObject as N, isFunction as y, isArray as Ie, isNumber as Ke, isString as $e, isBoolean as ze, isUndefined as C, isNull as He, isEmptyObject as Me } from "../../_utils/is.js";
|
|
3
|
-
import { getKeyFromValue as
|
|
4
|
-
import { Trigger as
|
|
5
|
-
import
|
|
3
|
+
import { getKeyFromValue as G, isGroupOptionInfo as Ue, isValidOption as Ge, hasEmptyStringKey as We } from "./utils.js";
|
|
4
|
+
import { Trigger as W } from "../trigger/index.js";
|
|
5
|
+
import Y from "../_components/select-view/select-view.js";
|
|
6
6
|
import Ye from "./SelectDropdown.vue.js";
|
|
7
7
|
import qe from "./SelectOption.vue.js";
|
|
8
8
|
import Je from "./SelectOptionGroup.vue.js";
|
|
@@ -13,12 +13,12 @@ import { useFormItem as et } from "../../_hooks/use-form-item.js";
|
|
|
13
13
|
import { useLocale as tt } from "../../locale/index.js";
|
|
14
14
|
import { debounce as at } from "../../_utils/debounce.js";
|
|
15
15
|
import { getClassNameMixin as lt } from "../../_utils/config.js";
|
|
16
|
-
import { omit as
|
|
17
|
-
import
|
|
16
|
+
import { omit as ot } from "../../_utils/omit.js";
|
|
17
|
+
import nt from "../../_utils/pick.js";
|
|
18
18
|
function ut(t) {
|
|
19
19
|
return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !_e(t);
|
|
20
20
|
}
|
|
21
|
-
const
|
|
21
|
+
const q = ["id", "aria-label", "aria-labelledby", "aria-describedby"], rt = {
|
|
22
22
|
value: "value",
|
|
23
23
|
label: "label",
|
|
24
24
|
disabled: "disabled",
|
|
@@ -27,8 +27,8 @@ const W = ["id", "aria-label", "aria-labelledby", "aria-describedby"], rt = {
|
|
|
27
27
|
}, Bt = /* @__PURE__ */ Ne({
|
|
28
28
|
name: "Select",
|
|
29
29
|
components: {
|
|
30
|
-
Trigger:
|
|
31
|
-
SelectView:
|
|
30
|
+
Trigger: W,
|
|
31
|
+
SelectView: Y
|
|
32
32
|
},
|
|
33
33
|
inheritAttrs: !1,
|
|
34
34
|
props: {
|
|
@@ -376,7 +376,7 @@ const W = ["id", "aria-label", "aria-labelledby", "aria-describedby"], rt = {
|
|
|
376
376
|
* @param {Event} ev
|
|
377
377
|
* @version 2.18.0
|
|
378
378
|
*/
|
|
379
|
-
exceedLimit: (t,
|
|
379
|
+
exceedLimit: (t, n) => !0
|
|
380
380
|
},
|
|
381
381
|
/**
|
|
382
382
|
* @zh 选项为空时的显示内容
|
|
@@ -437,38 +437,38 @@ const W = ["id", "aria-label", "aria-labelledby", "aria-describedby"], rt = {
|
|
|
437
437
|
* @version 2.22.0
|
|
438
438
|
*/
|
|
439
439
|
setup(t, {
|
|
440
|
-
slots:
|
|
440
|
+
slots: n,
|
|
441
441
|
emit: r,
|
|
442
442
|
attrs: B
|
|
443
443
|
}) {
|
|
444
444
|
const {
|
|
445
|
-
size:
|
|
446
|
-
disabled:
|
|
447
|
-
error:
|
|
448
|
-
options:
|
|
445
|
+
size: J,
|
|
446
|
+
disabled: Q,
|
|
447
|
+
error: X,
|
|
448
|
+
options: Z,
|
|
449
449
|
filterOption: h,
|
|
450
450
|
valueKey: f,
|
|
451
|
-
multiple:
|
|
452
|
-
popupVisible:
|
|
453
|
-
defaultPopupVisible:
|
|
454
|
-
showExtraOptions:
|
|
455
|
-
modelValue:
|
|
451
|
+
multiple: R,
|
|
452
|
+
popupVisible: ee,
|
|
453
|
+
defaultPopupVisible: te,
|
|
454
|
+
showExtraOptions: ae,
|
|
455
|
+
modelValue: le,
|
|
456
456
|
fieldNames: V,
|
|
457
|
-
loading:
|
|
458
|
-
defaultActiveFirstOption:
|
|
459
|
-
} =
|
|
460
|
-
formItemCtx:
|
|
461
|
-
mergedSize:
|
|
457
|
+
loading: oe,
|
|
458
|
+
defaultActiveFirstOption: ne
|
|
459
|
+
} = Re(t), ue = lt("select"), j = je(), x = `${j}-listbox`, F = (e) => `${j}-option-${encodeURIComponent(e)}`, {
|
|
460
|
+
formItemCtx: re,
|
|
461
|
+
mergedSize: ie,
|
|
462
462
|
mergedDisabled: w,
|
|
463
|
-
mergedError:
|
|
464
|
-
eventHandlers:
|
|
463
|
+
mergedError: ce,
|
|
464
|
+
eventHandlers: de
|
|
465
465
|
} = et({
|
|
466
|
-
size:
|
|
467
|
-
disabled:
|
|
468
|
-
error:
|
|
466
|
+
size: J,
|
|
467
|
+
disabled: Q,
|
|
468
|
+
error: X
|
|
469
469
|
}), {
|
|
470
|
-
t:
|
|
471
|
-
} = tt(),
|
|
470
|
+
t: se
|
|
471
|
+
} = tt(), fe = i(() => t.virtualListProps ? "div" : "li"), P = i(() => N(t.allowSearch) && !!t.allowSearch.retainInputValue);
|
|
472
472
|
i(() => {
|
|
473
473
|
if (y(t.formatLabel))
|
|
474
474
|
return (e) => {
|
|
@@ -476,69 +476,69 @@ const W = ["id", "aria-label", "aria-labelledby", "aria-describedby"], rt = {
|
|
|
476
476
|
return t.formatLabel(l);
|
|
477
477
|
};
|
|
478
478
|
});
|
|
479
|
-
const
|
|
479
|
+
const D = p(), T = p({}), _ = p(), {
|
|
480
480
|
computedPopupVisible: c,
|
|
481
481
|
handlePopupVisibleChange: O
|
|
482
482
|
} = Ze({
|
|
483
|
-
popupVisible:
|
|
484
|
-
defaultPopupVisible:
|
|
483
|
+
popupVisible: ee,
|
|
484
|
+
defaultPopupVisible: te,
|
|
485
485
|
emit: r
|
|
486
|
-
}), k = p(t.defaultValue),
|
|
486
|
+
}), k = p(t.defaultValue), A = i(() => {
|
|
487
487
|
const e = t.modelValue ?? k.value;
|
|
488
488
|
return (Ie(e) ? e : e || Ke(e) || $e(e) || ze(e) ? [e] : []).map((a) => ({
|
|
489
489
|
value: a,
|
|
490
|
-
key:
|
|
490
|
+
key: G(a, t.valueKey)
|
|
491
491
|
}));
|
|
492
492
|
});
|
|
493
|
-
|
|
494
|
-
(C(e) || He(e)) && (k.value =
|
|
493
|
+
U(le, (e) => {
|
|
494
|
+
(C(e) || He(e)) && (k.value = R.value ? [] : e);
|
|
495
495
|
});
|
|
496
|
-
const d = i(() =>
|
|
496
|
+
const d = i(() => A.value.map((e) => e.key)), I = i(() => ({
|
|
497
497
|
...rt,
|
|
498
498
|
...V == null ? void 0 : V.value
|
|
499
|
-
})), K = p(),
|
|
499
|
+
})), K = p(), pe = (e) => {
|
|
500
500
|
const l = {};
|
|
501
501
|
return e.forEach((a) => {
|
|
502
502
|
l[a] = u.get(a);
|
|
503
503
|
}), l;
|
|
504
|
-
},
|
|
505
|
-
K.value =
|
|
506
|
-
},
|
|
504
|
+
}, me = (e) => {
|
|
505
|
+
K.value = pe(e);
|
|
506
|
+
}, ve = (e) => y(t.fallbackOption) ? t.fallbackOption(e) : {
|
|
507
507
|
[I.value.value]: e,
|
|
508
508
|
[I.value.label]: String(N(e) ? e[f == null ? void 0 : f.value] : e)
|
|
509
|
-
},
|
|
509
|
+
}, be = () => {
|
|
510
510
|
const e = [], l = [];
|
|
511
511
|
if (t.allowCreate || t.fallbackOption) {
|
|
512
|
-
for (const a of
|
|
512
|
+
for (const a of A.value)
|
|
513
513
|
if (!l.includes(a.key) && a.value !== "") {
|
|
514
|
-
const
|
|
515
|
-
(!
|
|
514
|
+
const o = u.get(a.key);
|
|
515
|
+
(!o || o.origin === "extraOptions") && (e.push(a), l.push(a.key));
|
|
516
516
|
}
|
|
517
517
|
}
|
|
518
518
|
if (t.allowCreate && s.value) {
|
|
519
|
-
const a =
|
|
519
|
+
const a = G(s.value);
|
|
520
520
|
if (!l.includes(a)) {
|
|
521
|
-
const
|
|
522
|
-
(!
|
|
521
|
+
const o = u.get(a);
|
|
522
|
+
(!o || o.origin === "extraOptions") && e.push({
|
|
523
523
|
value: s.value,
|
|
524
524
|
key: a
|
|
525
525
|
});
|
|
526
526
|
}
|
|
527
527
|
}
|
|
528
528
|
return e;
|
|
529
|
-
}, v = p([]),
|
|
530
|
-
var
|
|
531
|
-
let l =
|
|
532
|
-
const a = (
|
|
529
|
+
}, v = p([]), ge = i(() => v.value.map((e) => {
|
|
530
|
+
var o;
|
|
531
|
+
let l = ve(e.value);
|
|
532
|
+
const a = (o = K.value) == null ? void 0 : o[e.key];
|
|
533
533
|
return !C(a) && !Me(a) && (l = {
|
|
534
534
|
...l,
|
|
535
535
|
...a
|
|
536
536
|
}), l;
|
|
537
537
|
}));
|
|
538
|
-
|
|
538
|
+
De(() => {
|
|
539
539
|
Te(() => {
|
|
540
540
|
var l;
|
|
541
|
-
const e =
|
|
541
|
+
const e = be();
|
|
542
542
|
if (e.length !== v.value.length)
|
|
543
543
|
v.value = e;
|
|
544
544
|
else if (e.length > 0) {
|
|
@@ -551,25 +551,25 @@ const W = ["id", "aria-label", "aria-labelledby", "aria-describedby"], rt = {
|
|
|
551
551
|
});
|
|
552
552
|
});
|
|
553
553
|
const $ = p(t.defaultInputValue), s = i(() => t.inputValue ?? $.value);
|
|
554
|
-
|
|
554
|
+
U(c, (e) => {
|
|
555
555
|
!e && !P.value && s.value && g("");
|
|
556
556
|
});
|
|
557
|
-
const
|
|
557
|
+
const ye = (e) => {
|
|
558
558
|
var l;
|
|
559
559
|
return t.multiple ? e.map((a) => {
|
|
560
|
-
var
|
|
561
|
-
return ((
|
|
560
|
+
var o;
|
|
561
|
+
return ((o = u.get(a)) == null ? void 0 : o.value) ?? "";
|
|
562
562
|
}) : ((l = u.get(e[0])) == null ? void 0 : l.value) ?? (We(u) ? void 0 : "");
|
|
563
563
|
}, b = (e) => {
|
|
564
|
-
var a,
|
|
565
|
-
const l =
|
|
566
|
-
k.value = l, r("update:modelValue", l), r("change", l), (
|
|
564
|
+
var a, o;
|
|
565
|
+
const l = ye(e);
|
|
566
|
+
k.value = l, r("update:modelValue", l), r("change", l), (o = (a = de.value) == null ? void 0 : a.onChange) == null || o.call(a), me(e);
|
|
567
567
|
}, g = (e) => {
|
|
568
568
|
$.value = e, r("update:inputValue", e), r("inputValueChange", e);
|
|
569
|
-
},
|
|
569
|
+
}, he = (e, l) => {
|
|
570
570
|
if (t.multiple) {
|
|
571
571
|
if (d.value.includes(e)) {
|
|
572
|
-
const a = d.value.filter((
|
|
572
|
+
const a = d.value.filter((o) => o !== e);
|
|
573
573
|
b(a);
|
|
574
574
|
} else if (Be.value.includes(e))
|
|
575
575
|
if (t.limit > 0 && d.value.length >= t.limit) {
|
|
@@ -587,64 +587,64 @@ const W = ["id", "aria-label", "aria-labelledby", "aria-describedby"], rt = {
|
|
|
587
587
|
}
|
|
588
588
|
O(!1);
|
|
589
589
|
}
|
|
590
|
-
},
|
|
590
|
+
}, Ve = at((e) => {
|
|
591
591
|
r("search", e);
|
|
592
|
-
}, t.searchDelay),
|
|
593
|
-
e !== s.value && (c.value || O(!0), g(e), t.allowSearch &&
|
|
594
|
-
},
|
|
595
|
-
const l = u.get(e), a = d.value.filter((
|
|
592
|
+
}, t.searchDelay), we = (e) => {
|
|
593
|
+
e !== s.value && (c.value || O(!0), g(e), t.allowSearch && Ve(e));
|
|
594
|
+
}, Oe = (e) => {
|
|
595
|
+
const l = u.get(e), a = d.value.filter((o) => o !== e);
|
|
596
596
|
b(a), r("remove", l == null ? void 0 : l.value);
|
|
597
|
-
},
|
|
597
|
+
}, Se = (e) => {
|
|
598
598
|
e == null || e.stopPropagation();
|
|
599
599
|
const l = d.value.filter((a) => {
|
|
600
|
-
var
|
|
601
|
-
return (
|
|
600
|
+
var o;
|
|
601
|
+
return (o = u.get(a)) == null ? void 0 : o.disabled;
|
|
602
602
|
});
|
|
603
603
|
b(l), g(""), r("clear", e);
|
|
604
|
-
},
|
|
604
|
+
}, z = (e) => {
|
|
605
605
|
r("dropdownScroll", e);
|
|
606
|
-
},
|
|
606
|
+
}, H = (e) => {
|
|
607
607
|
r("dropdownReachBottom", e);
|
|
608
608
|
}, {
|
|
609
|
-
validOptions:
|
|
609
|
+
validOptions: M,
|
|
610
610
|
optionInfoMap: u,
|
|
611
611
|
validOptionInfos: Ce,
|
|
612
612
|
enabledOptionKeys: Be,
|
|
613
613
|
activeKey: S,
|
|
614
614
|
handleKeyDown: xe
|
|
615
615
|
} = Xe({
|
|
616
|
-
multiple:
|
|
617
|
-
options:
|
|
618
|
-
extraOptions:
|
|
616
|
+
multiple: R,
|
|
617
|
+
options: Z,
|
|
618
|
+
extraOptions: ge,
|
|
619
619
|
inputValue: s,
|
|
620
620
|
filterOption: h,
|
|
621
|
-
showExtraOptions:
|
|
622
|
-
component:
|
|
621
|
+
showExtraOptions: ae,
|
|
622
|
+
component: fe,
|
|
623
623
|
valueKey: f,
|
|
624
624
|
fieldNames: V,
|
|
625
|
-
loading:
|
|
625
|
+
loading: oe,
|
|
626
626
|
disabled: w,
|
|
627
627
|
popupVisible: c,
|
|
628
628
|
valueKeys: d,
|
|
629
|
-
dropdownRef:
|
|
629
|
+
dropdownRef: D,
|
|
630
630
|
optionRefs: T,
|
|
631
631
|
virtualListRef: _,
|
|
632
|
-
defaultActiveFirstOption:
|
|
633
|
-
onSelect:
|
|
632
|
+
defaultActiveFirstOption: ne,
|
|
633
|
+
onSelect: he,
|
|
634
634
|
onPopupVisibleChange: O,
|
|
635
635
|
getOptionId: F
|
|
636
|
-
}), Fe = i(() =>
|
|
637
|
-
...
|
|
636
|
+
}), Fe = i(() => ot(B, [...q])), Pe = i(() => ({
|
|
637
|
+
...nt(B, [...q]),
|
|
638
638
|
role: "combobox",
|
|
639
639
|
"aria-haspopup": "listbox",
|
|
640
640
|
"aria-expanded": String(c.value),
|
|
641
641
|
"aria-controls": x,
|
|
642
642
|
"aria-activedescendant": c.value && !C(S.value) ? F(S.value) : void 0,
|
|
643
643
|
"aria-autocomplete": t.allowSearch || t.allowCreate ? "list" : "none",
|
|
644
|
-
"aria-label": B["aria-label"] ?? (
|
|
644
|
+
"aria-label": B["aria-label"] ?? (re.labelId ? void 0 : t.placeholder ?? se("common.select"))
|
|
645
645
|
})), ke = i(() => {
|
|
646
646
|
const e = [];
|
|
647
|
-
for (const l of
|
|
647
|
+
for (const l of A.value) {
|
|
648
648
|
const a = u.get(l.key);
|
|
649
649
|
a && e.push({
|
|
650
650
|
...a,
|
|
@@ -655,21 +655,21 @@ const W = ["id", "aria-label", "aria-labelledby", "aria-describedby"], rt = {
|
|
|
655
655
|
});
|
|
656
656
|
}
|
|
657
657
|
return e;
|
|
658
|
-
}),
|
|
659
|
-
if (y(
|
|
660
|
-
const l =
|
|
658
|
+
}), Ae = (e) => {
|
|
659
|
+
if (y(n.option)) {
|
|
660
|
+
const l = n.option;
|
|
661
661
|
return () => l({
|
|
662
662
|
data: e.raw
|
|
663
663
|
});
|
|
664
664
|
}
|
|
665
665
|
return y(e.render) ? e.render : () => e.label;
|
|
666
|
-
},
|
|
666
|
+
}, E = (e) => {
|
|
667
667
|
if (Ue(e)) {
|
|
668
668
|
let l;
|
|
669
669
|
return m(Je, {
|
|
670
670
|
key: e.key,
|
|
671
671
|
label: e.label
|
|
672
|
-
}, ut(l = e.options.map((a) =>
|
|
672
|
+
}, ut(l = e.options.map((a) => E(a))) ? l : {
|
|
673
673
|
default: () => [l]
|
|
674
674
|
});
|
|
675
675
|
}
|
|
@@ -686,10 +686,10 @@ const W = ["id", "aria-label", "aria-labelledby", "aria-describedby"], rt = {
|
|
|
686
686
|
disabled: e.disabled,
|
|
687
687
|
internal: !0
|
|
688
688
|
}, {
|
|
689
|
-
default:
|
|
689
|
+
default: Ae(e)
|
|
690
690
|
}) : null;
|
|
691
|
-
},
|
|
692
|
-
ref:
|
|
691
|
+
}, Ee = () => m(Ye, {
|
|
692
|
+
ref: D,
|
|
693
693
|
id: x,
|
|
694
694
|
multiple: t.multiple,
|
|
695
695
|
loading: t.loading,
|
|
@@ -698,49 +698,49 @@ const W = ["id", "aria-label", "aria-labelledby", "aria-describedby"], rt = {
|
|
|
698
698
|
scrollbar: t.scrollbar,
|
|
699
699
|
showHeaderOnEmpty: t.showHeaderOnEmpty,
|
|
700
700
|
showFooterOnEmpty: t.showFooterOnEmpty,
|
|
701
|
-
onScroll:
|
|
702
|
-
onReachBottom:
|
|
701
|
+
onScroll: z,
|
|
702
|
+
onReachBottom: H
|
|
703
703
|
}, {
|
|
704
704
|
default: () => {
|
|
705
705
|
var e;
|
|
706
|
-
return [...((e =
|
|
706
|
+
return [...((e = n.default) == null ? void 0 : e.call(n)) ?? [], ...M.value.map(E)];
|
|
707
707
|
},
|
|
708
|
-
"virtual-list": () => (
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
})
|
|
718
|
-
),
|
|
708
|
+
"virtual-list": () => m(Qe, L(t.virtualListProps, {
|
|
709
|
+
ref: _,
|
|
710
|
+
data: M.value,
|
|
711
|
+
scrollbar: t.scrollbar,
|
|
712
|
+
onScroll: z,
|
|
713
|
+
onReachBottom: H
|
|
714
|
+
}), {
|
|
715
|
+
item: ({
|
|
716
|
+
item: e
|
|
717
|
+
}) => E(e)
|
|
718
|
+
}),
|
|
719
719
|
// 仅在用户真的提供了插槽时才透传,否则 v-slots 对象里的空 key
|
|
720
720
|
// 会让 SelectDropdown 的 $slots.empty 判定为真,从而跳过默认空态
|
|
721
|
-
...
|
|
722
|
-
empty:
|
|
721
|
+
...n.empty ? {
|
|
722
|
+
empty: n.empty
|
|
723
723
|
} : {},
|
|
724
|
-
...
|
|
725
|
-
header:
|
|
724
|
+
...n.header ? {
|
|
725
|
+
header: n.header
|
|
726
726
|
} : {},
|
|
727
|
-
...
|
|
728
|
-
footer:
|
|
727
|
+
...n.footer ? {
|
|
728
|
+
footer: n.footer
|
|
729
729
|
} : {}
|
|
730
|
-
}),
|
|
730
|
+
}), Le = ({
|
|
731
731
|
data: e
|
|
732
732
|
}) => {
|
|
733
733
|
var l, a;
|
|
734
|
-
if ((
|
|
735
|
-
const
|
|
736
|
-
if (
|
|
737
|
-
return ((l =
|
|
738
|
-
data:
|
|
739
|
-
})) ?? ((a = t.formatLabel) == null ? void 0 : a.call(t,
|
|
734
|
+
if ((n.label || y(t.formatLabel)) && e) {
|
|
735
|
+
const o = u.get(e.value);
|
|
736
|
+
if (o != null && o.raw)
|
|
737
|
+
return ((l = n.label) == null ? void 0 : l.call(n, {
|
|
738
|
+
data: o.raw
|
|
739
|
+
})) ?? ((a = t.formatLabel) == null ? void 0 : a.call(t, o.raw));
|
|
740
740
|
}
|
|
741
741
|
return (e == null ? void 0 : e.label) ?? "";
|
|
742
742
|
};
|
|
743
|
-
return () => m(
|
|
743
|
+
return () => m(W, L({
|
|
744
744
|
trigger: "click",
|
|
745
745
|
position: "bl",
|
|
746
746
|
popupOffset: 4,
|
|
@@ -754,22 +754,23 @@ const W = ["id", "aria-label", "aria-labelledby", "aria-describedby"], rt = {
|
|
|
754
754
|
unmountOnClose: t.unmountOnClose,
|
|
755
755
|
clickToClose: !(t.allowSearch || t.allowCreate),
|
|
756
756
|
popupContainer: t.popupContainer,
|
|
757
|
-
onPopupVisibleChange: O
|
|
757
|
+
onPopupVisibleChange: O,
|
|
758
|
+
updateAtScroll: !0
|
|
758
759
|
}, t.triggerProps), {
|
|
759
760
|
default: () => {
|
|
760
761
|
var e;
|
|
761
|
-
return [((e =
|
|
762
|
+
return [((e = n.trigger) == null ? void 0 : e.call(n, {
|
|
762
763
|
popupVisible: c.value,
|
|
763
764
|
disabled: w.value,
|
|
764
765
|
listboxId: x,
|
|
765
766
|
activeDescendant: c.value && !C(S.value) ? F(S.value) : void 0
|
|
766
|
-
})) ?? m(
|
|
767
|
-
class:
|
|
767
|
+
})) ?? m(Y, L({
|
|
768
|
+
class: ue.block,
|
|
768
769
|
modelValue: ke.value,
|
|
769
770
|
inputValue: s.value,
|
|
770
771
|
multiple: t.multiple,
|
|
771
772
|
disabled: w.value,
|
|
772
|
-
error:
|
|
773
|
+
error: ce.value,
|
|
773
774
|
loading: t.loading,
|
|
774
775
|
allowClear: t.allowClear,
|
|
775
776
|
allowCreate: t.allowCreate,
|
|
@@ -778,23 +779,23 @@ const W = ["id", "aria-label", "aria-labelledby", "aria-describedby"], rt = {
|
|
|
778
779
|
maxTagCount: t.maxTagCount,
|
|
779
780
|
placeholder: t.placeholder,
|
|
780
781
|
bordered: t.bordered,
|
|
781
|
-
size:
|
|
782
|
+
size: ie.value,
|
|
782
783
|
tagNowrap: t.tagNowrap,
|
|
783
784
|
inputAttrs: Pe.value
|
|
784
785
|
}, Fe.value, {
|
|
785
|
-
onInputValueChange:
|
|
786
|
-
onRemove:
|
|
787
|
-
onClear:
|
|
786
|
+
onInputValueChange: we,
|
|
787
|
+
onRemove: Oe,
|
|
788
|
+
onClear: Se,
|
|
788
789
|
onKeydown: xe
|
|
789
790
|
}), {
|
|
790
|
-
label:
|
|
791
|
-
prefix:
|
|
792
|
-
"arrow-icon":
|
|
793
|
-
"loading-icon":
|
|
794
|
-
"search-icon":
|
|
791
|
+
label: Le,
|
|
792
|
+
prefix: n.prefix,
|
|
793
|
+
"arrow-icon": n["arrow-icon"],
|
|
794
|
+
"loading-icon": n["loading-icon"],
|
|
795
|
+
"search-icon": n["search-icon"]
|
|
795
796
|
})];
|
|
796
797
|
},
|
|
797
|
-
content:
|
|
798
|
+
content: Ee
|
|
798
799
|
});
|
|
799
800
|
}
|
|
800
801
|
});
|