@nhdropshipping/y-components 1.0.40 → 1.0.42
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/components/yimage.vue.d.ts.map +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +260 -264
- package/dist/index.esm.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -37,7 +37,7 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
|
|
|
37
37
|
}
|
|
38
38
|
n("click", C);
|
|
39
39
|
}
|
|
40
|
-
const
|
|
40
|
+
const p = Y(() => {
|
|
41
41
|
switch (t.groupPosition) {
|
|
42
42
|
case "start":
|
|
43
43
|
return "group-pos-start";
|
|
@@ -48,7 +48,7 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
|
|
|
48
48
|
default:
|
|
49
49
|
return "group-pos-single";
|
|
50
50
|
}
|
|
51
|
-
}),
|
|
51
|
+
}), y = Y(() => Array.isArray(t.groupItems) && t.groupItems.length > 0);
|
|
52
52
|
function I(C, T) {
|
|
53
53
|
if (t.disabled || t.loading || C.disabled || C.loading) {
|
|
54
54
|
T.preventDefault(), T.stopPropagation();
|
|
@@ -56,7 +56,7 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
|
|
|
56
56
|
}
|
|
57
57
|
n("group-click", C.value, T);
|
|
58
58
|
}
|
|
59
|
-
return (C, T) =>
|
|
59
|
+
return (C, T) => y.value ? (i(), u("div", dt, [
|
|
60
60
|
(i(!0), u(ae, null, de(e.groupItems, (k, w) => {
|
|
61
61
|
var g;
|
|
62
62
|
return i(), u("button", {
|
|
@@ -100,7 +100,7 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
|
|
|
100
100
|
`y-btn--${e.size}`,
|
|
101
101
|
{ "is-block": e.block, "is-loading": e.loading },
|
|
102
102
|
e.groupPosition !== "single" ? "is-grouped" : "",
|
|
103
|
-
|
|
103
|
+
p.value
|
|
104
104
|
]]),
|
|
105
105
|
type: e.htmlType,
|
|
106
106
|
disabled: e.disabled || e.loading,
|
|
@@ -137,19 +137,19 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
|
|
|
137
137
|
},
|
|
138
138
|
emits: ["update:modelValue"],
|
|
139
139
|
setup(e, { emit: $ }) {
|
|
140
|
-
const t = e, n = $, m = K(null),
|
|
140
|
+
const t = e, n = $, m = K(null), p = K(""), y = K(!1), I = K(!1), C = K(t.placeholder || "");
|
|
141
141
|
te(() => t.placeholder, (g) => {
|
|
142
142
|
I.value || (C.value = g || "");
|
|
143
143
|
});
|
|
144
144
|
function T(g) {
|
|
145
145
|
const x = g.target;
|
|
146
|
-
|
|
146
|
+
y.value = !0, n("update:modelValue", x.value);
|
|
147
147
|
}
|
|
148
148
|
function k() {
|
|
149
|
-
I.value = !0, t.clearOnFocus && (
|
|
149
|
+
I.value = !0, t.clearOnFocus && (p.value = t.modelValue || "", y.value = !1, C.value = p.value || t.placeholder || "", n("update:modelValue", ""));
|
|
150
150
|
}
|
|
151
151
|
function w() {
|
|
152
|
-
I.value = !1, t.clearOnFocus && !
|
|
152
|
+
I.value = !1, t.clearOnFocus && !y.value && (!t.modelValue || t.modelValue === "") && n("update:modelValue", p.value), C.value = t.placeholder || "";
|
|
153
153
|
}
|
|
154
154
|
return (g, x) => (i(), u("div", {
|
|
155
155
|
class: E(["y-input-wrap", { "is-block": e.block }]),
|
|
@@ -234,7 +234,7 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
|
|
|
234
234
|
},
|
|
235
235
|
emits: ["edit", "select", "update:selectedItems", "page-change", "page-size-change"],
|
|
236
236
|
setup(e, { emit: $ }) {
|
|
237
|
-
const t = e, n = $, m = K(t.currentPage || 1),
|
|
237
|
+
const t = e, n = $, m = K(t.currentPage || 1), p = K(t.pageSize), y = K([]), I = K(/* @__PURE__ */ new Set()), C = K("none"), T = K(), k = K(), w = K(), g = K(), x = K([]), P = K({}), J = Y(
|
|
238
238
|
() => t.columns.filter((l) => !U(l.width)).map((l) => l.key)
|
|
239
239
|
);
|
|
240
240
|
function A() {
|
|
@@ -275,7 +275,7 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
|
|
|
275
275
|
}), he = Y(() => (t.pagination, ne.value)), ge = Y(() => {
|
|
276
276
|
if (!t.selectable) return !1;
|
|
277
277
|
const l = he.value.map((c, _) => d(c, _));
|
|
278
|
-
return l.length > 0 && l.every((c) =>
|
|
278
|
+
return l.length > 0 && l.every((c) => y.value.includes(c));
|
|
279
279
|
}), me = Y(() => {
|
|
280
280
|
const l = [];
|
|
281
281
|
let c = t.selectable ? 40 : 0;
|
|
@@ -320,7 +320,7 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
|
|
|
320
320
|
function d(l, c) {
|
|
321
321
|
return typeof t.rowKey == "function" ? t.rowKey(l) : l[t.rowKey] || c;
|
|
322
322
|
}
|
|
323
|
-
function
|
|
323
|
+
function h(l) {
|
|
324
324
|
return I.value.has(l);
|
|
325
325
|
}
|
|
326
326
|
function a(l) {
|
|
@@ -355,20 +355,20 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
|
|
|
355
355
|
return c.formatter ? c.formatter(_, l) : _ || "";
|
|
356
356
|
}
|
|
357
357
|
function j(l) {
|
|
358
|
-
|
|
358
|
+
y.value.includes(l) ? y.value = y.value.filter((c) => c !== l) : y.value = [...y.value, l], n("select", y.value), n("update:selectedItems", y.value);
|
|
359
359
|
}
|
|
360
360
|
function X() {
|
|
361
361
|
const l = he.value.map((c, _) => d(c, _));
|
|
362
|
-
if (l.every((c) =>
|
|
363
|
-
|
|
362
|
+
if (l.every((c) => y.value.includes(c)))
|
|
363
|
+
y.value = y.value.filter((c) => !l.includes(c));
|
|
364
364
|
else {
|
|
365
|
-
const c = /* @__PURE__ */ new Set([...
|
|
366
|
-
|
|
365
|
+
const c = /* @__PURE__ */ new Set([...y.value, ...l]);
|
|
366
|
+
y.value = Array.from(c);
|
|
367
367
|
}
|
|
368
|
-
n("select",
|
|
368
|
+
n("select", y.value), n("update:selectedItems", y.value);
|
|
369
369
|
}
|
|
370
370
|
function R() {
|
|
371
|
-
|
|
371
|
+
y.value = [], n("select", y.value), n("update:selectedItems", y.value);
|
|
372
372
|
}
|
|
373
373
|
te(() => t.searchKeyword, () => {
|
|
374
374
|
m.value = 1;
|
|
@@ -379,14 +379,14 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
|
|
|
379
379
|
m.value = l, n("page-change", l);
|
|
380
380
|
}
|
|
381
381
|
function Se(l) {
|
|
382
|
-
|
|
382
|
+
p.value = l, m.value = 1, n("page-size-change", l);
|
|
383
383
|
}
|
|
384
384
|
te(() => t.currentPage, (l) => {
|
|
385
385
|
const c = typeof l == "number" && l > 0 ? l : 1;
|
|
386
386
|
m.value !== c && (m.value = c);
|
|
387
387
|
}), te(() => t.pageSize, (l) => {
|
|
388
388
|
const c = typeof l == "number" && l > 0 ? l : 10;
|
|
389
|
-
|
|
389
|
+
p.value !== c && (p.value = c);
|
|
390
390
|
});
|
|
391
391
|
function pe() {
|
|
392
392
|
T.value && oe(() => {
|
|
@@ -477,7 +477,7 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
|
|
|
477
477
|
oe(() => {
|
|
478
478
|
pe(), Ie(), s(), I.value.clear();
|
|
479
479
|
});
|
|
480
|
-
}, { deep: !0 }), te([m,
|
|
480
|
+
}, { deep: !0 }), te([m, p], () => {
|
|
481
481
|
oe(() => {
|
|
482
482
|
pe(), Ie(), s();
|
|
483
483
|
});
|
|
@@ -493,7 +493,7 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
|
|
|
493
493
|
}), P.value = c, x.value = l, oe(() => {
|
|
494
494
|
Ve(), Ie(), s();
|
|
495
495
|
});
|
|
496
|
-
}, { deep: !0 }), te(() =>
|
|
496
|
+
}, { deep: !0 }), te(() => y.value, () => {
|
|
497
497
|
oe(() => {
|
|
498
498
|
pe(), s();
|
|
499
499
|
});
|
|
@@ -538,11 +538,11 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
|
|
|
538
538
|
}, [
|
|
539
539
|
ie($e, { name: "bulk-slide" }, {
|
|
540
540
|
default: ue(() => [
|
|
541
|
-
|
|
542
|
-
o("div", kt, "已选择 " + ee(
|
|
541
|
+
y.value.length && e.showBulkActions ? (i(), u("div", bt, [
|
|
542
|
+
o("div", kt, "已选择 " + ee(y.value.length) + " 项", 1),
|
|
543
543
|
o("div", xt, [
|
|
544
544
|
se(l.$slots, "bulk-actions", {
|
|
545
|
-
selectedItems:
|
|
545
|
+
selectedItems: y.value,
|
|
546
546
|
clearSelection: R
|
|
547
547
|
}, () => [
|
|
548
548
|
ie(_, {
|
|
@@ -635,7 +635,7 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
|
|
|
635
635
|
onClick: (O) => a(d(S, H))
|
|
636
636
|
}, [
|
|
637
637
|
o("span", {
|
|
638
|
-
class: E(["expand-icon", { "is-open":
|
|
638
|
+
class: E(["expand-icon", { "is-open": h(d(S, H)) }])
|
|
639
639
|
}, null, 2)
|
|
640
640
|
], 8, Kt)
|
|
641
641
|
])) : W("", !0),
|
|
@@ -643,7 +643,7 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
|
|
|
643
643
|
o("input", {
|
|
644
644
|
type: "checkbox",
|
|
645
645
|
value: d(S, H),
|
|
646
|
-
checked:
|
|
646
|
+
checked: y.value.includes(d(S, H)),
|
|
647
647
|
onChange: (O) => j(d(S, H))
|
|
648
648
|
}, null, 40, Wt)
|
|
649
649
|
])) : W("", !0),
|
|
@@ -661,7 +661,7 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
|
|
|
661
661
|
], !0)
|
|
662
662
|
], 6))), 128))
|
|
663
663
|
]),
|
|
664
|
-
t.expandable &&
|
|
664
|
+
t.expandable && h(d(S, H)) ? (i(), u("tr", {
|
|
665
665
|
key: `${d(S, H)}-expand`,
|
|
666
666
|
class: "expand-row"
|
|
667
667
|
}, [
|
|
@@ -684,8 +684,8 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
|
|
|
684
684
|
class: "align-right",
|
|
685
685
|
"current-page": m.value,
|
|
686
686
|
"onUpdate:currentPage": c[0] || (c[0] = (S) => m.value = S),
|
|
687
|
-
"page-size":
|
|
688
|
-
"onUpdate:pageSize": c[1] || (c[1] = (S) =>
|
|
687
|
+
"page-size": p.value,
|
|
688
|
+
"onUpdate:pageSize": c[1] || (c[1] = (S) => p.value = S),
|
|
689
689
|
loading: t.loading,
|
|
690
690
|
"page-size-options": e.pageSizeOptions,
|
|
691
691
|
onPageChange: G,
|
|
@@ -714,7 +714,7 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
|
|
|
714
714
|
},
|
|
715
715
|
emits: ["update:modelValue", "change", "focus", "blur", "clear"],
|
|
716
716
|
setup(e, { emit: $ }) {
|
|
717
|
-
const t = e, n = $, m = K(!1),
|
|
717
|
+
const t = e, n = $, m = K(!1), p = K(-1), y = K(), I = K(), C = K(), T = K(), k = K(!1), w = K(), g = K(""), x = Y(() => t.options.find((a) => z(a) === t.modelValue) || null), P = Y(() => x.value ? B(x.value) : ""), J = Y(() => {
|
|
718
718
|
if (!t.filterable) return t.options;
|
|
719
719
|
const a = g.value.trim().toLowerCase();
|
|
720
720
|
return a ? t.options.filter((r) => {
|
|
@@ -760,7 +760,7 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
|
|
|
760
760
|
}));
|
|
761
761
|
}
|
|
762
762
|
function ce() {
|
|
763
|
-
m.value = !1,
|
|
763
|
+
m.value = !1, p.value = -1, k.value = !1, t.filterable && (g.value = "");
|
|
764
764
|
}
|
|
765
765
|
function ne(a, r) {
|
|
766
766
|
if (q(a)) return;
|
|
@@ -774,30 +774,30 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
|
|
|
774
774
|
}
|
|
775
775
|
function ge(a) {
|
|
776
776
|
if (!J.value || J.value.length === 0) {
|
|
777
|
-
|
|
777
|
+
p.value = -1;
|
|
778
778
|
return;
|
|
779
779
|
}
|
|
780
|
-
let r =
|
|
780
|
+
let r = p.value;
|
|
781
781
|
const f = J.value.length;
|
|
782
782
|
r === -1 ? r = a > 0 ? 0 : f - 1 : r = (r + a + f) % f;
|
|
783
783
|
let b = 0;
|
|
784
784
|
for (; b < f && q(J.value[r]); )
|
|
785
785
|
r = (r + a + f) % f, b++;
|
|
786
|
-
|
|
786
|
+
p.value = b >= f ? -1 : r, Z();
|
|
787
787
|
}
|
|
788
788
|
function me() {
|
|
789
|
-
if (
|
|
790
|
-
const a = J.value[
|
|
791
|
-
!a || q(a) || ne(a,
|
|
789
|
+
if (p.value < 0) return;
|
|
790
|
+
const a = J.value[p.value];
|
|
791
|
+
!a || q(a) || ne(a, p.value);
|
|
792
792
|
}
|
|
793
793
|
function V() {
|
|
794
|
-
if (!
|
|
795
|
-
const a =
|
|
794
|
+
if (!y.value) return;
|
|
795
|
+
const a = y.value.querySelector(".yselect__option--selected");
|
|
796
796
|
a && a.scrollIntoView({ block: "nearest" });
|
|
797
797
|
}
|
|
798
798
|
function Z() {
|
|
799
|
-
if (!
|
|
800
|
-
const r =
|
|
799
|
+
if (!y.value || p.value < 0) return;
|
|
800
|
+
const r = y.value.querySelectorAll(".yselect__option")[p.value];
|
|
801
801
|
r && r.scrollIntoView({ block: "nearest" });
|
|
802
802
|
}
|
|
803
803
|
function d(a) {
|
|
@@ -805,15 +805,15 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
|
|
|
805
805
|
(!C.value || !C.value.contains(r)) && ce();
|
|
806
806
|
}
|
|
807
807
|
te(() => t.modelValue, () => {
|
|
808
|
-
|
|
808
|
+
p.value = -1;
|
|
809
809
|
});
|
|
810
|
-
function
|
|
810
|
+
function h() {
|
|
811
811
|
m.value && D();
|
|
812
812
|
}
|
|
813
813
|
return De(() => {
|
|
814
|
-
document.addEventListener("click", d), window.addEventListener("resize",
|
|
814
|
+
document.addEventListener("click", d), window.addEventListener("resize", h), window.addEventListener("scroll", h, !0);
|
|
815
815
|
}), Ee(() => {
|
|
816
|
-
document.removeEventListener("click", d), window.removeEventListener("resize",
|
|
816
|
+
document.removeEventListener("click", d), window.removeEventListener("resize", h), window.removeEventListener("scroll", h, !0);
|
|
817
817
|
}), (a, r) => (i(), u("div", {
|
|
818
818
|
class: E(["yselect", { "yselect--disabled": e.disabled, [`yselect--${e.size}`]: !0 }]),
|
|
819
819
|
style: ve({ width: e.width }),
|
|
@@ -940,18 +940,18 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
|
|
|
940
940
|
o("div", {
|
|
941
941
|
class: "yselect__options",
|
|
942
942
|
ref_key: "optionsContainer",
|
|
943
|
-
ref:
|
|
943
|
+
ref: y
|
|
944
944
|
}, [
|
|
945
945
|
(i(!0), u(ae, null, de(J.value, (f, b) => (i(), u("div", {
|
|
946
946
|
key: F(f, b),
|
|
947
947
|
class: E(["yselect__option", {
|
|
948
948
|
"yselect__option--selected": N(f),
|
|
949
949
|
"yselect__option--disabled": q(f),
|
|
950
|
-
"yselect__option--hover":
|
|
950
|
+
"yselect__option--hover": p.value === b
|
|
951
951
|
}]),
|
|
952
952
|
onClick: (L) => ne(f),
|
|
953
|
-
onMouseenter: (L) =>
|
|
954
|
-
onMouseleave: r[5] || (r[5] = (L) =>
|
|
953
|
+
onMouseenter: (L) => p.value = b,
|
|
954
|
+
onMouseleave: r[5] || (r[5] = (L) => p.value = -1)
|
|
955
955
|
}, [
|
|
956
956
|
se(a.$slots, "option", {
|
|
957
957
|
option: f,
|
|
@@ -990,20 +990,20 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
|
|
|
990
990
|
},
|
|
991
991
|
emits: ["update:currentPage", "update:pageSize", "page-change", "page-size-change"],
|
|
992
992
|
setup(e, { emit: $ }) {
|
|
993
|
-
const t = e, n = $, m = K(t.pageSize),
|
|
993
|
+
const t = e, n = $, m = K(t.pageSize), p = Y(() => t.pageSizeOptions), y = Y({
|
|
994
994
|
get: () => t.currentPage,
|
|
995
995
|
set: (k) => {
|
|
996
996
|
n("update:currentPage", k), n("page-change", k);
|
|
997
997
|
}
|
|
998
998
|
});
|
|
999
999
|
function I(k) {
|
|
1000
|
-
t.loading || k >= 1 && k !== t.currentPage && (
|
|
1000
|
+
t.loading || k >= 1 && k !== t.currentPage && (y.value = k);
|
|
1001
1001
|
}
|
|
1002
1002
|
function C(k) {
|
|
1003
|
-
t.loading || (m.value = k, n("update:pageSize", k), n("page-size-change", k),
|
|
1003
|
+
t.loading || (m.value = k, n("update:pageSize", k), n("page-size-change", k), y.value = 1);
|
|
1004
1004
|
}
|
|
1005
1005
|
function T(k) {
|
|
1006
|
-
t.loading || (k === "prev" ? I(
|
|
1006
|
+
t.loading || (k === "prev" ? I(y.value - 1) : k === "next" && I(y.value + 1));
|
|
1007
1007
|
}
|
|
1008
1008
|
return m.value = t.pageSize, te(
|
|
1009
1009
|
() => t.pageSize,
|
|
@@ -1017,7 +1017,7 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
|
|
|
1017
1017
|
ie(g, {
|
|
1018
1018
|
size: "small",
|
|
1019
1019
|
variant: "secondary",
|
|
1020
|
-
disabled:
|
|
1020
|
+
disabled: y.value === 1 || e.loading,
|
|
1021
1021
|
onClick: w[0] || (w[0] = (P) => I(1))
|
|
1022
1022
|
}, {
|
|
1023
1023
|
default: ue(() => [...w[2] || (w[2] = [
|
|
@@ -1030,7 +1030,7 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
|
|
|
1030
1030
|
variant: "secondary",
|
|
1031
1031
|
size: "small",
|
|
1032
1032
|
groupItems: [
|
|
1033
|
-
{ label: "上一页", value: "prev", disabled:
|
|
1033
|
+
{ label: "上一页", value: "prev", disabled: y.value === 1 || e.loading, icon: "chevron-left", onlyIcon: !0, ariaLabel: "上一页" },
|
|
1034
1034
|
{ label: "下一页", value: "next", disabled: e.loading, icon: "chevron-right", onlyIcon: !0, ariaLabel: "下一页" }
|
|
1035
1035
|
],
|
|
1036
1036
|
onGroupClick: T
|
|
@@ -1039,7 +1039,7 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
|
|
|
1039
1039
|
ie(x, {
|
|
1040
1040
|
modelValue: m.value,
|
|
1041
1041
|
"onUpdate:modelValue": w[1] || (w[1] = (P) => m.value = P),
|
|
1042
|
-
options:
|
|
1042
|
+
options: p.value,
|
|
1043
1043
|
size: "small",
|
|
1044
1044
|
width: "105px",
|
|
1045
1045
|
clearable: !1,
|
|
@@ -1107,16 +1107,16 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
|
|
|
1107
1107
|
},
|
|
1108
1108
|
setup(e) {
|
|
1109
1109
|
const $ = e, t = Y(() => $.tone || "default"), n = Y(() => {
|
|
1110
|
-
const m = ($.label || "").trim(),
|
|
1111
|
-
if (
|
|
1110
|
+
const m = ($.label || "").trim(), p = $.tone, y = $.progress;
|
|
1111
|
+
if (y) {
|
|
1112
1112
|
const I = {
|
|
1113
1113
|
incomplete: "未完成",
|
|
1114
1114
|
partiallyComplete: "部分完成",
|
|
1115
1115
|
complete: "已完成"
|
|
1116
1116
|
};
|
|
1117
|
-
return m ? `${m},进度:${I[
|
|
1117
|
+
return m ? `${m},进度:${I[y] || y}` : `进度:${I[y] || y}`;
|
|
1118
1118
|
}
|
|
1119
|
-
if (
|
|
1119
|
+
if (p && p !== "default") {
|
|
1120
1120
|
const I = {
|
|
1121
1121
|
informational: "信息",
|
|
1122
1122
|
success: "成功",
|
|
@@ -1125,11 +1125,11 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
|
|
|
1125
1125
|
critical: "严重",
|
|
1126
1126
|
default: "默认"
|
|
1127
1127
|
};
|
|
1128
|
-
return m ? `${m},语气:${I[
|
|
1128
|
+
return m ? `${m},语气:${I[p] || p}` : `语气:${I[p] || p}`;
|
|
1129
1129
|
}
|
|
1130
1130
|
return m || "标记";
|
|
1131
1131
|
});
|
|
1132
|
-
return (m,
|
|
1132
|
+
return (m, p) => (i(), u("span", {
|
|
1133
1133
|
class: E(["y-badge", [
|
|
1134
1134
|
`y-badge--${t.value}`,
|
|
1135
1135
|
`y-badge--${e.size}`,
|
|
@@ -1141,13 +1141,13 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
|
|
|
1141
1141
|
}, [
|
|
1142
1142
|
o("span", Gt, [
|
|
1143
1143
|
e.progress ? (i(), u("span", en, [
|
|
1144
|
-
e.progress === "incomplete" ? (i(), u("svg", tn, [...
|
|
1144
|
+
e.progress === "incomplete" ? (i(), u("svg", tn, [...p[0] || (p[0] = [
|
|
1145
1145
|
o("circle", {
|
|
1146
1146
|
cx: "10",
|
|
1147
1147
|
cy: "10",
|
|
1148
1148
|
r: "5"
|
|
1149
1149
|
}, null, -1)
|
|
1150
|
-
])])) : e.progress === "partiallyComplete" ? (i(), u("svg", nn, [...
|
|
1150
|
+
])])) : e.progress === "partiallyComplete" ? (i(), u("svg", nn, [...p[1] || (p[1] = [
|
|
1151
1151
|
o("path", { d: "M10 5a5 5 0 100 10V5z" }, null, -1),
|
|
1152
1152
|
o("circle", {
|
|
1153
1153
|
cx: "10",
|
|
@@ -1157,7 +1157,7 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
|
|
|
1157
1157
|
stroke: "currentColor",
|
|
1158
1158
|
"stroke-width": "2"
|
|
1159
1159
|
}, null, -1)
|
|
1160
|
-
])])) : e.progress === "complete" ? (i(), u("svg", ln, [...
|
|
1160
|
+
])])) : e.progress === "complete" ? (i(), u("svg", ln, [...p[2] || (p[2] = [
|
|
1161
1161
|
o("path", {
|
|
1162
1162
|
"fill-rule": "evenodd",
|
|
1163
1163
|
d: "M16.707 5.293a1 1 0 010 1.414l-7.25 7.25a1 1 0 01-1.414 0l-4-4a1 1 0 111.414-1.414L8.75 11.086l6.543-6.543a1 1 0 011.414 0z",
|
|
@@ -1165,25 +1165,25 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
|
|
|
1165
1165
|
}, null, -1)
|
|
1166
1166
|
])])) : W("", !0)
|
|
1167
1167
|
])) : e.icon ? (i(), u("span", on, [
|
|
1168
|
-
e.icon === "dot" ? (i(), u("svg", an, [...
|
|
1168
|
+
e.icon === "dot" ? (i(), u("svg", an, [...p[3] || (p[3] = [
|
|
1169
1169
|
o("circle", {
|
|
1170
1170
|
cx: "10",
|
|
1171
1171
|
cy: "10",
|
|
1172
1172
|
r: "4"
|
|
1173
1173
|
}, null, -1)
|
|
1174
|
-
])])) : e.icon === "check" ? (i(), u("svg", sn, [...
|
|
1174
|
+
])])) : e.icon === "check" ? (i(), u("svg", sn, [...p[4] || (p[4] = [
|
|
1175
1175
|
o("path", {
|
|
1176
1176
|
"fill-rule": "evenodd",
|
|
1177
1177
|
d: "M16.707 5.293a1 1 0 010 1.414l-7.25 7.25a1 1 0 01-1.414 0l-4-4a1 1 0 111.414-1.414L8.75 11.086l6.543-6.543a1 1 0 011.414 0z",
|
|
1178
1178
|
"clip-rule": "evenodd"
|
|
1179
1179
|
}, null, -1)
|
|
1180
|
-
])])) : e.icon === "alert" ? (i(), u("svg", rn, [...
|
|
1180
|
+
])])) : e.icon === "alert" ? (i(), u("svg", rn, [...p[5] || (p[5] = [
|
|
1181
1181
|
o("path", {
|
|
1182
1182
|
"fill-rule": "evenodd",
|
|
1183
1183
|
d: "M8.257 3.099c.765-1.36 2.721-1.36 3.486 0l6.518 11.59c.75 1.334-.214 3.011-1.743 3.011H3.482c-1.53 0-2.493-1.677-1.743-3.01L8.257 3.1zM11 14a1 1 0 10-2 0 1 1 0 002 0zm-1-2a1 1 0 01-1-1V8a1 1 0 112 0v3a1 1 0 01-1 1z",
|
|
1184
1184
|
"clip-rule": "evenodd"
|
|
1185
1185
|
}, null, -1)
|
|
1186
|
-
])])) : (i(), u("svg", un, [...
|
|
1186
|
+
])])) : (i(), u("svg", un, [...p[6] || (p[6] = [
|
|
1187
1187
|
o("circle", {
|
|
1188
1188
|
cx: "10",
|
|
1189
1189
|
cy: "10",
|
|
@@ -1223,7 +1223,7 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
|
|
|
1223
1223
|
const t = e, n = $, m = Y({
|
|
1224
1224
|
get: () => t.modelValue,
|
|
1225
1225
|
set: (w) => n("update:modelValue", w)
|
|
1226
|
-
}),
|
|
1226
|
+
}), p = K(null), y = Y(() => {
|
|
1227
1227
|
const w = {};
|
|
1228
1228
|
return w.width = typeof t.width == "number" ? `${t.width}px` : String(t.width), w.margin = "0 auto", w.top = t.top, w;
|
|
1229
1229
|
});
|
|
@@ -1242,7 +1242,7 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
|
|
|
1242
1242
|
return te(() => t.modelValue, (w) => {
|
|
1243
1243
|
w ? (n("open"), requestAnimationFrame(() => {
|
|
1244
1244
|
var g;
|
|
1245
|
-
return (g =
|
|
1245
|
+
return (g = p.value) == null ? void 0 : g.focus();
|
|
1246
1246
|
}), document.addEventListener("keydown", k), document.body.style.overflow = "hidden") : (document.removeEventListener("keydown", k), document.body.style.overflow = "");
|
|
1247
1247
|
}), De(() => {
|
|
1248
1248
|
t.modelValue && (document.addEventListener("keydown", k), document.body.style.overflow = "hidden");
|
|
@@ -1264,9 +1264,9 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
|
|
|
1264
1264
|
default: ue(() => [
|
|
1265
1265
|
Be(o("div", {
|
|
1266
1266
|
ref_key: "panelRef",
|
|
1267
|
-
ref:
|
|
1267
|
+
ref: p,
|
|
1268
1268
|
class: E(["y-dialog-panel", [e.center ? "is-center" : ""]]),
|
|
1269
|
-
style: ve(
|
|
1269
|
+
style: ve(y.value),
|
|
1270
1270
|
onKeydown: ke(Q(T, ["prevent", "stop"]), ["esc"]),
|
|
1271
1271
|
tabindex: "-1"
|
|
1272
1272
|
}, [
|
|
@@ -1319,7 +1319,7 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
|
|
|
1319
1319
|
},
|
|
1320
1320
|
emits: ["update:modelValue", "show", "hide", "before-show", "before-hide"],
|
|
1321
1321
|
setup(e, { expose: $, emit: t }) {
|
|
1322
|
-
const n = e, m = t,
|
|
1322
|
+
const n = e, m = t, p = K(), y = K(), I = K(), C = K(!1), T = K(), k = K(), w = K({});
|
|
1323
1323
|
let g = null, x = null;
|
|
1324
1324
|
const P = Y(() => {
|
|
1325
1325
|
if (!C.value || !T.value) return {};
|
|
@@ -1337,44 +1337,44 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
|
|
|
1337
1337
|
function A() {
|
|
1338
1338
|
var X, R;
|
|
1339
1339
|
if (!T.value) return { top: 0, left: 0 };
|
|
1340
|
-
const { width: V, height: Z, top: d, left:
|
|
1340
|
+
const { width: V, height: Z, top: d, left: h } = T.value, a = ((X = I.value) == null ? void 0 : X.offsetWidth) || 200, r = ((R = I.value) == null ? void 0 : R.offsetHeight) || 100;
|
|
1341
1341
|
let f = 0, b = 0;
|
|
1342
1342
|
switch (n.placement) {
|
|
1343
1343
|
case "top":
|
|
1344
|
-
f = d - r - n.offset, b =
|
|
1344
|
+
f = d - r - n.offset, b = h + (V - a) / 2;
|
|
1345
1345
|
break;
|
|
1346
1346
|
case "top-start":
|
|
1347
|
-
f = d - r - n.offset, b =
|
|
1347
|
+
f = d - r - n.offset, b = h;
|
|
1348
1348
|
break;
|
|
1349
1349
|
case "top-end":
|
|
1350
|
-
f = d - r - n.offset, b =
|
|
1350
|
+
f = d - r - n.offset, b = h + V - a;
|
|
1351
1351
|
break;
|
|
1352
1352
|
case "bottom":
|
|
1353
|
-
f = d + Z + n.offset, b =
|
|
1353
|
+
f = d + Z + n.offset, b = h + (V - a) / 2;
|
|
1354
1354
|
break;
|
|
1355
1355
|
case "bottom-start":
|
|
1356
|
-
f = d + Z + n.offset, b =
|
|
1356
|
+
f = d + Z + n.offset, b = h;
|
|
1357
1357
|
break;
|
|
1358
1358
|
case "bottom-end":
|
|
1359
|
-
f = d + Z + n.offset, b =
|
|
1359
|
+
f = d + Z + n.offset, b = h + V - a;
|
|
1360
1360
|
break;
|
|
1361
1361
|
case "left":
|
|
1362
|
-
f = d + (Z - r) / 2, b =
|
|
1362
|
+
f = d + (Z - r) / 2, b = h - a - n.offset;
|
|
1363
1363
|
break;
|
|
1364
1364
|
case "left-start":
|
|
1365
|
-
f = d, b =
|
|
1365
|
+
f = d, b = h - a - n.offset;
|
|
1366
1366
|
break;
|
|
1367
1367
|
case "left-end":
|
|
1368
|
-
f = d + Z - r, b =
|
|
1368
|
+
f = d + Z - r, b = h - a - n.offset;
|
|
1369
1369
|
break;
|
|
1370
1370
|
case "right":
|
|
1371
|
-
f = d + (Z - r) / 2, b =
|
|
1371
|
+
f = d + (Z - r) / 2, b = h + V + n.offset;
|
|
1372
1372
|
break;
|
|
1373
1373
|
case "right-start":
|
|
1374
|
-
f = d, b =
|
|
1374
|
+
f = d, b = h + V + n.offset;
|
|
1375
1375
|
break;
|
|
1376
1376
|
case "right-end":
|
|
1377
|
-
f = d + Z - r, b =
|
|
1377
|
+
f = d + Z - r, b = h + V + n.offset;
|
|
1378
1378
|
break;
|
|
1379
1379
|
}
|
|
1380
1380
|
const L = window.innerWidth, j = window.innerHeight;
|
|
@@ -1410,32 +1410,32 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
|
|
|
1410
1410
|
}
|
|
1411
1411
|
const V = T.value, Z = I.value.getBoundingClientRect();
|
|
1412
1412
|
if (Z.width === 0 || Z.height === 0) {
|
|
1413
|
-
const
|
|
1414
|
-
n.placement.startsWith("top") || n.placement.startsWith("bottom") ?
|
|
1413
|
+
const h = {};
|
|
1414
|
+
n.placement.startsWith("top") || n.placement.startsWith("bottom") ? h.left = "50%" : h.top = "50%", w.value = h;
|
|
1415
1415
|
return;
|
|
1416
1416
|
}
|
|
1417
1417
|
const d = {};
|
|
1418
1418
|
if (n.placement.startsWith("top")) {
|
|
1419
1419
|
d.bottom = "-6px";
|
|
1420
|
-
const
|
|
1420
|
+
const h = V.left + V.width / 2, a = Z.left, r = h - a;
|
|
1421
1421
|
d.left = `${Math.max(12, Math.min(r, Z.width - 12))}px`;
|
|
1422
1422
|
} else if (n.placement.startsWith("bottom")) {
|
|
1423
1423
|
d.top = "-6px";
|
|
1424
|
-
const
|
|
1424
|
+
const h = V.left + V.width / 2, a = Z.left, r = h - a;
|
|
1425
1425
|
d.left = `${Math.max(12, Math.min(r, Z.width - 12))}px`;
|
|
1426
1426
|
} else if (n.placement.startsWith("left")) {
|
|
1427
1427
|
d.right = "-6px";
|
|
1428
|
-
const
|
|
1428
|
+
const h = V.top + V.height / 2, a = Z.top, r = h - a;
|
|
1429
1429
|
d.top = `${Math.max(12, Math.min(r, Z.height - 12))}px`;
|
|
1430
1430
|
} else if (n.placement.startsWith("right")) {
|
|
1431
1431
|
d.left = "-6px";
|
|
1432
|
-
const
|
|
1432
|
+
const h = V.top + V.height / 2, a = Z.top, r = h - a;
|
|
1433
1433
|
d.top = `${Math.max(12, Math.min(r, Z.height - 12))}px`;
|
|
1434
1434
|
}
|
|
1435
1435
|
w.value = d;
|
|
1436
1436
|
}
|
|
1437
1437
|
function U() {
|
|
1438
|
-
|
|
1438
|
+
y.value && (T.value = y.value.getBoundingClientRect(), I.value && (k.value = I.value.getBoundingClientRect(), q(), C.value && requestAnimationFrame(() => {
|
|
1439
1439
|
I.value && (k.value = I.value.getBoundingClientRect(), q());
|
|
1440
1440
|
})));
|
|
1441
1441
|
}
|
|
@@ -1457,7 +1457,7 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
|
|
|
1457
1457
|
function me(V) {
|
|
1458
1458
|
if (!n.closeOnClickOutside || !C.value) return;
|
|
1459
1459
|
const Z = V.target;
|
|
1460
|
-
|
|
1460
|
+
p.value && !p.value.contains(Z) && I.value && !I.value.contains(Z) && B();
|
|
1461
1461
|
}
|
|
1462
1462
|
return te(() => n.modelValue, (V) => {
|
|
1463
1463
|
V !== C.value && (V ? D() : B());
|
|
@@ -1480,11 +1480,11 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
|
|
|
1480
1480
|
}), (V, Z) => (i(), u("div", {
|
|
1481
1481
|
class: "ypopover",
|
|
1482
1482
|
ref_key: "popoverRef",
|
|
1483
|
-
ref:
|
|
1483
|
+
ref: p
|
|
1484
1484
|
}, [
|
|
1485
1485
|
o("div", {
|
|
1486
1486
|
ref_key: "triggerRef",
|
|
1487
|
-
ref:
|
|
1487
|
+
ref: y,
|
|
1488
1488
|
onClick: re,
|
|
1489
1489
|
onMouseenter: ce,
|
|
1490
1490
|
onMouseleave: ne
|
|
@@ -1586,7 +1586,7 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
|
|
|
1586
1586
|
},
|
|
1587
1587
|
emits: ["update:modelValue", "change"],
|
|
1588
1588
|
setup(e, { emit: $ }) {
|
|
1589
|
-
const t = e, n = $, m = K(!1),
|
|
1589
|
+
const t = e, n = $, m = K(!1), p = K(-1), y = K(-1), I = K(null), C = K(), T = K(), k = K({
|
|
1590
1590
|
top: !0,
|
|
1591
1591
|
left: !0
|
|
1592
1592
|
}), w = K({
|
|
@@ -1720,7 +1720,7 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
|
|
|
1720
1720
|
}, V = () => {
|
|
1721
1721
|
if (m.value = !m.value, m.value) {
|
|
1722
1722
|
const s = N(t.modelValue);
|
|
1723
|
-
if (A.value = (s == null ? void 0 : s.startDate) || null, D.value = (s == null ? void 0 : s.endDate) || null,
|
|
1723
|
+
if (A.value = (s == null ? void 0 : s.startDate) || null, D.value = (s == null ? void 0 : s.endDate) || null, y.value = ne(t.modelValue), p.value = -1, s != null && s.startDate && (w.value.year = s.startDate.getFullYear(), w.value.month = s.startDate.getMonth()), s != null && s.endDate)
|
|
1724
1724
|
g.value.year = s.endDate.getFullYear(), g.value.month = s.endDate.getMonth();
|
|
1725
1725
|
else {
|
|
1726
1726
|
const v = new Date(w.value.year, w.value.month + 1);
|
|
@@ -1732,22 +1732,22 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
|
|
|
1732
1732
|
}
|
|
1733
1733
|
}, Z = (s) => {
|
|
1734
1734
|
const v = s.target, l = C.value, c = T.value;
|
|
1735
|
-
l && c && !l.contains(v) && !c.contains(v) && (m.value = !1,
|
|
1735
|
+
l && c && !l.contains(v) && !c.contains(v) && (m.value = !1, p.value = -1);
|
|
1736
1736
|
}, d = (s) => {
|
|
1737
1737
|
s.key === "Enter" || s.key === " " ? (s.preventDefault(), V()) : s.key === "ArrowDown" && (s.preventDefault(), m.value = !0, oe(() => {
|
|
1738
1738
|
me(), b();
|
|
1739
1739
|
}));
|
|
1740
|
-
},
|
|
1740
|
+
}, h = (s) => {
|
|
1741
1741
|
var v;
|
|
1742
|
-
s.key === "Escape" && (m.value = !1,
|
|
1742
|
+
s.key === "Escape" && (m.value = !1, p.value = -1, (v = C.value) == null || v.focus());
|
|
1743
1743
|
}, a = (s, v) => {
|
|
1744
|
-
s.key === "ArrowDown" ? (s.preventDefault(),
|
|
1744
|
+
s.key === "ArrowDown" ? (s.preventDefault(), p.value = Math.min(v + 1, t.shortcuts.length - 1), L(p.value)) : s.key === "ArrowUp" ? (s.preventDefault(), p.value = Math.max(v - 1, 0), L(p.value)) : (s.key === "Enter" || s.key === " ") && (s.preventDefault(), j(t.shortcuts[v]));
|
|
1745
1745
|
}, r = (s) => {
|
|
1746
|
-
|
|
1746
|
+
p.value = s;
|
|
1747
1747
|
}, f = () => {
|
|
1748
|
-
|
|
1748
|
+
p.value = -1;
|
|
1749
1749
|
}, b = () => {
|
|
1750
|
-
|
|
1750
|
+
p.value = 0, L(0);
|
|
1751
1751
|
}, L = (s) => {
|
|
1752
1752
|
if (T.value) {
|
|
1753
1753
|
const l = T.value.querySelectorAll(".nh-time-shortcut")[s];
|
|
@@ -1755,7 +1755,7 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
|
|
|
1755
1755
|
}
|
|
1756
1756
|
}, j = (s) => {
|
|
1757
1757
|
const v = s.getValue();
|
|
1758
|
-
t.includeTime && v.startDate && v.endDate && (v.startDate.setHours(0, 0, 0, 0), v.endDate.setHours(23, 59, 59, 999)), ge(v),
|
|
1758
|
+
t.includeTime && v.startDate && v.endDate && (v.startDate.setHours(0, 0, 0, 0), v.endDate.setHours(23, 59, 59, 999)), ge(v), y.value = t.shortcuts.findIndex((l) => l.label === s.label), p.value = -1, m.value = !1;
|
|
1759
1759
|
}, X = (s, v) => {
|
|
1760
1760
|
if (!s || s.isDisabled) return;
|
|
1761
1761
|
let l;
|
|
@@ -1770,7 +1770,7 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
|
|
|
1770
1770
|
}
|
|
1771
1771
|
else
|
|
1772
1772
|
A.value = l, D.value = null;
|
|
1773
|
-
if (
|
|
1773
|
+
if (y.value = -1, A.value && D.value) {
|
|
1774
1774
|
const c = new Date(D.value);
|
|
1775
1775
|
t.includeTime && c.setHours(23, 59, 59, 999), I.value = {
|
|
1776
1776
|
startDate: A.value,
|
|
@@ -1783,9 +1783,9 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
|
|
|
1783
1783
|
const l = ["nh-date-table-td"];
|
|
1784
1784
|
return s.isCurrentMonth || l.push("is-prev-month"), s.isToday && l.push("is-today"), s.isDisabled && l.push("is-disabled"), A.value && re(s.date, A.value) && l.push("is-selected", "is-start"), D.value && re(s.date, D.value) && l.push("is-selected", "is-end"), A.value && D.value && ce(s.date, A.value, D.value) && l.push("is-in-range"), l;
|
|
1785
1785
|
}, G = () => {
|
|
1786
|
-
I.value && (t.includeTime && I.value.endDate && I.value.endDate.setHours(23, 59, 59, 999), ge(I.value),
|
|
1786
|
+
I.value && (t.includeTime && I.value.endDate && I.value.endDate.setHours(23, 59, 59, 999), ge(I.value), y.value = ne(I.value), m.value = !1);
|
|
1787
1787
|
}, Se = () => {
|
|
1788
|
-
ge({ startDate: null, endDate: null }), Ve(),
|
|
1788
|
+
ge({ startDate: null, endDate: null }), Ve(), p.value = -1, m.value = !1;
|
|
1789
1789
|
}, pe = () => {
|
|
1790
1790
|
m.value && oe(() => {
|
|
1791
1791
|
me();
|
|
@@ -1809,7 +1809,7 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
|
|
|
1809
1809
|
const s = N(t.modelValue);
|
|
1810
1810
|
return !!(s != null && s.startDate && (s != null && s.endDate));
|
|
1811
1811
|
}), Ye = Y(() => !!(A.value && D.value)), Ve = () => {
|
|
1812
|
-
A.value = null, D.value = null, I.value = null,
|
|
1812
|
+
A.value = null, D.value = null, I.value = null, y.value = -1;
|
|
1813
1813
|
};
|
|
1814
1814
|
te(() => t.modelValue, (s) => {
|
|
1815
1815
|
const v = N(s);
|
|
@@ -1824,7 +1824,7 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
|
|
|
1824
1824
|
const l = new Date(w.value.year, w.value.month + 1);
|
|
1825
1825
|
g.value.year = l.getFullYear(), g.value.month = l.getMonth();
|
|
1826
1826
|
}
|
|
1827
|
-
(v != null && v.startDate || v != null && v.endDate) && x(), m.value || (
|
|
1827
|
+
(v != null && v.startDate || v != null && v.endDate) && x(), m.value || (y.value = ne(s));
|
|
1828
1828
|
}, { immediate: !0, deep: !0 }), te([w, g], () => {
|
|
1829
1829
|
const s = new Date(w.value.year, w.value.month).getTime(), v = new Date(g.value.year, g.value.month).getTime();
|
|
1830
1830
|
if (s === v) {
|
|
@@ -1832,7 +1832,7 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
|
|
|
1832
1832
|
g.value.year = l.getFullYear(), g.value.month = l.getMonth();
|
|
1833
1833
|
}
|
|
1834
1834
|
}, { deep: !0 }), De(() => {
|
|
1835
|
-
document.addEventListener("click", Z), window.addEventListener("resize", pe), window.addEventListener("scroll", pe),
|
|
1835
|
+
document.addEventListener("click", Z), window.addEventListener("resize", pe), window.addEventListener("scroll", pe), y.value = ne(t.modelValue);
|
|
1836
1836
|
const s = N(t.modelValue);
|
|
1837
1837
|
if (s != null && s.startDate && (w.value.year = s.startDate.getFullYear(), w.value.month = s.startDate.getMonth()), s != null && s.endDate)
|
|
1838
1838
|
g.value.year = s.endDate.getFullYear(), g.value.month = s.endDate.getMonth();
|
|
@@ -1845,7 +1845,7 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
|
|
|
1845
1845
|
document.removeEventListener("click", Z), window.removeEventListener("resize", pe), window.removeEventListener("scroll", pe);
|
|
1846
1846
|
});
|
|
1847
1847
|
const He = () => {
|
|
1848
|
-
t.clearable && (ge({ startDate: null, endDate: null }), Ve(),
|
|
1848
|
+
t.clearable && (ge({ startDate: null, endDate: null }), Ve(), p.value = -1);
|
|
1849
1849
|
}, Te = (s, v) => {
|
|
1850
1850
|
if (s === "start") {
|
|
1851
1851
|
const l = new Date(w.value.year, w.value.month + v, 1);
|
|
@@ -1927,7 +1927,7 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
|
|
|
1927
1927
|
ref_key: "dropdown",
|
|
1928
1928
|
ref: T,
|
|
1929
1929
|
class: E(We.value),
|
|
1930
|
-
onKeydown:
|
|
1930
|
+
onKeydown: h
|
|
1931
1931
|
}, [
|
|
1932
1932
|
o("div", Sn, [
|
|
1933
1933
|
v[7] || (v[7] = o("div", { class: "nh-time-shortcuts-title" }, "快捷选项", -1)),
|
|
@@ -1941,8 +1941,8 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
|
|
|
1941
1941
|
class: E([
|
|
1942
1942
|
"nh-time-shortcut",
|
|
1943
1943
|
{
|
|
1944
|
-
"is-active":
|
|
1945
|
-
"is-selected":
|
|
1944
|
+
"is-active": p.value === _,
|
|
1945
|
+
"is-selected": y.value === _
|
|
1946
1946
|
}
|
|
1947
1947
|
]),
|
|
1948
1948
|
tabindex: "0"
|
|
@@ -2144,13 +2144,13 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
|
|
|
2144
2144
|
},
|
|
2145
2145
|
emits: ["update:modelValue", "change", "focus", "blur"],
|
|
2146
2146
|
setup(e, { emit: $ }) {
|
|
2147
|
-
const t = e, n = $, m = K(),
|
|
2147
|
+
const t = e, n = $, m = K(), p = Y(() => t.modelValue === t.trueValue), y = Y(() => {
|
|
2148
2148
|
const C = {};
|
|
2149
|
-
return C.background =
|
|
2149
|
+
return C.background = p.value ? t.activeColor : t.inactiveColor, C;
|
|
2150
2150
|
});
|
|
2151
2151
|
function I() {
|
|
2152
2152
|
if (t.disabled || t.loading) return;
|
|
2153
|
-
const C =
|
|
2153
|
+
const C = p.value ? t.falseValue : t.trueValue;
|
|
2154
2154
|
n("update:modelValue", C), n("change", C);
|
|
2155
2155
|
}
|
|
2156
2156
|
return De(() => {
|
|
@@ -2161,11 +2161,11 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
|
|
|
2161
2161
|
ref: m,
|
|
2162
2162
|
class: E(["yswitch", [
|
|
2163
2163
|
`yswitch--${e.size}`,
|
|
2164
|
-
{ "yswitch--checked":
|
|
2164
|
+
{ "yswitch--checked": p.value, "yswitch--disabled": e.disabled, "yswitch--loading": e.loading }
|
|
2165
2165
|
]]),
|
|
2166
|
-
style: ve(
|
|
2166
|
+
style: ve(y.value),
|
|
2167
2167
|
role: "switch",
|
|
2168
|
-
"aria-checked":
|
|
2168
|
+
"aria-checked": p.value,
|
|
2169
2169
|
"aria-disabled": e.disabled,
|
|
2170
2170
|
disabled: e.disabled || e.loading,
|
|
2171
2171
|
onClick: I,
|
|
@@ -2180,8 +2180,8 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
|
|
|
2180
2180
|
]),
|
|
2181
2181
|
e.showText ? (i(), u("span", {
|
|
2182
2182
|
key: 0,
|
|
2183
|
-
class: E(["yswitch__label", { "yswitch__label--left": !
|
|
2184
|
-
}, ee(
|
|
2183
|
+
class: E(["yswitch__label", { "yswitch__label--left": !p.value, "yswitch__label--right": p.value }])
|
|
2184
|
+
}, ee(p.value ? e.activeText : e.inactiveText), 3)) : W("", !0)
|
|
2185
2185
|
], 46, ll));
|
|
2186
2186
|
}
|
|
2187
2187
|
}), il = /* @__PURE__ */ be(sl, [["__scopeId", "data-v-0b157fc4"]]), rl = ["src", "alt"], ul = ["src", "alt"], cl = /* @__PURE__ */ we({
|
|
@@ -2200,7 +2200,7 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
|
|
|
2200
2200
|
},
|
|
2201
2201
|
emits: ["load", "error", "preview"],
|
|
2202
2202
|
setup(e, { expose: $, emit: t }) {
|
|
2203
|
-
const n = e, m = t,
|
|
2203
|
+
const n = e, m = t, p = K(), y = K(), I = K(), C = K(!1), T = K(!1), k = K(!1), w = K(!1), g = K(!1), x = K("data:image/svg+xml;charset=utf-8;base64,PHN2ZyB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCIgdmlld0JveD0iMCAwIDIwMCAyMDAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgPCEtLSDog4zmma8gLS0+CiAgPHJlY3Qgd2lkdGg9IjIwMCIgaGVpZ2h0PSIyMDAiIGZpbGw9IiNGM0Y0RjYiLz4KICAKICA8IS0tIOWbvueJh+WbvuaghyAtLT4KICA8cmVjdCB4PSI1MCIgeT0iNDAiIHdpZHRoPSIxMDAiIGhlaWdodD0iODAiIHJ4PSI0IiBmaWxsPSIjRDFENURCIiBzdHJva2U9IiM5Q0EzQUYiIHN0cm9rZS13aWR0aD0iMiIvPgogIAogIDwhLS0g5Zu+54mH5YaF6YOo6KOF6aWwIC0tPgogIDxjaXJjbGUgY3g9IjgwIiBjeT0iNzAiIHI9IjgiIGZpbGw9IiM5Q0EzQUYiLz4KICA8cGF0aCBkPSJNNjAgMTAwIEw5MCA4NSBMMTIwIDk1IEwxNDAgODAiIHN0cm9rZT0iIzlDQTNBRiIgc3Ryb2tlLXdpZHRoPSIyIiBmaWxsPSJub25lIiBzdHJva2UtbGluZWNhcD0icm91bmQiLz4KICAKICA8IS0tIOaWh+WtlyAtLT4KICA8dGV4dCB4PSIxMDAiIHk9IjE2MCIgdGV4dC1hbmNob3I9Im1pZGRsZSIgZmlsbD0iIzZCNzI4MCIgZm9udC1mYW1pbHk9IkFyaWFsLCBzYW5zLXNlcmlmIiBmb250LXNpemU9IjEyIiBmb250LXdlaWdodD0iNTAwIj4KICAgIEltYWdlIG5vdCBhdmFpbGFibGUKICA8L3RleHQ+Cjwvc3ZnPiA="), P = K(""), J = K(1), A = K(!1), D = K({
|
|
2204
2204
|
overflow: "",
|
|
2205
2205
|
paddingRight: ""
|
|
2206
2206
|
}), z = Y(() => [
|
|
@@ -2245,7 +2245,7 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
|
|
|
2245
2245
|
};
|
|
2246
2246
|
let V = null;
|
|
2247
2247
|
const Z = () => {
|
|
2248
|
-
!n.lazy || !
|
|
2248
|
+
!n.lazy || !p.value || (V = new IntersectionObserver(
|
|
2249
2249
|
(R) => {
|
|
2250
2250
|
R.forEach((G) => {
|
|
2251
2251
|
G.isIntersecting && (w.value = !0, x.value = n.src, V == null || V.unobserve(G.target));
|
|
@@ -2254,22 +2254,22 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
|
|
|
2254
2254
|
{
|
|
2255
2255
|
rootMargin: "50px"
|
|
2256
2256
|
}
|
|
2257
|
-
), V.observe(
|
|
2257
|
+
), V.observe(p.value));
|
|
2258
2258
|
}, d = (R) => {
|
|
2259
2259
|
C.value = !0, T.value = !1, k.value = !1, m("load", R);
|
|
2260
|
-
},
|
|
2260
|
+
}, h = (R) => {
|
|
2261
2261
|
k.value = !0, T.value = !1, C.value = !1, m("error", R);
|
|
2262
2262
|
}, a = () => {
|
|
2263
2263
|
k.value = !1, T.value = !0, C.value = !1, oe(() => {
|
|
2264
|
-
|
|
2264
|
+
y.value && (y.value.src = n.src);
|
|
2265
2265
|
});
|
|
2266
2266
|
}, r = () => Array.isArray(n.previewSrcList) ? n.previewSrcList.find(Boolean) || n.src : n.previewSrcList || n.src, f = () => {
|
|
2267
2267
|
n.preview && (n.previewSrcList || n.src) ? b() : a();
|
|
2268
2268
|
}, b = () => {
|
|
2269
|
-
if (
|
|
2269
|
+
if (!n.preview) return;
|
|
2270
2270
|
J.value = 1;
|
|
2271
2271
|
const R = r();
|
|
2272
|
-
if (
|
|
2272
|
+
if (y.value && y.value.complete && y.value.naturalWidth > 0) {
|
|
2273
2273
|
P.value = R, oe(() => {
|
|
2274
2274
|
g.value = !0, ge(), m("preview", R);
|
|
2275
2275
|
});
|
|
@@ -2304,18 +2304,14 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
|
|
|
2304
2304
|
V && V.disconnect(), g.value && me();
|
|
2305
2305
|
}), te(() => x.value, () => {
|
|
2306
2306
|
n.src && w.value && (T.value = !0, k.value = !1, C.value = !1);
|
|
2307
|
-
}, {
|
|
2308
|
-
immediate: !0
|
|
2309
2307
|
}), te(() => n.src, (R) => {
|
|
2310
2308
|
x.value = R || "";
|
|
2311
|
-
}, {
|
|
2312
|
-
immediate: !0
|
|
2313
2309
|
}), $({
|
|
2314
2310
|
retryLoad: a,
|
|
2315
2311
|
closePreview: L
|
|
2316
2312
|
}), (R, G) => (i(), u("div", {
|
|
2317
2313
|
ref_key: "containerRef",
|
|
2318
|
-
ref:
|
|
2314
|
+
ref: p,
|
|
2319
2315
|
class: E(["relative inline-block", z.value])
|
|
2320
2316
|
}, [
|
|
2321
2317
|
!C.value && !k.value && !w.value ? (i(), u("div", {
|
|
@@ -2359,12 +2355,12 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
|
|
|
2359
2355
|
], 2)) : W("", !0),
|
|
2360
2356
|
Be(o("img", {
|
|
2361
2357
|
ref_key: "imageRef",
|
|
2362
|
-
ref:
|
|
2358
|
+
ref: y,
|
|
2363
2359
|
src: x.value,
|
|
2364
2360
|
alt: e.alt,
|
|
2365
2361
|
class: E(F.value),
|
|
2366
2362
|
onLoad: d,
|
|
2367
|
-
onError:
|
|
2363
|
+
onError: h,
|
|
2368
2364
|
onClick: Q(b, ["stop"]),
|
|
2369
2365
|
style: ve(q.value)
|
|
2370
2366
|
}, null, 46, rl), [
|
|
@@ -2409,7 +2405,7 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
|
|
|
2409
2405
|
])) : W("", !0)
|
|
2410
2406
|
], 2));
|
|
2411
2407
|
}
|
|
2412
|
-
}), dl = /* @__PURE__ */ be(cl, [["__scopeId", "data-v-
|
|
2408
|
+
}), dl = /* @__PURE__ */ be(cl, [["__scopeId", "data-v-d2eba56e"]]), fl = /* @__PURE__ */ we({
|
|
2413
2409
|
__name: "ydropdown",
|
|
2414
2410
|
props: {
|
|
2415
2411
|
trigger: { default: "hover" },
|
|
@@ -2420,7 +2416,7 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
|
|
|
2420
2416
|
setup(e) {
|
|
2421
2417
|
const $ = e, t = K(!1), n = K();
|
|
2422
2418
|
let m = null;
|
|
2423
|
-
const
|
|
2419
|
+
const p = Y(() => `y-dropdown__menu--${$.placement}`), y = Y(() => {
|
|
2424
2420
|
if (!$.menuWidth) return {};
|
|
2425
2421
|
const g = typeof $.menuWidth == "number" ? `${$.menuWidth}px` : $.menuWidth;
|
|
2426
2422
|
return {
|
|
@@ -2503,8 +2499,8 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
|
|
|
2503
2499
|
}, {
|
|
2504
2500
|
default: ue(() => [
|
|
2505
2501
|
Be(o("div", {
|
|
2506
|
-
class: E(["y-dropdown__menu",
|
|
2507
|
-
style: ve(
|
|
2502
|
+
class: E(["y-dropdown__menu", p.value]),
|
|
2503
|
+
style: ve(y.value),
|
|
2508
2504
|
onMouseenter: I,
|
|
2509
2505
|
onMouseleave: C
|
|
2510
2506
|
}, [
|
|
@@ -2545,7 +2541,7 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
|
|
|
2545
2541
|
const t = e, n = $, m = Y({
|
|
2546
2542
|
get: () => t.modelValue,
|
|
2547
2543
|
set: (x) => n("update:modelValue", x)
|
|
2548
|
-
}),
|
|
2544
|
+
}), p = K(null), y = Y(() => t.placement === "right" ? "drawer-slide-right" : "drawer-slide-bottom"), I = Y(() => t.placement === "right" ? "rounded-left" : "rounded-top"), C = Y(() => {
|
|
2549
2545
|
const x = {};
|
|
2550
2546
|
return t.placement === "right" ? (x.width = typeof t.width == "number" ? `${t.width}px` : String(t.width), x.height = "100%", x.right = "0", x.top = "0") : (x.height = typeof t.height == "number" ? `${t.height}px` : String(t.height), x.width = "100%", x.bottom = "0", x.left = "0"), x;
|
|
2551
2547
|
});
|
|
@@ -2564,7 +2560,7 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
|
|
|
2564
2560
|
return te(() => t.modelValue, (x) => {
|
|
2565
2561
|
x ? (n("open"), requestAnimationFrame(() => {
|
|
2566
2562
|
var P;
|
|
2567
|
-
return (P =
|
|
2563
|
+
return (P = p.value) == null ? void 0 : P.focus();
|
|
2568
2564
|
}), document.addEventListener("keydown", g), document.body.style.overflow = "hidden") : (document.removeEventListener("keydown", g), document.body.style.overflow = "");
|
|
2569
2565
|
}), De(() => {
|
|
2570
2566
|
t.modelValue && (document.addEventListener("keydown", g), document.body.style.overflow = "hidden");
|
|
@@ -2582,11 +2578,11 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
|
|
|
2582
2578
|
class: "y-drawer-mask",
|
|
2583
2579
|
onClick: T
|
|
2584
2580
|
}),
|
|
2585
|
-
ie($e, { name:
|
|
2581
|
+
ie($e, { name: y.value }, {
|
|
2586
2582
|
default: ue(() => [
|
|
2587
2583
|
Be(o("div", {
|
|
2588
2584
|
ref_key: "panelRef",
|
|
2589
|
-
ref:
|
|
2585
|
+
ref: p,
|
|
2590
2586
|
class: E(["y-drawer-panel", [
|
|
2591
2587
|
`is-${e.placement}`,
|
|
2592
2588
|
I.value
|
|
@@ -2758,7 +2754,7 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
|
|
|
2758
2754
|
},
|
|
2759
2755
|
emits: ["node-click", "node-contextmenu", "check-change", "check", "current-change", "node-expand", "node-collapse", "node-drag-start", "node-drag-enter", "node-drag-leave", "node-drag-over", "node-drag-end", "node-drop", "checked-keys-change", "child-node-click"],
|
|
2760
2756
|
setup(e, { expose: $, emit: t }) {
|
|
2761
|
-
const n = e, m = t,
|
|
2757
|
+
const n = e, m = t, p = Y(() => (console.log("ytree 组件接收到的数据:", n.data), n.data || [])), y = K({
|
|
2762
2758
|
currentNode: null,
|
|
2763
2759
|
currentKey: null,
|
|
2764
2760
|
checkedKeys: /* @__PURE__ */ new Set(),
|
|
@@ -2766,54 +2762,54 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
|
|
|
2766
2762
|
selectedKeys: /* @__PURE__ */ new Set(),
|
|
2767
2763
|
highlightedKeys: /* @__PURE__ */ new Set()
|
|
2768
2764
|
});
|
|
2769
|
-
ot("treeStore",
|
|
2765
|
+
ot("treeStore", y);
|
|
2770
2766
|
const I = Y(() => n.restrictAutoExpandFromLevel && n.restrictAutoExpandFromLevel > 0 ? n.restrictAutoExpandFromLevel : void 0);
|
|
2771
2767
|
function C(d) {
|
|
2772
2768
|
return d[n.nodeKey] || d.id || Math.random();
|
|
2773
2769
|
}
|
|
2774
2770
|
function T(d) {
|
|
2775
|
-
var
|
|
2776
|
-
return ((
|
|
2771
|
+
var h;
|
|
2772
|
+
return ((h = n.props) != null && h.label ? d[n.props.label] : void 0) || d.label || "";
|
|
2777
2773
|
}
|
|
2778
2774
|
function k(d) {
|
|
2779
|
-
var
|
|
2780
|
-
return !!((
|
|
2775
|
+
var h;
|
|
2776
|
+
return !!((h = d == null ? void 0 : d.data) != null && h.isEmployee);
|
|
2781
2777
|
}
|
|
2782
|
-
function w(d,
|
|
2778
|
+
function w(d, h) {
|
|
2783
2779
|
var L;
|
|
2784
2780
|
const a = n.deptIconUrl || ho, r = n.personIconUrl || po, f = n.buttonIconUrl || "", b = n.childStyleIconUrl || "";
|
|
2785
|
-
return
|
|
2781
|
+
return h && b && J(d, h) ? b : (L = d == null ? void 0 : d.data) != null && L.isButton && f ? f : k(d) ? r : a;
|
|
2786
2782
|
}
|
|
2787
2783
|
function g(d) {
|
|
2788
2784
|
var a;
|
|
2789
|
-
const
|
|
2790
|
-
return
|
|
2785
|
+
const h = ((a = n.props) != null && a.children ? d[n.props.children] : void 0) || d.children;
|
|
2786
|
+
return h && h.length > 0;
|
|
2791
2787
|
}
|
|
2792
2788
|
function x(d) {
|
|
2793
|
-
var
|
|
2794
|
-
return ((
|
|
2789
|
+
var h;
|
|
2790
|
+
return ((h = n.props) != null && h.children ? d[n.props.children] : void 0) || d.children || [];
|
|
2795
2791
|
}
|
|
2796
|
-
function P(d,
|
|
2797
|
-
if (d ===
|
|
2792
|
+
function P(d, h, a = 1) {
|
|
2793
|
+
if (d === h)
|
|
2798
2794
|
return a;
|
|
2799
2795
|
const r = x(d);
|
|
2800
2796
|
for (const f of r) {
|
|
2801
|
-
const b = P(f,
|
|
2797
|
+
const b = P(f, h, a + 1);
|
|
2802
2798
|
if (b > 0)
|
|
2803
2799
|
return b;
|
|
2804
2800
|
}
|
|
2805
2801
|
return 0;
|
|
2806
2802
|
}
|
|
2807
|
-
function J(d,
|
|
2808
|
-
return !n.childStyleLevel || n.childStyleLevel < 1 ? !1 : P(
|
|
2803
|
+
function J(d, h) {
|
|
2804
|
+
return !n.childStyleLevel || n.childStyleLevel < 1 ? !1 : P(h, d) === n.childStyleLevel;
|
|
2809
2805
|
}
|
|
2810
2806
|
function A(d) {
|
|
2811
|
-
const
|
|
2812
|
-
return
|
|
2807
|
+
const h = C(d);
|
|
2808
|
+
return y.value.expandedKeys.has(h);
|
|
2813
2809
|
}
|
|
2814
2810
|
function D(d) {
|
|
2815
|
-
const
|
|
2816
|
-
if (
|
|
2811
|
+
const h = C(d);
|
|
2812
|
+
if (y.value.checkedKeys.has(h)) {
|
|
2817
2813
|
if (g(d)) {
|
|
2818
2814
|
const r = x(d), f = r.filter((L) => D(L)), b = r.filter(
|
|
2819
2815
|
(L) => z(L)
|
|
@@ -2832,30 +2828,30 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
|
|
|
2832
2828
|
}
|
|
2833
2829
|
function z(d) {
|
|
2834
2830
|
if (!g(d)) return !1;
|
|
2835
|
-
const
|
|
2831
|
+
const h = x(d), a = h.filter((f) => D(f)), r = h.filter(
|
|
2836
2832
|
(f) => z(f)
|
|
2837
2833
|
);
|
|
2838
|
-
return a.length ===
|
|
2834
|
+
return a.length === h.length ? !1 : a.length > 0 || r.length > 0;
|
|
2839
2835
|
}
|
|
2840
2836
|
function B(d) {
|
|
2841
|
-
const
|
|
2842
|
-
return
|
|
2837
|
+
const h = C(d);
|
|
2838
|
+
return y.value.currentKey === h;
|
|
2843
2839
|
}
|
|
2844
2840
|
function F(d) {
|
|
2845
|
-
const
|
|
2846
|
-
return
|
|
2841
|
+
const h = C(d);
|
|
2842
|
+
return y.value.highlightedKeys.has(h);
|
|
2847
2843
|
}
|
|
2848
2844
|
function N(d) {
|
|
2849
2845
|
if (n.disabled) return;
|
|
2850
|
-
const
|
|
2851
|
-
r ?
|
|
2846
|
+
const h = C(d), r = !y.value.checkedKeys.has(h), f = new Set(y.value.expandedKeys);
|
|
2847
|
+
r ? y.value.checkedKeys.add(h) : y.value.checkedKeys.delete(h);
|
|
2852
2848
|
function b(L, j) {
|
|
2853
2849
|
L.forEach((X) => {
|
|
2854
2850
|
const R = C(X);
|
|
2855
|
-
j ?
|
|
2851
|
+
j ? y.value.checkedKeys.add(R) : y.value.checkedKeys.delete(R), g(X) && b(x(X), j);
|
|
2856
2852
|
});
|
|
2857
2853
|
}
|
|
2858
|
-
b(x(d), r), r && q(), re(),
|
|
2854
|
+
b(x(d), r), r && q(), re(), y.value.expandedKeys = f, m("check-change", d, r, !1), m("check", d, r, !1), m("checked-keys-change", Array.from(y.value.checkedKeys));
|
|
2859
2855
|
}
|
|
2860
2856
|
function q(d) {
|
|
2861
2857
|
I.value && console.log(
|
|
@@ -2863,50 +2859,50 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
|
|
|
2863
2859
|
);
|
|
2864
2860
|
}
|
|
2865
2861
|
function U(d) {
|
|
2866
|
-
const
|
|
2867
|
-
|
|
2862
|
+
const h = C(d);
|
|
2863
|
+
y.value.expandedKeys.has(h) ? (y.value.expandedKeys.delete(h), m("node-collapse", d, d, null)) : (y.value.expandedKeys.add(h), m("node-expand", d, d, null));
|
|
2868
2864
|
}
|
|
2869
2865
|
function re() {
|
|
2870
2866
|
const d = [];
|
|
2871
|
-
function
|
|
2867
|
+
function h(r) {
|
|
2872
2868
|
r.forEach((f) => {
|
|
2873
|
-
d.push(f), g(f) &&
|
|
2869
|
+
d.push(f), g(f) && h(x(f));
|
|
2874
2870
|
});
|
|
2875
2871
|
}
|
|
2876
|
-
p
|
|
2872
|
+
h(p.value);
|
|
2877
2873
|
function a(r) {
|
|
2878
2874
|
if (g(r)) {
|
|
2879
2875
|
const f = x(r), b = C(r), L = f.filter((X) => D(X)), j = f.filter(
|
|
2880
2876
|
(X) => z(X)
|
|
2881
2877
|
);
|
|
2882
|
-
L.length === f.length && j.length === 0 || L.length > 0 || j.length > 0 ?
|
|
2878
|
+
L.length === f.length && j.length === 0 || L.length > 0 || j.length > 0 ? y.value.checkedKeys.add(b) : y.value.checkedKeys.delete(b);
|
|
2883
2879
|
}
|
|
2884
2880
|
}
|
|
2885
2881
|
for (let r = d.length - 1; r >= 0; r--)
|
|
2886
2882
|
a(d[r]);
|
|
2887
2883
|
}
|
|
2888
|
-
function ce(d,
|
|
2884
|
+
function ce(d, h, a, r) {
|
|
2889
2885
|
if (n.disabled) return;
|
|
2890
2886
|
const f = r ? J(d, r) : !1;
|
|
2891
2887
|
if (n.enableChildStyleCustomClick && f) {
|
|
2892
|
-
m("child-node-click", d,
|
|
2888
|
+
m("child-node-click", d, h, a);
|
|
2893
2889
|
return;
|
|
2894
2890
|
}
|
|
2895
2891
|
if (n.expandOnClickNode && g(d)) {
|
|
2896
2892
|
U(d);
|
|
2897
2893
|
return;
|
|
2898
2894
|
}
|
|
2899
|
-
|
|
2895
|
+
y.value.currentNode = d, y.value.currentKey = C(d), n.showCheckbox && N(d), m("node-click", d, h, a);
|
|
2900
2896
|
}
|
|
2901
|
-
function ne(d,
|
|
2902
|
-
n.disabled || m("node-contextmenu", d,
|
|
2897
|
+
function ne(d, h, a, r) {
|
|
2898
|
+
n.disabled || m("node-contextmenu", d, h, a, r);
|
|
2903
2899
|
}
|
|
2904
2900
|
te(
|
|
2905
2901
|
() => n.defaultExpandedKeys,
|
|
2906
2902
|
(d) => {
|
|
2907
2903
|
if (d) {
|
|
2908
|
-
const
|
|
2909
|
-
if (
|
|
2904
|
+
const h = I.value;
|
|
2905
|
+
if (h) {
|
|
2910
2906
|
let a = function(L, j, X = 1) {
|
|
2911
2907
|
for (const R of j) {
|
|
2912
2908
|
if (C(R) === L) return X;
|
|
@@ -2922,14 +2918,14 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
|
|
|
2922
2918
|
});
|
|
2923
2919
|
};
|
|
2924
2920
|
const f = (d || []).filter((L) => {
|
|
2925
|
-
const j = a(L,
|
|
2926
|
-
return j > 0 && j <
|
|
2921
|
+
const j = a(L, p.value, 1);
|
|
2922
|
+
return j > 0 && j < h;
|
|
2927
2923
|
}), b = new Set(f);
|
|
2928
|
-
r(
|
|
2929
|
-
a(L,
|
|
2930
|
-
}),
|
|
2924
|
+
r(p.value, 1, h), y.value.expandedKeys.forEach((L) => {
|
|
2925
|
+
a(L, p.value, 1) >= h && b.add(L);
|
|
2926
|
+
}), y.value.expandedKeys = b;
|
|
2931
2927
|
} else
|
|
2932
|
-
|
|
2928
|
+
y.value.expandedKeys = new Set(d);
|
|
2933
2929
|
}
|
|
2934
2930
|
},
|
|
2935
2931
|
{ immediate: !0 }
|
|
@@ -2942,13 +2938,13 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
|
|
|
2942
2938
|
const L = x(b);
|
|
2943
2939
|
if (a) {
|
|
2944
2940
|
if (f >= a) return;
|
|
2945
|
-
f + 1 === a ||
|
|
2941
|
+
f + 1 === a || h.add(C(b)), d(L, f + 1);
|
|
2946
2942
|
} else
|
|
2947
|
-
|
|
2943
|
+
h.add(C(b)), d(L, f + 1);
|
|
2948
2944
|
});
|
|
2949
2945
|
};
|
|
2950
|
-
const
|
|
2951
|
-
d(
|
|
2946
|
+
const h = /* @__PURE__ */ new Set(), a = I.value;
|
|
2947
|
+
d(p.value, 1), y.value.expandedKeys = h;
|
|
2952
2948
|
}
|
|
2953
2949
|
}
|
|
2954
2950
|
function ge() {
|
|
@@ -2956,11 +2952,11 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
|
|
|
2956
2952
|
let d = function(f, b = []) {
|
|
2957
2953
|
f.forEach((L) => {
|
|
2958
2954
|
const j = C(L), X = [...b, j];
|
|
2959
|
-
|
|
2955
|
+
h.has(j) && b.forEach((R) => a.add(R)), g(L) && d(x(L), X);
|
|
2960
2956
|
});
|
|
2961
2957
|
};
|
|
2962
|
-
const
|
|
2963
|
-
d(
|
|
2958
|
+
const h = new Set(n.defaultCheckedKeys), a = /* @__PURE__ */ new Set();
|
|
2959
|
+
d(p.value);
|
|
2964
2960
|
const r = I.value;
|
|
2965
2961
|
if (r) {
|
|
2966
2962
|
console.log(
|
|
@@ -2968,24 +2964,24 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
|
|
|
2968
2964
|
);
|
|
2969
2965
|
return;
|
|
2970
2966
|
}
|
|
2971
|
-
|
|
2967
|
+
y.value.expandedKeys = a;
|
|
2972
2968
|
}
|
|
2973
2969
|
}
|
|
2974
|
-
te(() => n.defaultExpandAll, he, { immediate: !0 }), te(() =>
|
|
2970
|
+
te(() => n.defaultExpandAll, he, { immediate: !0 }), te(() => p.value, he, { deep: !0 }), te(
|
|
2975
2971
|
() => n.defaultCheckedKeys,
|
|
2976
2972
|
(d) => {
|
|
2977
|
-
d ? (
|
|
2973
|
+
d ? (y.value.checkedKeys = new Set(d), n.enableFourthLevelSpecialHandling ? console.log("权限树模式:跳过自动展开逻辑,保持当前展开状态") : ge()) : y.value.checkedKeys.clear();
|
|
2978
2974
|
},
|
|
2979
2975
|
{ immediate: !0 }
|
|
2980
2976
|
);
|
|
2981
2977
|
function me(d) {
|
|
2982
2978
|
try {
|
|
2983
|
-
let
|
|
2979
|
+
let h = function(f, b, L = []) {
|
|
2984
2980
|
for (const j of f) {
|
|
2985
2981
|
const X = C(j), R = [...L, X];
|
|
2986
2982
|
if (X === b) return R;
|
|
2987
2983
|
if (g(j)) {
|
|
2988
|
-
const G =
|
|
2984
|
+
const G = h(x(j), b, R);
|
|
2989
2985
|
if (G) return G;
|
|
2990
2986
|
}
|
|
2991
2987
|
}
|
|
@@ -2993,33 +2989,33 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
|
|
|
2993
2989
|
};
|
|
2994
2990
|
const a = Array.isArray(d) ? d : [];
|
|
2995
2991
|
if (a.length === 0) return;
|
|
2996
|
-
|
|
2997
|
-
const r = new Set(
|
|
2992
|
+
y.value.highlightedKeys.clear();
|
|
2993
|
+
const r = new Set(y.value.expandedKeys);
|
|
2998
2994
|
a.forEach((f) => {
|
|
2999
|
-
const b = p
|
|
3000
|
-
b && b.length > 0 && (b.slice(0, -1).forEach((L) => r.add(L)),
|
|
3001
|
-
}),
|
|
3002
|
-
} catch (
|
|
3003
|
-
console.warn("highlightAndExpandByIds 执行失败",
|
|
2995
|
+
const b = h(p.value, f);
|
|
2996
|
+
b && b.length > 0 && (b.slice(0, -1).forEach((L) => r.add(L)), y.value.highlightedKeys.add(b[b.length - 1]));
|
|
2997
|
+
}), y.value.expandedKeys = r;
|
|
2998
|
+
} catch (h) {
|
|
2999
|
+
console.warn("highlightAndExpandByIds 执行失败", h);
|
|
3004
3000
|
}
|
|
3005
3001
|
}
|
|
3006
3002
|
function V() {
|
|
3007
|
-
|
|
3003
|
+
y.value.highlightedKeys.clear();
|
|
3008
3004
|
}
|
|
3009
3005
|
function Z() {
|
|
3010
|
-
|
|
3006
|
+
y.value.currentNode = null, y.value.currentKey = null;
|
|
3011
3007
|
}
|
|
3012
3008
|
return $({ highlightAndExpandByIds: me, clearHighlights: V, clearCurrentNode: Z }), te(
|
|
3013
3009
|
() => n.defaultSelectedKeys,
|
|
3014
3010
|
(d) => {
|
|
3015
|
-
d && (
|
|
3011
|
+
d && (y.value.selectedKeys = new Set(d));
|
|
3016
3012
|
},
|
|
3017
3013
|
{ immediate: !0 }
|
|
3018
|
-
), (d,
|
|
3014
|
+
), (d, h) => (i(), u("div", {
|
|
3019
3015
|
class: E(["ytree", [`ytree--${e.size}`, { "ytree--disabled": e.disabled }]])
|
|
3020
3016
|
}, [
|
|
3021
3017
|
o("div", xl, [
|
|
3022
|
-
(i(!0), u(ae, null, de(
|
|
3018
|
+
(i(!0), u(ae, null, de(p.value, (a) => (i(), u("div", {
|
|
3023
3019
|
key: C(a),
|
|
3024
3020
|
class: E(["ytree-node", { "ytree-node--current": B(a), "ytree-node--highlight": F(a) }])
|
|
3025
3021
|
}, [
|
|
@@ -3034,7 +3030,7 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
|
|
|
3034
3030
|
key: 0,
|
|
3035
3031
|
class: E(["ytree-node__expand-icon", { "is-expanded": A(a) }]),
|
|
3036
3032
|
onClick: Q((r) => U(a), ["stop"])
|
|
3037
|
-
}, [...
|
|
3033
|
+
}, [...h[0] || (h[0] = [
|
|
3038
3034
|
o("svg", {
|
|
3039
3035
|
width: "12",
|
|
3040
3036
|
height: "12",
|
|
@@ -3058,7 +3054,7 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
|
|
|
3058
3054
|
}]),
|
|
3059
3055
|
onClick: Q((r) => N(a), ["stop"])
|
|
3060
3056
|
}, [
|
|
3061
|
-
D(a) ? (i(), u("svg", Sl, [...
|
|
3057
|
+
D(a) ? (i(), u("svg", Sl, [...h[1] || (h[1] = [
|
|
3062
3058
|
o("path", {
|
|
3063
3059
|
d: "M2 6L4.5 8.5L10 3",
|
|
3064
3060
|
stroke: "currentColor",
|
|
@@ -3066,7 +3062,7 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
|
|
|
3066
3062
|
"stroke-linecap": "round",
|
|
3067
3063
|
"stroke-linejoin": "round"
|
|
3068
3064
|
}, null, -1)
|
|
3069
|
-
])])) : z(a) ? (i(), u("svg", Ml, [...
|
|
3065
|
+
])])) : z(a) ? (i(), u("svg", Ml, [...h[2] || (h[2] = [
|
|
3070
3066
|
o("path", {
|
|
3071
3067
|
d: "M2 6L10 6",
|
|
3072
3068
|
stroke: "currentColor",
|
|
@@ -3114,7 +3110,7 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
|
|
|
3114
3110
|
key: 0,
|
|
3115
3111
|
class: E(["ytree-node__expand-icon", { "is-expanded": A(r) }]),
|
|
3116
3112
|
onClick: Q((f) => U(r), ["stop"])
|
|
3117
|
-
}, [...
|
|
3113
|
+
}, [...h[3] || (h[3] = [
|
|
3118
3114
|
o("svg", {
|
|
3119
3115
|
width: "12",
|
|
3120
3116
|
height: "12",
|
|
@@ -3138,7 +3134,7 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
|
|
|
3138
3134
|
}]),
|
|
3139
3135
|
onClick: Q((f) => N(r), ["stop"])
|
|
3140
3136
|
}, [
|
|
3141
|
-
D(r) ? (i(), u("svg", Hl, [...
|
|
3137
|
+
D(r) ? (i(), u("svg", Hl, [...h[4] || (h[4] = [
|
|
3142
3138
|
o("path", {
|
|
3143
3139
|
d: "M2 6L4.5 8.5L10 3",
|
|
3144
3140
|
stroke: "currentColor",
|
|
@@ -3146,7 +3142,7 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
|
|
|
3146
3142
|
"stroke-linecap": "round",
|
|
3147
3143
|
"stroke-linejoin": "round"
|
|
3148
3144
|
}, null, -1)
|
|
3149
|
-
])])) : z(r) ? (i(), u("svg", Wl, [...
|
|
3145
|
+
])])) : z(r) ? (i(), u("svg", Wl, [...h[5] || (h[5] = [
|
|
3150
3146
|
o("path", {
|
|
3151
3147
|
d: "M2 6L10 6",
|
|
3152
3148
|
stroke: "currentColor",
|
|
@@ -3202,7 +3198,7 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
|
|
|
3202
3198
|
key: 0,
|
|
3203
3199
|
class: E(["ytree-node__expand-icon", { "is-expanded": A(f) }]),
|
|
3204
3200
|
onClick: Q((b) => U(f), ["stop"])
|
|
3205
|
-
}, [...
|
|
3201
|
+
}, [...h[6] || (h[6] = [
|
|
3206
3202
|
o("svg", {
|
|
3207
3203
|
width: "12",
|
|
3208
3204
|
height: "12",
|
|
@@ -3226,7 +3222,7 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
|
|
|
3226
3222
|
}]),
|
|
3227
3223
|
onClick: Q((b) => N(f), ["stop"])
|
|
3228
3224
|
}, [
|
|
3229
|
-
D(f) ? (i(), u("svg", Ol, [...
|
|
3225
|
+
D(f) ? (i(), u("svg", Ol, [...h[7] || (h[7] = [
|
|
3230
3226
|
o("path", {
|
|
3231
3227
|
d: "M2 6L4.5 8.5L10 3",
|
|
3232
3228
|
stroke: "currentColor",
|
|
@@ -3234,7 +3230,7 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
|
|
|
3234
3230
|
"stroke-linecap": "round",
|
|
3235
3231
|
"stroke-linejoin": "round"
|
|
3236
3232
|
}, null, -1)
|
|
3237
|
-
])])) : z(f) ? (i(), u("svg", jl, [...
|
|
3233
|
+
])])) : z(f) ? (i(), u("svg", jl, [...h[8] || (h[8] = [
|
|
3238
3234
|
o("path", {
|
|
3239
3235
|
d: "M2 6L10 6",
|
|
3240
3236
|
stroke: "currentColor",
|
|
@@ -3299,7 +3295,7 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
|
|
|
3299
3295
|
"is-expanded": A(b)
|
|
3300
3296
|
}]),
|
|
3301
3297
|
onClick: Q((L) => U(b), ["stop"])
|
|
3302
|
-
}, [...
|
|
3298
|
+
}, [...h[9] || (h[9] = [
|
|
3303
3299
|
o("svg", {
|
|
3304
3300
|
width: "12",
|
|
3305
3301
|
height: "12",
|
|
@@ -3323,7 +3319,7 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
|
|
|
3323
3319
|
}]),
|
|
3324
3320
|
onClick: Q((L) => N(b), ["stop"])
|
|
3325
3321
|
}, [
|
|
3326
|
-
D(b) ? (i(), u("svg", eo, [...
|
|
3322
|
+
D(b) ? (i(), u("svg", eo, [...h[10] || (h[10] = [
|
|
3327
3323
|
o("path", {
|
|
3328
3324
|
d: "M2 6L4.5 8.5L10 3",
|
|
3329
3325
|
stroke: "currentColor",
|
|
@@ -3331,7 +3327,7 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
|
|
|
3331
3327
|
"stroke-linecap": "round",
|
|
3332
3328
|
"stroke-linejoin": "round"
|
|
3333
3329
|
}, null, -1)
|
|
3334
|
-
])])) : z(b) ? (i(), u("svg", to, [...
|
|
3330
|
+
])])) : z(b) ? (i(), u("svg", to, [...h[11] || (h[11] = [
|
|
3335
3331
|
o("path", {
|
|
3336
3332
|
d: "M2 6L10 6",
|
|
3337
3333
|
stroke: "currentColor",
|
|
@@ -3399,7 +3395,7 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
|
|
|
3399
3395
|
"is-expanded": A(L)
|
|
3400
3396
|
}]),
|
|
3401
3397
|
onClick: Q((j) => U(L), ["stop"])
|
|
3402
|
-
}, [...
|
|
3398
|
+
}, [...h[12] || (h[12] = [
|
|
3403
3399
|
o("svg", {
|
|
3404
3400
|
width: "12",
|
|
3405
3401
|
height: "12",
|
|
@@ -3425,7 +3421,7 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
|
|
|
3425
3421
|
}]),
|
|
3426
3422
|
onClick: Q((j) => N(L), ["stop"])
|
|
3427
3423
|
}, [
|
|
3428
|
-
D(L) ? (i(), u("svg", uo, [...
|
|
3424
|
+
D(L) ? (i(), u("svg", uo, [...h[13] || (h[13] = [
|
|
3429
3425
|
o("path", {
|
|
3430
3426
|
d: "M2 6L4.5 8.5L10 3",
|
|
3431
3427
|
stroke: "currentColor",
|
|
@@ -3435,7 +3431,7 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
|
|
|
3435
3431
|
}, null, -1)
|
|
3436
3432
|
])])) : z(
|
|
3437
3433
|
L
|
|
3438
|
-
) ? (i(), u("svg", co, [...
|
|
3434
|
+
) ? (i(), u("svg", co, [...h[14] || (h[14] = [
|
|
3439
3435
|
o("path", {
|
|
3440
3436
|
d: "M2 6L10 6",
|
|
3441
3437
|
stroke: "currentColor",
|
|
@@ -3508,7 +3504,7 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
|
|
|
3508
3504
|
},
|
|
3509
3505
|
emits: ["update:modelValue", "search", "reset", "field-change"],
|
|
3510
3506
|
setup(e, { emit: $ }) {
|
|
3511
|
-
const t = e, n = $, m = K(!1),
|
|
3507
|
+
const t = e, n = $, m = K(!1), p = at({}), y = Y(() => t.fields.filter((D) => !D.hidden)), I = Y(() => m.value ? y.value : y.value.slice(0, t.maxVisibleFields)), C = Y(() => y.value.length > t.maxVisibleFields);
|
|
3512
3508
|
function T(D) {
|
|
3513
3509
|
switch (D) {
|
|
3514
3510
|
case "select":
|
|
@@ -3522,17 +3518,17 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
|
|
|
3522
3518
|
}
|
|
3523
3519
|
}
|
|
3524
3520
|
function k(D) {
|
|
3525
|
-
n("field-change", D,
|
|
3521
|
+
n("field-change", D, p[D.key]), n("update:modelValue", { ...p });
|
|
3526
3522
|
}
|
|
3527
3523
|
function w() {
|
|
3528
|
-
const D = P(
|
|
3524
|
+
const D = P(p), z = J(D), B = { ...p };
|
|
3529
3525
|
n("search", { data: z, raw: B });
|
|
3530
3526
|
}
|
|
3531
3527
|
function g() {
|
|
3532
|
-
Object.keys(
|
|
3528
|
+
Object.keys(p).forEach((D) => {
|
|
3533
3529
|
const z = t.fields.find((B) => B.key === D);
|
|
3534
|
-
(z == null ? void 0 : z.type) === "daterange" ?
|
|
3535
|
-
}), n("reset"), n("update:modelValue", { ...
|
|
3530
|
+
(z == null ? void 0 : z.type) === "daterange" ? p[D] = { startDate: null, endDate: null } : (z == null ? void 0 : z.type) === "date" ? p[D] = null : p[D] = "";
|
|
3531
|
+
}), n("reset"), n("update:modelValue", { ...p });
|
|
3536
3532
|
}
|
|
3537
3533
|
function x() {
|
|
3538
3534
|
m.value = !m.value;
|
|
@@ -3570,16 +3566,16 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
|
|
|
3570
3566
|
function A() {
|
|
3571
3567
|
t.fields.forEach((D) => {
|
|
3572
3568
|
var z, B, F;
|
|
3573
|
-
|
|
3569
|
+
p[D.key] === void 0 && (D.type === "daterange" ? p[D.key] = ((z = t.modelValue) == null ? void 0 : z[D.key]) || {
|
|
3574
3570
|
startDate: null,
|
|
3575
3571
|
endDate: null
|
|
3576
|
-
} : D.type === "date" ?
|
|
3572
|
+
} : D.type === "date" ? p[D.key] = ((B = t.modelValue) == null ? void 0 : B[D.key]) || null : p[D.key] = ((F = t.modelValue) == null ? void 0 : F[D.key]) || "");
|
|
3577
3573
|
});
|
|
3578
3574
|
}
|
|
3579
3575
|
return te(
|
|
3580
3576
|
() => t.modelValue,
|
|
3581
3577
|
(D) => {
|
|
3582
|
-
D && Object.assign(
|
|
3578
|
+
D && Object.assign(p, D);
|
|
3583
3579
|
},
|
|
3584
3580
|
{ deep: !0, immediate: !0 }
|
|
3585
3581
|
), De(() => {
|
|
@@ -3601,8 +3597,8 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
|
|
|
3601
3597
|
o("div", xo, [
|
|
3602
3598
|
e.Iflabel ? (i(), u("label", $o, ee(B.label), 1)) : W("", !0),
|
|
3603
3599
|
(i(), Le(it(T(B.type)), {
|
|
3604
|
-
modelValue:
|
|
3605
|
-
"onUpdate:modelValue": (F) =>
|
|
3600
|
+
modelValue: p[B.key],
|
|
3601
|
+
"onUpdate:modelValue": (F) => p[B.key] = F,
|
|
3606
3602
|
placeholder: B.placeholder || `请输入${B.label}`,
|
|
3607
3603
|
options: B.options,
|
|
3608
3604
|
clearable: B.clearable !== !1,
|
|
@@ -3709,13 +3705,13 @@ const ut = ["type", "disabled", "aria-busy", "aria-disabled"], ct = { class: "co
|
|
|
3709
3705
|
function m() {
|
|
3710
3706
|
t.value = !1;
|
|
3711
3707
|
}
|
|
3712
|
-
function
|
|
3713
|
-
var
|
|
3714
|
-
(
|
|
3708
|
+
function p() {
|
|
3709
|
+
var y;
|
|
3710
|
+
(y = $.onClose) == null || y.call($, $.id);
|
|
3715
3711
|
}
|
|
3716
|
-
return (
|
|
3712
|
+
return (y, I) => (i(), Le($e, {
|
|
3717
3713
|
name: "y-msg-fade",
|
|
3718
|
-
onAfterLeave:
|
|
3714
|
+
onAfterLeave: p
|
|
3719
3715
|
}, {
|
|
3720
3716
|
default: ue(() => [
|
|
3721
3717
|
Be(o("div", {
|
|
@@ -3781,21 +3777,21 @@ function Ho() {
|
|
|
3781
3777
|
}), e;
|
|
3782
3778
|
}
|
|
3783
3779
|
function Qe(e) {
|
|
3784
|
-
const $ = Me.findIndex((
|
|
3780
|
+
const $ = Me.findIndex((p) => p.id === e);
|
|
3785
3781
|
if ($ === -1) return;
|
|
3786
3782
|
const { el: t } = Me[$], n = t.firstElementChild;
|
|
3787
3783
|
if (n) {
|
|
3788
|
-
const
|
|
3789
|
-
n.style.top =
|
|
3784
|
+
const p = window.getComputedStyle(n).top;
|
|
3785
|
+
n.style.top = p, n.classList.add("is-leaving"), n.style.willChange = "opacity, transform";
|
|
3790
3786
|
}
|
|
3791
3787
|
Me[$].leaving = !0, je(), setTimeout(() => {
|
|
3792
3788
|
Xe(null, t), t.parentNode && t.parentNode.removeChild(t);
|
|
3793
|
-
const
|
|
3794
|
-
|
|
3789
|
+
const p = Me.findIndex((y) => y.id === e);
|
|
3790
|
+
p !== -1 && Me.splice(p, 1), je();
|
|
3795
3791
|
}, 260);
|
|
3796
3792
|
}
|
|
3797
3793
|
function qe(e) {
|
|
3798
|
-
var
|
|
3794
|
+
var p;
|
|
3799
3795
|
const $ = Ko++, t = document.createElement("div");
|
|
3800
3796
|
document.body.appendChild(t);
|
|
3801
3797
|
const n = ie(zo, {
|
|
@@ -3806,14 +3802,14 @@ function qe(e) {
|
|
|
3806
3802
|
offset: Ho(),
|
|
3807
3803
|
zIndex: 3e3 + $,
|
|
3808
3804
|
closable: e.closable ?? !1,
|
|
3809
|
-
onClose: (
|
|
3805
|
+
onClose: (y) => Qe(y)
|
|
3810
3806
|
});
|
|
3811
3807
|
Xe(n, t);
|
|
3812
|
-
const m = ((
|
|
3808
|
+
const m = ((p = t.firstElementChild) == null ? void 0 : p.offsetHeight) || 0;
|
|
3813
3809
|
return Me.push({ id: $, el: t, vm: n, height: m, leaving: !1 }), je(), requestAnimationFrame(() => {
|
|
3814
|
-
const
|
|
3815
|
-
if (!
|
|
3816
|
-
const I =
|
|
3810
|
+
const y = t.firstElementChild;
|
|
3811
|
+
if (!y) return;
|
|
3812
|
+
const I = y.offsetHeight || m || 0, C = Me.find((T) => T.id === $);
|
|
3817
3813
|
C && (C.height = I, je());
|
|
3818
3814
|
}), { close: () => Qe($) };
|
|
3819
3815
|
}
|