@gx-design-vue/pro-table 0.2.0-beta.38 → 0.2.0-beta.39
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/hooks/useFetchData.d.ts +2 -1
- package/dist/pro-table.mjs +303 -293
- package/dist/pro-table.umd.js +1 -1
- package/dist/types/TableTypings.d.ts +2 -1
- package/package.json +1 -1
package/dist/pro-table.mjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { computed as w, ref as O, watch as
|
|
1
|
+
import { computed as w, ref as O, watch as U, unref as h, watchEffect as fe, reactive as ce, onUnmounted as jt, onDeactivated as Mt, onMounted as kt, provide as Et, inject as zt, defineComponent as ae, createVNode as i, Fragment as Ie, nextTick as Kt, mergeProps as q, createTextVNode as pe, renderSlot as Yt, isVNode as Ce, cloneVNode as Lt, toRef as Q, toRaw as Ne } from "vue";
|
|
2
2
|
import { isBoolean as te, isObject as ne, getSlot as ze, isFunction as $e, arrayRepeat as At, runFunction as Vt, handleCurrentPage as Ht, getSortIndex as Wt, isDeepEqualReact as nt, genColumnKey as ot, compareArray as _t, isNumber as ut, isString as Gt, isArray as Ke, getPrefixCls as Ve, getRandomNumber as Ye, handleShowIndex as qt, getSlotVNode as ge, hanndleField as Ut } from "@gx-design-vue/pro-utils";
|
|
3
|
-
import { pick as it, cloneDeep as
|
|
3
|
+
import { pick as it, cloneDeep as X, omit as ye } from "lodash-es";
|
|
4
4
|
import { useFullscreen as st, useWindowSize as Xt } from "@vueuse/core";
|
|
5
5
|
import { Form as et, Grid as He, Space as le, Button as tt, Input as at, TimePicker as Jt, DatePicker as rt, TreeSelect as Qt, Spin as Le, Select as Zt, Popover as ea, Checkbox as ta, Tooltip as Z, Tree as aa, Dropdown as la, Menu as Re, Empty as ct, Pagination as na, Table as oa, Typography as ua } from "ant-design-vue";
|
|
6
6
|
import { useProAppContext as ia } from "@gx-design-vue/pro-app";
|
|
7
7
|
import { useProStyle as Pe } from "@gx-design-vue/pro-provider";
|
|
8
8
|
import { tryOnUnmounted as sa, useMemo as Fe } from "@gx-design-vue/pro-hooks";
|
|
9
|
-
import
|
|
9
|
+
import W from "dayjs";
|
|
10
10
|
import { UpOutlined as ra, DownOutlined as ca, SettingOutlined as dt, VerticalAlignTopOutlined as da, VerticalAlignMiddleOutlined as fa, VerticalAlignBottomOutlined as ha, FullscreenExitOutlined as va, FullscreenOutlined as ma, ColumnHeightOutlined as ga, InfoCircleOutlined as ya, ReloadOutlined as pa } from "@ant-design/icons-vue";
|
|
11
11
|
function pl(e) {
|
|
12
12
|
const o = w(() => {
|
|
@@ -36,8 +36,8 @@ function pl(e) {
|
|
|
36
36
|
return (u = o == null ? void 0 : o.value) == null ? void 0 : u.dataSource;
|
|
37
37
|
}),
|
|
38
38
|
setPageAndReload: (u, l, r, s) => {
|
|
39
|
-
var T,
|
|
40
|
-
return (
|
|
39
|
+
var T, v;
|
|
40
|
+
return (v = (T = o.value) == null ? void 0 : T.setPageAndReload) == null ? void 0 : v.call(T, u, l, r, s);
|
|
41
41
|
},
|
|
42
42
|
setPagination: (u) => {
|
|
43
43
|
var l, r;
|
|
@@ -515,10 +515,10 @@ const Ca = () => ({
|
|
|
515
515
|
function Sa({ emit: e, loading: o }) {
|
|
516
516
|
var l;
|
|
517
517
|
const t = O(te(o.value) ? o.value : ne(o.value) ? (l = o.value) == null ? void 0 : l.spinning : !1);
|
|
518
|
-
|
|
518
|
+
U(() => o.value, (r) => {
|
|
519
519
|
t.value = te(r) ? r : ne(r) ? r == null ? void 0 : r.spinning : t.value;
|
|
520
520
|
});
|
|
521
|
-
const n = w(() =>
|
|
521
|
+
const n = w(() => h(t) || !1);
|
|
522
522
|
function u(r) {
|
|
523
523
|
t.value = r, e("loadingChange", !0);
|
|
524
524
|
}
|
|
@@ -550,10 +550,10 @@ function wa({
|
|
|
550
550
|
delete n[r];
|
|
551
551
|
});
|
|
552
552
|
const u = w(() => {
|
|
553
|
-
var
|
|
553
|
+
var v;
|
|
554
554
|
if (te(t.value) && !t.value)
|
|
555
555
|
return !1;
|
|
556
|
-
const r = ze(e,
|
|
556
|
+
const r = ze(e, h(o), "pageItemRender"), s = $e(r) ? {
|
|
557
557
|
itemRender: ({
|
|
558
558
|
page: y,
|
|
559
559
|
type: d,
|
|
@@ -571,13 +571,13 @@ function wa({
|
|
|
571
571
|
showSizeChanger: !0,
|
|
572
572
|
pageSizeOptions: ["10", "20", "50", "100"],
|
|
573
573
|
...t.value || {},
|
|
574
|
-
...
|
|
574
|
+
...h(n),
|
|
575
575
|
...s || {}
|
|
576
576
|
};
|
|
577
|
-
return (
|
|
577
|
+
return (v = t.value) != null && v.showTotal || (T.showTotal = (y) => `共${y < T.pageSize ? 1 : Math.ceil(y / (T.pageSize || 10))}页 ${y}条记录`), T;
|
|
578
578
|
});
|
|
579
579
|
function l(r) {
|
|
580
|
-
const s =
|
|
580
|
+
const s = h(u);
|
|
581
581
|
Object.assign(n, {
|
|
582
582
|
...s || {},
|
|
583
583
|
...r
|
|
@@ -590,36 +590,36 @@ function wa({
|
|
|
590
590
|
}
|
|
591
591
|
function Ta(e, o) {
|
|
592
592
|
const t = O([]), n = O([]);
|
|
593
|
-
|
|
594
|
-
var
|
|
595
|
-
return (
|
|
596
|
-
}, (
|
|
597
|
-
t.value = At([...
|
|
593
|
+
U(() => {
|
|
594
|
+
var v;
|
|
595
|
+
return (v = o.value) == null ? void 0 : v.selectedRowKeys;
|
|
596
|
+
}, (v) => {
|
|
597
|
+
t.value = At([...v || []]);
|
|
598
598
|
}, {
|
|
599
599
|
deep: !0,
|
|
600
600
|
immediate: !0
|
|
601
601
|
});
|
|
602
|
-
const u = (
|
|
603
|
-
e.value && (y ?
|
|
602
|
+
const u = (v, y) => {
|
|
603
|
+
e.value && (y ? v != null && v[e.value] && (t.value.push(v[e.value]), n.value.push(v)) : (t.value = t.value.filter((d) => d !== v[e.value]), n.value = n.value.filter((d) => d[e.value] !== v[e.value])));
|
|
604
604
|
}, l = () => {
|
|
605
|
-
var
|
|
606
|
-
o.value && ((y = (
|
|
605
|
+
var v, y;
|
|
606
|
+
o.value && ((y = (v = o.value) == null ? void 0 : v.onChange) == null || y.call(v, t.value, n.value));
|
|
607
607
|
};
|
|
608
608
|
return {
|
|
609
609
|
selectedKey: t,
|
|
610
610
|
selectRowKey: u,
|
|
611
|
-
selectAllRowKey: (
|
|
612
|
-
e.value && (
|
|
611
|
+
selectAllRowKey: (v, y, d) => {
|
|
612
|
+
e.value && (v ? y.map((c) => (t.value.every((p) => p !== (c == null ? void 0 : c[e.value])) && c != null && c[e.value] && (t.value.push(c[e.value]), n.value.push(c)), c)) : d.map((c) => (t.value.some((p) => p === (c == null ? void 0 : c[e.value])) && (t.value = t.value.filter((p) => p !== c[e.value]), n.value = n.value.filter((p) => p[e.value] !== c[e.value])), c)));
|
|
613
613
|
},
|
|
614
|
-
removeRowKeys: (
|
|
615
|
-
t.value = t.value.filter((y) => !
|
|
614
|
+
removeRowKeys: (v) => {
|
|
615
|
+
t.value = t.value.filter((y) => !v.includes(y)), n.value = n.value.filter((y) => !v.includes(y == null ? void 0 : y[e.value || ""])), l();
|
|
616
616
|
},
|
|
617
617
|
changeRowKey: l,
|
|
618
|
-
syncSelectedRows: (
|
|
618
|
+
syncSelectedRows: (v) => {
|
|
619
619
|
if (e.value && t.value.length !== n.value.length) {
|
|
620
620
|
const y = n.value.map((c) => c[e.value]), d = t.value.filter((c) => !y.includes(c));
|
|
621
|
-
|
|
622
|
-
d.includes(c[e.value]) && n.value.push(
|
|
621
|
+
v.forEach((c) => {
|
|
622
|
+
d.includes(c[e.value]) && n.value.push(X(c));
|
|
623
623
|
});
|
|
624
624
|
}
|
|
625
625
|
}
|
|
@@ -632,8 +632,8 @@ function Ra(e, o) {
|
|
|
632
632
|
}
|
|
633
633
|
async function r(...s) {
|
|
634
634
|
return t.value === 0 || t.value === void 0 ? u.value(...s) : (l(), new Promise(async (T) => {
|
|
635
|
-
var
|
|
636
|
-
(
|
|
635
|
+
var v;
|
|
636
|
+
(v = s[0]) != null && v.immediate ? T(await u.value(...s)) : n.value = setTimeout(async () => {
|
|
637
637
|
T(await u.value(...s));
|
|
638
638
|
}, t.value);
|
|
639
639
|
}));
|
|
@@ -653,48 +653,48 @@ function $a(e) {
|
|
|
653
653
|
dataSource: l
|
|
654
654
|
};
|
|
655
655
|
}
|
|
656
|
-
function Fa({ polling: e, request: o, postData: t, dataSource: n, waitRequest: u, debounceTime: l }, { columns: r, loadingStatus: s, setLoading: T, setColumns:
|
|
657
|
-
const x = O(), I = O(!0), B = O(!1),
|
|
656
|
+
function Fa({ polling: e, request: o, postData: t, dataSource: n, waitRequest: u, debounceTime: l }, { columns: r, loadingStatus: s, setLoading: T, setColumns: v, removeRowKeys: y, syncSelectedRows: d, formParamsRef: c, setPagination: p, getPaginationInfo: g, onBeforeSearchSubmit: m, hasCustomRender: S }, F) {
|
|
657
|
+
const x = O(), I = O(!0), B = O(!1), _ = O(!1), M = O([]), A = O(), z = Ra(async (f) => {
|
|
658
658
|
A.value && clearTimeout(A.value);
|
|
659
|
-
const j = await P(
|
|
660
|
-
return
|
|
661
|
-
|
|
662
|
-
}, Math.max(
|
|
659
|
+
const j = await P(f), V = Vt(e.value, j);
|
|
660
|
+
return V && !x.value && (A.value = setTimeout(() => {
|
|
661
|
+
z.run({ ...f, isPolling: V });
|
|
662
|
+
}, Math.max(V, 2e3))), j;
|
|
663
663
|
}, l.value || 10);
|
|
664
664
|
jt(() => {
|
|
665
665
|
x.value = !0, clearTimeout(A.value);
|
|
666
666
|
}), Mt(() => {
|
|
667
667
|
x.value = !0, clearTimeout(A.value);
|
|
668
|
-
}),
|
|
669
|
-
e.value ?
|
|
670
|
-
}, { immediate: !0 }),
|
|
668
|
+
}), U(() => e.value, () => {
|
|
669
|
+
e.value ? z.run({ isPolling: !0 }) : clearTimeout(A.value);
|
|
670
|
+
}, { immediate: !0 }), U([
|
|
671
671
|
() => u.value,
|
|
672
672
|
() => n.value,
|
|
673
673
|
() => c
|
|
674
674
|
], () => {
|
|
675
|
-
o.value ? (!I.value || !e.value) &&
|
|
675
|
+
o.value ? (!I.value || !e.value) && z.run({ isPolling: !1 }) : $(n.value || []);
|
|
676
676
|
}, {
|
|
677
677
|
deep: !0,
|
|
678
678
|
immediate: !0
|
|
679
679
|
});
|
|
680
680
|
const D = w(() => {
|
|
681
681
|
if (S.value)
|
|
682
|
-
return
|
|
683
|
-
const
|
|
684
|
-
return !
|
|
685
|
-
}), oe = w(() =>
|
|
686
|
-
function a(
|
|
687
|
-
|
|
682
|
+
return h(M);
|
|
683
|
+
const f = h(r).filter((j) => j.show || j.show === void 0);
|
|
684
|
+
return !h(M) || !f || f.length === 0 ? [] : h(M);
|
|
685
|
+
}), oe = w(() => h(M).some((f) => f.children && f.children.length > 0));
|
|
686
|
+
function a(f) {
|
|
687
|
+
_.value = f;
|
|
688
688
|
}
|
|
689
|
-
function b(
|
|
690
|
-
|
|
689
|
+
function b(f, j, V, Y) {
|
|
690
|
+
z.run({ pagination: f, filters: j, sorter: V, extra: Y, isPolling: !1 }), F("change", f, j, V, Y);
|
|
691
691
|
}
|
|
692
|
-
const P = async (
|
|
692
|
+
const P = async (f = {}) => {
|
|
693
693
|
var Se, xe, we;
|
|
694
|
-
const { pagination: j, filters:
|
|
695
|
-
if (!
|
|
694
|
+
const { pagination: j, filters: V = {}, sorter: Y = {}, removeKeys: he = [], isPolling: Oe = !1 } = f;
|
|
695
|
+
if (!h(o) || !$e(h(o)) || h(u) && s.value || B.value)
|
|
696
696
|
return n.value || [];
|
|
697
|
-
if (B.value = !0, !Oe ||
|
|
697
|
+
if (B.value = !0, !Oe || h(u) || I.value ? T(!0) : a(!0), h(u)) {
|
|
698
698
|
I.value = !1, B.value = !1;
|
|
699
699
|
return;
|
|
700
700
|
}
|
|
@@ -704,37 +704,47 @@ function Fa({ polling: e, request: o, postData: t, dataSource: n, waitRequest: u
|
|
|
704
704
|
if (te(j) && !j || te(g))
|
|
705
705
|
ee = {};
|
|
706
706
|
else {
|
|
707
|
-
const { current:
|
|
708
|
-
ee.pageNum = Ht({ current:
|
|
707
|
+
const { current: E = 1, pageSize: ie = 10, total: G } = h(g) || {};
|
|
708
|
+
ee.pageNum = Ht({ current: E, pageSize: ie, total: G }, he.length), he.length && y(he), ee.pageSize = ie;
|
|
709
709
|
}
|
|
710
|
-
(ne(
|
|
711
|
-
const ie = (
|
|
712
|
-
|
|
710
|
+
(ne(Y) ? [Y] : Y).forEach((E) => {
|
|
711
|
+
const ie = (E == null ? void 0 : E.columnKey) || (E == null ? void 0 : E.field);
|
|
712
|
+
E && (E != null && E.order) ? v(h(r).map((G) => (G.dataIndex === ie ? G.sortOrder = E == null ? void 0 : E.order : G.sortOrder = null, G))) : E && v(h(r).map((G) => (G.dataIndex === ie && (G.sortOrder = null), G)));
|
|
713
713
|
});
|
|
714
714
|
let ve = {
|
|
715
715
|
...ee || {},
|
|
716
|
-
...
|
|
716
|
+
...f.params,
|
|
717
717
|
...c
|
|
718
718
|
};
|
|
719
|
-
|
|
719
|
+
m && $e(m) && (ve = await m(ve, Y, V));
|
|
720
720
|
let L = [];
|
|
721
|
-
const ue = await ((Se =
|
|
722
|
-
return B.value = !1, ue && ue.success ? (L = ue.data || [],
|
|
721
|
+
const ue = await ((Se = h(o)) == null ? void 0 : Se(ve, Y, V));
|
|
722
|
+
return B.value = !1, ue && ue.success ? (L = ue.data || [], h(t) && $e(h(t)) && (L = await ((xe = h(t)) == null ? void 0 : xe(L))), d(L), (ue.total || (L == null ? void 0 : L.length) || 0) !== ((we = h(g)) == null ? void 0 : we.total) && p({
|
|
723
723
|
total: ue.total || (L == null ? void 0 : L.length) || 0
|
|
724
724
|
}), $(L), L) : [];
|
|
725
725
|
} catch (ee) {
|
|
726
|
-
|
|
726
|
+
M.value === void 0 && $([]), F("requestError", ee);
|
|
727
727
|
} finally {
|
|
728
728
|
I.value = !1, T(!1);
|
|
729
729
|
}
|
|
730
730
|
return [];
|
|
731
731
|
};
|
|
732
|
-
function $(
|
|
733
|
-
const j = Wt(
|
|
734
|
-
nt(j,
|
|
732
|
+
function $(f) {
|
|
733
|
+
const j = Wt(X(f), h(g.value));
|
|
734
|
+
nt(j, M.value) || (M.value = j);
|
|
735
735
|
}
|
|
736
|
-
function N({ key:
|
|
737
|
-
|
|
736
|
+
function N({ key: f, params: j, type: V = "update" }) {
|
|
737
|
+
switch (V) {
|
|
738
|
+
case "update":
|
|
739
|
+
M.value = M.value.map((Y) => f && j[f] === Y[f] ? { ...Y, ...j } : Y);
|
|
740
|
+
break;
|
|
741
|
+
case "add":
|
|
742
|
+
M.value.push(j);
|
|
743
|
+
break;
|
|
744
|
+
case "delete":
|
|
745
|
+
M.value = M.value.filter((Y) => f ? f && j[f] !== Y[f] : !0);
|
|
746
|
+
break;
|
|
747
|
+
}
|
|
738
748
|
}
|
|
739
749
|
return {
|
|
740
750
|
getDataSourceRef: D,
|
|
@@ -742,8 +752,8 @@ function Fa({ polling: e, request: o, postData: t, dataSource: n, waitRequest: u
|
|
|
742
752
|
reSetDataList: $,
|
|
743
753
|
changeDataValue: N,
|
|
744
754
|
handleTableChange: b,
|
|
745
|
-
reload: async (
|
|
746
|
-
|
|
755
|
+
reload: async (f) => {
|
|
756
|
+
h(o) ? await z.run({ ...f, isPolling: !1 }) : F("reload");
|
|
747
757
|
}
|
|
748
758
|
};
|
|
749
759
|
}
|
|
@@ -761,41 +771,41 @@ function Pa({ search: e, searchMap: o, params: t, columns: n, setPagination: u }
|
|
|
761
771
|
return ne(e.value) ? !!((d = e.value) != null && d.showSearch) : !!e.value;
|
|
762
772
|
});
|
|
763
773
|
kt(() => {
|
|
764
|
-
|
|
765
|
-
}),
|
|
766
|
-
|
|
774
|
+
v("all");
|
|
775
|
+
}), U(() => t.value, () => {
|
|
776
|
+
v("params");
|
|
767
777
|
}, {
|
|
768
778
|
deep: !0
|
|
769
|
-
}),
|
|
770
|
-
|
|
779
|
+
}), U(() => o.value, () => {
|
|
780
|
+
v("searchMap");
|
|
771
781
|
}, {
|
|
772
782
|
deep: !0
|
|
773
|
-
}),
|
|
774
|
-
|
|
783
|
+
}), U(() => n.value, () => {
|
|
784
|
+
v("columns");
|
|
775
785
|
}, {
|
|
776
786
|
deep: !0
|
|
777
787
|
});
|
|
778
|
-
const
|
|
788
|
+
const v = (d) => {
|
|
779
789
|
var p, g;
|
|
780
790
|
const c = [];
|
|
781
|
-
if ((d === "all" || d === "searchMap") && ((p = o.value) == null || p.forEach((
|
|
782
|
-
s.value.some((S) => S.name ===
|
|
791
|
+
if ((d === "all" || d === "searchMap") && ((p = o.value) == null || p.forEach((m) => c.push(m)), c.forEach((m) => {
|
|
792
|
+
s.value.some((S) => S.name === m.name) ? s.value = s.value.map((S) => S.name === m.name ? {
|
|
783
793
|
...S,
|
|
784
|
-
...
|
|
785
|
-
} : S) : s.value.push(
|
|
786
|
-
})), (d === "all" || d === "columns") && ((g = n.value) != null && g.length) && (n.value && n.value.forEach((
|
|
787
|
-
|
|
788
|
-
}), c.forEach((
|
|
789
|
-
s.value.some((S) => S.name ===
|
|
794
|
+
...m
|
|
795
|
+
} : S) : s.value.push(m);
|
|
796
|
+
})), (d === "all" || d === "columns") && ((g = n.value) != null && g.length) && (n.value && n.value.forEach((m) => {
|
|
797
|
+
m.searchConfig && c.push(m.searchConfig);
|
|
798
|
+
}), c.forEach((m) => {
|
|
799
|
+
s.value.some((S) => S.name === m.name) ? s.value = s.value.map((S) => S.name === m.name ? {
|
|
790
800
|
...S,
|
|
791
|
-
...
|
|
792
|
-
} : S) : s.value.push(
|
|
801
|
+
...m
|
|
802
|
+
} : S) : s.value.push(m);
|
|
793
803
|
})), d === "all" || d === "searchMap" || d === "columns") {
|
|
794
804
|
u({ current: 1 });
|
|
795
|
-
const
|
|
796
|
-
Object.assign(r, { ...
|
|
797
|
-
for (const S in
|
|
798
|
-
l[S] || (l[S] =
|
|
805
|
+
const m = Ia(c);
|
|
806
|
+
Object.assign(r, { ...m });
|
|
807
|
+
for (const S in m)
|
|
808
|
+
l[S] || (l[S] = m[S]);
|
|
799
809
|
}
|
|
800
810
|
(d === "all" || d === "params") && !T.value && (u({ current: 1 }), Object.assign(l, t.value));
|
|
801
811
|
};
|
|
@@ -806,33 +816,33 @@ function Pa({ search: e, searchMap: o, params: t, columns: n, setPagination: u }
|
|
|
806
816
|
}
|
|
807
817
|
function Oa({ columns: e, columnsState: o, changeColumns: t }) {
|
|
808
818
|
const n = O(void 0), u = ce({}), l = ce({}), r = ce({}), s = O([]);
|
|
809
|
-
|
|
819
|
+
U(() => e.value, () => {
|
|
810
820
|
var y;
|
|
811
|
-
(y =
|
|
812
|
-
const
|
|
813
|
-
|
|
821
|
+
(y = h(e)) == null || y.forEach(({ show: d, key: c, fixed: p }, g) => {
|
|
822
|
+
const m = ot(c, g);
|
|
823
|
+
m && (r[m] = { show: d === void 0 ? !0 : d, fixed: p });
|
|
814
824
|
});
|
|
815
825
|
}, {
|
|
816
826
|
deep: !0,
|
|
817
827
|
immediate: !0
|
|
818
|
-
}),
|
|
819
|
-
const y =
|
|
820
|
-
|
|
828
|
+
}), U(() => e.value, () => {
|
|
829
|
+
const y = h(e).map((d) => d.key);
|
|
830
|
+
v(y);
|
|
821
831
|
}, {
|
|
822
832
|
deep: !0,
|
|
823
833
|
immediate: !0
|
|
824
834
|
}), fe(() => {
|
|
825
835
|
var d;
|
|
826
836
|
const y = {
|
|
827
|
-
...(d =
|
|
828
|
-
...
|
|
837
|
+
...(d = h(o)) == null ? void 0 : d.value,
|
|
838
|
+
...h(r)
|
|
829
839
|
};
|
|
830
840
|
Object.assign(u, y), Object.assign(l, y);
|
|
831
841
|
});
|
|
832
842
|
function T(y, d) {
|
|
833
843
|
n.value = d, Object.assign(u, y), t == null || t(u, d === "fixed");
|
|
834
844
|
}
|
|
835
|
-
function
|
|
845
|
+
function v(y) {
|
|
836
846
|
s.value = y;
|
|
837
847
|
}
|
|
838
848
|
return {
|
|
@@ -841,7 +851,7 @@ function Oa({ columns: e, columnsState: o, changeColumns: t }) {
|
|
|
841
851
|
setColumnsMap: T,
|
|
842
852
|
sortKeyColumns: s,
|
|
843
853
|
cacheColumnsMap: l,
|
|
844
|
-
setSortKeyColumns:
|
|
854
|
+
setSortKeyColumns: v
|
|
845
855
|
};
|
|
846
856
|
}
|
|
847
857
|
function Ba(e) {
|
|
@@ -854,7 +864,7 @@ function Ba(e) {
|
|
|
854
864
|
}
|
|
855
865
|
function Da({ scroll: e, columns: o, breakpoint: t, draggabled: n, autoScroll: u, neverScroll: l }) {
|
|
856
866
|
const r = O([]), s = O([]);
|
|
857
|
-
|
|
867
|
+
U([
|
|
858
868
|
() => e.value,
|
|
859
869
|
() => o.value,
|
|
860
870
|
() => t.value,
|
|
@@ -862,50 +872,50 @@ function Da({ scroll: e, columns: o, breakpoint: t, draggabled: n, autoScroll: u
|
|
|
862
872
|
() => u.value,
|
|
863
873
|
() => l.value
|
|
864
874
|
], () => {
|
|
865
|
-
r.value =
|
|
875
|
+
r.value = X(y(h(o))), s.value = X(y(h(o)));
|
|
866
876
|
}, {
|
|
867
877
|
deep: !0,
|
|
868
878
|
immediate: !0
|
|
869
879
|
});
|
|
870
880
|
const T = w(() => {
|
|
871
|
-
const g = h(
|
|
881
|
+
const g = v(h(r).filter((F) => F.fixed === "left")), m = v(h(r).filter((F) => F.fixed !== "left" && F.fixed !== "right")), S = v(h(r).filter((F) => F.fixed === "right"));
|
|
872
882
|
return [
|
|
873
883
|
...g,
|
|
874
|
-
...
|
|
884
|
+
...m,
|
|
875
885
|
...S
|
|
876
886
|
];
|
|
877
887
|
});
|
|
878
|
-
function
|
|
879
|
-
return g.sort((
|
|
888
|
+
function v(g) {
|
|
889
|
+
return g.sort((m, S) => _t(m, S, "order", 0));
|
|
880
890
|
}
|
|
881
891
|
function y(g) {
|
|
882
|
-
return
|
|
892
|
+
return X(g).map((m, S) => {
|
|
883
893
|
var F;
|
|
884
|
-
if (
|
|
885
|
-
return
|
|
886
|
-
if (
|
|
887
|
-
if ((F =
|
|
888
|
-
|
|
894
|
+
if (m.dataIndex === "action" || S === g.length - 1 ? m.resizable = !1 : m.resizable = te(m.resizable) ? m.resizable : !!(ut(m.width) && h(n)), !m.width || h(l))
|
|
895
|
+
return m;
|
|
896
|
+
if (m.dataIndex === "action" && h(u))
|
|
897
|
+
if ((F = h(e)) != null && F.x || !h(t))
|
|
898
|
+
m.width = m.width || 100, m.fixed = "right";
|
|
889
899
|
else {
|
|
890
|
-
const x =
|
|
891
|
-
|
|
900
|
+
const x = h(o).find((I) => I.dataIndex === m.dataIndex);
|
|
901
|
+
m.width = (x == null ? void 0 : x.width) || "", m.fixed = x == null ? void 0 : x.fixed;
|
|
892
902
|
}
|
|
893
|
-
return
|
|
903
|
+
return m;
|
|
894
904
|
});
|
|
895
905
|
}
|
|
896
|
-
function d(g,
|
|
897
|
-
r.value = r.value.map((S) => (S.uuid ===
|
|
906
|
+
function d(g, m) {
|
|
907
|
+
r.value = r.value.map((S) => (S.uuid === m.uuid && (S.width = g), S));
|
|
898
908
|
}
|
|
899
909
|
function c(g) {
|
|
900
910
|
if (g.length <= 0) {
|
|
901
911
|
r.value = [];
|
|
902
912
|
return;
|
|
903
913
|
}
|
|
904
|
-
nt(y(
|
|
914
|
+
nt(y(X(g)), r.value) || (r.value = y(X(g)));
|
|
905
915
|
}
|
|
906
916
|
function p(g) {
|
|
907
|
-
let
|
|
908
|
-
|
|
917
|
+
let m = X(o.value);
|
|
918
|
+
m = m.map((S) => {
|
|
909
919
|
var x, I, B;
|
|
910
920
|
const F = S.key ? {
|
|
911
921
|
show: (x = g[S.key]) == null ? void 0 : x.show,
|
|
@@ -916,7 +926,7 @@ function Da({ scroll: e, columns: o, breakpoint: t, draggabled: n, autoScroll: u
|
|
|
916
926
|
...S,
|
|
917
927
|
...F
|
|
918
928
|
};
|
|
919
|
-
}), c(
|
|
929
|
+
}), c(m);
|
|
920
930
|
}
|
|
921
931
|
return {
|
|
922
932
|
breakpoint: t,
|
|
@@ -939,25 +949,25 @@ function Na(e) {
|
|
|
939
949
|
};
|
|
940
950
|
}
|
|
941
951
|
function ja({ scroll: e, columns: o, autoScroll: t, modalScroll: n, neverScroll: u, rowSelection: l, screensRef: r, innerWidth: s, scrollBreakpoint: T }) {
|
|
942
|
-
const
|
|
952
|
+
const v = w(() => {
|
|
943
953
|
var c, p, g;
|
|
944
|
-
return
|
|
954
|
+
return h(T) ? ut(h(T)) ? s.value > h(T) : Gt(h(T)) ? (c = r.value) == null ? void 0 : c[h(T)] : (p = r.value) == null ? void 0 : p.xl : (g = r.value) == null ? void 0 : g.xl;
|
|
945
955
|
}), y = w(() => {
|
|
946
956
|
let c = 0;
|
|
947
|
-
const p =
|
|
948
|
-
|
|
957
|
+
const p = h(l) ? 60 : 0, g = 150, m = X(h(o));
|
|
958
|
+
m.forEach((x) => {
|
|
949
959
|
c += Number.parseInt(x.width) || 0;
|
|
950
960
|
});
|
|
951
|
-
const F =
|
|
961
|
+
const F = m.filter((x) => !Reflect.has(x, "width")).length;
|
|
952
962
|
return F !== 0 && (c += F * g), p && (c += p), c;
|
|
953
963
|
});
|
|
954
964
|
return { getScrollRef: w(() => {
|
|
955
965
|
var p;
|
|
956
966
|
const { xl: c } = r.value;
|
|
957
|
-
return
|
|
958
|
-
y: ((p =
|
|
959
|
-
} :
|
|
960
|
-
}), breakpoint:
|
|
967
|
+
return h(u) ? {} : h(e) && Object.keys(h(e)).length ? h(e) : h(n) ? {
|
|
968
|
+
y: ((p = h(e)) == null ? void 0 : p.y) || (c ? 400 : 235)
|
|
969
|
+
} : h(t) ? v.value ? {} : te(v.value) ? { x: h(y) } : {} : {};
|
|
970
|
+
}), breakpoint: v };
|
|
961
971
|
}
|
|
962
972
|
const ft = Symbol("table-context"), Ma = (e = Symbol(), o) => zt(e, o || {}), ka = (e) => {
|
|
963
973
|
Et(ft, e);
|
|
@@ -1049,7 +1059,7 @@ const za = (e) => ({
|
|
|
1049
1059
|
} = Pe("ProTableForm", [za], e.prefixCls), r = Ka(), {
|
|
1050
1060
|
formState: s,
|
|
1051
1061
|
resetFormState: T,
|
|
1052
|
-
changeFormState:
|
|
1062
|
+
changeFormState: v
|
|
1053
1063
|
} = Ea(e.defaultParams || {}, e.searchMap || []), y = O(!1), d = w(() => {
|
|
1054
1064
|
var a;
|
|
1055
1065
|
return !!((a = e.search) != null && a.showSearch);
|
|
@@ -1076,15 +1086,15 @@ const za = (e) => ({
|
|
|
1076
1086
|
span: 1
|
|
1077
1087
|
}], g = w(() => {
|
|
1078
1088
|
var a;
|
|
1079
|
-
return
|
|
1089
|
+
return m((a = e.search) == null ? void 0 : a.span);
|
|
1080
1090
|
});
|
|
1081
|
-
|
|
1091
|
+
U(() => {
|
|
1082
1092
|
var a;
|
|
1083
1093
|
return (a = e.search) == null ? void 0 : a.defaultCollapsed;
|
|
1084
1094
|
}, (a) => {
|
|
1085
1095
|
y.value = y.value || !!a;
|
|
1086
1096
|
});
|
|
1087
|
-
const
|
|
1097
|
+
const m = (a) => {
|
|
1088
1098
|
let b = 4;
|
|
1089
1099
|
for (let P = 0; P < p.length; P += 1) {
|
|
1090
1100
|
const $ = p[P].value;
|
|
@@ -1106,45 +1116,45 @@ const za = (e) => ({
|
|
|
1106
1116
|
var P, $, N;
|
|
1107
1117
|
switch (b.valueType) {
|
|
1108
1118
|
case "text":
|
|
1109
|
-
|
|
1119
|
+
v(b.name || "", a || b.initialValue || "");
|
|
1110
1120
|
break;
|
|
1111
1121
|
case "select":
|
|
1112
|
-
|
|
1122
|
+
v(b.name || "", a || a === 0 ? a : b.initialValue || void 0);
|
|
1113
1123
|
break;
|
|
1114
1124
|
case "treeSelect":
|
|
1115
|
-
|
|
1125
|
+
v(b.name || "", a || a === 0 ? a : b.initialValue || ((P = b.field) != null && P.treeCheckable || ($ = b.field) != null && $.multiple ? [] : null));
|
|
1116
1126
|
break;
|
|
1117
1127
|
case "date":
|
|
1118
|
-
|
|
1128
|
+
v(b.name || "", a ? W(a).format(b.valueFormat || "YYYY-MM-DD") : b.initialValue || null);
|
|
1119
1129
|
break;
|
|
1120
1130
|
case "dateMonth":
|
|
1121
|
-
|
|
1131
|
+
v(b.name || "", a ? W(a).format("YYYY-MM") : b.initialValue || null);
|
|
1122
1132
|
break;
|
|
1123
1133
|
case "dateRange":
|
|
1124
|
-
|
|
1134
|
+
v(b.name || "", a && a.length > 0 ? [W(a[0]).format(b.valueFormat || "YYYY-MM-DD"), W(a[1]).format(b.valueFormat || "YYYY-MM-DD")] : b.initialValue || null);
|
|
1125
1135
|
break;
|
|
1126
1136
|
case "time":
|
|
1127
|
-
|
|
1137
|
+
v(b.name || "", a ? W(a).format(b.valueFormat || "HH:mm:ss") : b.initialValue || null);
|
|
1128
1138
|
break;
|
|
1129
1139
|
}
|
|
1130
1140
|
(N = e.search) != null && N.showSearch || b.valueType === "text" || (b.valueType === "treeSelect" || b.valueType, B());
|
|
1131
1141
|
}, I = () => {
|
|
1132
|
-
const a =
|
|
1142
|
+
const a = X(s), b = e.searchMap.find((N) => N.valueType === "text") || "", P = e.searchMap.find((N) => N.valueType === "dateRange") || "", $ = e.searchMap.find((N) => N.valueType === "treeSelect") || "";
|
|
1133
1143
|
return b && (a[b.name] = s[b.name] || b.initialValue || ""), P && (a[P.rangeStartName || "start"] = a[P.name] ? a[P.name][0] : "", a[P.rangeEndName || "end"] = a[P.name] ? a[P.name][1] : "", delete a[P.name]), $ && (Ke(s[$.name]) && (a[$.name] = s[$.name].length ? s[$.name].map((N) => N[$.valueKey === "text" ? "label" : "value"]).join() : ""), $ && Ke(a[$.name]) && (a[$.name] = a[$.name].length ? a[$.name].map((N) => N[$.valueKey === "text" ? "label" : "value"]) : "")), a;
|
|
1134
1144
|
}, B = (a = !1, b) => {
|
|
1135
1145
|
Kt(() => {
|
|
1136
1146
|
(!d.value || a) && o("search", I(), !!b);
|
|
1137
1147
|
});
|
|
1138
|
-
},
|
|
1148
|
+
}, _ = (a = !0) => {
|
|
1139
1149
|
T(), B(!0, a);
|
|
1140
1150
|
};
|
|
1141
1151
|
n({
|
|
1142
1152
|
getFormState: () => I(),
|
|
1143
|
-
resetForm:
|
|
1153
|
+
resetForm: _
|
|
1144
1154
|
});
|
|
1145
|
-
const
|
|
1155
|
+
const M = () => (d.value || c.value) && i(le, null, {
|
|
1146
1156
|
default: () => [c.value && i(tt, {
|
|
1147
|
-
onClick: () =>
|
|
1157
|
+
onClick: () => _()
|
|
1148
1158
|
}, {
|
|
1149
1159
|
default: () => {
|
|
1150
1160
|
var a;
|
|
@@ -1172,30 +1182,30 @@ const za = (e) => ({
|
|
|
1172
1182
|
}, {
|
|
1173
1183
|
default: () => {
|
|
1174
1184
|
var $, N;
|
|
1175
|
-
return [
|
|
1185
|
+
return [M(), P && i("span", {
|
|
1176
1186
|
class: `${e.prefixCls}-a ${l.value}`,
|
|
1177
1187
|
onClick: () => S(!b)
|
|
1178
1188
|
}, [b ? "收起" : "展开", ($ = e.search) != null && $.collapseRender ? (N = e.search) == null ? void 0 : N.collapseRender() : b ? i(ra, null, null) : i(ca, null, null)])];
|
|
1179
1189
|
}
|
|
1180
|
-
})]),
|
|
1190
|
+
})]), z = (a) => {
|
|
1181
1191
|
var $, N;
|
|
1182
1192
|
let b;
|
|
1183
1193
|
const P = d.value ? at : at.Search;
|
|
1184
1194
|
switch (a.valueType) {
|
|
1185
1195
|
case "text":
|
|
1186
|
-
b = i(P,
|
|
1196
|
+
b = i(P, q({
|
|
1187
1197
|
style: {
|
|
1188
1198
|
width: "100%"
|
|
1189
1199
|
},
|
|
1190
1200
|
value: s[a.name],
|
|
1191
1201
|
placeholder: a.placeholder || "请输入",
|
|
1192
1202
|
allowClear: a.allowClear || a.allowClear === !1 ? a.allowClear : !0,
|
|
1193
|
-
onChange: (
|
|
1194
|
-
onSearch: (
|
|
1203
|
+
onChange: (f) => x(f.target.value, a),
|
|
1204
|
+
onSearch: (f) => B()
|
|
1195
1205
|
}, a.field || {}), null);
|
|
1196
1206
|
break;
|
|
1197
1207
|
case "select":
|
|
1198
|
-
b = i(Zt,
|
|
1208
|
+
b = i(Zt, q({
|
|
1199
1209
|
style: {
|
|
1200
1210
|
width: "100%"
|
|
1201
1211
|
},
|
|
@@ -1204,19 +1214,19 @@ const za = (e) => ({
|
|
|
1204
1214
|
placeholder: a.placeholder || "请选择",
|
|
1205
1215
|
showSearch: a.showSearch,
|
|
1206
1216
|
allowClear: a.allowClear || a.allowClear === !1 ? a.allowClear : !0,
|
|
1207
|
-
getPopupContainer: (
|
|
1217
|
+
getPopupContainer: (f) => f && f.parentNode ? f.parentNode : f,
|
|
1208
1218
|
notFoundContent: a.loading === void 0 ? void 0 : a.loading ? i(Le, {
|
|
1209
1219
|
size: "small"
|
|
1210
1220
|
}, null) : void 0,
|
|
1211
|
-
onChange: (
|
|
1212
|
-
options: ($ = a == null ? void 0 : a.valueEnum) == null ? void 0 : $.map((
|
|
1213
|
-
label:
|
|
1214
|
-
value:
|
|
1221
|
+
onChange: (f) => x(f, a),
|
|
1222
|
+
options: ($ = a == null ? void 0 : a.valueEnum) == null ? void 0 : $.map((f) => ({
|
|
1223
|
+
label: f.text,
|
|
1224
|
+
value: f.value
|
|
1215
1225
|
}))
|
|
1216
1226
|
}, a.field || {}), null);
|
|
1217
1227
|
break;
|
|
1218
1228
|
case "treeSelect":
|
|
1219
|
-
b = i(Qt,
|
|
1229
|
+
b = i(Qt, q({
|
|
1220
1230
|
style: {
|
|
1221
1231
|
width: "100%"
|
|
1222
1232
|
},
|
|
@@ -1224,64 +1234,64 @@ const za = (e) => ({
|
|
|
1224
1234
|
placeholder: a.placeholder || "请选择",
|
|
1225
1235
|
allowClear: a.allowClear || a.allowClear === !1 ? a.allowClear : !0,
|
|
1226
1236
|
treeData: a.valueEnum,
|
|
1227
|
-
getPopupContainer: (
|
|
1237
|
+
getPopupContainer: (f) => f && f.parentNode ? f.parentNode : f,
|
|
1228
1238
|
notFoundContent: a.loading === void 0 ? void 0 : a.loading ? i(Le, {
|
|
1229
1239
|
size: "small"
|
|
1230
1240
|
}, null) : void 0,
|
|
1231
|
-
onChange: (
|
|
1241
|
+
onChange: (f) => x(f, a)
|
|
1232
1242
|
}, a.field || {}), null);
|
|
1233
1243
|
break;
|
|
1234
1244
|
case "date":
|
|
1235
|
-
b = i(rt,
|
|
1245
|
+
b = i(rt, q({
|
|
1236
1246
|
style: {
|
|
1237
1247
|
width: "100%"
|
|
1238
1248
|
},
|
|
1239
|
-
value: s[a.name] ?
|
|
1240
|
-
getPopupContainer: (
|
|
1249
|
+
value: s[a.name] ? W(s[a.name], a.valueFormat || "YYYY-MM-DD") : void 0,
|
|
1250
|
+
getPopupContainer: (f) => f && f.parentNode ? f.parentNode : f,
|
|
1241
1251
|
placeholder: a.placeholder || "请选择",
|
|
1242
1252
|
allowClear: a.allowClear || a.allowClear === !1 ? a.allowClear : !0,
|
|
1243
1253
|
format: a.valueFormat || "YYYY-MM-DD",
|
|
1244
1254
|
showTime: a.showTime,
|
|
1245
1255
|
showToday: a.showToday || !0,
|
|
1246
|
-
onChange: (
|
|
1256
|
+
onChange: (f) => x(f, a)
|
|
1247
1257
|
}, a.field || {}), null);
|
|
1248
1258
|
break;
|
|
1249
1259
|
case "dateMonth":
|
|
1250
|
-
b = i(Ya,
|
|
1260
|
+
b = i(Ya, q({
|
|
1251
1261
|
style: {
|
|
1252
1262
|
width: "100%"
|
|
1253
1263
|
},
|
|
1254
|
-
value: s[a.name] ?
|
|
1255
|
-
getPopupContainer: (
|
|
1264
|
+
value: s[a.name] ? W(s[a.name], a.valueFormat || "YYYY-MM") : void 0,
|
|
1265
|
+
getPopupContainer: (f) => f && f.parentNode ? f.parentNode : f,
|
|
1256
1266
|
placeholder: a.placeholder || "请选择",
|
|
1257
|
-
onChange: (
|
|
1267
|
+
onChange: (f) => x(f, a)
|
|
1258
1268
|
}, a.field || {}), null);
|
|
1259
1269
|
break;
|
|
1260
1270
|
case "dateRange":
|
|
1261
|
-
b = i(La,
|
|
1271
|
+
b = i(La, q({
|
|
1262
1272
|
style: {
|
|
1263
1273
|
width: "100%"
|
|
1264
1274
|
},
|
|
1265
|
-
value: (N = s[a.name]) != null && N.length ? [
|
|
1266
|
-
getPopupContainer: (
|
|
1275
|
+
value: (N = s[a.name]) != null && N.length ? [W(s[a.name][0], a.valueFormat || "YYYY-MM-DD HH:mm:ss"), W(s[a.name][1], a.valueFormat || "YYYY-MM-DD HH:mm:ss")] : void 0,
|
|
1276
|
+
getPopupContainer: (f) => f && f.parentNode ? f.parentNode : f,
|
|
1267
1277
|
placeholder: a.placeholder || ["开始日期", "结束日期"],
|
|
1268
1278
|
format: a.valueFormat || "YYYY-MM-DD HH:mm:ss",
|
|
1269
1279
|
showTime: a.showTime,
|
|
1270
|
-
onChange: (
|
|
1280
|
+
onChange: (f) => x(f, a)
|
|
1271
1281
|
}, a.field || {}), null);
|
|
1272
1282
|
break;
|
|
1273
1283
|
case "time":
|
|
1274
|
-
b = i(Jt,
|
|
1284
|
+
b = i(Jt, q({
|
|
1275
1285
|
style: {
|
|
1276
1286
|
width: "100%"
|
|
1277
1287
|
},
|
|
1278
|
-
value: s[a.name] ?
|
|
1279
|
-
getPopupContainer: (
|
|
1288
|
+
value: s[a.name] ? W(s[a.name], a.valueFormat || "HH:mm:ss") : void 0,
|
|
1289
|
+
getPopupContainer: (f) => f && f.parentNode ? f.parentNode : f,
|
|
1280
1290
|
placeholder: a.placeholder || "请选择",
|
|
1281
1291
|
allowClear: a.allowClear || a.allowClear === !1 ? a.allowClear : !0,
|
|
1282
1292
|
use12Hours: a.use12Hours,
|
|
1283
1293
|
format: a.valueFormat || "HH:mm:ss",
|
|
1284
|
-
onChange: (
|
|
1294
|
+
onChange: (f) => x(f, a)
|
|
1285
1295
|
}, a.field || {}), null);
|
|
1286
1296
|
break;
|
|
1287
1297
|
}
|
|
@@ -1293,16 +1303,16 @@ const za = (e) => ({
|
|
|
1293
1303
|
class: `${e.prefixCls}-form-item`,
|
|
1294
1304
|
style: a
|
|
1295
1305
|
}, [i(et.Item, null, {
|
|
1296
|
-
default: () => [b.__v_isVNode ? b :
|
|
1306
|
+
default: () => [b.__v_isVNode ? b : z(b)]
|
|
1297
1307
|
})]), oe = () => {
|
|
1298
1308
|
var b;
|
|
1299
1309
|
const a = [...e.searchMap, ...((b = t.default) == null ? void 0 : b.call(t)) || []];
|
|
1300
1310
|
return a.map((P, $) => {
|
|
1301
1311
|
const N = {
|
|
1302
1312
|
width: `${(100 - (g.value - 1) * 2) / g.value}%`
|
|
1303
|
-
},
|
|
1313
|
+
}, f = F($, g.value, N);
|
|
1304
1314
|
return a.length < g.value || y.value ? i(Ie, null, [D({
|
|
1305
|
-
formItemStyle:
|
|
1315
|
+
formItemStyle: f,
|
|
1306
1316
|
item: P
|
|
1307
1317
|
}), $ === a.length - 1 && A({
|
|
1308
1318
|
formItemStyle: {
|
|
@@ -1312,10 +1322,10 @@ const za = (e) => ({
|
|
|
1312
1322
|
advanced: y.value,
|
|
1313
1323
|
showAdvanced: y.value
|
|
1314
1324
|
})]) : i(Ie, null, [$ < g.value - 1 && D({
|
|
1315
|
-
formItemStyle:
|
|
1325
|
+
formItemStyle: f,
|
|
1316
1326
|
item: P
|
|
1317
1327
|
}), $ === g.value - 1 && g.value - 1 === 0 && D({
|
|
1318
|
-
formItemStyle:
|
|
1328
|
+
formItemStyle: f,
|
|
1319
1329
|
item: P
|
|
1320
1330
|
}), $ === g.value - 1 && A({
|
|
1321
1331
|
formItemStyle: {
|
|
@@ -1332,15 +1342,15 @@ const za = (e) => ({
|
|
|
1332
1342
|
return u(i("div", {
|
|
1333
1343
|
class: {
|
|
1334
1344
|
[`${l.value}`]: !0,
|
|
1335
|
-
[`${
|
|
1345
|
+
[`${h(e.prefixCls)}-search`]: !0,
|
|
1336
1346
|
[`${(a = e.search) == null ? void 0 : a.className}`]: (b = e.search) == null ? void 0 : b.className
|
|
1337
1347
|
}
|
|
1338
1348
|
}, [i(et, {
|
|
1339
|
-
class: `${
|
|
1349
|
+
class: `${h(e.prefixCls)}-form ${l.value}`,
|
|
1340
1350
|
layout: "horizontal"
|
|
1341
1351
|
}, {
|
|
1342
1352
|
default: () => [i("div", {
|
|
1343
|
-
class: `${
|
|
1353
|
+
class: `${h(e.prefixCls)}-form-container ${l.value}`
|
|
1344
1354
|
}, [oe()])]
|
|
1345
1355
|
})]));
|
|
1346
1356
|
};
|
|
@@ -1460,12 +1470,12 @@ const be = (e) => {
|
|
|
1460
1470
|
onClick: (T) => {
|
|
1461
1471
|
var p, g;
|
|
1462
1472
|
T.stopPropagation(), T.preventDefault();
|
|
1463
|
-
const
|
|
1473
|
+
const v = ((p = h(l).find((m) => m.uuid === t)) == null ? void 0 : p.key) || "", y = (r == null ? void 0 : r.columnsMap[v]) || {};
|
|
1464
1474
|
if (typeof y.disable == "boolean" ? y.disable : (g = y.disable) == null ? void 0 : g.icon)
|
|
1465
1475
|
return;
|
|
1466
1476
|
const c = {
|
|
1467
1477
|
...r == null ? void 0 : r.columnsMap,
|
|
1468
|
-
[
|
|
1478
|
+
[v]: {
|
|
1469
1479
|
...y,
|
|
1470
1480
|
fixed: n
|
|
1471
1481
|
}
|
|
@@ -1545,40 +1555,40 @@ const be = (e) => {
|
|
|
1545
1555
|
settingsAction: s
|
|
1546
1556
|
} = de(), T = (c, p) => c.map(({
|
|
1547
1557
|
key: g,
|
|
1548
|
-
children:
|
|
1558
|
+
children: m,
|
|
1549
1559
|
uuid: S,
|
|
1550
1560
|
...F
|
|
1551
1561
|
}) => {
|
|
1552
|
-
var
|
|
1562
|
+
var _;
|
|
1553
1563
|
const x = (s == null ? void 0 : s.columnsMap[g || "null"]) || {
|
|
1554
1564
|
show: !0
|
|
1555
1565
|
};
|
|
1556
1566
|
let I = !1;
|
|
1557
|
-
x.show !== !1 && (p == null ? void 0 : p.show) !== !1 && !
|
|
1567
|
+
x.show !== !1 && (p == null ? void 0 : p.show) !== !1 && !m && (I = !0);
|
|
1558
1568
|
const B = {
|
|
1559
1569
|
key: S || "",
|
|
1560
1570
|
...Aa(F, ["dataIndex"]),
|
|
1561
1571
|
checked: I,
|
|
1562
1572
|
selectable: !1,
|
|
1563
1573
|
disabled: x.disable === !0,
|
|
1564
|
-
disableCheckbox: typeof x.disable == "boolean" ? x.disable : (
|
|
1574
|
+
disableCheckbox: typeof x.disable == "boolean" ? x.disable : (_ = x.disable) == null ? void 0 : _.checkbox,
|
|
1565
1575
|
isLeaf: !0
|
|
1566
1576
|
};
|
|
1567
|
-
return
|
|
1577
|
+
return m && (B.children = T(m, x)), B;
|
|
1568
1578
|
});
|
|
1569
1579
|
fe(() => {
|
|
1570
1580
|
const c = T(e.list || []);
|
|
1571
1581
|
n.value = c, u.value = c.filter((p) => p.checked).map((p) => p.key), (s == null ? void 0 : s.operationType.value) === "fixed" && (o.value = Ye().uuid(15));
|
|
1572
1582
|
});
|
|
1573
|
-
const
|
|
1574
|
-
var A,
|
|
1575
|
-
const
|
|
1583
|
+
const v = be((c, p, g) => {
|
|
1584
|
+
var A, z;
|
|
1585
|
+
const m = ((A = h(l).find((D) => D.uuid === c)) == null ? void 0 : A.key) || "", S = ((z = h(l).find((D) => D.uuid === p)) == null ? void 0 : z.key) || "", F = {
|
|
1576
1586
|
...s == null ? void 0 : s.columnsMap
|
|
1577
|
-
}, x = [...s.sortKeyColumns.value], I = x.findIndex((D) => D ===
|
|
1587
|
+
}, x = [...s.sortKeyColumns.value], I = x.findIndex((D) => D === m), B = x.findIndex((D) => D === S), _ = g > I;
|
|
1578
1588
|
if (I < 0)
|
|
1579
1589
|
return;
|
|
1580
|
-
const
|
|
1581
|
-
x.splice(I, 1), g === 0 ? x.unshift(
|
|
1590
|
+
const M = x[I];
|
|
1591
|
+
x.splice(I, 1), g === 0 ? x.unshift(M) : x.splice(_ ? B : B + 1, 0, M), x.forEach((D, oe) => {
|
|
1582
1592
|
F[D] = {
|
|
1583
1593
|
...F[D] || {},
|
|
1584
1594
|
order: oe
|
|
@@ -1586,7 +1596,7 @@ const be = (e) => {
|
|
|
1586
1596
|
}), s == null || s.setColumnsMap(F, "drop"), s == null || s.setSortKeyColumns(x);
|
|
1587
1597
|
}), y = be((c) => {
|
|
1588
1598
|
var x;
|
|
1589
|
-
const p = c.node.key, g = ((x =
|
|
1599
|
+
const p = c.node.key, g = ((x = h(l).find((I) => I.uuid === p)) == null ? void 0 : x.key) || "", S = {
|
|
1590
1600
|
...(s == null ? void 0 : s.columnsMap[g]) || {}
|
|
1591
1601
|
};
|
|
1592
1602
|
S.show = c.checked;
|
|
@@ -1596,7 +1606,7 @@ const be = (e) => {
|
|
|
1596
1606
|
};
|
|
1597
1607
|
s == null || s.setColumnsMap(F, "show");
|
|
1598
1608
|
}), d = (c) => {
|
|
1599
|
-
const p =
|
|
1609
|
+
const p = h(l).find((g) => g.uuid === c.key);
|
|
1600
1610
|
return c.title || Yt(r, "headerCell", {
|
|
1601
1611
|
title: p.title,
|
|
1602
1612
|
column: p
|
|
@@ -1615,28 +1625,28 @@ const be = (e) => {
|
|
|
1615
1625
|
checkedKeys: u.value,
|
|
1616
1626
|
height: 280,
|
|
1617
1627
|
onDrop: (g) => {
|
|
1618
|
-
const
|
|
1628
|
+
const m = g.node.key, S = g.dragNode.key, {
|
|
1619
1629
|
dropPosition: F,
|
|
1620
1630
|
dropToGap: x
|
|
1621
1631
|
} = g, I = F === -1 || !x ? F + 1 : F;
|
|
1622
|
-
|
|
1632
|
+
v(S, m, I);
|
|
1623
1633
|
},
|
|
1624
|
-
onCheck: (g,
|
|
1634
|
+
onCheck: (g, m) => y(m),
|
|
1625
1635
|
treeData: n.value
|
|
1626
1636
|
}, {
|
|
1627
1637
|
title: (g) => {
|
|
1628
1638
|
var S;
|
|
1629
|
-
const
|
|
1639
|
+
const m = {
|
|
1630
1640
|
...g,
|
|
1631
1641
|
children: void 0,
|
|
1632
1642
|
title: d(g),
|
|
1633
1643
|
autoScroll: (S = s == null ? void 0 : s.autoScroll) == null ? void 0 : S.value
|
|
1634
1644
|
};
|
|
1635
|
-
return i(Ha,
|
|
1645
|
+
return i(Ha, q({
|
|
1636
1646
|
hashId: e.hashId,
|
|
1637
1647
|
className: e.className
|
|
1638
|
-
},
|
|
1639
|
-
treeKey:
|
|
1648
|
+
}, m, {
|
|
1649
|
+
treeKey: m.key
|
|
1640
1650
|
}), null);
|
|
1641
1651
|
}
|
|
1642
1652
|
})]) : null;
|
|
@@ -1653,24 +1663,24 @@ const be = (e) => {
|
|
|
1653
1663
|
const {
|
|
1654
1664
|
columns: o
|
|
1655
1665
|
} = de(), t = O([]), n = O([]), u = O([]), l = O([]);
|
|
1656
|
-
|
|
1657
|
-
t.value = [], n.value = [], u.value = [], T.forEach((
|
|
1658
|
-
if (
|
|
1666
|
+
U(() => o.value, (T) => {
|
|
1667
|
+
t.value = [], n.value = [], u.value = [], T.forEach((v) => {
|
|
1668
|
+
if (v.hideInSetting)
|
|
1659
1669
|
return;
|
|
1660
1670
|
const {
|
|
1661
1671
|
fixed: y,
|
|
1662
1672
|
show: d,
|
|
1663
1673
|
uuid: c
|
|
1664
|
-
} =
|
|
1674
|
+
} = v;
|
|
1665
1675
|
if ((d || d === void 0) && c && l.value.push(c), y === "left") {
|
|
1666
|
-
n.value.push(
|
|
1676
|
+
n.value.push(v);
|
|
1667
1677
|
return;
|
|
1668
1678
|
}
|
|
1669
1679
|
if (y === "right") {
|
|
1670
|
-
t.value.push(
|
|
1680
|
+
t.value.push(v);
|
|
1671
1681
|
return;
|
|
1672
1682
|
}
|
|
1673
|
-
u.value.push(
|
|
1683
|
+
u.value.push(v);
|
|
1674
1684
|
});
|
|
1675
1685
|
}, {
|
|
1676
1686
|
immediate: !0
|
|
@@ -1735,12 +1745,12 @@ const be = (e) => {
|
|
|
1735
1745
|
} = de(), r = be((d = !0) => {
|
|
1736
1746
|
const c = {}, p = (g) => {
|
|
1737
1747
|
g.forEach(({
|
|
1738
|
-
key:
|
|
1748
|
+
key: m,
|
|
1739
1749
|
fixed: S,
|
|
1740
1750
|
index: F,
|
|
1741
1751
|
children: x
|
|
1742
1752
|
}) => {
|
|
1743
|
-
const I = ot(
|
|
1753
|
+
const I = ot(m, F);
|
|
1744
1754
|
I && (c[I] = {
|
|
1745
1755
|
show: d,
|
|
1746
1756
|
fixed: S
|
|
@@ -1752,17 +1762,17 @@ const be = (e) => {
|
|
|
1752
1762
|
d.target.checked ? r() : r(!1);
|
|
1753
1763
|
}), T = be(() => {
|
|
1754
1764
|
l == null || l.setColumnsMap(l == null ? void 0 : l.cacheColumnsMap, "fixed");
|
|
1755
|
-
}),
|
|
1765
|
+
}), v = w(() => (
|
|
1756
1766
|
// @ts-ignore
|
|
1757
1767
|
Object.values(l == null ? void 0 : l.columnsMap).filter((d) => !d || d.show === !1)
|
|
1758
|
-
)), y = w(() =>
|
|
1768
|
+
)), y = w(() => h(v).length > 0 && h(v).length !== u.value.length);
|
|
1759
1769
|
return () => t(i(ea, {
|
|
1760
1770
|
arrowPointAtCenter: !0,
|
|
1761
1771
|
title: i("div", {
|
|
1762
1772
|
class: [`${o}-title`, n.value]
|
|
1763
1773
|
}, [i(ta, {
|
|
1764
1774
|
indeterminate: y.value,
|
|
1765
|
-
checked:
|
|
1775
|
+
checked: h(v).length === 0 && h(v).length !== u.value.length,
|
|
1766
1776
|
onChange: (d) => s(d)
|
|
1767
1777
|
}, {
|
|
1768
1778
|
default: () => [pe("列展示")]
|
|
@@ -1971,7 +1981,7 @@ const mt = /* @__PURE__ */ ae({
|
|
|
1971
1981
|
default: () => [s.value && i("div", {
|
|
1972
1982
|
class: `${e.prefixCls}-actions`
|
|
1973
1983
|
}, [s.value])]
|
|
1974
|
-
}), [() => u.value, () => l.value, () => r.value, () => e.prefixCls, () => e.headerTitle, () => e.titleTipText, () => e.titleTip]),
|
|
1984
|
+
}), [() => u.value, () => l.value, () => r.value, () => e.prefixCls, () => e.headerTitle, () => e.titleTipText, () => e.titleTip]), v = Fe(() => {
|
|
1975
1985
|
let d;
|
|
1976
1986
|
return l.value ? i(le, {
|
|
1977
1987
|
size: 16,
|
|
@@ -1986,11 +1996,11 @@ const mt = /* @__PURE__ */ ae({
|
|
|
1986
1996
|
align: "center",
|
|
1987
1997
|
class: `${e.prefixCls}-setting-items`
|
|
1988
1998
|
}, lt(d = e.settings.map((p, g) => {
|
|
1989
|
-
const
|
|
1999
|
+
const m = Xa(p);
|
|
1990
2000
|
return i("div", {
|
|
1991
2001
|
key: g,
|
|
1992
2002
|
class: `${e.prefixCls}-setting-item`
|
|
1993
|
-
}, [
|
|
2003
|
+
}, [m]);
|
|
1994
2004
|
})) ? d : {
|
|
1995
2005
|
default: () => [d]
|
|
1996
2006
|
}) : null];
|
|
@@ -2006,8 +2016,8 @@ const mt = /* @__PURE__ */ ae({
|
|
|
2006
2016
|
};
|
|
2007
2017
|
return i("div", {
|
|
2008
2018
|
class: d
|
|
2009
|
-
}, [T.value,
|
|
2010
|
-
}, [() => u.value, () => l.value, () => T.value, () => e.prefixCls, () =>
|
|
2019
|
+
}, [T.value, v.value]);
|
|
2020
|
+
}, [() => u.value, () => l.value, () => T.value, () => e.prefixCls, () => v.value]);
|
|
2011
2021
|
return () => o(i("div", {
|
|
2012
2022
|
class: `${e.prefixCls} ${t.value}`
|
|
2013
2023
|
}, [y.value]));
|
|
@@ -2042,7 +2052,7 @@ function Qa(e, o) {
|
|
|
2042
2052
|
let u = n === !0 ? o[t] : () => n == null ? void 0 : n();
|
|
2043
2053
|
if (typeof u != "function" && (u = () => {
|
|
2044
2054
|
}), t === "setting")
|
|
2045
|
-
return i(_a,
|
|
2055
|
+
return i(_a, q(e[t], {
|
|
2046
2056
|
key: t
|
|
2047
2057
|
}), null);
|
|
2048
2058
|
if (t === "fullScreen")
|
|
@@ -2103,7 +2113,7 @@ const Za = {
|
|
|
2103
2113
|
optionsExtra: e.optionsExtra,
|
|
2104
2114
|
headerTitle: e.headerTitle,
|
|
2105
2115
|
actions: u,
|
|
2106
|
-
settings:
|
|
2116
|
+
settings: h(n),
|
|
2107
2117
|
titleTip: e.titleTip,
|
|
2108
2118
|
titleTipText: e.titleTipText
|
|
2109
2119
|
}, null);
|
|
@@ -2128,7 +2138,7 @@ function ll(e, o, t, n) {
|
|
|
2128
2138
|
let u = e;
|
|
2129
2139
|
if (ne(o)) {
|
|
2130
2140
|
const l = o.node === "a" ? "span" : o.node;
|
|
2131
|
-
return i(l,
|
|
2141
|
+
return i(l, q((o == null ? void 0 : o.attr) || {}, {
|
|
2132
2142
|
class: [o.class, o.node === "a" ? `${t}-a` : ""],
|
|
2133
2143
|
onClick: o.click
|
|
2134
2144
|
}), al(e) ? e : {
|
|
@@ -2142,13 +2152,13 @@ function ll(e, o, t, n) {
|
|
|
2142
2152
|
}, [e]);
|
|
2143
2153
|
break;
|
|
2144
2154
|
case "time":
|
|
2145
|
-
u =
|
|
2155
|
+
u = W(e).format("HH:mm:ss");
|
|
2146
2156
|
break;
|
|
2147
2157
|
case "dateMonth":
|
|
2148
|
-
u = `${
|
|
2158
|
+
u = `${W(e).month() + 1}月`;
|
|
2149
2159
|
break;
|
|
2150
2160
|
case "dateTime":
|
|
2151
|
-
u =
|
|
2161
|
+
u = W(e).format("YYYY-MM-DD HH:mm:ss");
|
|
2152
2162
|
break;
|
|
2153
2163
|
}
|
|
2154
2164
|
return u;
|
|
@@ -2373,14 +2383,14 @@ const ke = {
|
|
|
2373
2383
|
wrapSSR: r,
|
|
2374
2384
|
hashId: s
|
|
2375
2385
|
} = Pe("ProBaseTable", [nl], l), T = ul(), {
|
|
2376
|
-
width:
|
|
2386
|
+
width: v
|
|
2377
2387
|
} = Xt(), {
|
|
2378
2388
|
emptyText: y,
|
|
2379
2389
|
indicator: d
|
|
2380
2390
|
} = ia(), c = O(), p = O(), g = O(e.waitRequest);
|
|
2381
2391
|
fe(() => g.value = e.waitRequest);
|
|
2382
2392
|
const {
|
|
2383
|
-
toggle:
|
|
2393
|
+
toggle: m,
|
|
2384
2394
|
isFullscreen: S
|
|
2385
2395
|
} = st(c), F = w(() => ({
|
|
2386
2396
|
...e
|
|
@@ -2400,18 +2410,18 @@ const ke = {
|
|
|
2400
2410
|
});
|
|
2401
2411
|
}), {
|
|
2402
2412
|
loadingStatus: B,
|
|
2403
|
-
setLoading:
|
|
2413
|
+
setLoading: _
|
|
2404
2414
|
} = Sa({
|
|
2405
2415
|
emit: o,
|
|
2406
2416
|
loading: Q(e, "loading")
|
|
2407
2417
|
}), {
|
|
2408
|
-
sizeRef:
|
|
2418
|
+
sizeRef: M,
|
|
2409
2419
|
setTableSize: A
|
|
2410
2420
|
} = xa({
|
|
2411
2421
|
emit: o,
|
|
2412
2422
|
size: Q(e, "size")
|
|
2413
2423
|
}), {
|
|
2414
|
-
getPaginationInfo:
|
|
2424
|
+
getPaginationInfo: z,
|
|
2415
2425
|
setPagination: D
|
|
2416
2426
|
} = wa({
|
|
2417
2427
|
slots: t,
|
|
@@ -2422,22 +2432,22 @@ const ke = {
|
|
|
2422
2432
|
breakpoint: b
|
|
2423
2433
|
} = ja({
|
|
2424
2434
|
...oe,
|
|
2425
|
-
innerWidth:
|
|
2435
|
+
innerWidth: v,
|
|
2426
2436
|
columns: I,
|
|
2427
2437
|
screensRef: T
|
|
2428
2438
|
}), P = Ba(e), {
|
|
2429
2439
|
getProColumns: $,
|
|
2430
2440
|
cacheProColumns: N,
|
|
2431
|
-
setColumns:
|
|
2441
|
+
setColumns: f,
|
|
2432
2442
|
changeColumns: j,
|
|
2433
|
-
resizeColumnWidth:
|
|
2443
|
+
resizeColumnWidth: V
|
|
2434
2444
|
} = Da({
|
|
2435
2445
|
...P,
|
|
2436
2446
|
breakpoint: b,
|
|
2437
2447
|
scroll: a,
|
|
2438
2448
|
columns: I
|
|
2439
2449
|
}), {
|
|
2440
|
-
columnsMap:
|
|
2450
|
+
columnsMap: Y,
|
|
2441
2451
|
operationType: he,
|
|
2442
2452
|
setColumnsMap: Oe,
|
|
2443
2453
|
sortKeyColumns: Se,
|
|
@@ -2460,9 +2470,9 @@ const ke = {
|
|
|
2460
2470
|
setPagination: D
|
|
2461
2471
|
}), {
|
|
2462
2472
|
selectedKey: ue,
|
|
2463
|
-
changeRowKey:
|
|
2473
|
+
changeRowKey: E,
|
|
2464
2474
|
selectRowKey: ie,
|
|
2465
|
-
selectAllRowKey:
|
|
2475
|
+
selectAllRowKey: G,
|
|
2466
2476
|
syncSelectedRows: gt,
|
|
2467
2477
|
removeRowKeys: yt
|
|
2468
2478
|
} = Ta(Q(e, "rowKey"), Q(e, "rowSelection")), pt = $a(e), {
|
|
@@ -2477,49 +2487,49 @@ const ke = {
|
|
|
2477
2487
|
waitRequest: g
|
|
2478
2488
|
}, {
|
|
2479
2489
|
loadingStatus: B,
|
|
2480
|
-
getPaginationInfo:
|
|
2490
|
+
getPaginationInfo: z,
|
|
2481
2491
|
setPagination: D,
|
|
2482
2492
|
removeRowKeys: yt,
|
|
2483
2493
|
syncSelectedRows: gt,
|
|
2484
|
-
setLoading:
|
|
2485
|
-
setColumns:
|
|
2494
|
+
setLoading: _,
|
|
2495
|
+
setColumns: f,
|
|
2486
2496
|
columns: $,
|
|
2487
2497
|
formParamsRef: Be,
|
|
2488
2498
|
onBeforeSearchSubmit: e.onBeforeSearchSubmit,
|
|
2489
2499
|
hasCustomRender: w(() => !!ze(t, e, "customRender"))
|
|
2490
2500
|
}, o), St = w(() => e.options ? {
|
|
2491
2501
|
...il,
|
|
2492
|
-
...
|
|
2502
|
+
...X(ne(e.options) ? e.options : {})
|
|
2493
2503
|
} : !1), Ge = w(() => {
|
|
2494
2504
|
const C = ne(e.loading) ? ye(e.loading, "spinning") : {};
|
|
2495
2505
|
return !C.indicator && (d != null && d.value) && (C.indicator = d == null ? void 0 : d.value), ye({
|
|
2496
2506
|
...(ye(n), ["class", "style", "id"]),
|
|
2497
2507
|
...e,
|
|
2498
2508
|
virtualScroll: x.value,
|
|
2499
|
-
size:
|
|
2500
|
-
scroll:
|
|
2509
|
+
size: h(M),
|
|
2510
|
+
scroll: h(a),
|
|
2501
2511
|
loading: {
|
|
2502
|
-
spinning: e.showLoading ? !!
|
|
2512
|
+
spinning: e.showLoading ? !!h(B) : !1,
|
|
2503
2513
|
...C
|
|
2504
2514
|
},
|
|
2505
|
-
columns: Ne(
|
|
2506
|
-
pagination: Ne(
|
|
2507
|
-
dataSource:
|
|
2515
|
+
columns: Ne(h($).filter((R) => R.show || R.show === void 0)),
|
|
2516
|
+
pagination: Ne(h(z)),
|
|
2517
|
+
dataSource: h(me)
|
|
2508
2518
|
}, ["class", "onChange", "onExpand", "onExpandedRowsChange"]);
|
|
2509
2519
|
}), xt = w(() => [{
|
|
2510
2520
|
[`${s.value}`]: !0,
|
|
2511
2521
|
[`${l}`]: !0,
|
|
2512
2522
|
[`${n.class}`]: n.class,
|
|
2513
|
-
[`${l}-no-scroll`]: !Object.keys(
|
|
2523
|
+
[`${l}-no-scroll`]: !Object.keys(h(a) || {}).length,
|
|
2514
2524
|
[`${l}-table-tree`]: We.value,
|
|
2515
2525
|
[`${l}-full-screen`]: S.value
|
|
2516
2526
|
}]), qe = w(() => {
|
|
2517
2527
|
var J;
|
|
2518
2528
|
let C;
|
|
2519
|
-
const R =
|
|
2520
|
-
if (
|
|
2521
|
-
const
|
|
2522
|
-
!
|
|
2529
|
+
const R = h(F).direction === "rtl" ? "bottomLeft" : "right", k = (J = h(z)) == null ? void 0 : J.position;
|
|
2530
|
+
if (k !== null && Array.isArray(k)) {
|
|
2531
|
+
const K = k.find((se) => se.indexOf("top") !== -1), H = k.find((se) => se.indexOf("bottom") !== -1), Te = k.every((se) => `${se}` == "none");
|
|
2532
|
+
!K && !H && !Te && (C = R), K && (C = K.toLowerCase().replace("top", "")), H && (C = H.toLowerCase().replace("bottom", ""));
|
|
2523
2533
|
} else
|
|
2524
2534
|
C = R;
|
|
2525
2535
|
return C;
|
|
@@ -2531,25 +2541,25 @@ const ke = {
|
|
|
2531
2541
|
}), await De()) : L(C);
|
|
2532
2542
|
}, wt = async (C, R) => {
|
|
2533
2543
|
R ? (o("reset", C), e.request && await Ue(C)) : e.request ? (o("submit", C), await Ue(C)) : o("submit", C);
|
|
2534
|
-
}, Xe = (C, R,
|
|
2535
|
-
D(it(C, ["current", "pageSize"])), _e(C, R,
|
|
2544
|
+
}, Xe = (C, R, k, J) => {
|
|
2545
|
+
D(it(C, ["current", "pageSize"])), _e(C, R, k, J);
|
|
2536
2546
|
}, Tt = (C, R) => {
|
|
2537
|
-
var
|
|
2547
|
+
var k;
|
|
2538
2548
|
D({
|
|
2539
2549
|
current: C,
|
|
2540
2550
|
pageSize: R
|
|
2541
2551
|
}), _e({
|
|
2542
2552
|
current: C,
|
|
2543
2553
|
pageSize: R,
|
|
2544
|
-
total:
|
|
2554
|
+
total: z.value && ((k = z.value) == null ? void 0 : k.total) || 0
|
|
2545
2555
|
}, {}, {});
|
|
2546
2556
|
}, Rt = (C) => {
|
|
2547
2557
|
o("expandedRowsChange", C);
|
|
2548
2558
|
}, $t = (C, R) => {
|
|
2549
2559
|
o("expand", C, R);
|
|
2550
|
-
}, Ft = (C, R) =>
|
|
2551
|
-
const J =
|
|
2552
|
-
return R &&
|
|
2560
|
+
}, Ft = (C, R) => V(C, R), It = (C, R, k) => {
|
|
2561
|
+
const J = k.align === "center" ? "top" : k.align === "left" || !k.align ? "topLeft" : "topRight";
|
|
2562
|
+
return R && k.copyable ? i(ua.Paragraph, {
|
|
2553
2563
|
class: `${l}-copyable`,
|
|
2554
2564
|
style: {
|
|
2555
2565
|
margin: "0",
|
|
@@ -2566,7 +2576,7 @@ const ke = {
|
|
|
2566
2576
|
class: `${l}-ellipsis`
|
|
2567
2577
|
}, [C])]
|
|
2568
2578
|
})]
|
|
2569
|
-
}) : R && !
|
|
2579
|
+
}) : R && !k.copyable ? i(Z, {
|
|
2570
2580
|
title: C,
|
|
2571
2581
|
placement: J
|
|
2572
2582
|
}, {
|
|
@@ -2580,27 +2590,27 @@ const ke = {
|
|
|
2580
2590
|
return C ? (R = me.value) != null && R.length ? C(me.value) : (y == null ? void 0 : y.value) || i(ct, {
|
|
2581
2591
|
image: ol
|
|
2582
2592
|
}, null) : i(Ie, null, null);
|
|
2583
|
-
}, Ot = (C, R,
|
|
2593
|
+
}, Ot = (C, R, k) => i(el, {
|
|
2584
2594
|
headerTitle: C,
|
|
2585
|
-
titleTip:
|
|
2595
|
+
titleTip: k,
|
|
2586
2596
|
titleTipText: e.titleTipText,
|
|
2587
|
-
options:
|
|
2597
|
+
options: h(St),
|
|
2588
2598
|
settingExtra: ge(t, e, "settingExtra"),
|
|
2589
2599
|
optionsExtra: ge(t, e, "optionsExtra"),
|
|
2590
2600
|
toolBarBtn: R
|
|
2591
2601
|
}, null);
|
|
2592
2602
|
ka({
|
|
2593
|
-
tableSize:
|
|
2603
|
+
tableSize: M,
|
|
2594
2604
|
columns: $,
|
|
2595
2605
|
cacheColumns: I,
|
|
2596
2606
|
action: {
|
|
2597
2607
|
setTableSize: A,
|
|
2598
2608
|
reload: (C) => De(C),
|
|
2599
|
-
toggle:
|
|
2609
|
+
toggle: m
|
|
2600
2610
|
},
|
|
2601
2611
|
settingsAction: {
|
|
2602
2612
|
autoScroll: Q(e, "autoScroll"),
|
|
2603
|
-
columnsMap:
|
|
2613
|
+
columnsMap: Y,
|
|
2604
2614
|
operationType: he,
|
|
2605
2615
|
setColumnsMap: Oe,
|
|
2606
2616
|
sortKeyColumns: Se,
|
|
@@ -2617,7 +2627,7 @@ const ke = {
|
|
|
2617
2627
|
var C;
|
|
2618
2628
|
return ((C = p.value) == null ? void 0 : C.getFormState()) || {};
|
|
2619
2629
|
},
|
|
2620
|
-
getTableFormState: () =>
|
|
2630
|
+
getTableFormState: () => h(Be),
|
|
2621
2631
|
restForm: (C) => {
|
|
2622
2632
|
var R;
|
|
2623
2633
|
g.value = !0, C && (C == null || C()), (R = p.value) == null || R.resetForm(!1), g.value = !1;
|
|
@@ -2625,9 +2635,9 @@ const ke = {
|
|
|
2625
2635
|
}),
|
|
2626
2636
|
actionRef: () => ({
|
|
2627
2637
|
dataSource: me.value,
|
|
2628
|
-
pageParams:
|
|
2638
|
+
pageParams: z.value,
|
|
2629
2639
|
reload: De,
|
|
2630
|
-
getLoadingStatus: () =>
|
|
2640
|
+
getLoadingStatus: () => h(B),
|
|
2631
2641
|
reloadAndRest: async (C) => {
|
|
2632
2642
|
g.value = !0, D({
|
|
2633
2643
|
current: 1,
|
|
@@ -2638,13 +2648,13 @@ const ke = {
|
|
|
2638
2648
|
setPageAndReload: Xe,
|
|
2639
2649
|
setPagination: D,
|
|
2640
2650
|
changeDataValue: Ct,
|
|
2641
|
-
loadingOperation:
|
|
2651
|
+
loadingOperation: _
|
|
2642
2652
|
})
|
|
2643
2653
|
});
|
|
2644
2654
|
const Bt = w(() => (n == null ? void 0 : n.style) || {});
|
|
2645
2655
|
return () => {
|
|
2646
2656
|
var J;
|
|
2647
|
-
const C = ge(t, e, "headerTitle"), R = ge(t, e, "titleTip"),
|
|
2657
|
+
const C = ge(t, e, "headerTitle"), R = ge(t, e, "titleTip"), k = ge(t, e, "toolBarBtn");
|
|
2648
2658
|
return r(i("div", {
|
|
2649
2659
|
ref: c,
|
|
2650
2660
|
class: xt.value,
|
|
@@ -2657,52 +2667,52 @@ const ke = {
|
|
|
2657
2667
|
modal: e.modalScroll,
|
|
2658
2668
|
searchMap: ee.value,
|
|
2659
2669
|
prefixCls: l,
|
|
2660
|
-
loading: !!
|
|
2670
|
+
loading: !!h(B),
|
|
2661
2671
|
onSearch: wt,
|
|
2662
2672
|
defaultParams: ve
|
|
2663
2673
|
}, {
|
|
2664
2674
|
default: t.search ? () => {
|
|
2665
|
-
var
|
|
2666
|
-
return (
|
|
2675
|
+
var K;
|
|
2676
|
+
return (K = t.search) == null ? void 0 : K.call(t);
|
|
2667
2677
|
} : null
|
|
2668
|
-
}), !x.value && Ot(C,
|
|
2678
|
+
}), !x.value && Ot(C, k, R), e.customRender ?? t.customRender ? i(Le, h(Ge).loading, {
|
|
2669
2679
|
default: () => {
|
|
2670
|
-
var
|
|
2680
|
+
var K;
|
|
2671
2681
|
return [i("div", {
|
|
2672
2682
|
class: `${l}-wrapper ${s.value}`
|
|
2673
|
-
}, [Pt(), e.pagination !== !1 && ((
|
|
2683
|
+
}, [Pt(), e.pagination !== !1 && ((K = me.value) == null ? void 0 : K.length) > 0 && i(na, q({
|
|
2674
2684
|
class: {
|
|
2675
2685
|
[`${l}-pagination ${s.value}`]: !0,
|
|
2676
2686
|
[`${l}-pagination-${qe.value} ${s.value}`]: !!qe.value
|
|
2677
2687
|
}
|
|
2678
|
-
}, Ne(
|
|
2688
|
+
}, Ne(h(z)), {
|
|
2679
2689
|
onChange: Tt
|
|
2680
2690
|
}), null)])];
|
|
2681
2691
|
}
|
|
2682
|
-
}) : i(oa,
|
|
2692
|
+
}) : i(oa, q(Ge.value, {
|
|
2683
2693
|
style: e.tableStyle || void 0,
|
|
2684
2694
|
class: e.tableClassName,
|
|
2685
|
-
rowKey: (
|
|
2695
|
+
rowKey: (K) => K[e.rowKey || "sortIndex"],
|
|
2686
2696
|
transformCellText: ({
|
|
2687
|
-
text:
|
|
2688
|
-
column:
|
|
2697
|
+
text: K,
|
|
2698
|
+
column: H
|
|
2689
2699
|
}) => {
|
|
2690
2700
|
var Qe, Ze;
|
|
2691
|
-
const Te = Ke(
|
|
2701
|
+
const Te = Ke(K) ? K == null ? void 0 : K[0] : K;
|
|
2692
2702
|
if (Ce(Te))
|
|
2693
|
-
return
|
|
2703
|
+
return K;
|
|
2694
2704
|
const {
|
|
2695
2705
|
value: se,
|
|
2696
2706
|
success: Dt
|
|
2697
|
-
} = Ut(Te, (
|
|
2698
|
-
return
|
|
2707
|
+
} = Ut(Te, (H == null ? void 0 : H.columnEmptyText) || (e == null ? void 0 : e.columnEmptyText) || ""), Je = ll(se, ((Ze = (Qe = e.columns) == null ? void 0 : Qe.find((Nt) => Nt.key === H.key)) == null ? void 0 : Ze.valueType) || H.valueType, l, s.value);
|
|
2708
|
+
return H != null && H.ellipsis ? It(Je, Dt, H) : Je;
|
|
2699
2709
|
},
|
|
2700
2710
|
rowSelection: e.rowSelection ? {
|
|
2701
2711
|
...ye(e.rowSelection, ["onSelect", "onSelectAll", "onChange", "selectedRowKeys"]),
|
|
2702
2712
|
selectedRowKeys: ue.value,
|
|
2703
2713
|
onSelect: ie,
|
|
2704
|
-
onSelectAll:
|
|
2705
|
-
onChange:
|
|
2714
|
+
onSelectAll: G,
|
|
2715
|
+
onChange: E
|
|
2706
2716
|
} : void 0,
|
|
2707
2717
|
onChange: Xe,
|
|
2708
2718
|
onExpandedRowsChange: Rt,
|