@gx-design-vue/pro-table 0.2.0-beta.82 → 0.2.0-beta.83
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/pro-table.js +226 -226
- package/dist/pro-table.umd.cjs +1 -1
- package/package.json +1 -1
package/dist/pro-table.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { isObject as Q, isBoolean as se, getSlot as ht, isFunction as Fe, arrayRepeat as Lt, runFunction as Vt, convertValueBoolean as xe, isArray as be, getSortIndex as Ht, isDeepEqualReact as De, handleCurrentPage as Wt, genColumnKey as mt, compareArray as _t, isNumber as vt, isString as Gt, filterEmpty as gt, classNames as je, getPrefixCls as Ge, getRandomNumber as We, handleShowIndex as qt, hanndleEmptyField as Ut, getSlotVNode as Se } from "@gx-design-vue/pro-utils";
|
|
2
|
-
import { reactive as fe, isReactive as Xt, watch as W, computed as
|
|
2
|
+
import { reactive as fe, isReactive as Xt, watch as W, computed as p, ref as D, toRaw as ge, createVNode as r, mergeProps as X, isVNode as Ce, watchEffect as Ie, unref as x, onUnmounted as Jt, onDeactivated as Qt, onMounted as Zt, defineComponent as oe, Fragment as Ne, nextTick as el, h as yt, cloneVNode as qe, createTextVNode as Re, renderSlot as tl, toRef as ae } from "vue";
|
|
3
3
|
import "ant-design-vue/es/_util/props-util";
|
|
4
4
|
import { warning as ll } from "ant-design-vue/es/vc-util/warning";
|
|
5
5
|
import { omit as Ee, cloneDeep as ie, pick as ot } from "lodash-es";
|
|
@@ -12,7 +12,7 @@ import { useContext as Rl, useProStyle as ze } from "@gx-design-vue/pro-provider
|
|
|
12
12
|
import q from "dayjs";
|
|
13
13
|
import { tryOnUnmounted as Pl, useMemo as Me } from "@gx-design-vue/pro-hooks";
|
|
14
14
|
function Ia(e, a) {
|
|
15
|
-
var
|
|
15
|
+
var b, $, v;
|
|
16
16
|
function l() {
|
|
17
17
|
return a != null && a.state && Q(a == null ? void 0 : a.state) ? ge(a == null ? void 0 : a.state) : {};
|
|
18
18
|
}
|
|
@@ -26,19 +26,19 @@ function Ia(e, a) {
|
|
|
26
26
|
a != null && a.state && (Xt(a.state) ? W(() => a == null ? void 0 : a.state, () => {
|
|
27
27
|
Object.assign(u, l());
|
|
28
28
|
}, { deep: !0, immediate: !0 }) : Object.assign(u, l()));
|
|
29
|
-
const o =
|
|
29
|
+
const o = p(() => {
|
|
30
30
|
var s, n;
|
|
31
31
|
return (n = (s = e == null ? void 0 : e.value) == null ? void 0 : s.actionRef) == null ? void 0 : n.call(s);
|
|
32
|
-
}), i =
|
|
32
|
+
}), i = p(() => {
|
|
33
33
|
var s, n;
|
|
34
34
|
return (n = (s = e == null ? void 0 : e.value) == null ? void 0 : s.formRef) == null ? void 0 : n.call(s);
|
|
35
|
-
}), d =
|
|
35
|
+
}), d = p(() => {
|
|
36
36
|
var s, n, c;
|
|
37
37
|
return {
|
|
38
38
|
...((s = o.value) == null ? void 0 : s.pageState) || {},
|
|
39
39
|
...((c = (n = i.value) == null ? void 0 : n.getFormState) == null ? void 0 : c.call(n)) || {}
|
|
40
40
|
};
|
|
41
|
-
}), h = D(!!((
|
|
41
|
+
}), h = D(!!(($ = (b = o.value) == null ? void 0 : b.loading) != null && $.value));
|
|
42
42
|
return W(() => {
|
|
43
43
|
var s, n;
|
|
44
44
|
return (n = (s = o.value) == null ? void 0 : s.loading) == null ? void 0 : n.value;
|
|
@@ -53,15 +53,15 @@ function Ia(e, a) {
|
|
|
53
53
|
tableState: u,
|
|
54
54
|
requestParams: d,
|
|
55
55
|
loading: h,
|
|
56
|
-
dataSource:
|
|
56
|
+
dataSource: p(() => {
|
|
57
57
|
var s, n;
|
|
58
58
|
return ((n = (s = o == null ? void 0 : o.value) == null ? void 0 : s.dataSource) == null ? void 0 : n.value) || [];
|
|
59
59
|
}),
|
|
60
|
-
selectedKey:
|
|
60
|
+
selectedKey: p(() => {
|
|
61
61
|
var s, n;
|
|
62
62
|
return ((n = (s = o == null ? void 0 : o.value) == null ? void 0 : s.selectedKey) == null ? void 0 : n.value) || [];
|
|
63
63
|
}),
|
|
64
|
-
selectedItem:
|
|
64
|
+
selectedItem: p(() => {
|
|
65
65
|
var s, n;
|
|
66
66
|
return ((n = (s = o == null ? void 0 : o.value) == null ? void 0 : s.selectedItem) == null ? void 0 : n.value) || [];
|
|
67
67
|
}),
|
|
@@ -416,7 +416,7 @@ function jl({ emit: e, loading: a }) {
|
|
|
416
416
|
W(() => a.value, (d) => {
|
|
417
417
|
l.value = se(d) ? d : Q(d) ? d == null ? void 0 : d.spinning : l.value;
|
|
418
418
|
});
|
|
419
|
-
const u =
|
|
419
|
+
const u = p(() => l.value);
|
|
420
420
|
function o(d) {
|
|
421
421
|
l.value = d, e("loadingChange", !0);
|
|
422
422
|
}
|
|
@@ -439,7 +439,7 @@ function Nl({
|
|
|
439
439
|
}) {
|
|
440
440
|
const u = fe({}), o = D();
|
|
441
441
|
W(() => l.value, () => {
|
|
442
|
-
var
|
|
442
|
+
var $;
|
|
443
443
|
if (se(l.value) && !l.value) {
|
|
444
444
|
o.value = !1;
|
|
445
445
|
return;
|
|
@@ -454,7 +454,7 @@ function Nl({
|
|
|
454
454
|
type: s,
|
|
455
455
|
originalElement: n
|
|
456
456
|
}) : null
|
|
457
|
-
} : null,
|
|
457
|
+
} : null, b = {
|
|
458
458
|
current: 1,
|
|
459
459
|
pageSize: 10,
|
|
460
460
|
size: "default",
|
|
@@ -464,9 +464,9 @@ function Nl({
|
|
|
464
464
|
...l.value || {},
|
|
465
465
|
...h || {}
|
|
466
466
|
};
|
|
467
|
-
(
|
|
468
|
-
pageNum:
|
|
469
|
-
pageSize:
|
|
467
|
+
($ = l.value) != null && $.showTotal || (b.showTotal = (v) => `共${v < b.pageSize ? 1 : Math.ceil(v / (b.pageSize || 10))}页 ${v}条记录`), o.value = b, Object.assign(u, {
|
|
468
|
+
pageNum: b.current,
|
|
469
|
+
pageSize: b.pageSize
|
|
470
470
|
});
|
|
471
471
|
}, {
|
|
472
472
|
deep: 1,
|
|
@@ -475,8 +475,8 @@ function Nl({
|
|
|
475
475
|
function i(d) {
|
|
476
476
|
if (Q(o.value) && Q(d)) {
|
|
477
477
|
const h = {};
|
|
478
|
-
Object.keys(d).forEach((
|
|
479
|
-
Object.prototype.hasOwnProperty.call(d,
|
|
478
|
+
Object.keys(d).forEach((b) => {
|
|
479
|
+
Object.prototype.hasOwnProperty.call(d, b) && o.value[b] === d[b] || (h[b] = d[b]);
|
|
480
480
|
}), Object.keys(h).length > 0 && (Object.assign(o.value, h), El(h) && Object.assign(u, h));
|
|
481
481
|
}
|
|
482
482
|
}
|
|
@@ -534,15 +534,15 @@ function zl(e, a) {
|
|
|
534
534
|
};
|
|
535
535
|
}
|
|
536
536
|
function Kl(e, a) {
|
|
537
|
-
const l =
|
|
537
|
+
const l = p(() => a || 0), u = D(), o = D(e);
|
|
538
538
|
function i() {
|
|
539
539
|
u.value && clearTimeout(u.value);
|
|
540
540
|
}
|
|
541
541
|
async function d(...h) {
|
|
542
|
-
return l.value === 0 || l.value === void 0 ? o.value(...h) : (i(), new Promise(async (
|
|
543
|
-
var
|
|
544
|
-
(
|
|
545
|
-
|
|
542
|
+
return l.value === 0 || l.value === void 0 ? o.value(...h) : (i(), new Promise(async (b) => {
|
|
543
|
+
var $;
|
|
544
|
+
($ = h[0]) != null && $.immediate ? b(await o.value(...h)) : u.value = setTimeout(async () => {
|
|
545
|
+
b(await o.value(...h));
|
|
546
546
|
}, l.value);
|
|
547
547
|
}));
|
|
548
548
|
}
|
|
@@ -552,7 +552,7 @@ function Kl(e, a) {
|
|
|
552
552
|
};
|
|
553
553
|
}
|
|
554
554
|
function Al(e) {
|
|
555
|
-
const a =
|
|
555
|
+
const a = p(() => e.polling), l = p(() => e.debounceTime), u = p(() => e.dataSource);
|
|
556
556
|
return {
|
|
557
557
|
polling: a,
|
|
558
558
|
request: e.request,
|
|
@@ -561,20 +561,20 @@ function Al(e) {
|
|
|
561
561
|
dataSource: u
|
|
562
562
|
};
|
|
563
563
|
}
|
|
564
|
-
function Yl({ polling: e, request: a, postData: l, dataSource: u, waitRequest: o, debounceTime: i }, { columns: d, loading: h, setLoading:
|
|
564
|
+
function Yl({ polling: e, request: a, postData: l, dataSource: u, waitRequest: o, debounceTime: i }, { columns: d, loading: h, setLoading: b, setColumns: $, removeRowKeys: v, syncSelectedRows: s, formParamsRef: n, setPagination: c, paginationInfo: g, onBeforeSearchSubmit: m, hasCustomRender: S }, P) {
|
|
565
565
|
const R = D(), k = D(!0), Y = D(!1), L = D(!1), z = D([]), H = D(), re = async (y = {}) => {
|
|
566
566
|
var Be;
|
|
567
|
-
const { pagination:
|
|
567
|
+
const { pagination: T, filters: E = {}, sorter: K = {}, removeKeys: w = [], isPolling: Ke = !1 } = y;
|
|
568
568
|
if (!a || !Fe(a) || x(o) && h.value || Y.value)
|
|
569
569
|
return u.value || [];
|
|
570
|
-
if (Y.value = !0, !Ke || x(o) || k.value ?
|
|
570
|
+
if (Y.value = !0, !Ke || x(o) || k.value ? b(!0) : we(!0), x(o)) {
|
|
571
571
|
k.value = !1, Y.value = !1;
|
|
572
572
|
return;
|
|
573
573
|
}
|
|
574
|
-
|
|
574
|
+
T && c(T);
|
|
575
575
|
try {
|
|
576
576
|
let ce = {};
|
|
577
|
-
if (se(
|
|
577
|
+
if (se(T) && !T || se(g))
|
|
578
578
|
ce = {};
|
|
579
579
|
else {
|
|
580
580
|
const { current: A = 1, pageSize: me = 10, total: G } = x(g) || {};
|
|
@@ -583,7 +583,7 @@ function Yl({ polling: e, request: a, postData: l, dataSource: u, waitRequest: o
|
|
|
583
583
|
const Oe = Q(K) ? [K] : K;
|
|
584
584
|
Oe.forEach((A) => {
|
|
585
585
|
const me = (A == null ? void 0 : A.columnKey) || (A == null ? void 0 : A.field);
|
|
586
|
-
A && (A != null && A.order) ?
|
|
586
|
+
A && (A != null && A.order) ? $(x(d).map((G) => (G.dataIndex === me ? G.sortOrder = A == null ? void 0 : A.order : G.sortOrder = null, G))) : A && $(x(d).map((G) => (G.dataIndex === me && (G.sortOrder = null), G)));
|
|
587
587
|
});
|
|
588
588
|
let Te = {
|
|
589
589
|
...ce || {},
|
|
@@ -598,21 +598,21 @@ function Yl({ polling: e, request: a, postData: l, dataSource: u, waitRequest: o
|
|
|
598
598
|
const A = ue.total || (J == null ? void 0 : J.length) || 0;
|
|
599
599
|
return A !== ((Be = x(g)) == null ? void 0 : Be.total) && c({
|
|
600
600
|
total: A || 0
|
|
601
|
-
}),
|
|
601
|
+
}), C(J), J;
|
|
602
602
|
} else
|
|
603
603
|
return [];
|
|
604
604
|
} catch (ce) {
|
|
605
|
-
z.value === void 0 &&
|
|
605
|
+
z.value === void 0 && C([]), P("requestError", ce);
|
|
606
606
|
} finally {
|
|
607
|
-
k.value = !1,
|
|
607
|
+
k.value = !1, b(!1);
|
|
608
608
|
}
|
|
609
609
|
return [];
|
|
610
610
|
}, M = Kl(async (y) => {
|
|
611
611
|
H.value && clearTimeout(H.value);
|
|
612
|
-
const
|
|
612
|
+
const T = await re(y), E = Vt(e.value, T);
|
|
613
613
|
return E && !R.value && (H.value = setTimeout(() => {
|
|
614
614
|
M.run({ ...y, isPolling: E });
|
|
615
|
-
}, Math.max(E, 2e3))),
|
|
615
|
+
}, Math.max(E, 2e3))), T;
|
|
616
616
|
}, i.value || 10);
|
|
617
617
|
Jt(() => {
|
|
618
618
|
R.value = !0, clearTimeout(H.value);
|
|
@@ -621,54 +621,54 @@ function Yl({ polling: e, request: a, postData: l, dataSource: u, waitRequest: o
|
|
|
621
621
|
}), W(() => e.value, () => {
|
|
622
622
|
e.value ? M.run({ isPolling: !0 }) : clearTimeout(H.value);
|
|
623
623
|
}, { immediate: !0 }), W([() => o.value, () => u.value, () => n], () => {
|
|
624
|
-
xe(a) ? (!k.value || !e.value) && M.run({ isPolling: !1 }) :
|
|
624
|
+
xe(a) ? (!k.value || !e.value) && M.run({ isPolling: !1 }) : C(u.value || []);
|
|
625
625
|
}, {
|
|
626
626
|
deep: !0,
|
|
627
627
|
immediate: !0
|
|
628
628
|
});
|
|
629
|
-
const Z =
|
|
629
|
+
const Z = p(() => {
|
|
630
630
|
if (S.value)
|
|
631
631
|
return x(z);
|
|
632
|
-
const y = d.value.filter((
|
|
632
|
+
const y = d.value.filter((T) => T.show || T.show === void 0);
|
|
633
633
|
return !x(z) || !y || y.length === 0 ? [] : x(z);
|
|
634
|
-
}), _ =
|
|
634
|
+
}), _ = p(() => x(z).some((y) => be(y.children) && y.children.length > 0));
|
|
635
635
|
function we(y) {
|
|
636
636
|
L.value = y;
|
|
637
637
|
}
|
|
638
|
-
function t(y,
|
|
639
|
-
M.run({ pagination: y, filters:
|
|
638
|
+
function t(y, T, E, K) {
|
|
639
|
+
M.run({ pagination: y, filters: T, sorter: E, extra: K, isPolling: !1 }), P("change", y, T, E, K);
|
|
640
640
|
}
|
|
641
|
-
function
|
|
641
|
+
function C(y) {
|
|
642
642
|
var E;
|
|
643
|
-
const
|
|
644
|
-
if (!De(
|
|
645
|
-
const K =
|
|
643
|
+
const T = Ht(ie(y), x(g.value));
|
|
644
|
+
if (!De(T, z.value) && (z.value = T, !a || !Fe(a))) {
|
|
645
|
+
const K = T.length || 0;
|
|
646
646
|
K !== ((E = x(g)) == null ? void 0 : E.total) && c({
|
|
647
647
|
total: K
|
|
648
648
|
});
|
|
649
649
|
}
|
|
650
650
|
}
|
|
651
|
-
function
|
|
651
|
+
function O({ key: y, record: T, type: E = "update" }) {
|
|
652
652
|
switch (E) {
|
|
653
653
|
case "update":
|
|
654
|
-
z.value = z.value.map((K) => y &&
|
|
654
|
+
z.value = z.value.map((K) => y && T[y] === K[y] ? { ...K, ...T } : K);
|
|
655
655
|
break;
|
|
656
656
|
case "push":
|
|
657
|
-
z.value.push(
|
|
657
|
+
z.value.push(T);
|
|
658
658
|
break;
|
|
659
659
|
case "unshift":
|
|
660
|
-
z.value.unshift(
|
|
660
|
+
z.value.unshift(T);
|
|
661
661
|
break;
|
|
662
662
|
case "delete":
|
|
663
|
-
z.value = z.value.filter((K) => y ? y &&
|
|
663
|
+
z.value = z.value.filter((K) => y ? y && T[y] !== K[y] : !0);
|
|
664
664
|
break;
|
|
665
665
|
}
|
|
666
666
|
}
|
|
667
667
|
return {
|
|
668
668
|
dataSource: Z,
|
|
669
669
|
isTreeDataRef: _,
|
|
670
|
-
reSetDataList:
|
|
671
|
-
changeDataValue:
|
|
670
|
+
reSetDataList: C,
|
|
671
|
+
changeDataValue: O,
|
|
672
672
|
handleTableChange: t,
|
|
673
673
|
reload: async (y) => {
|
|
674
674
|
xe(a) ? await M.run({ ...y, isPolling: !1 }) : P("reload");
|
|
@@ -684,10 +684,10 @@ function Ll(e) {
|
|
|
684
684
|
}), a;
|
|
685
685
|
}
|
|
686
686
|
function Vl({ search: e, searchMap: a, params: l, columns: u, setPagination: o }) {
|
|
687
|
-
const i = fe({}), d = fe({}), h = D([]),
|
|
687
|
+
const i = fe({}), d = fe({}), h = D([]), b = p(() => {
|
|
688
688
|
var s;
|
|
689
689
|
return Q(e.value) ? !!((s = e.value) != null && s.showSearch) : !!e.value;
|
|
690
|
-
}),
|
|
690
|
+
}), $ = (s) => {
|
|
691
691
|
var c, g;
|
|
692
692
|
const n = [];
|
|
693
693
|
if ((s === "all" || s === "searchMap") && ((c = a.value) == null || c.forEach((m) => n.push(m)), n.forEach((m) => {
|
|
@@ -709,16 +709,16 @@ function Vl({ search: e, searchMap: a, params: l, columns: u, setPagination: o }
|
|
|
709
709
|
for (const S in m)
|
|
710
710
|
i[S] || (i[S] = m[S]);
|
|
711
711
|
}
|
|
712
|
-
(s === "all" || s === "params") && !
|
|
712
|
+
(s === "all" || s === "params") && !b.value && (o({ current: 1 }), Object.assign(i, l.value));
|
|
713
713
|
};
|
|
714
714
|
Zt(() => {
|
|
715
|
-
|
|
715
|
+
$("all");
|
|
716
716
|
}), W(() => l.value, () => {
|
|
717
|
-
|
|
717
|
+
$("params");
|
|
718
718
|
}, { deep: !0 }), W(() => a.value, () => {
|
|
719
|
-
|
|
719
|
+
$("searchMap");
|
|
720
720
|
}, { deep: !0 }), W(() => u.value, () => {
|
|
721
|
-
|
|
721
|
+
$("columns");
|
|
722
722
|
}, { deep: !0 });
|
|
723
723
|
function v(s) {
|
|
724
724
|
o({ current: 1 }), Object.assign(i, s);
|
|
@@ -734,7 +734,7 @@ function Hl({ columns: e, columnsState: a, changeColumns: l }) {
|
|
|
734
734
|
S && (d[S] = { show: n === void 0 ? !0 : n, fixed: g });
|
|
735
735
|
});
|
|
736
736
|
const v = x(e).map((n) => n.key);
|
|
737
|
-
|
|
737
|
+
$(v);
|
|
738
738
|
}, { deep: !0, immediate: !0 }), Ie(() => {
|
|
739
739
|
var s;
|
|
740
740
|
const v = {
|
|
@@ -743,23 +743,23 @@ function Hl({ columns: e, columnsState: a, changeColumns: l }) {
|
|
|
743
743
|
};
|
|
744
744
|
Object.assign(o, v), Object.assign(i, v);
|
|
745
745
|
});
|
|
746
|
-
function
|
|
746
|
+
function b(v, s) {
|
|
747
747
|
u.value = s, Object.assign(o, v), l == null || l(o, s === "fixed");
|
|
748
748
|
}
|
|
749
|
-
function
|
|
749
|
+
function $(v) {
|
|
750
750
|
h.value = v;
|
|
751
751
|
}
|
|
752
752
|
return {
|
|
753
753
|
columnsMap: o,
|
|
754
754
|
operationType: u,
|
|
755
|
-
setColumnsMap:
|
|
755
|
+
setColumnsMap: b,
|
|
756
756
|
sortKeyColumns: h,
|
|
757
757
|
cacheColumnsMap: i,
|
|
758
|
-
setSortKeyColumns:
|
|
758
|
+
setSortKeyColumns: $
|
|
759
759
|
};
|
|
760
760
|
}
|
|
761
761
|
function Wl(e) {
|
|
762
|
-
const a =
|
|
762
|
+
const a = p(() => e.draggabled), l = p(() => e.neverScroll), u = p(() => e.autoScroll);
|
|
763
763
|
return {
|
|
764
764
|
draggabled: a,
|
|
765
765
|
neverScroll: l,
|
|
@@ -783,15 +783,15 @@ function _l({ scroll: e, columns: a, breakpoint: l, draggabled: u, autoScroll: o
|
|
|
783
783
|
deep: !0,
|
|
784
784
|
immediate: !0
|
|
785
785
|
});
|
|
786
|
-
const
|
|
787
|
-
const g =
|
|
786
|
+
const b = p(() => {
|
|
787
|
+
const g = $(x(d).filter((P) => P.fixed === "left")), m = $(x(d).filter((P) => P.fixed !== "left" && P.fixed !== "right")), S = $(x(d).filter((P) => P.fixed === "right"));
|
|
788
788
|
return [
|
|
789
789
|
...g,
|
|
790
790
|
...m,
|
|
791
791
|
...S
|
|
792
792
|
];
|
|
793
793
|
});
|
|
794
|
-
function
|
|
794
|
+
function $(g) {
|
|
795
795
|
return g.sort((m, S) => _t(m, S, "order", 0));
|
|
796
796
|
}
|
|
797
797
|
function v(g) {
|
|
@@ -832,7 +832,7 @@ function _l({ scroll: e, columns: a, breakpoint: l, draggabled: u, autoScroll: o
|
|
|
832
832
|
}
|
|
833
833
|
return {
|
|
834
834
|
breakpoint: l,
|
|
835
|
-
proColumns:
|
|
835
|
+
proColumns: b,
|
|
836
836
|
cacheProColumns: h,
|
|
837
837
|
setColumns: n,
|
|
838
838
|
changeColumns: c,
|
|
@@ -840,7 +840,7 @@ function _l({ scroll: e, columns: a, breakpoint: l, draggabled: u, autoScroll: o
|
|
|
840
840
|
};
|
|
841
841
|
}
|
|
842
842
|
function Gl(e) {
|
|
843
|
-
const a =
|
|
843
|
+
const a = p(() => e.scroll), l = p(() => e.autoScroll), u = p(() => e.modalScroll), o = p(() => e.neverScroll), i = p(() => e.rowSelection), d = p(() => e.scrollBreakpoint);
|
|
844
844
|
return {
|
|
845
845
|
scroll: a,
|
|
846
846
|
neverScroll: o,
|
|
@@ -850,11 +850,11 @@ function Gl(e) {
|
|
|
850
850
|
scrollBreakpoint: d
|
|
851
851
|
};
|
|
852
852
|
}
|
|
853
|
-
function ql({ scroll: e, columns: a, autoScroll: l, modalScroll: u, neverScroll: o, rowSelection: i, screens: d, innerWidth: h, scrollBreakpoint:
|
|
854
|
-
const
|
|
853
|
+
function ql({ scroll: e, columns: a, autoScroll: l, modalScroll: u, neverScroll: o, rowSelection: i, screens: d, innerWidth: h, scrollBreakpoint: b }) {
|
|
854
|
+
const $ = p(() => {
|
|
855
855
|
var n, c, g;
|
|
856
|
-
return x(
|
|
857
|
-
}), v =
|
|
856
|
+
return x(b) ? vt(x(b)) ? h.value > x(b) : Gt(x(b)) ? (n = d.value) == null ? void 0 : n[x(b)] : (c = d.value) == null ? void 0 : c.xl : (g = d.value) == null ? void 0 : g.xl;
|
|
857
|
+
}), v = p(() => {
|
|
858
858
|
let n = 0;
|
|
859
859
|
const c = x(i) ? 60 : 0, g = 150, m = ie(x(a));
|
|
860
860
|
m.forEach((R) => {
|
|
@@ -863,12 +863,12 @@ function ql({ scroll: e, columns: a, autoScroll: l, modalScroll: u, neverScroll:
|
|
|
863
863
|
const P = m.filter((R) => !Reflect.has(R, "width")).length;
|
|
864
864
|
return P !== 0 && (n += P * g), c && (n += c), n;
|
|
865
865
|
});
|
|
866
|
-
return { proScroll:
|
|
866
|
+
return { proScroll: p(() => {
|
|
867
867
|
var n, c;
|
|
868
868
|
return x(o) ? {} : x(e) && Object.keys(x(e)).length ? x(e) : x(u) ? {
|
|
869
869
|
y: ((n = x(e)) == null ? void 0 : n.y) || ((c = d.value) != null && c.xl ? 400 : 235)
|
|
870
|
-
} : x(l) ?
|
|
871
|
-
}), breakpoint:
|
|
870
|
+
} : x(l) ? $.value ? {} : se($.value) ? { x: x(v) } : {} : {};
|
|
871
|
+
}), breakpoint: $ };
|
|
872
872
|
}
|
|
873
873
|
const { provideContext: Ul, useInjectContext: he } = Rl("pro-table");
|
|
874
874
|
function Xl(e, a) {
|
|
@@ -962,15 +962,15 @@ const Jl = (e) => ({
|
|
|
962
962
|
wrapSSR: o,
|
|
963
963
|
hashId: i
|
|
964
964
|
} = ze("ProTableForm", [Jl], e.prefixCls), d = xt(), h = Ql(), {
|
|
965
|
-
formState:
|
|
966
|
-
resetFormState:
|
|
965
|
+
formState: b,
|
|
966
|
+
resetFormState: $,
|
|
967
967
|
changeFormState: v
|
|
968
|
-
} = Xl(e.defaultParams || {}, e.searchMap || []), s = D(!1), n =
|
|
968
|
+
} = Xl(e.defaultParams || {}, e.searchMap || []), s = D(!1), n = p(() => {
|
|
969
969
|
var t;
|
|
970
970
|
return !!((t = e.search) != null && t.showSearch);
|
|
971
|
-
}), c =
|
|
972
|
-
var t,
|
|
973
|
-
return ((t = e.search) == null ? void 0 : t.showReset) === void 0 ? n.value : (
|
|
971
|
+
}), c = p(() => {
|
|
972
|
+
var t, C;
|
|
973
|
+
return ((t = e.search) == null ? void 0 : t.showReset) === void 0 ? n.value : (C = e.search) == null ? void 0 : C.showReset;
|
|
974
974
|
}), g = [{
|
|
975
975
|
value: "xxl",
|
|
976
976
|
span: 4
|
|
@@ -990,16 +990,16 @@ const Jl = (e) => ({
|
|
|
990
990
|
value: "xs",
|
|
991
991
|
span: 1
|
|
992
992
|
}], m = (t) => {
|
|
993
|
-
let
|
|
994
|
-
for (let
|
|
995
|
-
const y = g[
|
|
993
|
+
let C = 4;
|
|
994
|
+
for (let O = 0; O < g.length; O += 1) {
|
|
995
|
+
const y = g[O].value;
|
|
996
996
|
if (h.value[y]) {
|
|
997
|
-
|
|
997
|
+
C = (t == null ? void 0 : t[y]) || (e.modal ? 3 : g[O].span);
|
|
998
998
|
break;
|
|
999
999
|
}
|
|
1000
1000
|
}
|
|
1001
|
-
return
|
|
1002
|
-
}, S =
|
|
1001
|
+
return C;
|
|
1002
|
+
}, S = p(() => {
|
|
1003
1003
|
var t;
|
|
1004
1004
|
return m((t = e.search) == null ? void 0 : t.span);
|
|
1005
1005
|
});
|
|
@@ -1011,60 +1011,60 @@ const Jl = (e) => ({
|
|
|
1011
1011
|
});
|
|
1012
1012
|
const P = (t) => {
|
|
1013
1013
|
s.value = t;
|
|
1014
|
-
}, R = (t,
|
|
1015
|
-
...
|
|
1014
|
+
}, R = (t, C, O) => (t + 1) % C === 0 ? {
|
|
1015
|
+
...O,
|
|
1016
1016
|
marginRight: 0
|
|
1017
1017
|
} : {
|
|
1018
|
-
...
|
|
1018
|
+
...O,
|
|
1019
1019
|
marginRight: "2%"
|
|
1020
1020
|
}, k = () => {
|
|
1021
|
-
const t = ie(
|
|
1022
|
-
return
|
|
1023
|
-
}, Y = (t = !1,
|
|
1021
|
+
const t = ie(b), C = e.searchMap.find((T) => T.valueType === "text") || "", O = e.searchMap.find((T) => T.valueType === "dateRange") || "", y = e.searchMap.find((T) => T.valueType === "treeSelect");
|
|
1022
|
+
return C && (t[C.name] = b[C.name] || C.initialValue || ""), O && (t[O.rangeStartName || "start"] = t[O.name] ? t[O.name][0] : "", t[O.rangeEndName || "end"] = t[O.name] ? t[O.name][1] : "", delete t[O.name]), y && (y != null && y.name && be(b[y == null ? void 0 : y.name]) && (t[y.name] = b[y.name].length ? b[y.name].map((T) => T[y.valueKey === "text" ? "label" : "value"]).join() : ""), y != null && y.name && be(t[y == null ? void 0 : y.name]) && (t[y.name] = t[y.name].length ? t[y.name].map((T) => T[y.valueKey === "text" ? "label" : "value"]) : "")), t;
|
|
1023
|
+
}, Y = (t = !1, C) => {
|
|
1024
1024
|
el(() => {
|
|
1025
|
-
(!n.value || t) && a("search", k(), !!
|
|
1025
|
+
(!n.value || t) && a("search", k(), !!C);
|
|
1026
1026
|
});
|
|
1027
|
-
}, L = (t,
|
|
1028
|
-
var
|
|
1029
|
-
switch (
|
|
1027
|
+
}, L = (t, C) => {
|
|
1028
|
+
var O, y, T;
|
|
1029
|
+
switch (C.valueType) {
|
|
1030
1030
|
case "text":
|
|
1031
|
-
v(
|
|
1031
|
+
v(C.name || "", t || C.initialValue || "");
|
|
1032
1032
|
break;
|
|
1033
1033
|
case "select":
|
|
1034
|
-
v(
|
|
1034
|
+
v(C.name || "", t || t === 0 ? t : C.initialValue || void 0);
|
|
1035
1035
|
break;
|
|
1036
1036
|
case "treeSelect":
|
|
1037
|
-
v(
|
|
1037
|
+
v(C.name || "", t || t === 0 ? t : C.initialValue || ((O = C.field) != null && O.treeCheckable || (y = C.field) != null && y.multiple ? [] : null));
|
|
1038
1038
|
break;
|
|
1039
1039
|
case "date":
|
|
1040
|
-
v(
|
|
1040
|
+
v(C.name || "", t ? q(t).format(C.valueFormat || "YYYY-MM-DD") : C.initialValue || null);
|
|
1041
1041
|
break;
|
|
1042
1042
|
case "dateMonth":
|
|
1043
|
-
v(
|
|
1043
|
+
v(C.name || "", t ? q(t).format("YYYY-MM") : C.initialValue || null);
|
|
1044
1044
|
break;
|
|
1045
1045
|
case "dateRange":
|
|
1046
|
-
v(
|
|
1046
|
+
v(C.name || "", t && t.length > 0 ? [q(t[0]).format(C.valueFormat || "YYYY-MM-DD"), q(t[1]).format(C.valueFormat || "YYYY-MM-DD")] : C.initialValue || null);
|
|
1047
1047
|
break;
|
|
1048
1048
|
case "time":
|
|
1049
|
-
v(
|
|
1049
|
+
v(C.name || "", t ? q(t).format(C.valueFormat || "HH:mm:ss") : C.initialValue || null);
|
|
1050
1050
|
break;
|
|
1051
1051
|
}
|
|
1052
|
-
(
|
|
1052
|
+
(T = e.search) != null && T.showSearch || C.valueType === "text" || (C.valueType === "treeSelect" || C.valueType, Y());
|
|
1053
1053
|
}, z = (t = !0) => {
|
|
1054
|
-
|
|
1054
|
+
$(), Y(!0, t);
|
|
1055
1055
|
};
|
|
1056
1056
|
u({
|
|
1057
1057
|
getFormState: () => k(),
|
|
1058
1058
|
resetForm: z
|
|
1059
1059
|
});
|
|
1060
1060
|
const H = () => {
|
|
1061
|
-
var
|
|
1062
|
-
const t = (
|
|
1061
|
+
var C;
|
|
1062
|
+
const t = (C = d == null ? void 0 : d.emptyText) == null ? void 0 : C.value;
|
|
1063
1063
|
if (t) {
|
|
1064
|
-
const
|
|
1064
|
+
const O = Ce(t), y = O ? yt(t) : gt(t || []);
|
|
1065
1065
|
return r("div", {
|
|
1066
1066
|
class: je(`${e.prefixCls}-search-empty-text`, i.value)
|
|
1067
|
-
}, [
|
|
1067
|
+
}, [O ? y : be(y) ? y.map((T) => qe(T)) : void 0]);
|
|
1068
1068
|
}
|
|
1069
1069
|
}, re = () => (n.value || c.value) && r(de, null, {
|
|
1070
1070
|
default: () => [c.value && r(ct, {
|
|
@@ -1086,8 +1086,8 @@ const Jl = (e) => ({
|
|
|
1086
1086
|
})]
|
|
1087
1087
|
}), M = ({
|
|
1088
1088
|
formItemStyle: t,
|
|
1089
|
-
advanced:
|
|
1090
|
-
showAdvanced:
|
|
1089
|
+
advanced: C,
|
|
1090
|
+
showAdvanced: O = !0
|
|
1091
1091
|
}) => r("div", {
|
|
1092
1092
|
style: t,
|
|
1093
1093
|
class: `${e.prefixCls}-form-collapse-button ${i.value}`
|
|
@@ -1095,23 +1095,23 @@ const Jl = (e) => ({
|
|
|
1095
1095
|
size: 16
|
|
1096
1096
|
}, {
|
|
1097
1097
|
default: () => {
|
|
1098
|
-
var y,
|
|
1099
|
-
return [re(),
|
|
1098
|
+
var y, T;
|
|
1099
|
+
return [re(), O && r("span", {
|
|
1100
1100
|
class: `${e.prefixCls}-a ${i.value}`,
|
|
1101
|
-
onClick: () => P(!
|
|
1102
|
-
}, [
|
|
1101
|
+
onClick: () => P(!C)
|
|
1102
|
+
}, [C ? "收起" : "展开", (y = e.search) != null && y.collapseRender ? (T = e.search) == null ? void 0 : T.collapseRender() : C ? r(nl, null, null) : r(ul, null, null)])];
|
|
1103
1103
|
}
|
|
1104
1104
|
})]), Z = (t) => {
|
|
1105
|
-
var y,
|
|
1106
|
-
let
|
|
1107
|
-
const
|
|
1105
|
+
var y, T, E, K;
|
|
1106
|
+
let C;
|
|
1107
|
+
const O = n.value ? dt : dt.Search;
|
|
1108
1108
|
switch (t.valueType) {
|
|
1109
1109
|
case "text":
|
|
1110
|
-
|
|
1110
|
+
C = r(O, X({
|
|
1111
1111
|
style: {
|
|
1112
1112
|
width: "100%"
|
|
1113
1113
|
},
|
|
1114
|
-
value:
|
|
1114
|
+
value: b[t.name],
|
|
1115
1115
|
placeholder: t.placeholder || "请输入",
|
|
1116
1116
|
allowClear: t.allowClear || t.allowClear === !1 ? t.allowClear : !0,
|
|
1117
1117
|
onChange: (w) => L(w.target.value, t),
|
|
@@ -1119,11 +1119,11 @@ const Jl = (e) => ({
|
|
|
1119
1119
|
}, t.field || {}), null);
|
|
1120
1120
|
break;
|
|
1121
1121
|
case "select":
|
|
1122
|
-
|
|
1122
|
+
C = r(bl, X({
|
|
1123
1123
|
style: {
|
|
1124
1124
|
width: "100%"
|
|
1125
1125
|
},
|
|
1126
|
-
value: t.loading ? void 0 :
|
|
1126
|
+
value: t.loading ? void 0 : b[t.name],
|
|
1127
1127
|
optionFilterProp: "label",
|
|
1128
1128
|
placeholder: t.placeholder || "请选择",
|
|
1129
1129
|
showSearch: t.showSearch,
|
|
@@ -1134,18 +1134,18 @@ const Jl = (e) => ({
|
|
|
1134
1134
|
indicator: (y = d == null ? void 0 : d.indicator) == null ? void 0 : y.value
|
|
1135
1135
|
}, null) : H(),
|
|
1136
1136
|
onChange: (w) => L(w, t),
|
|
1137
|
-
options: t.loading ? [] : (
|
|
1137
|
+
options: t.loading ? [] : (T = t == null ? void 0 : t.valueEnum) == null ? void 0 : T.map((w) => ({
|
|
1138
1138
|
label: w.text,
|
|
1139
1139
|
value: w.value
|
|
1140
1140
|
}))
|
|
1141
1141
|
}, t.field || {}), null);
|
|
1142
1142
|
break;
|
|
1143
1143
|
case "treeSelect":
|
|
1144
|
-
|
|
1144
|
+
C = r(yl, X({
|
|
1145
1145
|
style: {
|
|
1146
1146
|
width: "100%"
|
|
1147
1147
|
},
|
|
1148
|
-
value:
|
|
1148
|
+
value: b[t.name],
|
|
1149
1149
|
placeholder: t.placeholder || "请选择",
|
|
1150
1150
|
allowClear: t.allowClear || t.allowClear === !1 ? t.allowClear : !0,
|
|
1151
1151
|
treeData: t.loading ? [] : t.valueEnum,
|
|
@@ -1158,11 +1158,11 @@ const Jl = (e) => ({
|
|
|
1158
1158
|
}, t.field || {}), null);
|
|
1159
1159
|
break;
|
|
1160
1160
|
case "date":
|
|
1161
|
-
|
|
1161
|
+
C = r(St, X({
|
|
1162
1162
|
style: {
|
|
1163
1163
|
width: "100%"
|
|
1164
1164
|
},
|
|
1165
|
-
value:
|
|
1165
|
+
value: b[t.name] ? q(b[t.name], t.valueFormat || "YYYY-MM-DD") : void 0,
|
|
1166
1166
|
getPopupContainer: (w) => w && w.parentNode ? w.parentNode : w,
|
|
1167
1167
|
placeholder: t.placeholder || "请选择",
|
|
1168
1168
|
allowClear: t.allowClear || t.allowClear === !1 ? t.allowClear : !0,
|
|
@@ -1173,22 +1173,22 @@ const Jl = (e) => ({
|
|
|
1173
1173
|
}, t.field || {}), null);
|
|
1174
1174
|
break;
|
|
1175
1175
|
case "dateMonth":
|
|
1176
|
-
|
|
1176
|
+
C = r(Zl, X({
|
|
1177
1177
|
style: {
|
|
1178
1178
|
width: "100%"
|
|
1179
1179
|
},
|
|
1180
|
-
value:
|
|
1180
|
+
value: b[t.name] ? q(b[t.name], t.valueFormat || "YYYY-MM") : void 0,
|
|
1181
1181
|
getPopupContainer: (w) => w && w.parentNode ? w.parentNode : w,
|
|
1182
1182
|
placeholder: t.placeholder || "请选择",
|
|
1183
1183
|
onChange: (w) => L(w, t)
|
|
1184
1184
|
}, t.field || {}), null);
|
|
1185
1185
|
break;
|
|
1186
1186
|
case "dateRange":
|
|
1187
|
-
|
|
1187
|
+
C = r(ea, X({
|
|
1188
1188
|
style: {
|
|
1189
1189
|
width: "100%"
|
|
1190
1190
|
},
|
|
1191
|
-
value: (K =
|
|
1191
|
+
value: (K = b[t.name]) != null && K.length ? [q(b[t.name][0], t.valueFormat || "YYYY-MM-DD HH:mm:ss"), q(b[t.name][1], t.valueFormat || "YYYY-MM-DD HH:mm:ss")] : void 0,
|
|
1192
1192
|
getPopupContainer: (w) => w && w.parentNode ? w.parentNode : w,
|
|
1193
1193
|
placeholder: t.placeholder || ["开始日期", "结束日期"],
|
|
1194
1194
|
format: t.valueFormat || "YYYY-MM-DD HH:mm:ss",
|
|
@@ -1197,11 +1197,11 @@ const Jl = (e) => ({
|
|
|
1197
1197
|
}, t.field || {}), null);
|
|
1198
1198
|
break;
|
|
1199
1199
|
case "time":
|
|
1200
|
-
|
|
1200
|
+
C = r(gl, X({
|
|
1201
1201
|
style: {
|
|
1202
1202
|
width: "100%"
|
|
1203
1203
|
},
|
|
1204
|
-
value:
|
|
1204
|
+
value: b[t.name] ? q(b[t.name], t.valueFormat || "HH:mm:ss") : void 0,
|
|
1205
1205
|
getPopupContainer: (w) => w && w.parentNode ? w.parentNode : w,
|
|
1206
1206
|
placeholder: t.placeholder || "请选择",
|
|
1207
1207
|
allowClear: t.allowClear || t.allowClear === !1 ? t.allowClear : !0,
|
|
@@ -1211,55 +1211,55 @@ const Jl = (e) => ({
|
|
|
1211
1211
|
}, t.field || {}), null);
|
|
1212
1212
|
break;
|
|
1213
1213
|
}
|
|
1214
|
-
return
|
|
1214
|
+
return C;
|
|
1215
1215
|
}, _ = ({
|
|
1216
1216
|
formItemStyle: t,
|
|
1217
|
-
item:
|
|
1217
|
+
item: C
|
|
1218
1218
|
}) => r("div", {
|
|
1219
1219
|
class: `${e.prefixCls}-form-item`,
|
|
1220
1220
|
style: t
|
|
1221
1221
|
}, [r(rt.Item, null, {
|
|
1222
|
-
default: () => [
|
|
1222
|
+
default: () => [C.__v_isVNode ? C : Z(C)]
|
|
1223
1223
|
})]), we = () => {
|
|
1224
|
-
var
|
|
1225
|
-
const t = [...e.searchMap, ...((
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1224
|
+
var O;
|
|
1225
|
+
const t = [...e.searchMap, ...((O = l.default) == null ? void 0 : O.call(l)) || []], C = {
|
|
1226
|
+
width: `${(100 - (S.value - 1) * 2) / S.value}%`
|
|
1227
|
+
};
|
|
1228
|
+
return t.map((y, T) => {
|
|
1229
|
+
const E = R(T, S.value, C);
|
|
1230
1230
|
return t.length < S.value || s.value ? r(Ne, null, [_({
|
|
1231
1231
|
formItemStyle: E,
|
|
1232
|
-
item:
|
|
1233
|
-
}),
|
|
1232
|
+
item: y
|
|
1233
|
+
}), T === t.length - 1 && M({
|
|
1234
1234
|
formItemStyle: {
|
|
1235
1235
|
flex: 1,
|
|
1236
1236
|
justifyContent: "flex-end"
|
|
1237
1237
|
},
|
|
1238
1238
|
advanced: s.value,
|
|
1239
1239
|
showAdvanced: s.value
|
|
1240
|
-
})]) : r(Ne, null, [
|
|
1240
|
+
})]) : r(Ne, null, [T < S.value - 1 && _({
|
|
1241
1241
|
formItemStyle: E,
|
|
1242
|
-
item:
|
|
1243
|
-
}),
|
|
1242
|
+
item: y
|
|
1243
|
+
}), T === S.value - 1 && (S.value - 1 === 0 || t.length === S.value) && _({
|
|
1244
1244
|
formItemStyle: E,
|
|
1245
|
-
item:
|
|
1246
|
-
}),
|
|
1245
|
+
item: y
|
|
1246
|
+
}), T === S.value - 1 && t.length >= S.value && M({
|
|
1247
1247
|
formItemStyle: {
|
|
1248
1248
|
flex: 1,
|
|
1249
1249
|
justifyContent: "flex-end"
|
|
1250
1250
|
},
|
|
1251
1251
|
advanced: !1,
|
|
1252
|
-
showAdvanced: t.length
|
|
1252
|
+
showAdvanced: t.length !== S.value
|
|
1253
1253
|
})]);
|
|
1254
1254
|
});
|
|
1255
1255
|
};
|
|
1256
1256
|
return () => {
|
|
1257
|
-
var t,
|
|
1257
|
+
var t, C;
|
|
1258
1258
|
return o(r("div", {
|
|
1259
1259
|
class: {
|
|
1260
1260
|
[`${i.value}`]: !0,
|
|
1261
1261
|
[`${x(e.prefixCls)}-search`]: !0,
|
|
1262
|
-
[`${(t = e.search) == null ? void 0 : t.className}`]: (
|
|
1262
|
+
[`${(t = e.search) == null ? void 0 : t.className}`]: (C = e.search) == null ? void 0 : C.className
|
|
1263
1263
|
}
|
|
1264
1264
|
}, [r(rt, {
|
|
1265
1265
|
class: `${x(e.prefixCls)}-form ${i.value}`,
|
|
@@ -1379,14 +1379,14 @@ const Pe = (e) => {
|
|
|
1379
1379
|
default: () => {
|
|
1380
1380
|
var h;
|
|
1381
1381
|
return [r("span", {
|
|
1382
|
-
onClick: (
|
|
1382
|
+
onClick: (b) => {
|
|
1383
1383
|
var c, g, m;
|
|
1384
|
-
|
|
1385
|
-
const
|
|
1384
|
+
b.stopPropagation(), b.preventDefault();
|
|
1385
|
+
const $ = ((g = (c = x(i)) == null ? void 0 : c.find((S) => S.uuid === l)) == null ? void 0 : g.key) || "", v = (d == null ? void 0 : d.columnsMap[$]) || {};
|
|
1386
1386
|
if (typeof v.disable == "boolean" ? v.disable : (m = v.disable) == null ? void 0 : m.icon) return;
|
|
1387
1387
|
const n = {
|
|
1388
1388
|
...d == null ? void 0 : d.columnsMap,
|
|
1389
|
-
[
|
|
1389
|
+
[$]: {
|
|
1390
1390
|
...v,
|
|
1391
1391
|
fixed: u
|
|
1392
1392
|
}
|
|
@@ -1408,10 +1408,10 @@ const Pe = (e) => {
|
|
|
1408
1408
|
setup(e) {
|
|
1409
1409
|
const {
|
|
1410
1410
|
cacheColumns: a
|
|
1411
|
-
} = he(), l =
|
|
1411
|
+
} = he(), l = p(() => {
|
|
1412
1412
|
var o, i;
|
|
1413
1413
|
return ((i = (o = x(a)) == null ? void 0 : o.find((d) => d.uuid === e.treeKey)) == null ? void 0 : i.key) || "";
|
|
1414
|
-
}), u =
|
|
1414
|
+
}), u = p(() => l.value === "action" && e.autoScroll);
|
|
1415
1415
|
return () => {
|
|
1416
1416
|
const o = r("span", {
|
|
1417
1417
|
class: [`${e.className}-list-item-option`, e.hashId]
|
|
@@ -1460,11 +1460,11 @@ const Pe = (e) => {
|
|
|
1460
1460
|
}
|
|
1461
1461
|
},
|
|
1462
1462
|
setup(e) {
|
|
1463
|
-
const a = D(We().uuid(15)), l =
|
|
1463
|
+
const a = D(We().uuid(15)), l = p(() => e.list && e.list.length > 0), u = D([]), o = D([]), {
|
|
1464
1464
|
cacheColumns: i,
|
|
1465
1465
|
slots: d,
|
|
1466
1466
|
settingsAction: h
|
|
1467
|
-
} = he(),
|
|
1467
|
+
} = he(), b = (n, c) => n.map(({
|
|
1468
1468
|
key: g,
|
|
1469
1469
|
children: m,
|
|
1470
1470
|
uuid: S,
|
|
@@ -1485,13 +1485,13 @@ const Pe = (e) => {
|
|
|
1485
1485
|
disableCheckbox: typeof R.disable == "boolean" ? R.disable : (L = R.disable) == null ? void 0 : L.checkbox,
|
|
1486
1486
|
isLeaf: !0
|
|
1487
1487
|
};
|
|
1488
|
-
return m && (Y.children =
|
|
1488
|
+
return m && (Y.children = b(m, R)), Y;
|
|
1489
1489
|
});
|
|
1490
1490
|
Ie(() => {
|
|
1491
|
-
const n =
|
|
1491
|
+
const n = b(e.list || []);
|
|
1492
1492
|
u.value = n, o.value = n.filter((c) => c.checked).map((c) => c.key), (h == null ? void 0 : h.operationType.value) === "fixed" && (a.value = We().uuid(15));
|
|
1493
1493
|
});
|
|
1494
|
-
const
|
|
1494
|
+
const $ = Pe((n, c, g) => {
|
|
1495
1495
|
var H, re;
|
|
1496
1496
|
const m = ((H = x(i).find((M) => M.uuid === n)) == null ? void 0 : H.key) || "", S = ((re = x(i).find((M) => M.uuid === c)) == null ? void 0 : re.key) || "", P = {
|
|
1497
1497
|
...h == null ? void 0 : h.columnsMap
|
|
@@ -1540,7 +1540,7 @@ const Pe = (e) => {
|
|
|
1540
1540
|
dropPosition: P,
|
|
1541
1541
|
dropToGap: R
|
|
1542
1542
|
} = g, k = P === -1 || !R ? P + 1 : P;
|
|
1543
|
-
|
|
1543
|
+
$(S, m, k);
|
|
1544
1544
|
},
|
|
1545
1545
|
onCheck: (g, m) => v(m),
|
|
1546
1546
|
treeData: u.value
|
|
@@ -1574,29 +1574,29 @@ const Pe = (e) => {
|
|
|
1574
1574
|
const {
|
|
1575
1575
|
columns: a
|
|
1576
1576
|
} = he(), l = D([]), u = D([]), o = D([]), i = D([]);
|
|
1577
|
-
W(() => a.value, (
|
|
1578
|
-
l.value = [], u.value = [], o.value = [],
|
|
1579
|
-
if (
|
|
1577
|
+
W(() => a.value, (b) => {
|
|
1578
|
+
l.value = [], u.value = [], o.value = [], b.forEach(($) => {
|
|
1579
|
+
if ($.hideInSetting)
|
|
1580
1580
|
return;
|
|
1581
1581
|
const {
|
|
1582
1582
|
fixed: v,
|
|
1583
1583
|
show: s,
|
|
1584
1584
|
uuid: n
|
|
1585
|
-
} =
|
|
1585
|
+
} = $;
|
|
1586
1586
|
if ((s || s === void 0) && n && i.value.push(n), v === "left") {
|
|
1587
|
-
u.value.push(
|
|
1587
|
+
u.value.push($);
|
|
1588
1588
|
return;
|
|
1589
1589
|
}
|
|
1590
1590
|
if (v === "right") {
|
|
1591
|
-
l.value.push(
|
|
1591
|
+
l.value.push($);
|
|
1592
1592
|
return;
|
|
1593
1593
|
}
|
|
1594
|
-
o.value.push(
|
|
1594
|
+
o.value.push($);
|
|
1595
1595
|
});
|
|
1596
1596
|
}, {
|
|
1597
1597
|
immediate: !0
|
|
1598
1598
|
});
|
|
1599
|
-
const d =
|
|
1599
|
+
const d = p(() => l.value && l.value.length > 0), h = p(() => u.value && u.value.length > 0);
|
|
1600
1600
|
return () => r("div", {
|
|
1601
1601
|
class: {
|
|
1602
1602
|
[`${e.hashId}`]: !0,
|
|
@@ -1671,24 +1671,24 @@ const Pe = (e) => {
|
|
|
1671
1671
|
c(o.value), i == null || i.setColumnsMap(n, "show");
|
|
1672
1672
|
}), h = Pe((s) => {
|
|
1673
1673
|
s.target.checked ? d() : d(!1);
|
|
1674
|
-
}),
|
|
1674
|
+
}), b = Pe(() => {
|
|
1675
1675
|
i == null || i.setColumnsMap(i == null ? void 0 : i.cacheColumnsMap, "fixed");
|
|
1676
|
-
}),
|
|
1676
|
+
}), $ = p(() => (
|
|
1677
1677
|
// @ts-ignore
|
|
1678
1678
|
Object.values(i == null ? void 0 : i.columnsMap).filter((s) => !s || s.show === !1)
|
|
1679
|
-
)), v =
|
|
1679
|
+
)), v = p(() => x($).length > 0 && x($).length !== o.value.length);
|
|
1680
1680
|
return () => l(r(Cl, {
|
|
1681
1681
|
arrowPointAtCenter: !0,
|
|
1682
1682
|
title: r("div", {
|
|
1683
1683
|
class: [`${a}-title`, u.value]
|
|
1684
1684
|
}, [r(Sl, {
|
|
1685
1685
|
indeterminate: v.value,
|
|
1686
|
-
checked: x(
|
|
1686
|
+
checked: x($).length === 0 && x($).length !== o.value.length,
|
|
1687
1687
|
onChange: (s) => h(s)
|
|
1688
1688
|
}, {
|
|
1689
1689
|
default: () => [Re("列展示")]
|
|
1690
1690
|
}), e.checkedReset ? r("a", {
|
|
1691
|
-
onClick:
|
|
1691
|
+
onClick: b,
|
|
1692
1692
|
class: [`${a}-action-rest-button`, u.value]
|
|
1693
1693
|
}, [Re("重置")]) : null, e != null && e.extra ? r(de, {
|
|
1694
1694
|
size: 12,
|
|
@@ -1855,13 +1855,13 @@ const $t = /* @__PURE__ */ oe({
|
|
|
1855
1855
|
hashId: l
|
|
1856
1856
|
} = ze("ListToolBar", [ia], e.prefixCls), u = sa(), {
|
|
1857
1857
|
isMobile: o
|
|
1858
|
-
} = he(), i =
|
|
1858
|
+
} = he(), i = p(() => {
|
|
1859
1859
|
var n;
|
|
1860
1860
|
return !!(e.titleTip || e.headerTitle || (n = e.actions) != null && n.length);
|
|
1861
|
-
}), d =
|
|
1861
|
+
}), d = p(() => {
|
|
1862
1862
|
var n;
|
|
1863
1863
|
return !!((n = e.settings) != null && n.length || e.optionsExtra);
|
|
1864
|
-
}), h =
|
|
1864
|
+
}), h = p(() => !!(e.titleTip || e.headerTitle)), b = p(() => {
|
|
1865
1865
|
var c;
|
|
1866
1866
|
let n;
|
|
1867
1867
|
return Array.isArray(e.actions) ? ((c = e.actions) == null ? void 0 : c.length) < 1 ? null : r(de, {
|
|
@@ -1874,7 +1874,7 @@ const $t = /* @__PURE__ */ oe({
|
|
|
1874
1874
|
}, [g]))) ? n : {
|
|
1875
1875
|
default: () => [n]
|
|
1876
1876
|
}) : e.actions;
|
|
1877
|
-
}),
|
|
1877
|
+
}), $ = Me(() => !i.value && d.value ? r("div", {
|
|
1878
1878
|
class: `${e.prefixCls}-left ${l.value}`
|
|
1879
1879
|
}, null) : h.value ? r(de, {
|
|
1880
1880
|
class: `${e.prefixCls}-left ${l.value}`
|
|
@@ -1885,15 +1885,15 @@ const $t = /* @__PURE__ */ oe({
|
|
|
1885
1885
|
title: e.titleTipText
|
|
1886
1886
|
}, {
|
|
1887
1887
|
default: () => [se(e.titleTip) && e.titleTip ? r(fl, null, null) : e.titleTip]
|
|
1888
|
-
})]),
|
|
1888
|
+
})]), b.value && r("div", {
|
|
1889
1889
|
class: `${e.prefixCls}-actions ${l.value}`
|
|
1890
|
-
}, [
|
|
1890
|
+
}, [b.value])]
|
|
1891
1891
|
}) : r(de, {
|
|
1892
1892
|
class: `${e.prefixCls}-left ${l.value}`
|
|
1893
1893
|
}, {
|
|
1894
|
-
default: () => [
|
|
1894
|
+
default: () => [b.value && r("div", {
|
|
1895
1895
|
class: `${e.prefixCls}-actions`
|
|
1896
|
-
}, [
|
|
1896
|
+
}, [b.value])]
|
|
1897
1897
|
}), [() => i.value, () => d.value, () => h.value, () => e.prefixCls, () => e.headerTitle, () => e.titleTipText, () => e.titleTip]), v = Me(() => {
|
|
1898
1898
|
let n;
|
|
1899
1899
|
return d.value ? r(de, {
|
|
@@ -1919,7 +1919,7 @@ const $t = /* @__PURE__ */ oe({
|
|
|
1919
1919
|
}) : null];
|
|
1920
1920
|
}
|
|
1921
1921
|
}) : null;
|
|
1922
|
-
}, [() => u.value, () => d.value, () => e.prefixCls, () => h.value, () =>
|
|
1922
|
+
}, [() => u.value, () => d.value, () => e.prefixCls, () => h.value, () => b.value, () => e.settings]), s = Me(() => {
|
|
1923
1923
|
if (!d.value && !i.value) return null;
|
|
1924
1924
|
const n = {
|
|
1925
1925
|
[`${l.value}`]: !0,
|
|
@@ -1928,8 +1928,8 @@ const $t = /* @__PURE__ */ oe({
|
|
|
1928
1928
|
};
|
|
1929
1929
|
return r("div", {
|
|
1930
1930
|
class: n
|
|
1931
|
-
}, [
|
|
1932
|
-
}, [() => o.value, () => i.value, () => d.value, () =>
|
|
1931
|
+
}, [$.value, v.value]);
|
|
1932
|
+
}, [() => o.value, () => i.value, () => d.value, () => $.value, () => e.prefixCls, () => v.value]);
|
|
1933
1933
|
return () => a(r("div", {
|
|
1934
1934
|
class: `${e.prefixCls} ${l.value}`
|
|
1935
1935
|
}, [s.value]));
|
|
@@ -2258,19 +2258,19 @@ const da = {
|
|
|
2258
2258
|
}), {
|
|
2259
2259
|
wrapSSR: d,
|
|
2260
2260
|
hashId: h
|
|
2261
|
-
} = ze("ProBaseTable", [ha], i),
|
|
2262
|
-
width:
|
|
2261
|
+
} = ze("ProBaseTable", [ha], i), b = ma(), {
|
|
2262
|
+
width: $
|
|
2263
2263
|
} = vl(), v = xt(), s = D(), n = D(), c = D(e.waitRequest);
|
|
2264
2264
|
Ie(() => c.value = e.waitRequest);
|
|
2265
2265
|
const {
|
|
2266
2266
|
toggle: g,
|
|
2267
2267
|
isFullscreen: m
|
|
2268
|
-
} = Ct(s), S =
|
|
2268
|
+
} = Ct(s), S = p(() => ({
|
|
2269
2269
|
...e
|
|
2270
|
-
})), P =
|
|
2270
|
+
})), P = p(() => !b.value.xl), R = p(() => {
|
|
2271
2271
|
var f, F;
|
|
2272
2272
|
return e.virtualScroll && ll(!((f = e.scroll) != null && f.y), "参数scroll的Y值不能为空!"), !!((F = e.scroll) != null && F.y && e.virtualScroll);
|
|
2273
|
-
}), k =
|
|
2273
|
+
}), k = p(() => {
|
|
2274
2274
|
const f = (e.columns || []).filter((F) => F.key || F.dataIndex).map((F) => ({
|
|
2275
2275
|
...F,
|
|
2276
2276
|
key: F.key || F.dataIndex,
|
|
@@ -2304,21 +2304,21 @@ const da = {
|
|
|
2304
2304
|
pagination: ae(e, "pagination")
|
|
2305
2305
|
}), we = Gl(e), {
|
|
2306
2306
|
proScroll: t,
|
|
2307
|
-
breakpoint:
|
|
2307
|
+
breakpoint: C
|
|
2308
2308
|
} = ql({
|
|
2309
2309
|
...we,
|
|
2310
|
-
innerWidth:
|
|
2310
|
+
innerWidth: $,
|
|
2311
2311
|
columns: k,
|
|
2312
|
-
screens:
|
|
2313
|
-
}),
|
|
2312
|
+
screens: b
|
|
2313
|
+
}), O = Wl(e), {
|
|
2314
2314
|
proColumns: y,
|
|
2315
|
-
cacheProColumns:
|
|
2315
|
+
cacheProColumns: T,
|
|
2316
2316
|
setColumns: E,
|
|
2317
2317
|
changeColumns: K,
|
|
2318
2318
|
resizeColumnWidth: w
|
|
2319
2319
|
} = _l({
|
|
2320
|
-
...
|
|
2321
|
-
breakpoint:
|
|
2320
|
+
...O,
|
|
2321
|
+
breakpoint: C,
|
|
2322
2322
|
scroll: t,
|
|
2323
2323
|
columns: k
|
|
2324
2324
|
}), {
|
|
@@ -2329,7 +2329,7 @@ const da = {
|
|
|
2329
2329
|
cacheColumnsMap: Te,
|
|
2330
2330
|
setSortKeyColumns: J
|
|
2331
2331
|
} = Hl({
|
|
2332
|
-
columns:
|
|
2332
|
+
columns: T,
|
|
2333
2333
|
columnsState: ae(e, "columnsState"),
|
|
2334
2334
|
changeColumns: K
|
|
2335
2335
|
}), {
|
|
@@ -2373,31 +2373,31 @@ const da = {
|
|
|
2373
2373
|
columns: y,
|
|
2374
2374
|
formParamsRef: A,
|
|
2375
2375
|
onBeforeSearchSubmit: e.onBeforeSearchSubmit,
|
|
2376
|
-
hasCustomRender:
|
|
2377
|
-
}, a), $e =
|
|
2376
|
+
hasCustomRender: p(() => xe(e.customRender || (l == null ? void 0 : l.customRender)))
|
|
2377
|
+
}, a), $e = p(() => e.options ? {
|
|
2378
2378
|
...va,
|
|
2379
2379
|
...Q(e.options) ? e.options : {}
|
|
2380
|
-
} : !1), Dt =
|
|
2380
|
+
} : !1), Dt = p(() => ({
|
|
2381
2381
|
size: x(H),
|
|
2382
2382
|
scroll: x(t),
|
|
2383
2383
|
dataSource: x(pe),
|
|
2384
2384
|
pagination: x(M),
|
|
2385
2385
|
virtualScroll: R.value,
|
|
2386
2386
|
columns: x(y).filter((f) => f.show || f.show === void 0)
|
|
2387
|
-
})), lt =
|
|
2387
|
+
})), lt = p(() => {
|
|
2388
2388
|
var F, I;
|
|
2389
2389
|
const f = Q(e.loading) ? Ee(e.loading, "spinning") : {};
|
|
2390
2390
|
return !f.indicator && ((F = v == null ? void 0 : v.indicator) != null && F.value) && (f.indicator = (I = v == null ? void 0 : v.indicator) == null ? void 0 : I.value), {
|
|
2391
2391
|
spinning: e.showLoading ? xe(L.value) : !1,
|
|
2392
2392
|
...f
|
|
2393
2393
|
};
|
|
2394
|
-
}), at =
|
|
2394
|
+
}), at = p(() => {
|
|
2395
2395
|
var j;
|
|
2396
2396
|
let f;
|
|
2397
2397
|
const F = x(S).direction === "rtl" ? "bottomLeft" : "right", I = (j = x(M)) == null ? void 0 : j.position;
|
|
2398
2398
|
if (I !== null && Array.isArray(I)) {
|
|
2399
|
-
const
|
|
2400
|
-
!
|
|
2399
|
+
const B = I.find((N) => N.includes("top")), V = I.find((N) => N.includes("bottom")), ee = I.every((N) => `${N}` == "none");
|
|
2400
|
+
!B && !V && !ee && (f = F), B && (f = B.toLowerCase().replace("top", "")), V && (f = V.toLowerCase().replace("bottom", ""));
|
|
2401
2401
|
} else
|
|
2402
2402
|
f = F;
|
|
2403
2403
|
return f;
|
|
@@ -2426,7 +2426,7 @@ const da = {
|
|
|
2426
2426
|
}, Et = (f, F) => {
|
|
2427
2427
|
a("expand", f, F);
|
|
2428
2428
|
}, zt = (f, F) => w(f, F), Kt = (f, F, I) => {
|
|
2429
|
-
var
|
|
2429
|
+
var B, V, ee;
|
|
2430
2430
|
let j = f;
|
|
2431
2431
|
if (F) {
|
|
2432
2432
|
const N = document.querySelector(`.${i} .ant-table-tbody`);
|
|
@@ -2443,7 +2443,7 @@ const da = {
|
|
|
2443
2443
|
class: `${i}-ellipsis-text`
|
|
2444
2444
|
}, [f])]
|
|
2445
2445
|
})]), I.copyable) {
|
|
2446
|
-
const U = be(f) ? typeof ((
|
|
2446
|
+
const U = be(f) ? typeof ((B = f == null ? void 0 : f[0]) == null ? void 0 : B.children) == "string" ? (V = f == null ? void 0 : f[0]) == null ? void 0 : V.children : "" : f.toString(), te = typeof I.copyText == "function" ? (ee = I.copyText) == null ? void 0 : ee.call(I, I) : I.copyText || U;
|
|
2447
2447
|
j = r("div", {
|
|
2448
2448
|
class: `${i}-copyable`
|
|
2449
2449
|
}, [r(ne, {
|
|
@@ -2467,10 +2467,10 @@ const da = {
|
|
|
2467
2467
|
return j;
|
|
2468
2468
|
};
|
|
2469
2469
|
function it() {
|
|
2470
|
-
var I, j,
|
|
2470
|
+
var I, j, B, V, ee;
|
|
2471
2471
|
const f = Se(l, e, "emptyText");
|
|
2472
2472
|
if (f !== !1 && ((I = v == null ? void 0 : v.emptyText) == null ? void 0 : I.value) !== !1) {
|
|
2473
|
-
const N = ((j = e.emptyTextProps) == null ? void 0 : j.extraProps) || {}, U = f || ((
|
|
2473
|
+
const N = ((j = e.emptyTextProps) == null ? void 0 : j.extraProps) || {}, U = f || ((B = v == null ? void 0 : v.emptyText) == null ? void 0 : B.value), te = Ce(U), le = te ? yt(U, N) : gt(U || []);
|
|
2474
2474
|
return r("div", {
|
|
2475
2475
|
class: je(`${i}-empty-text`, h.value, (V = e.emptyTextProps) == null ? void 0 : V.class),
|
|
2476
2476
|
style: (ee = e.emptyTextProps) == null ? void 0 : ee.style
|
|
@@ -2493,7 +2493,7 @@ const da = {
|
|
|
2493
2493
|
}
|
|
2494
2494
|
return r(Ne, null, null);
|
|
2495
2495
|
}, Yt = (f) => {
|
|
2496
|
-
var
|
|
2496
|
+
var B, V;
|
|
2497
2497
|
const F = Se(l, e, "headerTitle"), I = Se(l, e, "titleTip"), j = Se(l, e, "toolBarBtn");
|
|
2498
2498
|
return r(fa, {
|
|
2499
2499
|
headerTitle: F,
|
|
@@ -2501,7 +2501,7 @@ const da = {
|
|
|
2501
2501
|
titleTipText: e.titleTipText,
|
|
2502
2502
|
options: se($e.value) ? $e.value : {
|
|
2503
2503
|
...$e.value,
|
|
2504
|
-
setting: f ? !1 : (
|
|
2504
|
+
setting: f ? !1 : (B = $e.value) == null ? void 0 : B.setting,
|
|
2505
2505
|
density: f ? !1 : (V = $e.value) == null ? void 0 : V.density
|
|
2506
2506
|
},
|
|
2507
2507
|
settingExtra: Se(l, e, "settingExtra"),
|
|
@@ -2548,8 +2548,8 @@ const da = {
|
|
|
2548
2548
|
dataSource: pe,
|
|
2549
2549
|
pageState: Z,
|
|
2550
2550
|
pagination: M.value,
|
|
2551
|
-
selectedKey:
|
|
2552
|
-
selectedItem:
|
|
2551
|
+
selectedKey: p(() => Xe.value),
|
|
2552
|
+
selectedItem: p(() => Ft.value),
|
|
2553
2553
|
rowsSelection: {
|
|
2554
2554
|
clear: Pt,
|
|
2555
2555
|
select: Je,
|
|
@@ -2604,12 +2604,12 @@ const da = {
|
|
|
2604
2604
|
} : null
|
|
2605
2605
|
}), !R.value && Yt(f), f ? r(_e, lt.value, {
|
|
2606
2606
|
default: () => {
|
|
2607
|
-
var j,
|
|
2607
|
+
var j, B, V;
|
|
2608
2608
|
return [r("div", {
|
|
2609
2609
|
class: `${i}-wrapper ${h.value}`
|
|
2610
2610
|
}, [r("div", {
|
|
2611
2611
|
class: je(`${i}-list`, h.value, (j = e.tableProps) == null ? void 0 : j.class),
|
|
2612
|
-
style: (
|
|
2612
|
+
style: (B = e.tableProps) == null ? void 0 : B.style
|
|
2613
2613
|
}, [At()]), e.pagination !== !1 && ((V = pe.value) == null ? void 0 : V.length) > 0 && r(Tl, X({
|
|
2614
2614
|
class: {
|
|
2615
2615
|
[`${i}-pagination ${h.value}`]: !0,
|
|
@@ -2628,15 +2628,15 @@ const da = {
|
|
|
2628
2628
|
var U, te, le;
|
|
2629
2629
|
e.transformCellText && typeof e.transformCellText && ((U = e.transformCellText) == null || U.call(e, j));
|
|
2630
2630
|
const {
|
|
2631
|
-
column:
|
|
2632
|
-
} = j, V = (
|
|
2631
|
+
column: B
|
|
2632
|
+
} = j, V = (B == null ? void 0 : B.key) || (B == null ? void 0 : B.dataIndex);
|
|
2633
2633
|
let ee = !0, N = j.text;
|
|
2634
2634
|
if (be(N) && N.length === 1 && !Ce(N == null ? void 0 : N[0])) {
|
|
2635
2635
|
N = N == null ? void 0 : N[0];
|
|
2636
|
-
const ve = Ut(N, (
|
|
2637
|
-
ee = ve.success, N = Ol(ve.value, (
|
|
2636
|
+
const ve = Ut(N, (B == null ? void 0 : B.columnEmptyText) || (e == null ? void 0 : e.columnEmptyText) || "");
|
|
2637
|
+
ee = ve.success, N = Ol(ve.value, (B == null ? void 0 : B.valueType) || ((le = (te = e.columns) == null ? void 0 : te.find((st) => (st.key || st.dataIndex) === V)) == null ? void 0 : le.valueType), i, h.value);
|
|
2638
2638
|
}
|
|
2639
|
-
return
|
|
2639
|
+
return B != null && B.ellipsis ? Kt(N, ee, B) : N;
|
|
2640
2640
|
},
|
|
2641
2641
|
rowSelection: e.rowSelection ? {
|
|
2642
2642
|
...Ee(e.rowSelection, ["onSelect", "onSelectAll", "onChange", "selectedRowKeys"]),
|
|
@@ -2648,7 +2648,7 @@ const da = {
|
|
|
2648
2648
|
onChange: ut,
|
|
2649
2649
|
onExpandedRowsChange: Nt,
|
|
2650
2650
|
onExpand: Et,
|
|
2651
|
-
onResizeColumn: (j,
|
|
2651
|
+
onResizeColumn: (j, B) => zt(j, B)
|
|
2652
2652
|
}), {
|
|
2653
2653
|
...l,
|
|
2654
2654
|
emptyText: () => it()
|