@wx-design/components 0.10.2 → 0.10.3
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/es/index.mjs
CHANGED
|
@@ -453,8 +453,8 @@ var Au = Su, Ie = { exports: {} };
|
|
|
453
453
|
Ie.exports;
|
|
454
454
|
(function(e, t) {
|
|
455
455
|
var r = L, a = t && !t.nodeType && t, n = a && !0 && e && !e.nodeType && e, l = n && n.exports === a, i = l ? r.Buffer : void 0, o = i ? i.allocUnsafe : void 0;
|
|
456
|
-
function s(u,
|
|
457
|
-
if (
|
|
456
|
+
function s(u, h) {
|
|
457
|
+
if (h)
|
|
458
458
|
return u.slice();
|
|
459
459
|
var f = u.length, c = o ? o(f) : new u.constructor(f);
|
|
460
460
|
return u.copy(c), c;
|
|
@@ -623,8 +623,8 @@ function we(e, t, r, a, n, l) {
|
|
|
623
623
|
return i;
|
|
624
624
|
if (!vd(e))
|
|
625
625
|
return e;
|
|
626
|
-
var
|
|
627
|
-
if (
|
|
626
|
+
var h = cd(e);
|
|
627
|
+
if (h) {
|
|
628
628
|
if (i = id(e), !o)
|
|
629
629
|
return td(e, i);
|
|
630
630
|
} else {
|
|
@@ -646,12 +646,12 @@ function we(e, t, r, a, n, l) {
|
|
|
646
646
|
return b;
|
|
647
647
|
l.set(e, i), gd(e) ? e.forEach(function(v) {
|
|
648
648
|
i.add(we(v, t, r, v, e, l));
|
|
649
|
-
}) : dd(e) && e.forEach(function(v,
|
|
650
|
-
i.set(
|
|
649
|
+
}) : dd(e) && e.forEach(function(v, p) {
|
|
650
|
+
i.set(p, we(v, t, r, p, e, l));
|
|
651
651
|
});
|
|
652
|
-
var
|
|
653
|
-
return Xf(
|
|
654
|
-
|
|
652
|
+
var y = u ? s ? ld : nd : s ? pd : bd, g = h ? void 0 : y(e);
|
|
653
|
+
return Xf(g || e, function(v, p) {
|
|
654
|
+
g && (p = v, v = e[p]), Jf(i, p, we(v, t, r, p, e, l));
|
|
655
655
|
}), i;
|
|
656
656
|
}
|
|
657
657
|
var Ud = we, Hd = te, Gd = Y, zd = "[object Symbol]";
|
|
@@ -863,14 +863,14 @@ function tb(e, t, r, a, n, l) {
|
|
|
863
863
|
var i = r & Qg, o = e.length, s = t.length;
|
|
864
864
|
if (o != s && !(i && s > o))
|
|
865
865
|
return !1;
|
|
866
|
-
var u = l.get(e),
|
|
867
|
-
if (u &&
|
|
868
|
-
return u == t &&
|
|
866
|
+
var u = l.get(e), h = l.get(t);
|
|
867
|
+
if (u && h)
|
|
868
|
+
return u == t && h == e;
|
|
869
869
|
var f = -1, c = !0, b = r & eb ? new Xg() : void 0;
|
|
870
870
|
for (l.set(e, t), l.set(t, e); ++f < o; ) {
|
|
871
|
-
var
|
|
871
|
+
var y = e[f], g = t[f];
|
|
872
872
|
if (a)
|
|
873
|
-
var v = i ? a(
|
|
873
|
+
var v = i ? a(g, y, f, t, e, l) : a(y, g, f, e, t, l);
|
|
874
874
|
if (v !== void 0) {
|
|
875
875
|
if (v)
|
|
876
876
|
continue;
|
|
@@ -878,14 +878,14 @@ function tb(e, t, r, a, n, l) {
|
|
|
878
878
|
break;
|
|
879
879
|
}
|
|
880
880
|
if (b) {
|
|
881
|
-
if (!Jg(t, function(
|
|
882
|
-
if (!Zg(b,
|
|
883
|
-
return b.push(
|
|
881
|
+
if (!Jg(t, function(p, d) {
|
|
882
|
+
if (!Zg(b, d) && (y === p || n(y, p, r, a, l)))
|
|
883
|
+
return b.push(d);
|
|
884
884
|
})) {
|
|
885
885
|
c = !1;
|
|
886
886
|
break;
|
|
887
887
|
}
|
|
888
|
-
} else if (!(
|
|
888
|
+
} else if (!(y === g || n(y, g, r, a, l))) {
|
|
889
889
|
c = !1;
|
|
890
890
|
break;
|
|
891
891
|
}
|
|
@@ -934,8 +934,8 @@ function Cb(e, t, r, a, n, l, i) {
|
|
|
934
934
|
if (u)
|
|
935
935
|
return u == t;
|
|
936
936
|
a |= cb, i.set(e, t);
|
|
937
|
-
var
|
|
938
|
-
return i.delete(e),
|
|
937
|
+
var h = ob(o(e), o(t), a, n, l, i);
|
|
938
|
+
return i.delete(e), h;
|
|
939
939
|
case mb:
|
|
940
940
|
if (Ue)
|
|
941
941
|
return Ue.call(e) == Ue.call(t);
|
|
@@ -944,53 +944,53 @@ function Cb(e, t, r, a, n, l, i) {
|
|
|
944
944
|
}
|
|
945
945
|
var wb = Cb, vr = oa, Tb = 1, Sb = Object.prototype, Ab = Sb.hasOwnProperty;
|
|
946
946
|
function Ob(e, t, r, a, n, l) {
|
|
947
|
-
var i = r & Tb, o = vr(e), s = o.length, u = vr(t),
|
|
948
|
-
if (s !=
|
|
947
|
+
var i = r & Tb, o = vr(e), s = o.length, u = vr(t), h = u.length;
|
|
948
|
+
if (s != h && !i)
|
|
949
949
|
return !1;
|
|
950
950
|
for (var f = s; f--; ) {
|
|
951
951
|
var c = o[f];
|
|
952
952
|
if (!(i ? c in t : Ab.call(t, c)))
|
|
953
953
|
return !1;
|
|
954
954
|
}
|
|
955
|
-
var b = l.get(e),
|
|
956
|
-
if (b &&
|
|
957
|
-
return b == t &&
|
|
958
|
-
var
|
|
955
|
+
var b = l.get(e), y = l.get(t);
|
|
956
|
+
if (b && y)
|
|
957
|
+
return b == t && y == e;
|
|
958
|
+
var g = !0;
|
|
959
959
|
l.set(e, t), l.set(t, e);
|
|
960
960
|
for (var v = i; ++f < s; ) {
|
|
961
961
|
c = o[f];
|
|
962
|
-
var
|
|
962
|
+
var p = e[c], d = t[c];
|
|
963
963
|
if (a)
|
|
964
|
-
var $ = i ? a(
|
|
965
|
-
if (!($ === void 0 ?
|
|
966
|
-
|
|
964
|
+
var $ = i ? a(d, p, c, t, e, l) : a(p, d, c, e, t, l);
|
|
965
|
+
if (!($ === void 0 ? p === d || n(p, d, r, a, l) : $)) {
|
|
966
|
+
g = !1;
|
|
967
967
|
break;
|
|
968
968
|
}
|
|
969
969
|
v || (v = c == "constructor");
|
|
970
970
|
}
|
|
971
|
-
if (
|
|
971
|
+
if (g && !v) {
|
|
972
972
|
var C = e.constructor, _ = t.constructor;
|
|
973
|
-
C != _ && "constructor" in e && "constructor" in t && !(typeof C == "function" && C instanceof C && typeof _ == "function" && _ instanceof _) && (
|
|
973
|
+
C != _ && "constructor" in e && "constructor" in t && !(typeof C == "function" && C instanceof C && typeof _ == "function" && _ instanceof _) && (g = !1);
|
|
974
974
|
}
|
|
975
|
-
return l.delete(e), l.delete(t),
|
|
975
|
+
return l.delete(e), l.delete(t), g;
|
|
976
976
|
}
|
|
977
977
|
var Ib = Ob, He = ft, xb = $a, Eb = wb, Mb = Ib, gr = Ne, br = N, pr = vt, Pb = ea, Fb = 1, hr = "[object Arguments]", yr = "[object Array]", Ce = "[object Object]", Rb = Object.prototype, mr = Rb.hasOwnProperty;
|
|
978
978
|
function Bb(e, t, r, a, n, l) {
|
|
979
979
|
var i = br(e), o = br(t), s = i ? yr : gr(e), u = o ? yr : gr(t);
|
|
980
980
|
s = s == hr ? Ce : s, u = u == hr ? Ce : u;
|
|
981
|
-
var
|
|
981
|
+
var h = s == Ce, f = u == Ce, c = s == u;
|
|
982
982
|
if (c && pr(e)) {
|
|
983
983
|
if (!pr(t))
|
|
984
984
|
return !1;
|
|
985
|
-
i = !0,
|
|
985
|
+
i = !0, h = !1;
|
|
986
986
|
}
|
|
987
|
-
if (c && !
|
|
987
|
+
if (c && !h)
|
|
988
988
|
return l || (l = new He()), i || Pb(e) ? xb(e, t, r, a, n, l) : Eb(e, t, s, r, a, n, l);
|
|
989
989
|
if (!(r & Fb)) {
|
|
990
|
-
var b =
|
|
991
|
-
if (b ||
|
|
992
|
-
var
|
|
993
|
-
return l || (l = new He()), n(
|
|
990
|
+
var b = h && mr.call(e, "__wrapped__"), y = f && mr.call(t, "__wrapped__");
|
|
991
|
+
if (b || y) {
|
|
992
|
+
var g = b ? e.value() : e, v = y ? t.value() : t;
|
|
993
|
+
return l || (l = new He()), n(g, v, r, a, l);
|
|
994
994
|
}
|
|
995
995
|
}
|
|
996
996
|
return c ? (l || (l = new He()), Mb(e, t, r, a, n, l)) : !1;
|
|
@@ -1011,15 +1011,15 @@ function Kb(e, t, r, a) {
|
|
|
1011
1011
|
}
|
|
1012
1012
|
for (; ++n < l; ) {
|
|
1013
1013
|
o = r[n];
|
|
1014
|
-
var s = o[0], u = e[s],
|
|
1014
|
+
var s = o[0], u = e[s], h = o[1];
|
|
1015
1015
|
if (i && o[2]) {
|
|
1016
1016
|
if (u === void 0 && !(s in e))
|
|
1017
1017
|
return !1;
|
|
1018
1018
|
} else {
|
|
1019
1019
|
var f = new Lb();
|
|
1020
1020
|
if (a)
|
|
1021
|
-
var c = a(u,
|
|
1022
|
-
if (!(c === void 0 ? Nb(
|
|
1021
|
+
var c = a(u, h, s, e, t, f);
|
|
1022
|
+
if (!(c === void 0 ? Nb(h, u, Vb | kb, a, f) : c))
|
|
1023
1023
|
return !1;
|
|
1024
1024
|
}
|
|
1025
1025
|
}
|
|
@@ -1130,8 +1130,8 @@ function eh(e, t, r, a) {
|
|
|
1130
1130
|
if (s === "__proto__" || s === "constructor" || s === "prototype")
|
|
1131
1131
|
return e;
|
|
1132
1132
|
if (n != i) {
|
|
1133
|
-
var
|
|
1134
|
-
u = a ? a(
|
|
1133
|
+
var h = o[s];
|
|
1134
|
+
u = a ? a(h, s, o) : void 0, u === void 0 && (u = _r(h) ? h : Zp(t[n + 1]) ? [] : {});
|
|
1135
1135
|
}
|
|
1136
1136
|
Xp(o, s, u), o = o[s];
|
|
1137
1137
|
}
|
|
@@ -1197,18 +1197,18 @@ function Lh(e) {
|
|
|
1197
1197
|
}
|
|
1198
1198
|
var Sa = Lh, Nh = V, Ge = Th, Tr = Sa, Vh = "Expected a function", kh = Math.max, Kh = Math.min;
|
|
1199
1199
|
function Uh(e, t, r) {
|
|
1200
|
-
var a, n, l, i, o, s, u = 0,
|
|
1200
|
+
var a, n, l, i, o, s, u = 0, h = !1, f = !1, c = !0;
|
|
1201
1201
|
if (typeof e != "function")
|
|
1202
1202
|
throw new TypeError(Vh);
|
|
1203
|
-
t = Tr(t) || 0, Nh(r) && (
|
|
1203
|
+
t = Tr(t) || 0, Nh(r) && (h = !!r.leading, f = "maxWait" in r, l = f ? kh(Tr(r.maxWait) || 0, t) : l, c = "trailing" in r ? !!r.trailing : c);
|
|
1204
1204
|
function b(T) {
|
|
1205
1205
|
var j = a, R = n;
|
|
1206
1206
|
return a = n = void 0, u = T, i = e.apply(R, j), i;
|
|
1207
1207
|
}
|
|
1208
|
-
function
|
|
1209
|
-
return u = T, o = setTimeout(
|
|
1208
|
+
function y(T) {
|
|
1209
|
+
return u = T, o = setTimeout(p, t), h ? b(T) : i;
|
|
1210
1210
|
}
|
|
1211
|
-
function
|
|
1211
|
+
function g(T) {
|
|
1212
1212
|
var j = T - s, R = T - u, z = t - j;
|
|
1213
1213
|
return f ? Kh(z, l - R) : z;
|
|
1214
1214
|
}
|
|
@@ -1216,30 +1216,30 @@ function Uh(e, t, r) {
|
|
|
1216
1216
|
var j = T - s, R = T - u;
|
|
1217
1217
|
return s === void 0 || j >= t || j < 0 || f && R >= l;
|
|
1218
1218
|
}
|
|
1219
|
-
function
|
|
1219
|
+
function p() {
|
|
1220
1220
|
var T = Ge();
|
|
1221
1221
|
if (v(T))
|
|
1222
|
-
return
|
|
1223
|
-
o = setTimeout(
|
|
1222
|
+
return d(T);
|
|
1223
|
+
o = setTimeout(p, g(T));
|
|
1224
1224
|
}
|
|
1225
|
-
function
|
|
1225
|
+
function d(T) {
|
|
1226
1226
|
return o = void 0, c && a ? b(T) : (a = n = void 0, i);
|
|
1227
1227
|
}
|
|
1228
1228
|
function $() {
|
|
1229
1229
|
o !== void 0 && clearTimeout(o), u = 0, a = s = n = o = void 0;
|
|
1230
1230
|
}
|
|
1231
1231
|
function C() {
|
|
1232
|
-
return o === void 0 ? i :
|
|
1232
|
+
return o === void 0 ? i : d(Ge());
|
|
1233
1233
|
}
|
|
1234
1234
|
function _() {
|
|
1235
1235
|
var T = Ge(), j = v(T);
|
|
1236
1236
|
if (a = arguments, n = this, s = T, j) {
|
|
1237
1237
|
if (o === void 0)
|
|
1238
|
-
return
|
|
1238
|
+
return y(s);
|
|
1239
1239
|
if (f)
|
|
1240
|
-
return clearTimeout(o), o = setTimeout(
|
|
1240
|
+
return clearTimeout(o), o = setTimeout(p, t), b(s);
|
|
1241
1241
|
}
|
|
1242
|
-
return o === void 0 && (o = setTimeout(
|
|
1242
|
+
return o === void 0 && (o = setTimeout(p, t)), i;
|
|
1243
1243
|
}
|
|
1244
1244
|
return _.cancel = $, _.flush = C, _;
|
|
1245
1245
|
}
|
|
@@ -1549,8 +1549,8 @@ const _y = /* @__PURE__ */ D($y), Cy = "sab-table-config-", xa = (e) => `${Cy}${
|
|
|
1549
1549
|
setup(e, { emit: t }) {
|
|
1550
1550
|
const r = e, a = t, { locale: n } = St(), l = S(() => {
|
|
1551
1551
|
const c = [], b = [];
|
|
1552
|
-
return (r.columns || []).forEach((
|
|
1553
|
-
|
|
1552
|
+
return (r.columns || []).forEach((y) => {
|
|
1553
|
+
y.field && !y.noHeaderSet ? c.push(y) : b.push(y);
|
|
1554
1554
|
}), {
|
|
1555
1555
|
sortables: c,
|
|
1556
1556
|
notSortables: b
|
|
@@ -1582,9 +1582,9 @@ const _y = /* @__PURE__ */ D($y), Cy = "sab-table-config-", xa = (e) => `${Cy}${
|
|
|
1582
1582
|
},
|
|
1583
1583
|
set: (c) => {
|
|
1584
1584
|
var b;
|
|
1585
|
-
o.value = (b = o.value) == null ? void 0 : b.map((
|
|
1585
|
+
o.value = (b = o.value) == null ? void 0 : b.map((y) => (y.visible = c, y));
|
|
1586
1586
|
}
|
|
1587
|
-
}),
|
|
1587
|
+
}), h = S(() => {
|
|
1588
1588
|
var c;
|
|
1589
1589
|
return !u.value && ((c = o.value) == null ? void 0 : c.some((b) => b.visible));
|
|
1590
1590
|
}), f = () => {
|
|
@@ -1601,14 +1601,14 @@ const _y = /* @__PURE__ */ D($y), Cy = "sab-table-config-", xa = (e) => `${Cy}${
|
|
|
1601
1601
|
default: B(() => [
|
|
1602
1602
|
m(O(xt), { class: "sab-table-set-dropdown--item" }, {
|
|
1603
1603
|
default: B(() => {
|
|
1604
|
-
var
|
|
1604
|
+
var y;
|
|
1605
1605
|
return [
|
|
1606
1606
|
m(O(Xe), {
|
|
1607
1607
|
class: "sab-table-set-dropdown--item-checkbox",
|
|
1608
|
-
indeterminate:
|
|
1608
|
+
indeterminate: h.value,
|
|
1609
1609
|
modelValue: u.value,
|
|
1610
|
-
"onUpdate:modelValue": b[0] || (b[0] = (
|
|
1611
|
-
label: (
|
|
1610
|
+
"onUpdate:modelValue": b[0] || (b[0] = (g) => u.value = g),
|
|
1611
|
+
label: (y = O(n)) == null ? void 0 : y.sabDesign.table.set.selectAll
|
|
1612
1612
|
}, null, 8, ["indeterminate", "modelValue", "label"])
|
|
1613
1613
|
];
|
|
1614
1614
|
}),
|
|
@@ -1616,21 +1616,21 @@ const _y = /* @__PURE__ */ D($y), Cy = "sab-table-config-", xa = (e) => `${Cy}${
|
|
|
1616
1616
|
}),
|
|
1617
1617
|
m(O(pn), {
|
|
1618
1618
|
modelValue: o.value,
|
|
1619
|
-
"onUpdate:modelValue": b[1] || (b[1] = (
|
|
1619
|
+
"onUpdate:modelValue": b[1] || (b[1] = (y) => o.value = y),
|
|
1620
1620
|
animation: "300",
|
|
1621
1621
|
itemKey: "field"
|
|
1622
1622
|
}, {
|
|
1623
|
-
item: B(({ element:
|
|
1623
|
+
item: B(({ element: y }) => [
|
|
1624
1624
|
U("div", null, [
|
|
1625
1625
|
m(O(xt), { class: "sab-table-set-dropdown--item" }, {
|
|
1626
1626
|
default: B(() => [
|
|
1627
1627
|
m(O(Xe), {
|
|
1628
1628
|
class: "sab-table-set-dropdown--item-checkbox",
|
|
1629
|
-
modelValue:
|
|
1630
|
-
"onUpdate:modelValue": (
|
|
1629
|
+
modelValue: y.visible,
|
|
1630
|
+
"onUpdate:modelValue": (g) => y.visible = g,
|
|
1631
1631
|
onChange: f,
|
|
1632
|
-
label:
|
|
1633
|
-
title:
|
|
1632
|
+
label: y.title,
|
|
1633
|
+
title: y.title
|
|
1634
1634
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "label", "title"]),
|
|
1635
1635
|
m(O(Je), {
|
|
1636
1636
|
class: "sab-table-set-dropdown--item-drag",
|
|
@@ -1649,12 +1649,12 @@ const _y = /* @__PURE__ */ D($y), Cy = "sab-table-config-", xa = (e) => `${Cy}${
|
|
|
1649
1649
|
})
|
|
1650
1650
|
]),
|
|
1651
1651
|
default: B(() => {
|
|
1652
|
-
var
|
|
1652
|
+
var y;
|
|
1653
1653
|
return [
|
|
1654
1654
|
U("div", null, [
|
|
1655
1655
|
m(O(sn), {
|
|
1656
1656
|
effect: "dark",
|
|
1657
|
-
content: (
|
|
1657
|
+
content: (y = O(n)) == null ? void 0 : y.sabDesign.table.set.tableConfig,
|
|
1658
1658
|
placement: "top"
|
|
1659
1659
|
}, {
|
|
1660
1660
|
default: B(() => [
|
|
@@ -1721,10 +1721,10 @@ const _y = /* @__PURE__ */ D($y), Cy = "sab-table-config-", xa = (e) => `${Cy}${
|
|
|
1721
1721
|
return M(), k(Ay, {
|
|
1722
1722
|
name: o.name,
|
|
1723
1723
|
columns: i.value,
|
|
1724
|
-
"onUpdate:columns": s[0] || (s[0] = (
|
|
1724
|
+
"onUpdate:columns": s[0] || (s[0] = (h) => i.value = h),
|
|
1725
1725
|
tableRef: o.tableRef,
|
|
1726
1726
|
initColumns: (u = n.value) == null ? void 0 : u.columns,
|
|
1727
|
-
"onUpdate:configColumns": s[1] || (s[1] = (
|
|
1727
|
+
"onUpdate:configColumns": s[1] || (s[1] = (h) => a.set({ columns: h }))
|
|
1728
1728
|
}, null, 8, ["name", "columns", "tableRef", "initColumns"]);
|
|
1729
1729
|
};
|
|
1730
1730
|
}
|
|
@@ -1916,14 +1916,14 @@ function $m(e, t, r) {
|
|
|
1916
1916
|
s = t ? [] : o;
|
|
1917
1917
|
e:
|
|
1918
1918
|
for (; ++a < l; ) {
|
|
1919
|
-
var
|
|
1920
|
-
if (
|
|
1919
|
+
var h = e[a], f = t ? t(h) : h;
|
|
1920
|
+
if (h = r || h !== 0 ? h : 0, i && f === f) {
|
|
1921
1921
|
for (var c = s.length; c--; )
|
|
1922
1922
|
if (s[c] === f)
|
|
1923
1923
|
continue e;
|
|
1924
|
-
t && s.push(f), o.push(
|
|
1924
|
+
t && s.push(f), o.push(h);
|
|
1925
1925
|
} else
|
|
1926
|
-
n(s, f, r) || (s !== o && s.push(f), o.push(
|
|
1926
|
+
n(s, f, r) || (s !== o && s.push(f), o.push(h));
|
|
1927
1927
|
}
|
|
1928
1928
|
return o;
|
|
1929
1929
|
}
|
|
@@ -2077,14 +2077,14 @@ const G = (e, t) => {
|
|
|
2077
2077
|
attrs: t,
|
|
2078
2078
|
emit: r
|
|
2079
2079
|
}) {
|
|
2080
|
-
var
|
|
2080
|
+
var g;
|
|
2081
2081
|
const {
|
|
2082
2082
|
renderOption: a,
|
|
2083
2083
|
renderOptionLabel: n,
|
|
2084
2084
|
scope: l,
|
|
2085
2085
|
...i
|
|
2086
|
-
} = t, o = F([]), s = S(() => e.options || o.value || []), u = F(""),
|
|
2087
|
-
var
|
|
2086
|
+
} = t, o = F([]), s = S(() => e.options || o.value || []), u = F(""), h = S(() => u.value && !e.remote ? s.value.filter((v) => `${v[e.labelKey]}${v[e.valueKey]}`.toLowerCase().includes(u.value.toLowerCase())) : s.value), f = (v) => {
|
|
2087
|
+
var p, d;
|
|
2088
2088
|
if (r("update:modelValue", v), Array.isArray(v)) {
|
|
2089
2089
|
const $ = v.map((C) => {
|
|
2090
2090
|
var _;
|
|
@@ -2092,25 +2092,25 @@ const G = (e, t) => {
|
|
|
2092
2092
|
});
|
|
2093
2093
|
r("update:label", $);
|
|
2094
2094
|
} else {
|
|
2095
|
-
const $ = (
|
|
2095
|
+
const $ = (p = s.value.find((C) => C[e.valueKey] === v)) == null ? void 0 : p[e.labelKey];
|
|
2096
2096
|
r("update:label", $);
|
|
2097
2097
|
}
|
|
2098
|
-
(
|
|
2098
|
+
(d = e == null ? void 0 : e.onChange) == null || d.call(e, v, {
|
|
2099
2099
|
options: s.value
|
|
2100
2100
|
});
|
|
2101
2101
|
}, c = F(!1), b = Ee(async (v) => {
|
|
2102
|
-
var
|
|
2102
|
+
var p;
|
|
2103
2103
|
try {
|
|
2104
2104
|
c.value = !0;
|
|
2105
|
-
const
|
|
2105
|
+
const d = await ((p = e.dynamicOptions) == null ? void 0 : p.call(e, {
|
|
2106
2106
|
...l,
|
|
2107
2107
|
keywords: v
|
|
2108
2108
|
}));
|
|
2109
|
-
o.value =
|
|
2109
|
+
o.value = d;
|
|
2110
2110
|
} finally {
|
|
2111
2111
|
c.value = !1;
|
|
2112
2112
|
}
|
|
2113
|
-
}, ((
|
|
2113
|
+
}, ((g = e.dynamicDebounce) == null ? void 0 : g.delay) ?? 300, {
|
|
2114
2114
|
leading: !1,
|
|
2115
2115
|
trailing: !0,
|
|
2116
2116
|
...e.dynamicDebounce
|
|
@@ -2118,7 +2118,7 @@ const G = (e, t) => {
|
|
|
2118
2118
|
jr(() => {
|
|
2119
2119
|
typeof e.dynamicOptions == "function" && b();
|
|
2120
2120
|
});
|
|
2121
|
-
const
|
|
2121
|
+
const y = () => {
|
|
2122
2122
|
e.revalidateOnFocus && b();
|
|
2123
2123
|
};
|
|
2124
2124
|
return () => m(Kr, A({
|
|
@@ -2130,25 +2130,25 @@ const G = (e, t) => {
|
|
|
2130
2130
|
filterMethod: (v) => u.value = v,
|
|
2131
2131
|
remote: e.remote,
|
|
2132
2132
|
remoteMethod: b,
|
|
2133
|
-
onFocus:
|
|
2133
|
+
onFocus: y
|
|
2134
2134
|
}, i, {
|
|
2135
2135
|
onChange: f
|
|
2136
2136
|
}), {
|
|
2137
2137
|
default: () => {
|
|
2138
2138
|
var v;
|
|
2139
|
-
return [(v =
|
|
2140
|
-
const
|
|
2139
|
+
return [(v = h.value) == null ? void 0 : v.map((p) => {
|
|
2140
|
+
const d = typeof n == "function" ? n(p) : p[e.labelKey];
|
|
2141
2141
|
return m(dn, {
|
|
2142
|
-
key:
|
|
2143
|
-
value:
|
|
2144
|
-
label:
|
|
2145
|
-
disabled:
|
|
2142
|
+
key: p[e.valueKey],
|
|
2143
|
+
value: p[e.valueKey],
|
|
2144
|
+
label: d,
|
|
2145
|
+
disabled: p[e.disabledKey]
|
|
2146
2146
|
}, {
|
|
2147
|
-
default: () => [typeof a == "function" ? a(
|
|
2147
|
+
default: () => [typeof a == "function" ? a(p) : m("span", {
|
|
2148
2148
|
style: {
|
|
2149
2149
|
fontWeight: "normal"
|
|
2150
2150
|
}
|
|
2151
|
-
}, [
|
|
2151
|
+
}, [p[e.labelKey]])]
|
|
2152
2152
|
});
|
|
2153
2153
|
})];
|
|
2154
2154
|
}
|
|
@@ -2366,9 +2366,9 @@ const G = (e, t) => {
|
|
|
2366
2366
|
xTable: a,
|
|
2367
2367
|
data: n
|
|
2368
2368
|
} = e, l = t.field, i = S(() => {
|
|
2369
|
-
var u,
|
|
2370
|
-
if ((u = t.headerFilterConfig) != null && u.enable && ((
|
|
2371
|
-
return Fa(n, l).sort((c, b) => c[l] < b[l] ? 1 : -1).map((c) => ({
|
|
2369
|
+
var u, h, f;
|
|
2370
|
+
if ((u = t.headerFilterConfig) != null && u.enable && ((h = t.headerFilterConfig) != null && h.autoCollect))
|
|
2371
|
+
return Fa(n.value, l).sort((c, b) => c[l] < b[l] ? 1 : -1).map((c) => ({
|
|
2372
2372
|
label: c[l],
|
|
2373
2373
|
value: c[l]
|
|
2374
2374
|
}));
|
|
@@ -2378,42 +2378,42 @@ const G = (e, t) => {
|
|
|
2378
2378
|
}];
|
|
2379
2379
|
}), o = ({
|
|
2380
2380
|
option: u,
|
|
2381
|
-
row:
|
|
2381
|
+
row: h,
|
|
2382
2382
|
...f
|
|
2383
2383
|
}) => {
|
|
2384
|
-
var
|
|
2384
|
+
var y, g, v;
|
|
2385
2385
|
if (typeof t.filterMethod == "function")
|
|
2386
2386
|
return t.filterMethod({
|
|
2387
2387
|
option: u,
|
|
2388
|
-
row:
|
|
2388
|
+
row: h,
|
|
2389
2389
|
...f
|
|
2390
2390
|
});
|
|
2391
|
-
if (typeof ((
|
|
2391
|
+
if (typeof ((y = t.headerFilterConfig) == null ? void 0 : y.filterMethod) == "function")
|
|
2392
2392
|
return t.headerFilterConfig.filterMethod({
|
|
2393
2393
|
option: u,
|
|
2394
|
-
row:
|
|
2394
|
+
row: h,
|
|
2395
2395
|
...f
|
|
2396
2396
|
});
|
|
2397
2397
|
const c = S(() => {
|
|
2398
|
-
var
|
|
2399
|
-
return (
|
|
2398
|
+
var p, d, $, C;
|
|
2399
|
+
return (p = t == null ? void 0 : t.headerFilterConfig) != null && p.extendFromColumnEditor ? P(
|
|
2400
2400
|
// @ts-ignore
|
|
2401
|
-
t.editorProps || ((
|
|
2401
|
+
t.editorProps || ((d = t.editRender) == null ? void 0 : d.editorProps) || {},
|
|
2402
2402
|
(($ = t.headerFilterConfig) == null ? void 0 : $.editorProps) || {}
|
|
2403
2403
|
) : (C = t == null ? void 0 : t.headerFilterConfig) == null ? void 0 : C.editorProps;
|
|
2404
2404
|
}), b = u.data ?? u.value;
|
|
2405
2405
|
if (typeof b < "u" && t.field) {
|
|
2406
|
-
let
|
|
2406
|
+
let p = ((v = h[((g = c.value) == null ? void 0 : g.effectValueField) || t.field]) == null ? void 0 : v.toString().toLowerCase()) || "";
|
|
2407
2407
|
if (Array.isArray(b)) {
|
|
2408
|
-
for (let
|
|
2409
|
-
if (
|
|
2408
|
+
for (let d of b)
|
|
2409
|
+
if (p.includes(d == null ? void 0 : d.toString().toLowerCase()))
|
|
2410
2410
|
return !0;
|
|
2411
2411
|
if (b.length === 2) {
|
|
2412
|
-
let [
|
|
2413
|
-
return t.sabCellType === w.DatePciker && (
|
|
2412
|
+
let [d, $] = b;
|
|
2413
|
+
return t.sabCellType === w.DatePciker && (d = new Date(d), $ = new Date($), p = new Date(p)), p >= d && p <= $;
|
|
2414
2414
|
}
|
|
2415
2415
|
}
|
|
2416
|
-
return
|
|
2416
|
+
return p.includes(b == null ? void 0 : b.toString().toLowerCase());
|
|
2417
2417
|
}
|
|
2418
2418
|
return !0;
|
|
2419
2419
|
};
|
|
@@ -2421,12 +2421,12 @@ const G = (e, t) => {
|
|
|
2421
2421
|
var f, c, b;
|
|
2422
2422
|
if (!((f = t.headerFilterConfig) != null && f.enable))
|
|
2423
2423
|
return;
|
|
2424
|
-
const
|
|
2425
|
-
if (
|
|
2426
|
-
const
|
|
2427
|
-
if (
|
|
2428
|
-
const
|
|
2429
|
-
|
|
2424
|
+
const h = a.value;
|
|
2425
|
+
if (h) {
|
|
2426
|
+
const y = h.getColumnByField(t.field);
|
|
2427
|
+
if (y) {
|
|
2428
|
+
const g = y.filters[0];
|
|
2429
|
+
g.data = u, u === "" || u === null || typeof u > "u" || Array.isArray(u) && u.length === 0 ? g.checked = !1 : g.checked = !0, h.updateData();
|
|
2430
2430
|
const v = (c = a.value) == null ? void 0 : c.getCheckedFilters();
|
|
2431
2431
|
(b = e.onFilter) == null || b.call(e, {
|
|
2432
2432
|
$table: a.value,
|
|
@@ -2462,43 +2462,43 @@ const G = (e, t) => {
|
|
|
2462
2462
|
headerFilterModel: o,
|
|
2463
2463
|
...s
|
|
2464
2464
|
} = t, u = S(() => {
|
|
2465
|
-
const
|
|
2466
|
-
return Object.keys(n || {}).forEach((
|
|
2467
|
-
|
|
2468
|
-
}),
|
|
2469
|
-
}),
|
|
2470
|
-
filters:
|
|
2471
|
-
filterMethod:
|
|
2465
|
+
const v = {};
|
|
2466
|
+
return Object.keys(n || {}).forEach((p) => {
|
|
2467
|
+
v[p] = (d) => typeof n[p] == "string" ? r[n[p]](d) : typeof n[p] == "function" ? n[p](d, l) : null;
|
|
2468
|
+
}), v;
|
|
2469
|
+
}), h = S(() => e.xTable), f = S(() => e.data), {
|
|
2470
|
+
filters: c,
|
|
2471
|
+
filterMethod: b
|
|
2472
2472
|
} = Im({
|
|
2473
|
-
data:
|
|
2473
|
+
data: f,
|
|
2474
2474
|
column: s,
|
|
2475
2475
|
headerFilterModel: o,
|
|
2476
|
-
xTable:
|
|
2477
|
-
onFilter: (
|
|
2478
|
-
}),
|
|
2479
|
-
var
|
|
2476
|
+
xTable: h,
|
|
2477
|
+
onFilter: (v) => a("filter-change", v)
|
|
2478
|
+
}), y = S(() => {
|
|
2479
|
+
var v, p;
|
|
2480
2480
|
return Ma(s.headerClassName, {
|
|
2481
|
-
"sab-table-header-filter-column": ((
|
|
2481
|
+
"sab-table-header-filter-column": ((v = s.headerFilterConfig) == null ? void 0 : v.enable) && !((p = s.headerFilterConfig) != null && p.autoCollect)
|
|
2482
2482
|
});
|
|
2483
|
-
}),
|
|
2484
|
-
var
|
|
2485
|
-
return ((
|
|
2483
|
+
}), g = S(() => {
|
|
2484
|
+
var v, p;
|
|
2485
|
+
return ((v = s.headerFilterConfig) == null ? void 0 : v.enable) && !((p = s.headerFilterConfig) != null && p.autoCollect) && s.type != "checkbox" && s.type != "radio" && s.type != "seq";
|
|
2486
2486
|
});
|
|
2487
2487
|
return () => m(Ja, A(s, {
|
|
2488
|
-
filters:
|
|
2489
|
-
headerClassName:
|
|
2490
|
-
filterMethod:
|
|
2488
|
+
filters: c.value,
|
|
2489
|
+
headerClassName: y.value,
|
|
2490
|
+
filterMethod: b
|
|
2491
2491
|
}), {
|
|
2492
2492
|
...u.value,
|
|
2493
|
-
header:
|
|
2493
|
+
header: g.value ? (v) => m(Om, {
|
|
2494
2494
|
column: t,
|
|
2495
2495
|
headerFilterModel: o
|
|
2496
2496
|
}, {
|
|
2497
2497
|
default: () => {
|
|
2498
|
-
var
|
|
2498
|
+
var p, d;
|
|
2499
2499
|
return (
|
|
2500
2500
|
// @ts-ignore
|
|
2501
|
-
((
|
|
2501
|
+
((d = (p = u.value).header) == null ? void 0 : d.call(p, v)) ?? i
|
|
2502
2502
|
);
|
|
2503
2503
|
}
|
|
2504
2504
|
}) : void 0
|
|
@@ -2766,7 +2766,7 @@ const G = (e, t) => {
|
|
|
2766
2766
|
}
|
|
2767
2767
|
};
|
|
2768
2768
|
}, {
|
|
2769
|
-
showDialog:
|
|
2769
|
+
showDialog: h,
|
|
2770
2770
|
onCloseDialog: f,
|
|
2771
2771
|
onShowDialog: c
|
|
2772
2772
|
} = u();
|
|
@@ -2795,10 +2795,10 @@ const G = (e, t) => {
|
|
|
2795
2795
|
class: "sab-cell-popover-inner-btn",
|
|
2796
2796
|
size: "small",
|
|
2797
2797
|
icon: m(t1, null, null)
|
|
2798
|
-
}, null)]), i.value ?
|
|
2798
|
+
}, null)]), i.value ? h.value && m(gn, A({
|
|
2799
2799
|
ref: s,
|
|
2800
2800
|
modelValue: o.value,
|
|
2801
|
-
"onUpdate:modelValue": (
|
|
2801
|
+
"onUpdate:modelValue": (y) => o.value = y,
|
|
2802
2802
|
"destroy-on-close": !0,
|
|
2803
2803
|
draggable: !0,
|
|
2804
2804
|
"append-to-body": !0,
|
|
@@ -2809,8 +2809,8 @@ const G = (e, t) => {
|
|
|
2809
2809
|
modalClass: Ma(["sab-cell-popover-dialog", n.modalClass])
|
|
2810
2810
|
}), {
|
|
2811
2811
|
default: () => {
|
|
2812
|
-
var
|
|
2813
|
-
return [(
|
|
2812
|
+
var y;
|
|
2813
|
+
return [(y = t.popover) == null ? void 0 : y.call(t, a)];
|
|
2814
2814
|
}
|
|
2815
2815
|
}) : m(Ur, A({
|
|
2816
2816
|
ref: s,
|
|
@@ -2821,8 +2821,8 @@ const G = (e, t) => {
|
|
|
2821
2821
|
transition: "el-zoom-in-top"
|
|
2822
2822
|
}, n), {
|
|
2823
2823
|
default: () => {
|
|
2824
|
-
var
|
|
2825
|
-
return [(
|
|
2824
|
+
var y;
|
|
2825
|
+
return [(y = t.popover) == null ? void 0 : y.call(t, a)];
|
|
2826
2826
|
}
|
|
2827
2827
|
})]);
|
|
2828
2828
|
};
|
|
@@ -2873,11 +2873,11 @@ const G = (e, t) => {
|
|
|
2873
2873
|
return typeof s == "function" ? s(e, o) : e.row[e.column.field];
|
|
2874
2874
|
},
|
|
2875
2875
|
edit: (e, t) => {
|
|
2876
|
-
var
|
|
2876
|
+
var h, f;
|
|
2877
2877
|
const r = G(e, t), {
|
|
2878
2878
|
getSabCellType: a,
|
|
2879
2879
|
getEditorProps: n
|
|
2880
|
-
} = r || {}, l = a == null ? void 0 : a(e), i = Er(l), o = n == null ? void 0 : n(e), s = (
|
|
2880
|
+
} = r || {}, l = a == null ? void 0 : a(e), i = Er(l), o = n == null ? void 0 : n(e), s = (h = i == null ? void 0 : i.slots) == null ? void 0 : h.edit;
|
|
2881
2881
|
if (typeof s == "function")
|
|
2882
2882
|
return s(e, o);
|
|
2883
2883
|
const u = (f = i == null ? void 0 : i.slots) == null ? void 0 : f.default;
|
|
@@ -2979,11 +2979,11 @@ const Wa = [
|
|
|
2979
2979
|
"custom"
|
|
2980
2980
|
], Hm = (e) => {
|
|
2981
2981
|
const { checkboxRecords: t, emit: r, xTable: a, tableConfig: n } = e, l = (f = []) => {
|
|
2982
|
-
var
|
|
2983
|
-
const c = ((
|
|
2984
|
-
return
|
|
2982
|
+
var g, v, p, d;
|
|
2983
|
+
const c = ((g = a.value) == null ? void 0 : g.getCheckboxRecords()) || [], b = ((v = a.value) == null ? void 0 : v.getCheckboxRecords(!0)) || [], y = ((p = n.value.rowConfig) == null ? void 0 : p.keyField) || ((d = n.value.rowConfig) != null && d.useKey ? "_X_ROW_KEY" : void 0);
|
|
2984
|
+
return y ? Fa(
|
|
2985
2985
|
[...f, ...c, ...b],
|
|
2986
|
-
|
|
2986
|
+
y
|
|
2987
2987
|
) : c;
|
|
2988
2988
|
}, i = (f) => {
|
|
2989
2989
|
const c = l(f.records);
|
|
@@ -2996,17 +2996,17 @@ const Wa = [
|
|
|
2996
2996
|
t.value = c || [], r("checkbox-range-end", { ...f, records: c });
|
|
2997
2997
|
}, u = {
|
|
2998
2998
|
"cell-click": async (f) => {
|
|
2999
|
-
var
|
|
3000
|
-
const { row: c, column: b } = f,
|
|
2999
|
+
var g, v, p, d, $, C;
|
|
3000
|
+
const { row: c, column: b } = f, y = (g = a.value) == null ? void 0 : g.isCheckedByCheckboxRow(c);
|
|
3001
3001
|
if (ce.has(Te.Shift) && b.field == "sab-table-seq") {
|
|
3002
3002
|
i(f);
|
|
3003
3003
|
return;
|
|
3004
3004
|
}
|
|
3005
3005
|
if ((ce.has(Te.Control) || ce.has(Te.Meta)) && b.field == "sab-table-seq") {
|
|
3006
|
-
|
|
3006
|
+
y || await ((v = a.value) == null ? void 0 : v.setCheckboxRow(c, !1)), s(f);
|
|
3007
3007
|
return;
|
|
3008
3008
|
}
|
|
3009
|
-
b.field === "sab-table-seq" && ((
|
|
3009
|
+
b.field === "sab-table-seq" && ((p = n.value.seqConfig) != null && p.clearOtherSelectedWhenClick && await ((d = a.value) == null ? void 0 : d.clearCheckboxRow()), await (($ = a.value) == null ? void 0 : $.setCheckboxRow(c, !0)), (C = a.value) == null || C.setCurrentRow(c), i(f)), r("cell-click", f);
|
|
3010
3010
|
},
|
|
3011
3011
|
"checkbox-change": async (f) => {
|
|
3012
3012
|
f.column.field === "sab-table-seq" || i(f);
|
|
@@ -3017,11 +3017,11 @@ const Wa = [
|
|
|
3017
3017
|
"checkbox-all": (f) => {
|
|
3018
3018
|
o(f);
|
|
3019
3019
|
}
|
|
3020
|
-
},
|
|
3021
|
-
return Wa.map((f) => (
|
|
3020
|
+
}, h = {};
|
|
3021
|
+
return Wa.map((f) => (h[f] = (...c) => {
|
|
3022
3022
|
typeof u[f] == "function" ? u[f](...c) : r(f, ...c);
|
|
3023
3023
|
}, f)), {
|
|
3024
|
-
onEvents:
|
|
3024
|
+
onEvents: h
|
|
3025
3025
|
};
|
|
3026
3026
|
};
|
|
3027
3027
|
function At(e, t) {
|
|
@@ -3089,12 +3089,12 @@ const Xm = (e) => {
|
|
|
3089
3089
|
);
|
|
3090
3090
|
return ({ columns: a, data: n }) => [
|
|
3091
3091
|
a.map((l, i) => {
|
|
3092
|
-
var o, s, u,
|
|
3092
|
+
var o, s, u, h, f, c;
|
|
3093
3093
|
return i === 0 && (!l.field || l.type) ? (
|
|
3094
3094
|
// @ts-ignore
|
|
3095
|
-
((u = (s = (o = t.value) == null ? void 0 : o.sabDesign) == null ? void 0 : s.table) == null ? void 0 : u.total) || ((f = (
|
|
3095
|
+
((u = (s = (o = t.value) == null ? void 0 : o.sabDesign) == null ? void 0 : s.table) == null ? void 0 : u.total) || ((f = (h = t == null ? void 0 : t.sabDesign) == null ? void 0 : h.table) == null ? void 0 : f.total)
|
|
3096
3096
|
) : (c = r[l.field]) != null && c.withSummary ? n.reduce(
|
|
3097
|
-
(b,
|
|
3097
|
+
(b, y) => Ym.plus(b, y[l.field] || 0),
|
|
3098
3098
|
0
|
|
3099
3099
|
) : null;
|
|
3100
3100
|
})
|
|
@@ -3209,22 +3209,22 @@ const Xm = (e) => {
|
|
|
3209
3209
|
],
|
|
3210
3210
|
setup(e, { expose: t, emit: r }) {
|
|
3211
3211
|
const a = e, n = F(), { locale: l } = St(), i = S(() => {
|
|
3212
|
-
const
|
|
3212
|
+
const g = Em(
|
|
3213
3213
|
{
|
|
3214
3214
|
keyboardConfig: {
|
|
3215
|
-
editMethod({ row: v, column:
|
|
3216
|
-
return n.value.setEditCell(v,
|
|
3215
|
+
editMethod({ row: v, column: p }) {
|
|
3216
|
+
return n.value.setEditCell(v, p), !0;
|
|
3217
3217
|
}
|
|
3218
3218
|
}
|
|
3219
3219
|
},
|
|
3220
3220
|
at(a, "data")
|
|
3221
3221
|
);
|
|
3222
|
-
return
|
|
3222
|
+
return g.columns = Km(g.columns || [], g), g;
|
|
3223
3223
|
}), o = S(() => {
|
|
3224
|
-
var
|
|
3224
|
+
var g;
|
|
3225
3225
|
return rl(
|
|
3226
|
-
(
|
|
3227
|
-
(
|
|
3226
|
+
(g = i.value.columns) == null ? void 0 : g.map((v) => v.slots ? Object.values(v.slots).filter(
|
|
3227
|
+
(p) => typeof p == "string"
|
|
3228
3228
|
) : [])
|
|
3229
3229
|
);
|
|
3230
3230
|
}), s = r, u = S({
|
|
@@ -3232,9 +3232,9 @@ const Xm = (e) => {
|
|
|
3232
3232
|
return a.checkboxRecords || [];
|
|
3233
3233
|
},
|
|
3234
3234
|
set: Yh(
|
|
3235
|
-
function(
|
|
3235
|
+
function(g) {
|
|
3236
3236
|
var v;
|
|
3237
|
-
s("update:checkboxRecords",
|
|
3237
|
+
s("update:checkboxRecords", g), (v = n.value) == null || v.setCheckboxRow(g, !0);
|
|
3238
3238
|
},
|
|
3239
3239
|
300,
|
|
3240
3240
|
{
|
|
@@ -3245,12 +3245,12 @@ const Xm = (e) => {
|
|
|
3245
3245
|
});
|
|
3246
3246
|
de(
|
|
3247
3247
|
() => a.checkboxRecords,
|
|
3248
|
-
(
|
|
3248
|
+
(g) => {
|
|
3249
3249
|
var v;
|
|
3250
|
-
Array.isArray(
|
|
3250
|
+
Array.isArray(g) && ((v = n.value) == null || v.setCheckboxRow(g, !0));
|
|
3251
3251
|
}
|
|
3252
3252
|
);
|
|
3253
|
-
const { onEvents:
|
|
3253
|
+
const { onEvents: h } = Hm({
|
|
3254
3254
|
checkboxRecords: u,
|
|
3255
3255
|
emit: s,
|
|
3256
3256
|
xTable: n,
|
|
@@ -3262,34 +3262,34 @@ const Xm = (e) => {
|
|
|
3262
3262
|
const c = F(!0);
|
|
3263
3263
|
de(
|
|
3264
3264
|
() => {
|
|
3265
|
-
var
|
|
3266
|
-
return (
|
|
3265
|
+
var g;
|
|
3266
|
+
return (g = i.value.columns) == null ? void 0 : g.filter((v) => v.visible != !1).map((v) => v.field).join(",");
|
|
3267
3267
|
},
|
|
3268
3268
|
() => {
|
|
3269
|
-
var
|
|
3270
|
-
(
|
|
3269
|
+
var g, v;
|
|
3270
|
+
(g = a.headerFilterConfig) != null && g.enable ? (c.value = !1, Dr(() => {
|
|
3271
3271
|
c.value = !0;
|
|
3272
3272
|
})) : (v = n.value) == null || v.reloadColumn(i.value.columns), u.value = [], s("checkbox-all", { checked: !1, records: [] });
|
|
3273
3273
|
}
|
|
3274
3274
|
);
|
|
3275
|
-
const b = S(() => a.showToolbar || !!a.tableSetConfig),
|
|
3275
|
+
const b = S(() => a.showToolbar || !!a.tableSetConfig), y = F(a.headerFilterModel || {});
|
|
3276
3276
|
return t({
|
|
3277
3277
|
getInstance: () => n.value,
|
|
3278
3278
|
// 重新加载当前行数据,刷新状态
|
|
3279
|
-
reloadRow: (
|
|
3279
|
+
reloadRow: (g) => {
|
|
3280
3280
|
var v;
|
|
3281
|
-
Array.isArray(
|
|
3282
|
-
var
|
|
3283
|
-
return await ((
|
|
3284
|
-
}) : (v = n.value) == null || v.reloadRow(
|
|
3281
|
+
Array.isArray(g) ? g.forEach(async (p) => {
|
|
3282
|
+
var d;
|
|
3283
|
+
return await ((d = n.value) == null ? void 0 : d.reloadRow(p));
|
|
3284
|
+
}) : (v = n.value) == null || v.reloadRow(g);
|
|
3285
3285
|
},
|
|
3286
3286
|
// 获取表头筛选数据
|
|
3287
3287
|
getCheckedFilters() {
|
|
3288
|
-
var
|
|
3289
|
-
return (
|
|
3288
|
+
var g;
|
|
3289
|
+
return (g = n.value) == null ? void 0 : g.getCheckedFilters();
|
|
3290
3290
|
}
|
|
3291
|
-
}), (
|
|
3292
|
-
var
|
|
3291
|
+
}), (g, v) => {
|
|
3292
|
+
var p, d, $;
|
|
3293
3293
|
return M(), q("div", {
|
|
3294
3294
|
class: en(["sab-table-wrap", a.wrapClassName])
|
|
3295
3295
|
}, [
|
|
@@ -3298,14 +3298,14 @@ const Xm = (e) => {
|
|
|
3298
3298
|
"table-ref": n.value,
|
|
3299
3299
|
columns: a.columns,
|
|
3300
3300
|
name: a.name,
|
|
3301
|
-
tableSetConfig:
|
|
3301
|
+
tableSetConfig: g.tableSetConfig,
|
|
3302
3302
|
"onUpdate:columns": v[0] || (v[0] = (C) => s("update:columns", C))
|
|
3303
3303
|
}, {
|
|
3304
3304
|
"toolbar-right": B(() => [
|
|
3305
|
-
K(
|
|
3305
|
+
K(g.$slots, "toolbar-right")
|
|
3306
3306
|
]),
|
|
3307
3307
|
default: B(() => [
|
|
3308
|
-
K(
|
|
3308
|
+
K(g.$slots, "toolbar")
|
|
3309
3309
|
]),
|
|
3310
3310
|
_: 3
|
|
3311
3311
|
}, 8, ["table-ref", "columns", "name", "tableSetConfig"])) : Se("", !0),
|
|
@@ -3316,10 +3316,10 @@ const Xm = (e) => {
|
|
|
3316
3316
|
ref: n,
|
|
3317
3317
|
data: a.data,
|
|
3318
3318
|
footerMethod: O(Xm)(i.value.columns || [])
|
|
3319
|
-
}, f.value, tn(O(
|
|
3320
|
-
"empty-text": (
|
|
3319
|
+
}, f.value, tn(O(h)), {
|
|
3320
|
+
"empty-text": (p = O(l)) == null ? void 0 : p.sabDesign.table.emptyText,
|
|
3321
3321
|
"loading-config": {
|
|
3322
|
-
text: (
|
|
3322
|
+
text: (d = O(l)) == null ? void 0 : d.sabDesign.table.loadingText
|
|
3323
3323
|
},
|
|
3324
3324
|
class: [
|
|
3325
3325
|
"sab-table",
|
|
@@ -3328,25 +3328,25 @@ const Xm = (e) => {
|
|
|
3328
3328
|
// 无需背景高亮
|
|
3329
3329
|
"sab-table-row-no-bg-highlight": i.value.rowBackgroundHighlight === !1,
|
|
3330
3330
|
// 有头部筛选条
|
|
3331
|
-
"sab-table-header-filters": (($ =
|
|
3331
|
+
"sab-table-header-filters": (($ = g.headerFilterConfig) == null ? void 0 : $.enable) != !1
|
|
3332
3332
|
}
|
|
3333
3333
|
]
|
|
3334
3334
|
}), {
|
|
3335
3335
|
default: B(() => [
|
|
3336
3336
|
(M(!0), q(Nr, null, Ye(i.value.columns, (C) => (M(), k(O(xm), A({
|
|
3337
|
-
data:
|
|
3337
|
+
data: g.data,
|
|
3338
3338
|
key: C.field
|
|
3339
3339
|
}, C, {
|
|
3340
3340
|
xTable: n.value,
|
|
3341
3341
|
visible: C.visible != !1,
|
|
3342
|
-
headerFilterModel:
|
|
3343
|
-
"onUpdate:headerFilterModel": v[1] || (v[1] = (_) =>
|
|
3344
|
-
onFilterChange: O(
|
|
3342
|
+
headerFilterModel: y.value,
|
|
3343
|
+
"onUpdate:headerFilterModel": v[1] || (v[1] = (_) => y.value = _),
|
|
3344
|
+
onFilterChange: O(h)["filter-change"]
|
|
3345
3345
|
}), rn({ _: 2 }, [
|
|
3346
3346
|
Ye(o.value, (_) => ({
|
|
3347
3347
|
name: _,
|
|
3348
3348
|
fn: B((T) => [
|
|
3349
|
-
K(
|
|
3349
|
+
K(g.$slots, _, Vr(kr(T)))
|
|
3350
3350
|
])
|
|
3351
3351
|
}))
|
|
3352
3352
|
]), 1040, ["data", "xTable", "visible", "headerFilterModel", "onFilterChange"]))), 128))
|
|
@@ -3354,7 +3354,7 @@ const Xm = (e) => {
|
|
|
3354
3354
|
_: 3
|
|
3355
3355
|
}, 16, ["data", "footerMethod", "empty-text", "loading-config", "class"])) : Se("", !0)
|
|
3356
3356
|
]),
|
|
3357
|
-
K(
|
|
3357
|
+
K(g.$slots, "table-footer")
|
|
3358
3358
|
], 2);
|
|
3359
3359
|
};
|
|
3360
3360
|
}
|
|
@@ -3385,9 +3385,9 @@ const Pr = /* @__PURE__ */ E({
|
|
|
3385
3385
|
emits: ["update:modelValue", "focus", "blur"],
|
|
3386
3386
|
setup(e, { emit: t }) {
|
|
3387
3387
|
const r = t, a = e, n = {
|
|
3388
|
-
mounted(
|
|
3388
|
+
mounted(d, $) {
|
|
3389
3389
|
var T;
|
|
3390
|
-
const C =
|
|
3390
|
+
const C = d.querySelector(".el-tooltip__trigger"), _ = () => {
|
|
3391
3391
|
requestAnimationFrame(() => {
|
|
3392
3392
|
var R, z;
|
|
3393
3393
|
const j = C.getAttribute("aria-describedby");
|
|
@@ -3421,20 +3421,20 @@ const Pr = /* @__PURE__ */ E({
|
|
|
3421
3421
|
},
|
|
3422
3422
|
a.pagination
|
|
3423
3423
|
)
|
|
3424
|
-
), o = F(!1), s = F(""), u = F(!1),
|
|
3424
|
+
), o = F(!1), s = F(""), u = F(!1), h = async (d = "", $ = 1) => {
|
|
3425
3425
|
var C;
|
|
3426
|
-
if (a.remoteMethod && (s.value =
|
|
3426
|
+
if (a.remoteMethod && (s.value = d, !($ != 1 && u.value))) {
|
|
3427
3427
|
i.current = $;
|
|
3428
3428
|
try {
|
|
3429
3429
|
o.value = !0;
|
|
3430
|
-
const _ = await ((C = a.remoteMethod) == null ? void 0 : C.call(a,
|
|
3430
|
+
const _ = await ((C = a.remoteMethod) == null ? void 0 : C.call(a, d, i));
|
|
3431
3431
|
Array.isArray(_) || !_ ? (i.current === 1 ? l.value = _ || [] : l.value.push(..._ || []), u.value = (_ == null ? void 0 : _.length) < i.size) : (i.current === 1 ? l.value = _.records || [] : l.value.push(..._.records || []), i.pages = Math.max(1, _.pages || 0), u.value = i.current >= i.pages);
|
|
3432
3432
|
} finally {
|
|
3433
3433
|
o.value = !1;
|
|
3434
3434
|
}
|
|
3435
3435
|
}
|
|
3436
3436
|
}, f = Ee(
|
|
3437
|
-
(
|
|
3437
|
+
(d) => h(d, 1),
|
|
3438
3438
|
500,
|
|
3439
3439
|
{
|
|
3440
3440
|
leading: !1,
|
|
@@ -3443,7 +3443,7 @@ const Pr = /* @__PURE__ */ E({
|
|
|
3443
3443
|
), c = Ee(
|
|
3444
3444
|
() => {
|
|
3445
3445
|
if (a.enableLoadmore)
|
|
3446
|
-
return i.current++,
|
|
3446
|
+
return i.current++, h(s.value, i.current);
|
|
3447
3447
|
},
|
|
3448
3448
|
500,
|
|
3449
3449
|
{
|
|
@@ -3454,41 +3454,41 @@ const Pr = /* @__PURE__ */ E({
|
|
|
3454
3454
|
jr(() => {
|
|
3455
3455
|
f();
|
|
3456
3456
|
});
|
|
3457
|
-
const b = (
|
|
3458
|
-
r("focus",
|
|
3459
|
-
},
|
|
3460
|
-
r("blur",
|
|
3461
|
-
},
|
|
3457
|
+
const b = (d) => {
|
|
3458
|
+
r("focus", d), a.revalidateWhenFocus && h();
|
|
3459
|
+
}, y = (d) => {
|
|
3460
|
+
r("blur", d);
|
|
3461
|
+
}, g = S({
|
|
3462
3462
|
get() {
|
|
3463
|
-
var
|
|
3464
|
-
return a.labelInValue ? Array.isArray(a.modelValue) ? a.modelValue.map(($) => $[a.valueKey]) : (
|
|
3463
|
+
var d;
|
|
3464
|
+
return a.labelInValue ? Array.isArray(a.modelValue) ? a.modelValue.map(($) => $[a.valueKey]) : (d = a.modelValue) == null ? void 0 : d[a.valueKey] : a.modelValue;
|
|
3465
3465
|
},
|
|
3466
|
-
set(
|
|
3466
|
+
set(d) {
|
|
3467
3467
|
if (a.labelInValue)
|
|
3468
|
-
if (Array.isArray(
|
|
3468
|
+
if (Array.isArray(d)) {
|
|
3469
3469
|
const $ = l.value.filter(
|
|
3470
|
-
(C) =>
|
|
3470
|
+
(C) => d.includes(C[a.valueKey])
|
|
3471
3471
|
);
|
|
3472
3472
|
r("update:modelValue", $);
|
|
3473
3473
|
} else {
|
|
3474
3474
|
const $ = l.value.find(
|
|
3475
|
-
(C) =>
|
|
3475
|
+
(C) => d === C[a.valueKey]
|
|
3476
3476
|
);
|
|
3477
3477
|
r("update:modelValue", $);
|
|
3478
3478
|
}
|
|
3479
3479
|
else
|
|
3480
|
-
r("update:modelValue",
|
|
3480
|
+
r("update:modelValue", d);
|
|
3481
3481
|
}
|
|
3482
3482
|
}), v = Br(() => {
|
|
3483
|
-
var
|
|
3483
|
+
var d, $, C;
|
|
3484
3484
|
if (a.autoSelectFirstOption) {
|
|
3485
|
-
if (l.value.length && (
|
|
3486
|
-
let _ = a.labelInValue ? (
|
|
3487
|
-
a.multiple && typeof _ < "u" ?
|
|
3485
|
+
if (l.value.length && (g.value === null || g.value === void 0)) {
|
|
3486
|
+
let _ = a.labelInValue ? (d = l.value) == null ? void 0 : d[0] : (C = ($ = l.value) == null ? void 0 : $[0]) == null ? void 0 : C[a.valueKey];
|
|
3487
|
+
a.multiple && typeof _ < "u" ? g.value = [_] : g.value = _, setTimeout(() => v());
|
|
3488
3488
|
}
|
|
3489
3489
|
} else
|
|
3490
3490
|
setTimeout(() => v());
|
|
3491
|
-
}),
|
|
3491
|
+
}), p = at(
|
|
3492
3492
|
a,
|
|
3493
3493
|
"modelValue",
|
|
3494
3494
|
"options",
|
|
@@ -3496,41 +3496,41 @@ const Pr = /* @__PURE__ */ E({
|
|
|
3496
3496
|
"labelKey",
|
|
3497
3497
|
"valueKey"
|
|
3498
3498
|
);
|
|
3499
|
-
return (
|
|
3499
|
+
return (d, $) => {
|
|
3500
3500
|
const C = nn("el-option");
|
|
3501
|
-
return
|
|
3501
|
+
return d.enableLoadmore || d.selectType === "v1" ? It((M(), k(O(Kr), A({
|
|
3502
3502
|
key: 0,
|
|
3503
|
-
modelValue:
|
|
3504
|
-
"onUpdate:modelValue": $[0] || ($[0] = (_) =>
|
|
3503
|
+
modelValue: g.value,
|
|
3504
|
+
"onUpdate:modelValue": $[0] || ($[0] = (_) => g.value = _),
|
|
3505
3505
|
onFocus: b,
|
|
3506
|
-
onBlur:
|
|
3506
|
+
onBlur: y
|
|
3507
3507
|
}, {
|
|
3508
|
-
...O(
|
|
3509
|
-
...
|
|
3508
|
+
...O(p),
|
|
3509
|
+
...d.$attrs
|
|
3510
3510
|
}), {
|
|
3511
3511
|
default: B(() => {
|
|
3512
3512
|
var _, T, j;
|
|
3513
3513
|
return [
|
|
3514
|
-
|
|
3514
|
+
d.labelInValue && ((_ = d.modelValue) != null && _[d.labelKey]) && !l.value.find((R) => {
|
|
3515
3515
|
var z;
|
|
3516
|
-
return R[
|
|
3516
|
+
return R[d.valueKey] === ((z = d.modelValue) == null ? void 0 : z[d.valueKey]);
|
|
3517
3517
|
}) ? (M(), k(C, {
|
|
3518
3518
|
key: 0,
|
|
3519
|
-
label: (T =
|
|
3520
|
-
value: (j =
|
|
3519
|
+
label: (T = d.modelValue) == null ? void 0 : T[d.labelKey],
|
|
3520
|
+
value: (j = d.modelValue) == null ? void 0 : j[d.valueKey]
|
|
3521
3521
|
}, {
|
|
3522
3522
|
default: B(() => [
|
|
3523
|
-
K(
|
|
3523
|
+
K(d.$slots, "default", { item: d.modelValue })
|
|
3524
3524
|
]),
|
|
3525
3525
|
_: 3
|
|
3526
3526
|
}, 8, ["label", "value"])) : Se("", !0),
|
|
3527
3527
|
(M(!0), q(Nr, null, Ye(l.value, (R) => (M(), k(C, {
|
|
3528
|
-
key: R[
|
|
3529
|
-
label: R[
|
|
3530
|
-
value: R[
|
|
3528
|
+
key: R[d.valueKey],
|
|
3529
|
+
label: R[d.labelKey],
|
|
3530
|
+
value: R[d.valueKey]
|
|
3531
3531
|
}, {
|
|
3532
3532
|
default: B(() => [
|
|
3533
|
-
K(
|
|
3533
|
+
K(d.$slots, "default", { item: R })
|
|
3534
3534
|
]),
|
|
3535
3535
|
_: 2
|
|
3536
3536
|
}, 1032, ["label", "value"]))), 128))
|
|
@@ -3541,22 +3541,22 @@ const Pr = /* @__PURE__ */ E({
|
|
|
3541
3541
|
[n, O(c)]
|
|
3542
3542
|
]) : It((M(), k(O(bn), A({
|
|
3543
3543
|
key: 1,
|
|
3544
|
-
modelValue:
|
|
3545
|
-
"onUpdate:modelValue": $[1] || ($[1] = (_) =>
|
|
3544
|
+
modelValue: g.value,
|
|
3545
|
+
"onUpdate:modelValue": $[1] || ($[1] = (_) => g.value = _),
|
|
3546
3546
|
props: {
|
|
3547
|
-
value:
|
|
3548
|
-
label:
|
|
3549
|
-
...
|
|
3547
|
+
value: d.valueKey,
|
|
3548
|
+
label: d.labelKey,
|
|
3549
|
+
...d.$attrs.props || {}
|
|
3550
3550
|
},
|
|
3551
3551
|
options: l.value,
|
|
3552
3552
|
onFocus: b,
|
|
3553
|
-
onBlur:
|
|
3553
|
+
onBlur: y
|
|
3554
3554
|
}, {
|
|
3555
|
-
...O(
|
|
3556
|
-
...
|
|
3555
|
+
...O(p),
|
|
3556
|
+
...d.$attrs
|
|
3557
3557
|
}), {
|
|
3558
3558
|
default: B((_) => [
|
|
3559
|
-
K(
|
|
3559
|
+
K(d.$slots, "default", Vr(kr(_)))
|
|
3560
3560
|
]),
|
|
3561
3561
|
_: 3
|
|
3562
3562
|
}, 16, ["modelValue", "props", "options"])), [
|