@gx-design-vue/pro-table 0.2.0-beta.42 → 0.2.0-beta.43
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.mjs +242 -242
- package/dist/pro-table.umd.js +1 -1
- package/package.json +1 -1
package/dist/pro-table.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { computed as S, ref as O, watch as X, unref as
|
|
1
|
+
import { computed as S, ref as O, watch as X, unref as v, watchEffect as he, reactive as de, onUnmounted as kt, onDeactivated as Et, onMounted as zt, provide as Kt, inject as Yt, defineComponent as ae, createVNode as i, Fragment as Ie, nextTick as Lt, mergeProps as U, createTextVNode as pe, renderSlot as At, isVNode as Ce, cloneVNode as Vt, toRef as Z, toRaw as Me } from "vue";
|
|
2
2
|
import { isBoolean as te, isObject as ue, getSlot as ze, isFunction as $e, arrayRepeat as Ht, runFunction as Wt, handleCurrentPage as _t, getSortIndex as Gt, isDeepEqualReact as nt, genColumnKey as ot, compareArray as qt, isNumber as ut, isString as Ut, isArray as Ke, getPrefixCls as Ve, getRandomNumber as Ye, handleShowIndex as Xt, getSlotVNode as ge, hanndleField as Jt } from "@gx-design-vue/pro-utils";
|
|
3
3
|
import { pick as it, cloneDeep as J, omit as ye } from "lodash-es";
|
|
4
4
|
import { useFullscreen as st, useWindowSize as Qt } from "@vueuse/core";
|
|
@@ -44,8 +44,8 @@ function Cl(e) {
|
|
|
44
44
|
return (u = n == null ? void 0 : n.value) == null ? void 0 : u.selectedItem;
|
|
45
45
|
}),
|
|
46
46
|
setPageAndReload: (u, l, s, r) => {
|
|
47
|
-
var w,
|
|
48
|
-
return (
|
|
47
|
+
var w, m;
|
|
48
|
+
return (m = (w = n.value) == null ? void 0 : w.setPageAndReload) == null ? void 0 : m.call(w, u, l, s, r);
|
|
49
49
|
},
|
|
50
50
|
setPagination: (u) => {
|
|
51
51
|
var l, s;
|
|
@@ -526,7 +526,7 @@ function wa({ emit: e, loading: n }) {
|
|
|
526
526
|
X(() => n.value, (s) => {
|
|
527
527
|
t.value = te(s) ? s : ue(s) ? s == null ? void 0 : s.spinning : t.value;
|
|
528
528
|
});
|
|
529
|
-
const o = S(() =>
|
|
529
|
+
const o = S(() => v(t) || !1);
|
|
530
530
|
function u(s) {
|
|
531
531
|
t.value = s, e("loadingChange", !0);
|
|
532
532
|
}
|
|
@@ -558,10 +558,10 @@ function Ra({
|
|
|
558
558
|
delete o[s];
|
|
559
559
|
});
|
|
560
560
|
const u = S(() => {
|
|
561
|
-
var
|
|
561
|
+
var m;
|
|
562
562
|
if (te(t.value) && !t.value)
|
|
563
563
|
return !1;
|
|
564
|
-
const s = ze(e,
|
|
564
|
+
const s = ze(e, v(n), "pageItemRender"), r = $e(s) ? {
|
|
565
565
|
itemRender: ({
|
|
566
566
|
page: g,
|
|
567
567
|
type: y,
|
|
@@ -579,13 +579,13 @@ function Ra({
|
|
|
579
579
|
showSizeChanger: !0,
|
|
580
580
|
pageSizeOptions: ["10", "20", "50", "100"],
|
|
581
581
|
...t.value || {},
|
|
582
|
-
...
|
|
582
|
+
...v(o),
|
|
583
583
|
...r || {}
|
|
584
584
|
};
|
|
585
|
-
return (
|
|
585
|
+
return (m = t.value) != null && m.showTotal || (w.showTotal = (g) => `共${g < w.pageSize ? 1 : Math.ceil(g / (w.pageSize || 10))}页 ${g}条记录`), w;
|
|
586
586
|
});
|
|
587
587
|
function l(s) {
|
|
588
|
-
const r =
|
|
588
|
+
const r = v(u);
|
|
589
589
|
Object.assign(o, {
|
|
590
590
|
...r || {},
|
|
591
591
|
...s
|
|
@@ -599,35 +599,35 @@ function Ra({
|
|
|
599
599
|
function $a(e, n) {
|
|
600
600
|
const t = O([]), o = O([]);
|
|
601
601
|
X(() => {
|
|
602
|
-
var
|
|
603
|
-
return (
|
|
604
|
-
}, (
|
|
605
|
-
t.value = Ht([...
|
|
602
|
+
var m;
|
|
603
|
+
return (m = n.value) == null ? void 0 : m.selectedRowKeys;
|
|
604
|
+
}, (m) => {
|
|
605
|
+
t.value = Ht([...m || []]);
|
|
606
606
|
}, {
|
|
607
607
|
deep: !0,
|
|
608
608
|
immediate: !0
|
|
609
609
|
});
|
|
610
|
-
const u = (
|
|
611
|
-
e.value && (g ?
|
|
610
|
+
const u = (m, g) => {
|
|
611
|
+
e.value && (g ? m != null && m[e.value] && (t.value.push(m[e.value]), o.value.push(m)) : (t.value = t.value.filter((y) => y !== m[e.value]), o.value = o.value.filter((y) => y[e.value] !== m[e.value])));
|
|
612
612
|
}, l = () => {
|
|
613
|
-
var
|
|
614
|
-
n.value && ((g = (
|
|
613
|
+
var m, g;
|
|
614
|
+
n.value && ((g = (m = n.value) == null ? void 0 : m.onChange) == null || g.call(m, t.value, o.value));
|
|
615
615
|
};
|
|
616
616
|
return {
|
|
617
617
|
selectedKey: t,
|
|
618
618
|
selectedItem: o,
|
|
619
619
|
selectRowKey: u,
|
|
620
|
-
selectAllRowKey: (
|
|
621
|
-
e.value && (
|
|
620
|
+
selectAllRowKey: (m, g, y) => {
|
|
621
|
+
e.value && (m ? g.map((c) => (t.value.every((b) => b !== (c == null ? void 0 : c[e.value])) && c != null && c[e.value] && (t.value.push(c[e.value]), o.value.push(c)), c)) : y.map((c) => (t.value.some((b) => b === (c == null ? void 0 : c[e.value])) && (t.value = t.value.filter((b) => b !== c[e.value]), o.value = o.value.filter((b) => b[e.value] !== c[e.value])), c)));
|
|
622
622
|
},
|
|
623
|
-
removeRowKeys: (
|
|
624
|
-
t.value = t.value.filter((g) => !
|
|
623
|
+
removeRowKeys: (m) => {
|
|
624
|
+
t.value = t.value.filter((g) => !m.includes(g)), o.value = o.value.filter((g) => !m.includes(g == null ? void 0 : g[e.value || ""])), l();
|
|
625
625
|
},
|
|
626
626
|
changeRowKey: l,
|
|
627
|
-
syncSelectedRows: (
|
|
627
|
+
syncSelectedRows: (m) => {
|
|
628
628
|
if (e.value && t.value.length !== o.value.length) {
|
|
629
629
|
const g = o.value.map((c) => c[e.value]), y = t.value.filter((c) => !g.includes(c));
|
|
630
|
-
|
|
630
|
+
m.forEach((c) => {
|
|
631
631
|
y.includes(c[e.value]) && o.value.push(J(c));
|
|
632
632
|
});
|
|
633
633
|
}
|
|
@@ -641,8 +641,8 @@ function Fa(e, n) {
|
|
|
641
641
|
}
|
|
642
642
|
async function s(...r) {
|
|
643
643
|
return t.value === 0 || t.value === void 0 ? u.value(...r) : (l(), new Promise(async (w) => {
|
|
644
|
-
var
|
|
645
|
-
(
|
|
644
|
+
var m;
|
|
645
|
+
(m = r[0]) != null && m.immediate ? w(await u.value(...r)) : o.value = setTimeout(async () => {
|
|
646
646
|
w(await u.value(...r));
|
|
647
647
|
}, t.value);
|
|
648
648
|
}));
|
|
@@ -662,12 +662,12 @@ function Ia(e) {
|
|
|
662
662
|
dataSource: l
|
|
663
663
|
};
|
|
664
664
|
}
|
|
665
|
-
function Pa({ polling: e, request: n, postData: t, dataSource: o, waitRequest: u, debounceTime: l }, { columns: s, loadingStatus: r, setLoading: w, setColumns:
|
|
666
|
-
const T = O(), P = O(!0), D = O(!1), Y = O(!1), j = O([]), L = O(), G = Fa(async (
|
|
665
|
+
function Pa({ polling: e, request: n, postData: t, dataSource: o, waitRequest: u, debounceTime: l }, { columns: s, loadingStatus: r, setLoading: w, setColumns: m, removeRowKeys: g, syncSelectedRows: y, formParamsRef: c, setPagination: b, getPaginationInfo: d, onBeforeSearchSubmit: f, hasCustomRender: x }, $) {
|
|
666
|
+
const T = O(), P = O(!0), D = O(!1), Y = O(!1), j = O([]), L = O(), G = Fa(async (h) => {
|
|
667
667
|
L.value && clearTimeout(L.value);
|
|
668
|
-
const N = await I(
|
|
668
|
+
const N = await I(h), A = Wt(e.value, N);
|
|
669
669
|
return A && !T.value && (L.value = setTimeout(() => {
|
|
670
|
-
G.run({ ...
|
|
670
|
+
G.run({ ...h, isPolling: A });
|
|
671
671
|
}, Math.max(A, 2e3))), N;
|
|
672
672
|
}, l.value || 10);
|
|
673
673
|
kt(() => {
|
|
@@ -688,47 +688,47 @@ function Pa({ polling: e, request: n, postData: t, dataSource: o, waitRequest: u
|
|
|
688
688
|
});
|
|
689
689
|
const M = S(() => {
|
|
690
690
|
if (x.value)
|
|
691
|
-
return
|
|
692
|
-
const
|
|
693
|
-
return !
|
|
694
|
-
}), H = S(() =>
|
|
695
|
-
function a(
|
|
696
|
-
Y.value =
|
|
691
|
+
return v(j);
|
|
692
|
+
const h = v(s).filter((N) => N.show || N.show === void 0);
|
|
693
|
+
return !v(j) || !h || h.length === 0 ? [] : v(j);
|
|
694
|
+
}), H = S(() => v(j).some((h) => h.children && h.children.length > 0));
|
|
695
|
+
function a(h) {
|
|
696
|
+
Y.value = h;
|
|
697
697
|
}
|
|
698
|
-
function p(
|
|
699
|
-
G.run({ pagination:
|
|
698
|
+
function p(h, N, A, K) {
|
|
699
|
+
G.run({ pagination: h, filters: N, sorter: A, extra: K, isPolling: !1 }), $("change", h, N, A, K);
|
|
700
700
|
}
|
|
701
|
-
const I = async (
|
|
701
|
+
const I = async (h = {}) => {
|
|
702
702
|
var Se, xe, we;
|
|
703
|
-
const { pagination: N, filters: A = {}, sorter: K = {}, removeKeys: ve = [], isPolling: Oe = !1 } =
|
|
704
|
-
if (!
|
|
703
|
+
const { pagination: N, filters: A = {}, sorter: K = {}, removeKeys: ve = [], isPolling: Oe = !1 } = h;
|
|
704
|
+
if (!v(n) || !$e(v(n)) || v(u) && r.value || D.value)
|
|
705
705
|
return o.value || [];
|
|
706
|
-
if (D.value = !0, !Oe ||
|
|
706
|
+
if (D.value = !0, !Oe || v(u) || P.value ? w(!0) : a(!0), v(u)) {
|
|
707
707
|
P.value = !1, D.value = !1;
|
|
708
708
|
return;
|
|
709
709
|
}
|
|
710
710
|
N && b(N);
|
|
711
711
|
try {
|
|
712
712
|
let le = {};
|
|
713
|
-
if (te(N) && !N || te(
|
|
713
|
+
if (te(N) && !N || te(d))
|
|
714
714
|
le = {};
|
|
715
715
|
else {
|
|
716
|
-
const { current: k = 1, pageSize: se = 10, total: q } =
|
|
716
|
+
const { current: k = 1, pageSize: se = 10, total: q } = v(d) || {};
|
|
717
717
|
le.pageNum = _t({ current: k, pageSize: se, total: q }, ve.length), ve.length && g(ve), le.pageSize = se;
|
|
718
718
|
}
|
|
719
719
|
(ue(K) ? [K] : K).forEach((k) => {
|
|
720
720
|
const se = (k == null ? void 0 : k.columnKey) || (k == null ? void 0 : k.field);
|
|
721
|
-
k && (k != null && k.order) ? v(
|
|
721
|
+
k && (k != null && k.order) ? m(v(s).map((q) => (q.dataIndex === se ? q.sortOrder = k == null ? void 0 : k.order : q.sortOrder = null, q))) : k && m(v(s).map((q) => (q.dataIndex === se && (q.sortOrder = null), q)));
|
|
722
722
|
});
|
|
723
723
|
let fe = {
|
|
724
724
|
...le || {},
|
|
725
|
-
...
|
|
725
|
+
...h.params,
|
|
726
726
|
...c
|
|
727
727
|
};
|
|
728
|
-
|
|
728
|
+
f && $e(f) && (fe = await f(fe, K, A));
|
|
729
729
|
let V = [];
|
|
730
|
-
const ne = await ((Se =
|
|
731
|
-
return D.value = !1, ne && ne.success ? (V = ne.data || [],
|
|
730
|
+
const ne = await ((Se = v(n)) == null ? void 0 : Se(fe, K, A));
|
|
731
|
+
return D.value = !1, ne && ne.success ? (V = ne.data || [], v(t) && $e(v(t)) && (V = await ((xe = v(t)) == null ? void 0 : xe(V))), y(V), (ne.total || (V == null ? void 0 : V.length) || 0) !== ((we = v(d)) == null ? void 0 : we.total) && b({
|
|
732
732
|
total: ne.total || (V == null ? void 0 : V.length) || 0
|
|
733
733
|
}), F(V), V) : [];
|
|
734
734
|
} catch (le) {
|
|
@@ -738,20 +738,20 @@ function Pa({ polling: e, request: n, postData: t, dataSource: o, waitRequest: u
|
|
|
738
738
|
}
|
|
739
739
|
return [];
|
|
740
740
|
};
|
|
741
|
-
function F(
|
|
742
|
-
const N = Gt(J(
|
|
741
|
+
function F(h) {
|
|
742
|
+
const N = Gt(J(h), v(d.value));
|
|
743
743
|
nt(N, j.value) || (j.value = N);
|
|
744
744
|
}
|
|
745
|
-
function B({ key:
|
|
745
|
+
function B({ key: h, params: N, type: A = "update" }) {
|
|
746
746
|
switch (A) {
|
|
747
747
|
case "update":
|
|
748
|
-
j.value = j.value.map((K) =>
|
|
748
|
+
j.value = j.value.map((K) => h && N[h] === K[h] ? { ...K, ...N } : K);
|
|
749
749
|
break;
|
|
750
750
|
case "add":
|
|
751
751
|
j.value.push(N);
|
|
752
752
|
break;
|
|
753
753
|
case "delete":
|
|
754
|
-
j.value = j.value.filter((K) =>
|
|
754
|
+
j.value = j.value.filter((K) => h ? h && N[h] !== K[h] : !0);
|
|
755
755
|
break;
|
|
756
756
|
}
|
|
757
757
|
}
|
|
@@ -761,8 +761,8 @@ function Pa({ polling: e, request: n, postData: t, dataSource: o, waitRequest: u
|
|
|
761
761
|
reSetDataList: F,
|
|
762
762
|
changeDataValue: B,
|
|
763
763
|
handleTableChange: p,
|
|
764
|
-
reload: async (
|
|
765
|
-
|
|
764
|
+
reload: async (h) => {
|
|
765
|
+
v(n) ? await G.run({ ...h, isPolling: !1 }) : $("reload");
|
|
766
766
|
}
|
|
767
767
|
};
|
|
768
768
|
}
|
|
@@ -780,41 +780,41 @@ function Ba({ search: e, searchMap: n, params: t, columns: o, setPagination: u }
|
|
|
780
780
|
return ue(e.value) ? !!((y = e.value) != null && y.showSearch) : !!e.value;
|
|
781
781
|
});
|
|
782
782
|
zt(() => {
|
|
783
|
-
|
|
783
|
+
m("all");
|
|
784
784
|
}), X(() => t.value, () => {
|
|
785
|
-
|
|
785
|
+
m("params");
|
|
786
786
|
}, {
|
|
787
787
|
deep: !0
|
|
788
788
|
}), X(() => n.value, () => {
|
|
789
|
-
|
|
789
|
+
m("searchMap");
|
|
790
790
|
}, {
|
|
791
791
|
deep: !0
|
|
792
792
|
}), X(() => o.value, () => {
|
|
793
|
-
|
|
793
|
+
m("columns");
|
|
794
794
|
}, {
|
|
795
795
|
deep: !0
|
|
796
796
|
});
|
|
797
|
-
const
|
|
798
|
-
var b,
|
|
797
|
+
const m = (y) => {
|
|
798
|
+
var b, d;
|
|
799
799
|
const c = [];
|
|
800
|
-
if ((y === "all" || y === "searchMap") && ((b = n.value) == null || b.forEach((
|
|
801
|
-
r.value.some((x) => x.name ===
|
|
800
|
+
if ((y === "all" || y === "searchMap") && ((b = n.value) == null || b.forEach((f) => c.push(f)), c.forEach((f) => {
|
|
801
|
+
r.value.some((x) => x.name === f.name) ? r.value = r.value.map((x) => x.name === f.name ? {
|
|
802
802
|
...x,
|
|
803
|
-
...
|
|
804
|
-
} : x) : r.value.push(
|
|
805
|
-
})), (y === "all" || y === "columns") && ((
|
|
806
|
-
|
|
807
|
-
}), c.forEach((
|
|
808
|
-
r.value.some((x) => x.name ===
|
|
803
|
+
...f
|
|
804
|
+
} : x) : r.value.push(f);
|
|
805
|
+
})), (y === "all" || y === "columns") && ((d = o.value) != null && d.length) && (o.value && o.value.forEach((f) => {
|
|
806
|
+
f.searchConfig && c.push(f.searchConfig);
|
|
807
|
+
}), c.forEach((f) => {
|
|
808
|
+
r.value.some((x) => x.name === f.name) ? r.value = r.value.map((x) => x.name === f.name ? {
|
|
809
809
|
...x,
|
|
810
|
-
...
|
|
811
|
-
} : x) : r.value.push(
|
|
810
|
+
...f
|
|
811
|
+
} : x) : r.value.push(f);
|
|
812
812
|
})), y === "all" || y === "searchMap" || y === "columns") {
|
|
813
813
|
u({ current: 1 });
|
|
814
|
-
const
|
|
815
|
-
Object.assign(s, { ...
|
|
816
|
-
for (const x in
|
|
817
|
-
l[x] || (l[x] =
|
|
814
|
+
const f = Oa(c);
|
|
815
|
+
Object.assign(s, { ...f });
|
|
816
|
+
for (const x in f)
|
|
817
|
+
l[x] || (l[x] = f[x]);
|
|
818
818
|
}
|
|
819
819
|
(y === "all" || y === "params") && !w.value && (u({ current: 1 }), Object.assign(l, t.value));
|
|
820
820
|
};
|
|
@@ -827,31 +827,31 @@ function Da({ columns: e, columnsState: n, changeColumns: t }) {
|
|
|
827
827
|
const o = O(void 0), u = de({}), l = de({}), s = de({}), r = O([]);
|
|
828
828
|
X(() => e.value, () => {
|
|
829
829
|
var g;
|
|
830
|
-
(g =
|
|
831
|
-
const
|
|
832
|
-
|
|
830
|
+
(g = v(e)) == null || g.forEach(({ show: y, key: c, fixed: b }, d) => {
|
|
831
|
+
const f = ot(c, d);
|
|
832
|
+
f && (s[f] = { show: y === void 0 ? !0 : y, fixed: b });
|
|
833
833
|
});
|
|
834
834
|
}, {
|
|
835
835
|
deep: !0,
|
|
836
836
|
immediate: !0
|
|
837
837
|
}), X(() => e.value, () => {
|
|
838
|
-
const g =
|
|
839
|
-
|
|
838
|
+
const g = v(e).map((y) => y.key);
|
|
839
|
+
m(g);
|
|
840
840
|
}, {
|
|
841
841
|
deep: !0,
|
|
842
842
|
immediate: !0
|
|
843
843
|
}), he(() => {
|
|
844
844
|
var y;
|
|
845
845
|
const g = {
|
|
846
|
-
...(y =
|
|
847
|
-
...
|
|
846
|
+
...(y = v(n)) == null ? void 0 : y.value,
|
|
847
|
+
...v(s)
|
|
848
848
|
};
|
|
849
849
|
Object.assign(u, g), Object.assign(l, g);
|
|
850
850
|
});
|
|
851
851
|
function w(g, y) {
|
|
852
852
|
o.value = y, Object.assign(u, g), t == null || t(u, y === "fixed");
|
|
853
853
|
}
|
|
854
|
-
function
|
|
854
|
+
function m(g) {
|
|
855
855
|
r.value = g;
|
|
856
856
|
}
|
|
857
857
|
return {
|
|
@@ -860,7 +860,7 @@ function Da({ columns: e, columnsState: n, changeColumns: t }) {
|
|
|
860
860
|
setColumnsMap: w,
|
|
861
861
|
sortKeyColumns: r,
|
|
862
862
|
cacheColumnsMap: l,
|
|
863
|
-
setSortKeyColumns:
|
|
863
|
+
setSortKeyColumns: m
|
|
864
864
|
};
|
|
865
865
|
}
|
|
866
866
|
function Ma(e) {
|
|
@@ -881,61 +881,61 @@ function Na({ scroll: e, columns: n, breakpoint: t, draggabled: o, autoScroll: u
|
|
|
881
881
|
() => u.value,
|
|
882
882
|
() => l.value
|
|
883
883
|
], () => {
|
|
884
|
-
s.value = J(g(
|
|
884
|
+
s.value = J(g(v(n))), r.value = J(g(v(n)));
|
|
885
885
|
}, {
|
|
886
886
|
deep: !0,
|
|
887
887
|
immediate: !0
|
|
888
888
|
});
|
|
889
889
|
const w = S(() => {
|
|
890
|
-
const
|
|
890
|
+
const d = m(v(s).filter(($) => $.fixed === "left")), f = m(v(s).filter(($) => $.fixed !== "left" && $.fixed !== "right")), x = m(v(s).filter(($) => $.fixed === "right"));
|
|
891
891
|
return [
|
|
892
|
-
...m,
|
|
893
892
|
...d,
|
|
893
|
+
...f,
|
|
894
894
|
...x
|
|
895
895
|
];
|
|
896
896
|
});
|
|
897
|
-
function
|
|
898
|
-
return
|
|
897
|
+
function m(d) {
|
|
898
|
+
return d.sort((f, x) => qt(f, x, "order", 0));
|
|
899
899
|
}
|
|
900
|
-
function g(
|
|
901
|
-
return J(
|
|
900
|
+
function g(d) {
|
|
901
|
+
return J(d).map((f, x) => {
|
|
902
902
|
var $;
|
|
903
|
-
if (
|
|
904
|
-
return
|
|
905
|
-
if (
|
|
906
|
-
if (($ =
|
|
907
|
-
|
|
903
|
+
if (f.dataIndex === "action" || x === d.length - 1 ? f.resizable = !1 : f.resizable = te(f.resizable) ? f.resizable : !!(ut(f.width) && v(o)), !f.width || v(l))
|
|
904
|
+
return f;
|
|
905
|
+
if (f.dataIndex === "action" && v(u))
|
|
906
|
+
if (($ = v(e)) != null && $.x || !v(t))
|
|
907
|
+
f.width = f.width || 100, f.fixed = "right";
|
|
908
908
|
else {
|
|
909
|
-
const T =
|
|
910
|
-
|
|
909
|
+
const T = v(n).find((P) => P.dataIndex === f.dataIndex);
|
|
910
|
+
f.width = (T == null ? void 0 : T.width) || "", f.fixed = T == null ? void 0 : T.fixed;
|
|
911
911
|
}
|
|
912
|
-
return
|
|
912
|
+
return f;
|
|
913
913
|
});
|
|
914
914
|
}
|
|
915
|
-
function y(
|
|
916
|
-
s.value = s.value.map((x) => (x.uuid ===
|
|
915
|
+
function y(d, f) {
|
|
916
|
+
s.value = s.value.map((x) => (x.uuid === f.uuid && (x.width = d), x));
|
|
917
917
|
}
|
|
918
|
-
function c(
|
|
919
|
-
if (
|
|
918
|
+
function c(d) {
|
|
919
|
+
if (d.length <= 0) {
|
|
920
920
|
s.value = [];
|
|
921
921
|
return;
|
|
922
922
|
}
|
|
923
|
-
nt(g(J(
|
|
923
|
+
nt(g(J(d)), s.value) || (s.value = g(J(d)));
|
|
924
924
|
}
|
|
925
|
-
function b(
|
|
926
|
-
let
|
|
927
|
-
|
|
925
|
+
function b(d) {
|
|
926
|
+
let f = J(n.value);
|
|
927
|
+
f = f.map((x) => {
|
|
928
928
|
var T, P, D;
|
|
929
929
|
const $ = x.key ? {
|
|
930
|
-
show: (T =
|
|
931
|
-
fixed: (P =
|
|
932
|
-
order: (D =
|
|
930
|
+
show: (T = d[x.key]) == null ? void 0 : T.show,
|
|
931
|
+
fixed: (P = d[x.key]) == null ? void 0 : P.fixed,
|
|
932
|
+
order: (D = d[x.key]) == null ? void 0 : D.order
|
|
933
933
|
} : {};
|
|
934
934
|
return {
|
|
935
935
|
...x,
|
|
936
936
|
...$
|
|
937
937
|
};
|
|
938
|
-
}), c(
|
|
938
|
+
}), c(f);
|
|
939
939
|
}
|
|
940
940
|
return {
|
|
941
941
|
breakpoint: t,
|
|
@@ -958,24 +958,24 @@ function ja(e) {
|
|
|
958
958
|
};
|
|
959
959
|
}
|
|
960
960
|
function ka({ scroll: e, columns: n, autoScroll: t, modalScroll: o, neverScroll: u, rowSelection: l, screens: s, innerWidth: r, scrollBreakpoint: w }) {
|
|
961
|
-
const
|
|
962
|
-
var c, b,
|
|
963
|
-
return
|
|
961
|
+
const m = S(() => {
|
|
962
|
+
var c, b, d;
|
|
963
|
+
return v(w) ? ut(v(w)) ? r.value > v(w) : Ut(v(w)) ? (c = s.value) == null ? void 0 : c[v(w)] : (b = s.value) == null ? void 0 : b.xl : (d = s.value) == null ? void 0 : d.xl;
|
|
964
964
|
}), g = S(() => {
|
|
965
965
|
let c = 0;
|
|
966
|
-
const b =
|
|
967
|
-
|
|
966
|
+
const b = v(l) ? 60 : 0, d = 150, f = J(v(n));
|
|
967
|
+
f.forEach((T) => {
|
|
968
968
|
c += Number.parseInt(T.width) || 0;
|
|
969
969
|
});
|
|
970
|
-
const $ =
|
|
971
|
-
return $ !== 0 && (c += $ *
|
|
970
|
+
const $ = f.filter((T) => !Reflect.has(T, "width")).length;
|
|
971
|
+
return $ !== 0 && (c += $ * d), b && (c += b), c;
|
|
972
972
|
});
|
|
973
973
|
return { getScrollRef: S(() => {
|
|
974
974
|
var c, b;
|
|
975
|
-
return
|
|
976
|
-
y: ((c =
|
|
977
|
-
} :
|
|
978
|
-
}), breakpoint:
|
|
975
|
+
return v(u) ? {} : v(e) && Object.keys(v(e)).length ? v(e) : v(o) ? {
|
|
976
|
+
y: ((c = v(e)) == null ? void 0 : c.y) || ((b = s.value) != null && b.xl ? 400 : 235)
|
|
977
|
+
} : v(t) ? m.value ? {} : te(m.value) ? { x: v(g) } : {} : {};
|
|
978
|
+
}), breakpoint: m };
|
|
979
979
|
}
|
|
980
980
|
const ft = Symbol("table-context"), Ea = (e = Symbol(), n) => Yt(e, n || {}), za = (e) => {
|
|
981
981
|
Kt(ft, e);
|
|
@@ -1067,7 +1067,7 @@ const Ya = (e) => ({
|
|
|
1067
1067
|
} = Pe("ProTableForm", [Ya], e.prefixCls), s = La(), {
|
|
1068
1068
|
formState: r,
|
|
1069
1069
|
resetFormState: w,
|
|
1070
|
-
changeFormState:
|
|
1070
|
+
changeFormState: m
|
|
1071
1071
|
} = Ka(e.defaultParams || {}, e.searchMap || []), g = O(!1), y = S(() => {
|
|
1072
1072
|
var a;
|
|
1073
1073
|
return !!((a = e.search) != null && a.showSearch);
|
|
@@ -1092,9 +1092,9 @@ const Ya = (e) => ({
|
|
|
1092
1092
|
}, {
|
|
1093
1093
|
value: "xs",
|
|
1094
1094
|
span: 1
|
|
1095
|
-
}],
|
|
1095
|
+
}], d = S(() => {
|
|
1096
1096
|
var a;
|
|
1097
|
-
return
|
|
1097
|
+
return f((a = e.search) == null ? void 0 : a.span);
|
|
1098
1098
|
});
|
|
1099
1099
|
X(() => {
|
|
1100
1100
|
var a;
|
|
@@ -1102,7 +1102,7 @@ const Ya = (e) => ({
|
|
|
1102
1102
|
}, (a) => {
|
|
1103
1103
|
g.value = g.value || !!a;
|
|
1104
1104
|
});
|
|
1105
|
-
const
|
|
1105
|
+
const f = (a) => {
|
|
1106
1106
|
let p = 4;
|
|
1107
1107
|
for (let I = 0; I < b.length; I += 1) {
|
|
1108
1108
|
const F = b[I].value;
|
|
@@ -1124,25 +1124,25 @@ const Ya = (e) => ({
|
|
|
1124
1124
|
var I, F, B;
|
|
1125
1125
|
switch (p.valueType) {
|
|
1126
1126
|
case "text":
|
|
1127
|
-
|
|
1127
|
+
m(p.name || "", a || p.initialValue || "");
|
|
1128
1128
|
break;
|
|
1129
1129
|
case "select":
|
|
1130
|
-
|
|
1130
|
+
m(p.name || "", a || a === 0 ? a : p.initialValue || void 0);
|
|
1131
1131
|
break;
|
|
1132
1132
|
case "treeSelect":
|
|
1133
|
-
|
|
1133
|
+
m(p.name || "", a || a === 0 ? a : p.initialValue || ((I = p.field) != null && I.treeCheckable || (F = p.field) != null && F.multiple ? [] : null));
|
|
1134
1134
|
break;
|
|
1135
1135
|
case "date":
|
|
1136
|
-
|
|
1136
|
+
m(p.name || "", a ? _(a).format(p.valueFormat || "YYYY-MM-DD") : p.initialValue || null);
|
|
1137
1137
|
break;
|
|
1138
1138
|
case "dateMonth":
|
|
1139
|
-
|
|
1139
|
+
m(p.name || "", a ? _(a).format("YYYY-MM") : p.initialValue || null);
|
|
1140
1140
|
break;
|
|
1141
1141
|
case "dateRange":
|
|
1142
|
-
|
|
1142
|
+
m(p.name || "", a && a.length > 0 ? [_(a[0]).format(p.valueFormat || "YYYY-MM-DD"), _(a[1]).format(p.valueFormat || "YYYY-MM-DD")] : p.initialValue || null);
|
|
1143
1143
|
break;
|
|
1144
1144
|
case "time":
|
|
1145
|
-
|
|
1145
|
+
m(p.name || "", a ? _(a).format(p.valueFormat || "HH:mm:ss") : p.initialValue || null);
|
|
1146
1146
|
break;
|
|
1147
1147
|
}
|
|
1148
1148
|
(B = e.search) != null && B.showSearch || p.valueType === "text" || (p.valueType === "treeSelect" || p.valueType, D());
|
|
@@ -1208,8 +1208,8 @@ const Ya = (e) => ({
|
|
|
1208
1208
|
value: r[a.name],
|
|
1209
1209
|
placeholder: a.placeholder || "请输入",
|
|
1210
1210
|
allowClear: a.allowClear || a.allowClear === !1 ? a.allowClear : !0,
|
|
1211
|
-
onChange: (
|
|
1212
|
-
onSearch: (
|
|
1211
|
+
onChange: (h) => T(h.target.value, a),
|
|
1212
|
+
onSearch: (h) => D()
|
|
1213
1213
|
}, a.field || {}), null);
|
|
1214
1214
|
break;
|
|
1215
1215
|
case "select":
|
|
@@ -1222,14 +1222,14 @@ const Ya = (e) => ({
|
|
|
1222
1222
|
placeholder: a.placeholder || "请选择",
|
|
1223
1223
|
showSearch: a.showSearch,
|
|
1224
1224
|
allowClear: a.allowClear || a.allowClear === !1 ? a.allowClear : !0,
|
|
1225
|
-
getPopupContainer: (
|
|
1225
|
+
getPopupContainer: (h) => h && h.parentNode ? h.parentNode : h,
|
|
1226
1226
|
notFoundContent: a.loading === void 0 ? void 0 : a.loading ? i(Le, {
|
|
1227
1227
|
size: "small"
|
|
1228
1228
|
}, null) : void 0,
|
|
1229
|
-
onChange: (
|
|
1230
|
-
options: (F = a == null ? void 0 : a.valueEnum) == null ? void 0 : F.map((
|
|
1231
|
-
label:
|
|
1232
|
-
value:
|
|
1229
|
+
onChange: (h) => T(h, a),
|
|
1230
|
+
options: (F = a == null ? void 0 : a.valueEnum) == null ? void 0 : F.map((h) => ({
|
|
1231
|
+
label: h.text,
|
|
1232
|
+
value: h.value
|
|
1233
1233
|
}))
|
|
1234
1234
|
}, a.field || {}), null);
|
|
1235
1235
|
break;
|
|
@@ -1242,11 +1242,11 @@ const Ya = (e) => ({
|
|
|
1242
1242
|
placeholder: a.placeholder || "请选择",
|
|
1243
1243
|
allowClear: a.allowClear || a.allowClear === !1 ? a.allowClear : !0,
|
|
1244
1244
|
treeData: a.valueEnum,
|
|
1245
|
-
getPopupContainer: (
|
|
1245
|
+
getPopupContainer: (h) => h && h.parentNode ? h.parentNode : h,
|
|
1246
1246
|
notFoundContent: a.loading === void 0 ? void 0 : a.loading ? i(Le, {
|
|
1247
1247
|
size: "small"
|
|
1248
1248
|
}, null) : void 0,
|
|
1249
|
-
onChange: (
|
|
1249
|
+
onChange: (h) => T(h, a)
|
|
1250
1250
|
}, a.field || {}), null);
|
|
1251
1251
|
break;
|
|
1252
1252
|
case "date":
|
|
@@ -1255,13 +1255,13 @@ const Ya = (e) => ({
|
|
|
1255
1255
|
width: "100%"
|
|
1256
1256
|
},
|
|
1257
1257
|
value: r[a.name] ? _(r[a.name], a.valueFormat || "YYYY-MM-DD") : void 0,
|
|
1258
|
-
getPopupContainer: (
|
|
1258
|
+
getPopupContainer: (h) => h && h.parentNode ? h.parentNode : h,
|
|
1259
1259
|
placeholder: a.placeholder || "请选择",
|
|
1260
1260
|
allowClear: a.allowClear || a.allowClear === !1 ? a.allowClear : !0,
|
|
1261
1261
|
format: a.valueFormat || "YYYY-MM-DD",
|
|
1262
1262
|
showTime: a.showTime,
|
|
1263
1263
|
showToday: a.showToday || !0,
|
|
1264
|
-
onChange: (
|
|
1264
|
+
onChange: (h) => T(h, a)
|
|
1265
1265
|
}, a.field || {}), null);
|
|
1266
1266
|
break;
|
|
1267
1267
|
case "dateMonth":
|
|
@@ -1270,9 +1270,9 @@ const Ya = (e) => ({
|
|
|
1270
1270
|
width: "100%"
|
|
1271
1271
|
},
|
|
1272
1272
|
value: r[a.name] ? _(r[a.name], a.valueFormat || "YYYY-MM") : void 0,
|
|
1273
|
-
getPopupContainer: (
|
|
1273
|
+
getPopupContainer: (h) => h && h.parentNode ? h.parentNode : h,
|
|
1274
1274
|
placeholder: a.placeholder || "请选择",
|
|
1275
|
-
onChange: (
|
|
1275
|
+
onChange: (h) => T(h, a)
|
|
1276
1276
|
}, a.field || {}), null);
|
|
1277
1277
|
break;
|
|
1278
1278
|
case "dateRange":
|
|
@@ -1281,11 +1281,11 @@ const Ya = (e) => ({
|
|
|
1281
1281
|
width: "100%"
|
|
1282
1282
|
},
|
|
1283
1283
|
value: (B = r[a.name]) != null && B.length ? [_(r[a.name][0], a.valueFormat || "YYYY-MM-DD HH:mm:ss"), _(r[a.name][1], a.valueFormat || "YYYY-MM-DD HH:mm:ss")] : void 0,
|
|
1284
|
-
getPopupContainer: (
|
|
1284
|
+
getPopupContainer: (h) => h && h.parentNode ? h.parentNode : h,
|
|
1285
1285
|
placeholder: a.placeholder || ["开始日期", "结束日期"],
|
|
1286
1286
|
format: a.valueFormat || "YYYY-MM-DD HH:mm:ss",
|
|
1287
1287
|
showTime: a.showTime,
|
|
1288
|
-
onChange: (
|
|
1288
|
+
onChange: (h) => T(h, a)
|
|
1289
1289
|
}, a.field || {}), null);
|
|
1290
1290
|
break;
|
|
1291
1291
|
case "time":
|
|
@@ -1294,12 +1294,12 @@ const Ya = (e) => ({
|
|
|
1294
1294
|
width: "100%"
|
|
1295
1295
|
},
|
|
1296
1296
|
value: r[a.name] ? _(r[a.name], a.valueFormat || "HH:mm:ss") : void 0,
|
|
1297
|
-
getPopupContainer: (
|
|
1297
|
+
getPopupContainer: (h) => h && h.parentNode ? h.parentNode : h,
|
|
1298
1298
|
placeholder: a.placeholder || "请选择",
|
|
1299
1299
|
allowClear: a.allowClear || a.allowClear === !1 ? a.allowClear : !0,
|
|
1300
1300
|
use12Hours: a.use12Hours,
|
|
1301
1301
|
format: a.valueFormat || "HH:mm:ss",
|
|
1302
|
-
onChange: (
|
|
1302
|
+
onChange: (h) => T(h, a)
|
|
1303
1303
|
}, a.field || {}), null);
|
|
1304
1304
|
break;
|
|
1305
1305
|
}
|
|
@@ -1317,10 +1317,10 @@ const Ya = (e) => ({
|
|
|
1317
1317
|
const a = [...e.searchMap, ...((p = t.default) == null ? void 0 : p.call(t)) || []];
|
|
1318
1318
|
return a.map((I, F) => {
|
|
1319
1319
|
const B = {
|
|
1320
|
-
width: `${(100 - (
|
|
1321
|
-
},
|
|
1322
|
-
return a.length <
|
|
1323
|
-
formItemStyle:
|
|
1320
|
+
width: `${(100 - (d.value - 1) * 2) / d.value}%`
|
|
1321
|
+
}, h = $(F, d.value, B);
|
|
1322
|
+
return a.length < d.value || g.value ? i(Ie, null, [M({
|
|
1323
|
+
formItemStyle: h,
|
|
1324
1324
|
item: I
|
|
1325
1325
|
}), F === a.length - 1 && L({
|
|
1326
1326
|
formItemStyle: {
|
|
@@ -1329,19 +1329,19 @@ const Ya = (e) => ({
|
|
|
1329
1329
|
},
|
|
1330
1330
|
advanced: g.value,
|
|
1331
1331
|
showAdvanced: g.value
|
|
1332
|
-
})]) : i(Ie, null, [F <
|
|
1333
|
-
formItemStyle:
|
|
1332
|
+
})]) : i(Ie, null, [F < d.value - 1 && M({
|
|
1333
|
+
formItemStyle: h,
|
|
1334
1334
|
item: I
|
|
1335
|
-
}), F ===
|
|
1336
|
-
formItemStyle:
|
|
1335
|
+
}), F === d.value - 1 && (d.value - 1 === 0 || a.length === d.value) && M({
|
|
1336
|
+
formItemStyle: h,
|
|
1337
1337
|
item: I
|
|
1338
|
-
}), F ===
|
|
1338
|
+
}), F === d.value - 1 && a.length !== d.value && L({
|
|
1339
1339
|
formItemStyle: {
|
|
1340
1340
|
flex: 1,
|
|
1341
1341
|
justifyContent: "flex-end"
|
|
1342
1342
|
},
|
|
1343
1343
|
advanced: !1,
|
|
1344
|
-
showAdvanced: a.length >=
|
|
1344
|
+
showAdvanced: a.length >= d.value
|
|
1345
1345
|
})]);
|
|
1346
1346
|
});
|
|
1347
1347
|
};
|
|
@@ -1350,15 +1350,15 @@ const Ya = (e) => ({
|
|
|
1350
1350
|
return u(i("div", {
|
|
1351
1351
|
class: {
|
|
1352
1352
|
[`${l.value}`]: !0,
|
|
1353
|
-
[`${
|
|
1353
|
+
[`${v(e.prefixCls)}-search`]: !0,
|
|
1354
1354
|
[`${(a = e.search) == null ? void 0 : a.className}`]: (p = e.search) == null ? void 0 : p.className
|
|
1355
1355
|
}
|
|
1356
1356
|
}, [i(et, {
|
|
1357
|
-
class: `${
|
|
1357
|
+
class: `${v(e.prefixCls)}-form ${l.value}`,
|
|
1358
1358
|
layout: "horizontal"
|
|
1359
1359
|
}, {
|
|
1360
1360
|
default: () => [i("div", {
|
|
1361
|
-
class: `${
|
|
1361
|
+
class: `${v(e.prefixCls)}-form-container ${l.value}`
|
|
1362
1362
|
}, [H()])]
|
|
1363
1363
|
})]));
|
|
1364
1364
|
};
|
|
@@ -1480,14 +1480,14 @@ const be = (e) => {
|
|
|
1480
1480
|
var r;
|
|
1481
1481
|
return [i("span", {
|
|
1482
1482
|
onClick: (w) => {
|
|
1483
|
-
var b,
|
|
1483
|
+
var b, d;
|
|
1484
1484
|
w.stopPropagation(), w.preventDefault();
|
|
1485
|
-
const
|
|
1486
|
-
if (typeof g.disable == "boolean" ? g.disable : (
|
|
1485
|
+
const m = ((b = v(l).find((f) => f.uuid === t)) == null ? void 0 : b.key) || "", g = (s == null ? void 0 : s.columnsMap[m]) || {};
|
|
1486
|
+
if (typeof g.disable == "boolean" ? g.disable : (d = g.disable) == null ? void 0 : d.icon)
|
|
1487
1487
|
return;
|
|
1488
1488
|
const c = {
|
|
1489
1489
|
...s == null ? void 0 : s.columnsMap,
|
|
1490
|
-
[
|
|
1490
|
+
[m]: {
|
|
1491
1491
|
...g,
|
|
1492
1492
|
fixed: o
|
|
1493
1493
|
}
|
|
@@ -1566,17 +1566,17 @@ const be = (e) => {
|
|
|
1566
1566
|
slots: s,
|
|
1567
1567
|
settingsAction: r
|
|
1568
1568
|
} = ie(), w = (c, b) => c.map(({
|
|
1569
|
-
key:
|
|
1570
|
-
children:
|
|
1569
|
+
key: d,
|
|
1570
|
+
children: f,
|
|
1571
1571
|
uuid: x,
|
|
1572
1572
|
...$
|
|
1573
1573
|
}) => {
|
|
1574
1574
|
var Y;
|
|
1575
|
-
const T = (r == null ? void 0 : r.columnsMap[
|
|
1575
|
+
const T = (r == null ? void 0 : r.columnsMap[d || "null"]) || {
|
|
1576
1576
|
show: !0
|
|
1577
1577
|
};
|
|
1578
1578
|
let P = !1;
|
|
1579
|
-
T.show !== !1 && (b == null ? void 0 : b.show) !== !1 && !
|
|
1579
|
+
T.show !== !1 && (b == null ? void 0 : b.show) !== !1 && !f && (P = !0);
|
|
1580
1580
|
const D = {
|
|
1581
1581
|
key: x || "",
|
|
1582
1582
|
...Ha($, ["dataIndex"]),
|
|
@@ -1586,21 +1586,21 @@ const be = (e) => {
|
|
|
1586
1586
|
disableCheckbox: typeof T.disable == "boolean" ? T.disable : (Y = T.disable) == null ? void 0 : Y.checkbox,
|
|
1587
1587
|
isLeaf: !0
|
|
1588
1588
|
};
|
|
1589
|
-
return
|
|
1589
|
+
return f && (D.children = w(f, T)), D;
|
|
1590
1590
|
});
|
|
1591
1591
|
he(() => {
|
|
1592
1592
|
const c = w(e.list || []);
|
|
1593
1593
|
o.value = c, u.value = c.filter((b) => b.checked).map((b) => b.key), (r == null ? void 0 : r.operationType.value) === "fixed" && (n.value = Ye().uuid(15));
|
|
1594
1594
|
});
|
|
1595
|
-
const
|
|
1595
|
+
const m = be((c, b, d) => {
|
|
1596
1596
|
var L, G;
|
|
1597
|
-
const
|
|
1597
|
+
const f = ((L = v(l).find((M) => M.uuid === c)) == null ? void 0 : L.key) || "", x = ((G = v(l).find((M) => M.uuid === b)) == null ? void 0 : G.key) || "", $ = {
|
|
1598
1598
|
...r == null ? void 0 : r.columnsMap
|
|
1599
|
-
}, T = [...r.sortKeyColumns.value], P = T.findIndex((M) => M ===
|
|
1599
|
+
}, T = [...r.sortKeyColumns.value], P = T.findIndex((M) => M === f), D = T.findIndex((M) => M === x), Y = d > P;
|
|
1600
1600
|
if (P < 0)
|
|
1601
1601
|
return;
|
|
1602
1602
|
const j = T[P];
|
|
1603
|
-
T.splice(P, 1),
|
|
1603
|
+
T.splice(P, 1), d === 0 ? T.unshift(j) : T.splice(Y ? D : D + 1, 0, j), T.forEach((M, H) => {
|
|
1604
1604
|
$[M] = {
|
|
1605
1605
|
...$[M] || {},
|
|
1606
1606
|
order: H
|
|
@@ -1608,17 +1608,17 @@ const be = (e) => {
|
|
|
1608
1608
|
}), r == null || r.setColumnsMap($, "drop"), r == null || r.setSortKeyColumns(T);
|
|
1609
1609
|
}), g = be((c) => {
|
|
1610
1610
|
var T;
|
|
1611
|
-
const b = c.node.key,
|
|
1612
|
-
...(r == null ? void 0 : r.columnsMap[
|
|
1611
|
+
const b = c.node.key, d = ((T = v(l).find((P) => P.uuid === b)) == null ? void 0 : T.key) || "", x = {
|
|
1612
|
+
...(r == null ? void 0 : r.columnsMap[d]) || {}
|
|
1613
1613
|
};
|
|
1614
1614
|
x.show = c.checked;
|
|
1615
1615
|
const $ = {
|
|
1616
1616
|
...r == null ? void 0 : r.columnsMap,
|
|
1617
|
-
[
|
|
1617
|
+
[d]: x
|
|
1618
1618
|
};
|
|
1619
1619
|
r == null || r.setColumnsMap($, "show");
|
|
1620
1620
|
}), y = (c) => {
|
|
1621
|
-
const b =
|
|
1621
|
+
const b = v(l).find((d) => d.uuid === c.key);
|
|
1622
1622
|
return c.title || At(s, "headerCell", {
|
|
1623
1623
|
title: b.title,
|
|
1624
1624
|
column: b
|
|
@@ -1636,29 +1636,29 @@ const be = (e) => {
|
|
|
1636
1636
|
showLine: !1,
|
|
1637
1637
|
checkedKeys: u.value,
|
|
1638
1638
|
height: 280,
|
|
1639
|
-
onDrop: (
|
|
1640
|
-
const
|
|
1639
|
+
onDrop: (d) => {
|
|
1640
|
+
const f = d.node.key, x = d.dragNode.key, {
|
|
1641
1641
|
dropPosition: $,
|
|
1642
1642
|
dropToGap: T
|
|
1643
|
-
} =
|
|
1644
|
-
|
|
1643
|
+
} = d, P = $ === -1 || !T ? $ + 1 : $;
|
|
1644
|
+
m(x, f, P);
|
|
1645
1645
|
},
|
|
1646
|
-
onCheck: (
|
|
1646
|
+
onCheck: (d, f) => g(f),
|
|
1647
1647
|
treeData: o.value
|
|
1648
1648
|
}, {
|
|
1649
|
-
title: (
|
|
1649
|
+
title: (d) => {
|
|
1650
1650
|
var x;
|
|
1651
|
-
const
|
|
1652
|
-
...
|
|
1651
|
+
const f = {
|
|
1652
|
+
...d,
|
|
1653
1653
|
children: void 0,
|
|
1654
|
-
title: y(
|
|
1654
|
+
title: y(d),
|
|
1655
1655
|
autoScroll: (x = r == null ? void 0 : r.autoScroll) == null ? void 0 : x.value
|
|
1656
1656
|
};
|
|
1657
1657
|
return i(_a, U({
|
|
1658
1658
|
hashId: e.hashId,
|
|
1659
1659
|
className: e.className
|
|
1660
|
-
},
|
|
1661
|
-
treeKey:
|
|
1660
|
+
}, f, {
|
|
1661
|
+
treeKey: f.key
|
|
1662
1662
|
}), null);
|
|
1663
1663
|
}
|
|
1664
1664
|
})]) : null;
|
|
@@ -1676,23 +1676,23 @@ const be = (e) => {
|
|
|
1676
1676
|
columns: n
|
|
1677
1677
|
} = ie(), t = O([]), o = O([]), u = O([]), l = O([]);
|
|
1678
1678
|
X(() => n.value, (w) => {
|
|
1679
|
-
t.value = [], o.value = [], u.value = [], w.forEach((
|
|
1680
|
-
if (
|
|
1679
|
+
t.value = [], o.value = [], u.value = [], w.forEach((m) => {
|
|
1680
|
+
if (m.hideInSetting)
|
|
1681
1681
|
return;
|
|
1682
1682
|
const {
|
|
1683
1683
|
fixed: g,
|
|
1684
1684
|
show: y,
|
|
1685
1685
|
uuid: c
|
|
1686
|
-
} =
|
|
1686
|
+
} = m;
|
|
1687
1687
|
if ((y || y === void 0) && c && l.value.push(c), g === "left") {
|
|
1688
|
-
o.value.push(
|
|
1688
|
+
o.value.push(m);
|
|
1689
1689
|
return;
|
|
1690
1690
|
}
|
|
1691
1691
|
if (g === "right") {
|
|
1692
|
-
t.value.push(
|
|
1692
|
+
t.value.push(m);
|
|
1693
1693
|
return;
|
|
1694
1694
|
}
|
|
1695
|
-
u.value.push(
|
|
1695
|
+
u.value.push(m);
|
|
1696
1696
|
});
|
|
1697
1697
|
}, {
|
|
1698
1698
|
immediate: !0
|
|
@@ -1755,14 +1755,14 @@ const be = (e) => {
|
|
|
1755
1755
|
columns: u,
|
|
1756
1756
|
settingsAction: l
|
|
1757
1757
|
} = ie(), s = be((y = !0) => {
|
|
1758
|
-
const c = {}, b = (
|
|
1759
|
-
|
|
1760
|
-
key:
|
|
1758
|
+
const c = {}, b = (d) => {
|
|
1759
|
+
d.forEach(({
|
|
1760
|
+
key: f,
|
|
1761
1761
|
fixed: x,
|
|
1762
1762
|
index: $,
|
|
1763
1763
|
children: T
|
|
1764
1764
|
}) => {
|
|
1765
|
-
const P = ot(
|
|
1765
|
+
const P = ot(f, $);
|
|
1766
1766
|
P && (c[P] = {
|
|
1767
1767
|
show: y,
|
|
1768
1768
|
fixed: x
|
|
@@ -1774,17 +1774,17 @@ const be = (e) => {
|
|
|
1774
1774
|
y.target.checked ? s() : s(!1);
|
|
1775
1775
|
}), w = be(() => {
|
|
1776
1776
|
l == null || l.setColumnsMap(l == null ? void 0 : l.cacheColumnsMap, "fixed");
|
|
1777
|
-
}),
|
|
1777
|
+
}), m = S(() => (
|
|
1778
1778
|
// @ts-ignore
|
|
1779
1779
|
Object.values(l == null ? void 0 : l.columnsMap).filter((y) => !y || y.show === !1)
|
|
1780
|
-
)), g = S(() =>
|
|
1780
|
+
)), g = S(() => v(m).length > 0 && v(m).length !== u.value.length);
|
|
1781
1781
|
return () => t(i(aa, {
|
|
1782
1782
|
arrowPointAtCenter: !0,
|
|
1783
1783
|
title: i("div", {
|
|
1784
1784
|
class: [`${n}-title`, o.value]
|
|
1785
1785
|
}, [i(la, {
|
|
1786
1786
|
indeterminate: g.value,
|
|
1787
|
-
checked:
|
|
1787
|
+
checked: v(m).length === 0 && v(m).length !== u.value.length,
|
|
1788
1788
|
onChange: (y) => r(y)
|
|
1789
1789
|
}, {
|
|
1790
1790
|
default: () => [pe("列展示")]
|
|
@@ -1967,15 +1967,15 @@ const mt = /* @__PURE__ */ ae({
|
|
|
1967
1967
|
let c;
|
|
1968
1968
|
return Array.isArray(e.actions) ? ((b = e.actions) == null ? void 0 : b.length) < 1 ? null : i(oe, {
|
|
1969
1969
|
align: "center"
|
|
1970
|
-
}, lt(c = e.actions.map((
|
|
1971
|
-
key:
|
|
1972
|
-
...
|
|
1970
|
+
}, lt(c = e.actions.map((d, f) => Ce(d) ? Vt(d, {
|
|
1971
|
+
key: f,
|
|
1972
|
+
...d == null ? void 0 : d.props
|
|
1973
1973
|
}) : i("template", {
|
|
1974
|
-
key:
|
|
1975
|
-
}, [
|
|
1974
|
+
key: f
|
|
1975
|
+
}, [d]))) ? c : {
|
|
1976
1976
|
default: () => [c]
|
|
1977
1977
|
}) : e.actions;
|
|
1978
|
-
}),
|
|
1978
|
+
}), m = Fe(() => !l.value && s.value ? i("div", {
|
|
1979
1979
|
class: `${e.prefixCls}-left ${t.value}`
|
|
1980
1980
|
}, null) : r.value ? i(oe, {
|
|
1981
1981
|
class: `${e.prefixCls}-left ${t.value}`
|
|
@@ -2009,10 +2009,10 @@ const mt = /* @__PURE__ */ ae({
|
|
|
2009
2009
|
size: 12,
|
|
2010
2010
|
align: "center",
|
|
2011
2011
|
class: `${e.prefixCls}-setting-items`
|
|
2012
|
-
}, lt(c = e.settings.map((
|
|
2013
|
-
const x = Qa(
|
|
2012
|
+
}, lt(c = e.settings.map((d, f) => {
|
|
2013
|
+
const x = Qa(d);
|
|
2014
2014
|
return i("div", {
|
|
2015
|
-
key:
|
|
2015
|
+
key: f,
|
|
2016
2016
|
class: `${e.prefixCls}-setting-item`
|
|
2017
2017
|
}, [x]);
|
|
2018
2018
|
})) ? c : {
|
|
@@ -2030,8 +2030,8 @@ const mt = /* @__PURE__ */ ae({
|
|
|
2030
2030
|
};
|
|
2031
2031
|
return i("div", {
|
|
2032
2032
|
class: c
|
|
2033
|
-
}, [
|
|
2034
|
-
}, [() => u.value, () => l.value, () => s.value, () =>
|
|
2033
|
+
}, [m.value, g.value]);
|
|
2034
|
+
}, [() => u.value, () => l.value, () => s.value, () => m.value, () => e.prefixCls, () => g.value]);
|
|
2035
2035
|
return () => n(i("div", {
|
|
2036
2036
|
class: `${e.prefixCls} ${t.value}`
|
|
2037
2037
|
}, [y.value]));
|
|
@@ -2127,7 +2127,7 @@ const tl = {
|
|
|
2127
2127
|
optionsExtra: e.optionsExtra,
|
|
2128
2128
|
headerTitle: e.headerTitle,
|
|
2129
2129
|
actions: u,
|
|
2130
|
-
settings:
|
|
2130
|
+
settings: v(o),
|
|
2131
2131
|
titleTip: e.titleTip,
|
|
2132
2132
|
titleTipText: e.titleTipText
|
|
2133
2133
|
}, null);
|
|
@@ -2397,14 +2397,14 @@ const ke = {
|
|
|
2397
2397
|
wrapSSR: s,
|
|
2398
2398
|
hashId: r
|
|
2399
2399
|
} = Pe("ProBaseTable", [ul], l), w = sl(), {
|
|
2400
|
-
width:
|
|
2400
|
+
width: m
|
|
2401
2401
|
} = Qt(), {
|
|
2402
2402
|
emptyText: g,
|
|
2403
2403
|
indicator: y
|
|
2404
|
-
} = ra(), c = O(), b = O(),
|
|
2405
|
-
he(() =>
|
|
2404
|
+
} = ra(), c = O(), b = O(), d = O(e.waitRequest);
|
|
2405
|
+
he(() => d.value = e.waitRequest);
|
|
2406
2406
|
const {
|
|
2407
|
-
toggle:
|
|
2407
|
+
toggle: f,
|
|
2408
2408
|
isFullscreen: x
|
|
2409
2409
|
} = st(c), $ = S(() => ({
|
|
2410
2410
|
...e
|
|
@@ -2446,12 +2446,12 @@ const ke = {
|
|
|
2446
2446
|
breakpoint: I
|
|
2447
2447
|
} = ka({
|
|
2448
2448
|
...a,
|
|
2449
|
-
innerWidth:
|
|
2449
|
+
innerWidth: m,
|
|
2450
2450
|
columns: D,
|
|
2451
2451
|
screens: w
|
|
2452
2452
|
}), F = Ma(e), {
|
|
2453
2453
|
getProColumns: B,
|
|
2454
|
-
cacheProColumns:
|
|
2454
|
+
cacheProColumns: h,
|
|
2455
2455
|
setColumns: N,
|
|
2456
2456
|
changeColumns: A,
|
|
2457
2457
|
resizeColumnWidth: K
|
|
@@ -2468,7 +2468,7 @@ const ke = {
|
|
|
2468
2468
|
cacheColumnsMap: we,
|
|
2469
2469
|
setSortKeyColumns: le
|
|
2470
2470
|
} = Da({
|
|
2471
|
-
columns:
|
|
2471
|
+
columns: h,
|
|
2472
2472
|
columnsState: Z(e, "columnsState"),
|
|
2473
2473
|
changeColumns: A
|
|
2474
2474
|
}), {
|
|
@@ -2499,7 +2499,7 @@ const ke = {
|
|
|
2499
2499
|
handleTableChange: _e
|
|
2500
2500
|
} = Pa({
|
|
2501
2501
|
...Ct,
|
|
2502
|
-
waitRequest:
|
|
2502
|
+
waitRequest: d
|
|
2503
2503
|
}, {
|
|
2504
2504
|
loadingStatus: Y,
|
|
2505
2505
|
getPaginationInfo: M,
|
|
@@ -2521,27 +2521,27 @@ const ke = {
|
|
|
2521
2521
|
...(ye(o), ["class", "style", "id"]),
|
|
2522
2522
|
...e,
|
|
2523
2523
|
virtualScroll: P.value,
|
|
2524
|
-
size:
|
|
2525
|
-
scroll:
|
|
2524
|
+
size: v(L),
|
|
2525
|
+
scroll: v(p),
|
|
2526
2526
|
loading: {
|
|
2527
|
-
spinning: e.showLoading ? !!
|
|
2527
|
+
spinning: e.showLoading ? !!v(Y) : !1,
|
|
2528
2528
|
...C
|
|
2529
2529
|
},
|
|
2530
|
-
columns: Me(
|
|
2531
|
-
pagination: Me(
|
|
2532
|
-
dataSource:
|
|
2530
|
+
columns: Me(v(B).filter((R) => R.show || R.show === void 0)),
|
|
2531
|
+
pagination: Me(v(M)),
|
|
2532
|
+
dataSource: v(me)
|
|
2533
2533
|
}, ["class", "onChange", "onExpand", "onExpandedRowsChange"]);
|
|
2534
2534
|
}), Tt = S(() => [{
|
|
2535
2535
|
[`${r.value}`]: !0,
|
|
2536
2536
|
[`${l}`]: !0,
|
|
2537
2537
|
[`${o.class}`]: o.class,
|
|
2538
|
-
[`${l}-no-scroll`]: !Object.keys(
|
|
2538
|
+
[`${l}-no-scroll`]: !Object.keys(v(p) || {}).length,
|
|
2539
2539
|
[`${l}-table-tree`]: We.value,
|
|
2540
2540
|
[`${l}-full-screen`]: x.value
|
|
2541
2541
|
}]), qe = S(() => {
|
|
2542
2542
|
var Q;
|
|
2543
2543
|
let C;
|
|
2544
|
-
const R =
|
|
2544
|
+
const R = v($).direction === "rtl" ? "bottomLeft" : "right", E = (Q = v(M)) == null ? void 0 : Q.position;
|
|
2545
2545
|
if (E !== null && Array.isArray(E)) {
|
|
2546
2546
|
const z = E.find((re) => re.indexOf("top") !== -1), W = E.find((re) => re.indexOf("bottom") !== -1), Te = E.every((re) => `${re}` == "none");
|
|
2547
2547
|
!z && !W && !Te && (C = R), z && (C = z.toLowerCase().replace("top", "")), W && (C = W.toLowerCase().replace("bottom", ""));
|
|
@@ -2609,7 +2609,7 @@ const ke = {
|
|
|
2609
2609
|
headerTitle: C,
|
|
2610
2610
|
titleTip: E,
|
|
2611
2611
|
titleTipText: e.titleTipText,
|
|
2612
|
-
options:
|
|
2612
|
+
options: v(wt),
|
|
2613
2613
|
settingExtra: ge(t, e, "settingExtra"),
|
|
2614
2614
|
optionsExtra: ge(t, e, "optionsExtra"),
|
|
2615
2615
|
toolBarBtn: R
|
|
@@ -2622,7 +2622,7 @@ const ke = {
|
|
|
2622
2622
|
action: {
|
|
2623
2623
|
setTableSize: G,
|
|
2624
2624
|
reload: (C) => De(C),
|
|
2625
|
-
toggle:
|
|
2625
|
+
toggle: f
|
|
2626
2626
|
},
|
|
2627
2627
|
settingsAction: {
|
|
2628
2628
|
autoScroll: Z(e, "autoScroll"),
|
|
@@ -2643,10 +2643,10 @@ const ke = {
|
|
|
2643
2643
|
var C;
|
|
2644
2644
|
return ((C = b.value) == null ? void 0 : C.getFormState()) || {};
|
|
2645
2645
|
},
|
|
2646
|
-
getTableFormState: () =>
|
|
2646
|
+
getTableFormState: () => v(fe),
|
|
2647
2647
|
restForm: (C) => {
|
|
2648
2648
|
var R;
|
|
2649
|
-
|
|
2649
|
+
d.value = !0, C && (C == null || C()), (R = b.value) == null || R.resetForm(!1), d.value = !1;
|
|
2650
2650
|
}
|
|
2651
2651
|
}),
|
|
2652
2652
|
actionRef: () => ({
|
|
@@ -2655,12 +2655,12 @@ const ke = {
|
|
|
2655
2655
|
selectedKey: k.value,
|
|
2656
2656
|
selectedItem: se.value,
|
|
2657
2657
|
reload: De,
|
|
2658
|
-
getLoadingStatus: () =>
|
|
2658
|
+
getLoadingStatus: () => v(Y),
|
|
2659
2659
|
reloadAndRest: async (C) => {
|
|
2660
|
-
|
|
2660
|
+
d.value = !0, H({
|
|
2661
2661
|
current: 1,
|
|
2662
2662
|
pageSize: 10
|
|
2663
|
-
}), C && (C == null || C()),
|
|
2663
|
+
}), C && (C == null || C()), d.value = !1;
|
|
2664
2664
|
},
|
|
2665
2665
|
reSetDataList: St,
|
|
2666
2666
|
setPageAndReload: Xe,
|
|
@@ -2685,7 +2685,7 @@ const ke = {
|
|
|
2685
2685
|
modal: e.modalScroll,
|
|
2686
2686
|
searchMap: Be.value,
|
|
2687
2687
|
prefixCls: l,
|
|
2688
|
-
loading: !!
|
|
2688
|
+
loading: !!v(Y),
|
|
2689
2689
|
onSearch: Rt,
|
|
2690
2690
|
defaultParams: V
|
|
2691
2691
|
}, {
|
|
@@ -2693,7 +2693,7 @@ const ke = {
|
|
|
2693
2693
|
var z;
|
|
2694
2694
|
return (z = t.search) == null ? void 0 : z.call(t);
|
|
2695
2695
|
} : null
|
|
2696
|
-
}), !P.value && Dt(C, E, R), e.customRender ?? t.customRender ? i(Le,
|
|
2696
|
+
}), !P.value && Dt(C, E, R), e.customRender ?? t.customRender ? i(Le, v(Ge).loading, {
|
|
2697
2697
|
default: () => {
|
|
2698
2698
|
var z;
|
|
2699
2699
|
return [i("div", {
|
|
@@ -2703,7 +2703,7 @@ const ke = {
|
|
|
2703
2703
|
[`${l}-pagination ${r.value}`]: !0,
|
|
2704
2704
|
[`${l}-pagination-${qe.value} ${r.value}`]: !!qe.value
|
|
2705
2705
|
}
|
|
2706
|
-
}, Me(
|
|
2706
|
+
}, Me(v(M)), {
|
|
2707
2707
|
onChange: $t
|
|
2708
2708
|
}), null)])];
|
|
2709
2709
|
}
|