@gx-design-vue/pro-table 0.2.0-beta.40 → 0.2.0-beta.42
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ProTable.d.ts +2 -12
- package/dist/hooks/useRowSelection.d.ts +1 -0
- package/dist/hooks/useTable.d.ts +3 -1
- package/dist/pro-table.mjs +417 -401
- package/dist/pro-table.umd.js +1 -1
- package/dist/types/TableTypings.d.ts +2 -0
- package/package.json +1 -1
package/dist/pro-table.mjs
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { computed as
|
|
2
|
-
import { isBoolean as te, isObject as ue, getSlot as ze, isFunction as $e, arrayRepeat as
|
|
1
|
+
import { computed as S, ref as O, watch as X, unref as h, 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
|
+
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
|
-
import { useFullscreen as st, useWindowSize as
|
|
5
|
-
import { Form as et, Grid as He, Space as oe, Button as tt, Input as at, TimePicker as
|
|
6
|
-
import { useProAppContext as
|
|
4
|
+
import { useFullscreen as st, useWindowSize as Qt } from "@vueuse/core";
|
|
5
|
+
import { Form as et, Grid as He, Space as oe, Button as tt, Input as at, TimePicker as Zt, DatePicker as rt, TreeSelect as ea, Spin as Le, Select as ta, Popover as aa, Checkbox as la, Tooltip as ee, Tree as na, Dropdown as oa, Menu as Re, Empty as ct, Pagination as ua, Table as ia, Typography as sa } from "ant-design-vue";
|
|
6
|
+
import { useProAppContext as ra } from "@gx-design-vue/pro-app";
|
|
7
7
|
import { useProStyle as Pe } from "@gx-design-vue/pro-provider";
|
|
8
|
-
import { tryOnUnmounted as
|
|
8
|
+
import { tryOnUnmounted as ca, useMemo as Fe } from "@gx-design-vue/pro-hooks";
|
|
9
9
|
import _ from "dayjs";
|
|
10
|
-
import { UpOutlined as
|
|
11
|
-
function
|
|
12
|
-
const
|
|
10
|
+
import { UpOutlined as da, DownOutlined as fa, SettingOutlined as dt, VerticalAlignTopOutlined as ha, VerticalAlignMiddleOutlined as va, VerticalAlignBottomOutlined as ma, FullscreenExitOutlined as ga, FullscreenOutlined as ya, ColumnHeightOutlined as pa, InfoCircleOutlined as ba, ReloadOutlined as Ca } from "@ant-design/icons-vue";
|
|
11
|
+
function Cl(e) {
|
|
12
|
+
const n = S(() => {
|
|
13
13
|
var u;
|
|
14
14
|
return (u = e.value) == null ? void 0 : u.actionRef();
|
|
15
|
-
}), t =
|
|
15
|
+
}), t = S(() => {
|
|
16
16
|
var u;
|
|
17
17
|
return (u = e.value) == null ? void 0 : u.formRef();
|
|
18
|
-
}),
|
|
18
|
+
}), o = S(() => {
|
|
19
19
|
var l, s, r, w;
|
|
20
|
-
const u = te((l =
|
|
20
|
+
const u = te((l = n.value) == null ? void 0 : l.pageParams) ? {} : ((s = n.value) == null ? void 0 : s.pageParams) || {};
|
|
21
21
|
return {
|
|
22
22
|
...it(u, ["current", "pageSize"]),
|
|
23
23
|
...((w = (r = t.value) == null ? void 0 : r.getTableFormState) == null ? void 0 : w.call(r)) || {}
|
|
@@ -25,56 +25,64 @@ function bl(e) {
|
|
|
25
25
|
});
|
|
26
26
|
return {
|
|
27
27
|
formRef: t,
|
|
28
|
-
actionRef:
|
|
29
|
-
|
|
28
|
+
actionRef: n,
|
|
29
|
+
params: o,
|
|
30
|
+
loading: S(() => {
|
|
30
31
|
var u;
|
|
31
32
|
return (u = e.value) == null ? void 0 : u.loading;
|
|
32
33
|
}),
|
|
33
|
-
|
|
34
|
-
dataSource: x(() => {
|
|
34
|
+
dataSource: S(() => {
|
|
35
35
|
var u;
|
|
36
|
-
return (u =
|
|
36
|
+
return (u = n == null ? void 0 : n.value) == null ? void 0 : u.dataSource;
|
|
37
|
+
}),
|
|
38
|
+
selectedKey: S(() => {
|
|
39
|
+
var u;
|
|
40
|
+
return (u = n == null ? void 0 : n.value) == null ? void 0 : u.selectedKey;
|
|
41
|
+
}),
|
|
42
|
+
selectedItem: S(() => {
|
|
43
|
+
var u;
|
|
44
|
+
return (u = n == null ? void 0 : n.value) == null ? void 0 : u.selectedItem;
|
|
37
45
|
}),
|
|
38
46
|
setPageAndReload: (u, l, s, r) => {
|
|
39
47
|
var w, v;
|
|
40
|
-
return (v = (w =
|
|
48
|
+
return (v = (w = n.value) == null ? void 0 : w.setPageAndReload) == null ? void 0 : v.call(w, u, l, s, r);
|
|
41
49
|
},
|
|
42
50
|
setPagination: (u) => {
|
|
43
51
|
var l, s;
|
|
44
|
-
return (s = (l =
|
|
52
|
+
return (s = (l = n.value) == null ? void 0 : l.setPagination) == null ? void 0 : s.call(l, u);
|
|
45
53
|
},
|
|
46
54
|
mutate: (u) => {
|
|
47
55
|
var l, s;
|
|
48
|
-
return (s = (l =
|
|
56
|
+
return (s = (l = n.value) == null ? void 0 : l.reSetDataList) == null ? void 0 : s.call(l, u);
|
|
49
57
|
},
|
|
50
58
|
changeLoading: (u) => {
|
|
51
59
|
var l, s;
|
|
52
|
-
return (s = (l =
|
|
60
|
+
return (s = (l = n.value) == null ? void 0 : l.loadingOperation) == null ? void 0 : s.call(l, u);
|
|
53
61
|
},
|
|
54
62
|
changeDataValue: (u) => {
|
|
55
63
|
var l, s;
|
|
56
|
-
return (s = (l =
|
|
64
|
+
return (s = (l = n.value) == null ? void 0 : l.changeDataValue) == null ? void 0 : s.call(l, u);
|
|
57
65
|
},
|
|
58
66
|
reload: (u) => {
|
|
59
67
|
var l, s;
|
|
60
|
-
return (s = (l =
|
|
68
|
+
return (s = (l = n.value) == null ? void 0 : l.reload) == null ? void 0 : s.call(l, u);
|
|
61
69
|
}
|
|
62
70
|
};
|
|
63
71
|
}
|
|
64
72
|
function Ae() {
|
|
65
73
|
return Ae = Object.assign ? Object.assign.bind() : function(e) {
|
|
66
|
-
for (var
|
|
67
|
-
var t = arguments[
|
|
68
|
-
for (var
|
|
69
|
-
Object.prototype.hasOwnProperty.call(t,
|
|
74
|
+
for (var n = 1; n < arguments.length; n++) {
|
|
75
|
+
var t = arguments[n];
|
|
76
|
+
for (var o in t)
|
|
77
|
+
Object.prototype.hasOwnProperty.call(t, o) && (e[o] = t[o]);
|
|
70
78
|
}
|
|
71
79
|
return e;
|
|
72
80
|
}, Ae.apply(this, arguments);
|
|
73
81
|
}
|
|
74
|
-
function
|
|
75
|
-
process.env.NODE_ENV !== "production" && !e && console !== void 0 && console.error(`Warning: ${
|
|
82
|
+
function Sa(e, n) {
|
|
83
|
+
process.env.NODE_ENV !== "production" && !e && console !== void 0 && console.error(`Warning: ${n}`);
|
|
76
84
|
}
|
|
77
|
-
const
|
|
85
|
+
const xa = () => ({
|
|
78
86
|
prefixCls: {
|
|
79
87
|
type: String,
|
|
80
88
|
default: void 0
|
|
@@ -249,7 +257,7 @@ const Sa = () => ({
|
|
|
249
257
|
default: void 0
|
|
250
258
|
}
|
|
251
259
|
}), ce = {
|
|
252
|
-
...
|
|
260
|
+
...xa(),
|
|
253
261
|
rowSelection: {
|
|
254
262
|
type: Object,
|
|
255
263
|
default: void 0
|
|
@@ -512,48 +520,48 @@ const Sa = () => ({
|
|
|
512
520
|
onBeforeSearchSubmit: Function,
|
|
513
521
|
onColumnsStateChange: Function
|
|
514
522
|
};
|
|
515
|
-
function
|
|
523
|
+
function wa({ emit: e, loading: n }) {
|
|
516
524
|
var l;
|
|
517
|
-
const t = O(te(
|
|
518
|
-
X(() =>
|
|
525
|
+
const t = O(te(n.value) ? n.value : ue(n.value) ? (l = n.value) == null ? void 0 : l.spinning : !1);
|
|
526
|
+
X(() => n.value, (s) => {
|
|
519
527
|
t.value = te(s) ? s : ue(s) ? s == null ? void 0 : s.spinning : t.value;
|
|
520
528
|
});
|
|
521
|
-
const
|
|
529
|
+
const o = S(() => h(t) || !1);
|
|
522
530
|
function u(s) {
|
|
523
531
|
t.value = s, e("loadingChange", !0);
|
|
524
532
|
}
|
|
525
|
-
return { loadingStatus:
|
|
533
|
+
return { loadingStatus: o, setLoading: u };
|
|
526
534
|
}
|
|
527
|
-
function
|
|
535
|
+
function Ta({ size: e, emit: n }) {
|
|
528
536
|
const t = O("middle");
|
|
529
537
|
he(() => {
|
|
530
538
|
t.value = e.value;
|
|
531
539
|
});
|
|
532
|
-
function
|
|
533
|
-
t.value = u,
|
|
540
|
+
function o(u) {
|
|
541
|
+
t.value = u, n("sizeChange", !0);
|
|
534
542
|
}
|
|
535
|
-
return { sizeRef: t, setTableSize:
|
|
543
|
+
return { sizeRef: t, setTableSize: o };
|
|
536
544
|
}
|
|
537
|
-
function
|
|
545
|
+
function Ra({
|
|
538
546
|
slots: e,
|
|
539
|
-
props:
|
|
547
|
+
props: n,
|
|
540
548
|
pagination: t
|
|
541
549
|
}) {
|
|
542
|
-
const
|
|
550
|
+
const o = de({});
|
|
543
551
|
he(() => {
|
|
544
552
|
if (t.value || t.value === void 0)
|
|
545
|
-
Object.assign(
|
|
553
|
+
Object.assign(o, {
|
|
546
554
|
...t.value ?? {}
|
|
547
555
|
});
|
|
548
556
|
else
|
|
549
|
-
for (const s in
|
|
550
|
-
delete
|
|
557
|
+
for (const s in o)
|
|
558
|
+
delete o[s];
|
|
551
559
|
});
|
|
552
|
-
const u =
|
|
560
|
+
const u = S(() => {
|
|
553
561
|
var v;
|
|
554
562
|
if (te(t.value) && !t.value)
|
|
555
563
|
return !1;
|
|
556
|
-
const s = ze(e, h(
|
|
564
|
+
const s = ze(e, h(n), "pageItemRender"), r = $e(s) ? {
|
|
557
565
|
itemRender: ({
|
|
558
566
|
page: g,
|
|
559
567
|
type: y,
|
|
@@ -571,14 +579,14 @@ function Ta({
|
|
|
571
579
|
showSizeChanger: !0,
|
|
572
580
|
pageSizeOptions: ["10", "20", "50", "100"],
|
|
573
581
|
...t.value || {},
|
|
574
|
-
...h(
|
|
582
|
+
...h(o),
|
|
575
583
|
...r || {}
|
|
576
584
|
};
|
|
577
585
|
return (v = t.value) != null && v.showTotal || (w.showTotal = (g) => `共${g < w.pageSize ? 1 : Math.ceil(g / (w.pageSize || 10))}页 ${g}条记录`), w;
|
|
578
586
|
});
|
|
579
587
|
function l(s) {
|
|
580
588
|
const r = h(u);
|
|
581
|
-
Object.assign(
|
|
589
|
+
Object.assign(o, {
|
|
582
590
|
...r || {},
|
|
583
591
|
...s
|
|
584
592
|
});
|
|
@@ -588,101 +596,102 @@ function Ta({
|
|
|
588
596
|
setPagination: l
|
|
589
597
|
};
|
|
590
598
|
}
|
|
591
|
-
function
|
|
592
|
-
const t = O([]),
|
|
599
|
+
function $a(e, n) {
|
|
600
|
+
const t = O([]), o = O([]);
|
|
593
601
|
X(() => {
|
|
594
602
|
var v;
|
|
595
|
-
return (v =
|
|
603
|
+
return (v = n.value) == null ? void 0 : v.selectedRowKeys;
|
|
596
604
|
}, (v) => {
|
|
597
|
-
t.value =
|
|
605
|
+
t.value = Ht([...v || []]);
|
|
598
606
|
}, {
|
|
599
607
|
deep: !0,
|
|
600
608
|
immediate: !0
|
|
601
609
|
});
|
|
602
610
|
const u = (v, g) => {
|
|
603
|
-
e.value && (g ? v != null && v[e.value] && (t.value.push(v[e.value]),
|
|
611
|
+
e.value && (g ? v != null && v[e.value] && (t.value.push(v[e.value]), o.value.push(v)) : (t.value = t.value.filter((y) => y !== v[e.value]), o.value = o.value.filter((y) => y[e.value] !== v[e.value])));
|
|
604
612
|
}, l = () => {
|
|
605
613
|
var v, g;
|
|
606
|
-
|
|
614
|
+
n.value && ((g = (v = n.value) == null ? void 0 : v.onChange) == null || g.call(v, t.value, o.value));
|
|
607
615
|
};
|
|
608
616
|
return {
|
|
609
617
|
selectedKey: t,
|
|
618
|
+
selectedItem: o,
|
|
610
619
|
selectRowKey: u,
|
|
611
620
|
selectAllRowKey: (v, g, y) => {
|
|
612
|
-
e.value && (v ? 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]),
|
|
621
|
+
e.value && (v ? 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)));
|
|
613
622
|
},
|
|
614
623
|
removeRowKeys: (v) => {
|
|
615
|
-
t.value = t.value.filter((g) => !v.includes(g)),
|
|
624
|
+
t.value = t.value.filter((g) => !v.includes(g)), o.value = o.value.filter((g) => !v.includes(g == null ? void 0 : g[e.value || ""])), l();
|
|
616
625
|
},
|
|
617
626
|
changeRowKey: l,
|
|
618
627
|
syncSelectedRows: (v) => {
|
|
619
|
-
if (e.value && t.value.length !==
|
|
620
|
-
const g =
|
|
628
|
+
if (e.value && t.value.length !== o.value.length) {
|
|
629
|
+
const g = o.value.map((c) => c[e.value]), y = t.value.filter((c) => !g.includes(c));
|
|
621
630
|
v.forEach((c) => {
|
|
622
|
-
y.includes(c[e.value]) &&
|
|
631
|
+
y.includes(c[e.value]) && o.value.push(J(c));
|
|
623
632
|
});
|
|
624
633
|
}
|
|
625
634
|
}
|
|
626
635
|
};
|
|
627
636
|
}
|
|
628
|
-
function
|
|
629
|
-
const t =
|
|
637
|
+
function Fa(e, n) {
|
|
638
|
+
const t = S(() => n || 0), o = O(), u = O(e);
|
|
630
639
|
function l() {
|
|
631
|
-
|
|
640
|
+
o.value && clearTimeout(o.value);
|
|
632
641
|
}
|
|
633
642
|
async function s(...r) {
|
|
634
643
|
return t.value === 0 || t.value === void 0 ? u.value(...r) : (l(), new Promise(async (w) => {
|
|
635
644
|
var v;
|
|
636
|
-
(v = r[0]) != null && v.immediate ? w(await u.value(...r)) :
|
|
645
|
+
(v = r[0]) != null && v.immediate ? w(await u.value(...r)) : o.value = setTimeout(async () => {
|
|
637
646
|
w(await u.value(...r));
|
|
638
647
|
}, t.value);
|
|
639
648
|
}));
|
|
640
649
|
}
|
|
641
|
-
return
|
|
650
|
+
return ca(l), {
|
|
642
651
|
cancel: l,
|
|
643
652
|
run: s
|
|
644
653
|
};
|
|
645
654
|
}
|
|
646
|
-
function
|
|
647
|
-
const
|
|
655
|
+
function Ia(e) {
|
|
656
|
+
const n = S(() => e.polling), t = S(() => e.request), o = S(() => e.postData), u = S(() => e.debounceTime), l = S(() => e.dataSource);
|
|
648
657
|
return {
|
|
649
|
-
polling:
|
|
658
|
+
polling: n,
|
|
650
659
|
request: t,
|
|
651
|
-
postData:
|
|
660
|
+
postData: o,
|
|
652
661
|
debounceTime: u,
|
|
653
662
|
dataSource: l
|
|
654
663
|
};
|
|
655
664
|
}
|
|
656
|
-
function
|
|
657
|
-
const T = O(), P = O(!0), D = O(!1), Y = O(!1), j = O([]), L = O(), G =
|
|
665
|
+
function Pa({ polling: e, request: n, postData: t, dataSource: o, waitRequest: u, debounceTime: l }, { columns: s, loadingStatus: r, setLoading: w, setColumns: v, removeRowKeys: g, syncSelectedRows: y, formParamsRef: c, setPagination: b, getPaginationInfo: m, onBeforeSearchSubmit: d, hasCustomRender: x }, $) {
|
|
666
|
+
const T = O(), P = O(!0), D = O(!1), Y = O(!1), j = O([]), L = O(), G = Fa(async (f) => {
|
|
658
667
|
L.value && clearTimeout(L.value);
|
|
659
|
-
const N = await I(f), A =
|
|
668
|
+
const N = await I(f), A = Wt(e.value, N);
|
|
660
669
|
return A && !T.value && (L.value = setTimeout(() => {
|
|
661
670
|
G.run({ ...f, isPolling: A });
|
|
662
671
|
}, Math.max(A, 2e3))), N;
|
|
663
672
|
}, l.value || 10);
|
|
664
|
-
|
|
673
|
+
kt(() => {
|
|
665
674
|
T.value = !0, clearTimeout(L.value);
|
|
666
|
-
}),
|
|
675
|
+
}), Et(() => {
|
|
667
676
|
T.value = !0, clearTimeout(L.value);
|
|
668
677
|
}), X(() => e.value, () => {
|
|
669
678
|
e.value ? G.run({ isPolling: !0 }) : clearTimeout(L.value);
|
|
670
679
|
}, { immediate: !0 }), X([
|
|
671
680
|
() => u.value,
|
|
672
|
-
() =>
|
|
681
|
+
() => o.value,
|
|
673
682
|
() => c
|
|
674
683
|
], () => {
|
|
675
|
-
|
|
684
|
+
n.value ? (!P.value || !e.value) && G.run({ isPolling: !1 }) : F(o.value || []);
|
|
676
685
|
}, {
|
|
677
686
|
deep: !0,
|
|
678
687
|
immediate: !0
|
|
679
688
|
});
|
|
680
|
-
const M =
|
|
681
|
-
if (
|
|
689
|
+
const M = S(() => {
|
|
690
|
+
if (x.value)
|
|
682
691
|
return h(j);
|
|
683
692
|
const f = h(s).filter((N) => N.show || N.show === void 0);
|
|
684
693
|
return !h(j) || !f || f.length === 0 ? [] : h(j);
|
|
685
|
-
}), H =
|
|
694
|
+
}), H = S(() => h(j).some((f) => f.children && f.children.length > 0));
|
|
686
695
|
function a(f) {
|
|
687
696
|
Y.value = f;
|
|
688
697
|
}
|
|
@@ -692,8 +701,8 @@ function Ia({ polling: e, request: o, postData: t, dataSource: n, waitRequest: u
|
|
|
692
701
|
const I = async (f = {}) => {
|
|
693
702
|
var Se, xe, we;
|
|
694
703
|
const { pagination: N, filters: A = {}, sorter: K = {}, removeKeys: ve = [], isPolling: Oe = !1 } = f;
|
|
695
|
-
if (!h(
|
|
696
|
-
return
|
|
704
|
+
if (!h(n) || !$e(h(n)) || h(u) && r.value || D.value)
|
|
705
|
+
return o.value || [];
|
|
697
706
|
if (D.value = !0, !Oe || h(u) || P.value ? w(!0) : a(!0), h(u)) {
|
|
698
707
|
P.value = !1, D.value = !1;
|
|
699
708
|
return;
|
|
@@ -704,12 +713,12 @@ function Ia({ polling: e, request: o, postData: t, dataSource: n, waitRequest: u
|
|
|
704
713
|
if (te(N) && !N || te(m))
|
|
705
714
|
le = {};
|
|
706
715
|
else {
|
|
707
|
-
const { current:
|
|
708
|
-
le.pageNum =
|
|
716
|
+
const { current: k = 1, pageSize: se = 10, total: q } = h(m) || {};
|
|
717
|
+
le.pageNum = _t({ current: k, pageSize: se, total: q }, ve.length), ve.length && g(ve), le.pageSize = se;
|
|
709
718
|
}
|
|
710
|
-
(ue(K) ? [K] : K).forEach((
|
|
711
|
-
const se = (
|
|
712
|
-
|
|
719
|
+
(ue(K) ? [K] : K).forEach((k) => {
|
|
720
|
+
const se = (k == null ? void 0 : k.columnKey) || (k == null ? void 0 : k.field);
|
|
721
|
+
k && (k != null && k.order) ? v(h(s).map((q) => (q.dataIndex === se ? q.sortOrder = k == null ? void 0 : k.order : q.sortOrder = null, q))) : k && v(h(s).map((q) => (q.dataIndex === se && (q.sortOrder = null), q)));
|
|
713
722
|
});
|
|
714
723
|
let fe = {
|
|
715
724
|
...le || {},
|
|
@@ -718,7 +727,7 @@ function Ia({ polling: e, request: o, postData: t, dataSource: n, waitRequest: u
|
|
|
718
727
|
};
|
|
719
728
|
d && $e(d) && (fe = await d(fe, K, A));
|
|
720
729
|
let V = [];
|
|
721
|
-
const ne = await ((Se = h(
|
|
730
|
+
const ne = await ((Se = h(n)) == null ? void 0 : Se(fe, K, A));
|
|
722
731
|
return D.value = !1, ne && ne.success ? (V = ne.data || [], h(t) && $e(h(t)) && (V = await ((xe = h(t)) == null ? void 0 : xe(V))), y(V), (ne.total || (V == null ? void 0 : V.length) || 0) !== ((we = h(m)) == null ? void 0 : we.total) && b({
|
|
723
732
|
total: ne.total || (V == null ? void 0 : V.length) || 0
|
|
724
733
|
}), F(V), V) : [];
|
|
@@ -730,7 +739,7 @@ function Ia({ polling: e, request: o, postData: t, dataSource: n, waitRequest: u
|
|
|
730
739
|
return [];
|
|
731
740
|
};
|
|
732
741
|
function F(f) {
|
|
733
|
-
const N =
|
|
742
|
+
const N = Gt(J(f), h(m.value));
|
|
734
743
|
nt(N, j.value) || (j.value = N);
|
|
735
744
|
}
|
|
736
745
|
function B({ key: f, params: N, type: A = "update" }) {
|
|
@@ -753,34 +762,34 @@ function Ia({ polling: e, request: o, postData: t, dataSource: n, waitRequest: u
|
|
|
753
762
|
changeDataValue: B,
|
|
754
763
|
handleTableChange: p,
|
|
755
764
|
reload: async (f) => {
|
|
756
|
-
h(
|
|
765
|
+
h(n) ? await G.run({ ...f, isPolling: !1 }) : $("reload");
|
|
757
766
|
}
|
|
758
767
|
};
|
|
759
768
|
}
|
|
760
|
-
function
|
|
761
|
-
const
|
|
769
|
+
function Oa(e) {
|
|
770
|
+
const n = {};
|
|
762
771
|
return e.forEach((t) => {
|
|
763
|
-
let
|
|
772
|
+
let o = t.initialValue;
|
|
764
773
|
const u = ["select"], l = ["date", "time", "dateRange"];
|
|
765
|
-
!
|
|
766
|
-
}),
|
|
774
|
+
!o && u.includes(t.valueType) ? o = void 0 : !o && l.includes(t.valueType) ? o = null : o || (o = ""), t.name === "dateRange" ? (n[t.rangeStartName || "start"] = o ? o[0] : null, n[t.rangeEndName || "end"] = o ? o[1] : null) : t.name && (n[t.name] = o);
|
|
775
|
+
}), n;
|
|
767
776
|
}
|
|
768
|
-
function
|
|
769
|
-
const l = de({}), s = de({}), r = O([]), w =
|
|
777
|
+
function Ba({ search: e, searchMap: n, params: t, columns: o, setPagination: u }) {
|
|
778
|
+
const l = de({}), s = de({}), r = O([]), w = S(() => {
|
|
770
779
|
var y;
|
|
771
780
|
return ue(e.value) ? !!((y = e.value) != null && y.showSearch) : !!e.value;
|
|
772
781
|
});
|
|
773
|
-
|
|
782
|
+
zt(() => {
|
|
774
783
|
v("all");
|
|
775
784
|
}), X(() => t.value, () => {
|
|
776
785
|
v("params");
|
|
777
786
|
}, {
|
|
778
787
|
deep: !0
|
|
779
|
-
}), X(() =>
|
|
788
|
+
}), X(() => n.value, () => {
|
|
780
789
|
v("searchMap");
|
|
781
790
|
}, {
|
|
782
791
|
deep: !0
|
|
783
|
-
}), X(() =>
|
|
792
|
+
}), X(() => o.value, () => {
|
|
784
793
|
v("columns");
|
|
785
794
|
}, {
|
|
786
795
|
deep: !0
|
|
@@ -788,24 +797,24 @@ function Oa({ search: e, searchMap: o, params: t, columns: n, setPagination: u }
|
|
|
788
797
|
const v = (y) => {
|
|
789
798
|
var b, m;
|
|
790
799
|
const c = [];
|
|
791
|
-
if ((y === "all" || y === "searchMap") && ((b =
|
|
792
|
-
r.value.some((
|
|
793
|
-
...
|
|
800
|
+
if ((y === "all" || y === "searchMap") && ((b = n.value) == null || b.forEach((d) => c.push(d)), c.forEach((d) => {
|
|
801
|
+
r.value.some((x) => x.name === d.name) ? r.value = r.value.map((x) => x.name === d.name ? {
|
|
802
|
+
...x,
|
|
794
803
|
...d
|
|
795
|
-
} :
|
|
796
|
-
})), (y === "all" || y === "columns") && ((m =
|
|
804
|
+
} : x) : r.value.push(d);
|
|
805
|
+
})), (y === "all" || y === "columns") && ((m = o.value) != null && m.length) && (o.value && o.value.forEach((d) => {
|
|
797
806
|
d.searchConfig && c.push(d.searchConfig);
|
|
798
807
|
}), c.forEach((d) => {
|
|
799
|
-
r.value.some((
|
|
800
|
-
...
|
|
808
|
+
r.value.some((x) => x.name === d.name) ? r.value = r.value.map((x) => x.name === d.name ? {
|
|
809
|
+
...x,
|
|
801
810
|
...d
|
|
802
|
-
} :
|
|
811
|
+
} : x) : r.value.push(d);
|
|
803
812
|
})), y === "all" || y === "searchMap" || y === "columns") {
|
|
804
813
|
u({ current: 1 });
|
|
805
|
-
const d =
|
|
814
|
+
const d = Oa(c);
|
|
806
815
|
Object.assign(s, { ...d });
|
|
807
|
-
for (const
|
|
808
|
-
l[
|
|
816
|
+
for (const x in d)
|
|
817
|
+
l[x] || (l[x] = d[x]);
|
|
809
818
|
}
|
|
810
819
|
(y === "all" || y === "params") && !w.value && (u({ current: 1 }), Object.assign(l, t.value));
|
|
811
820
|
};
|
|
@@ -814,8 +823,8 @@ function Oa({ search: e, searchMap: o, params: t, columns: n, setPagination: u }
|
|
|
814
823
|
}
|
|
815
824
|
return { formDataRef: r, formParamsRef: l, defaultParamsRef: s, setFormParams: g };
|
|
816
825
|
}
|
|
817
|
-
function
|
|
818
|
-
const
|
|
826
|
+
function Da({ columns: e, columnsState: n, changeColumns: t }) {
|
|
827
|
+
const o = O(void 0), u = de({}), l = de({}), s = de({}), r = O([]);
|
|
819
828
|
X(() => e.value, () => {
|
|
820
829
|
var g;
|
|
821
830
|
(g = h(e)) == null || g.forEach(({ show: y, key: c, fixed: b }, m) => {
|
|
@@ -834,77 +843,77 @@ function Ba({ columns: e, columnsState: o, changeColumns: t }) {
|
|
|
834
843
|
}), he(() => {
|
|
835
844
|
var y;
|
|
836
845
|
const g = {
|
|
837
|
-
...(y = h(
|
|
846
|
+
...(y = h(n)) == null ? void 0 : y.value,
|
|
838
847
|
...h(s)
|
|
839
848
|
};
|
|
840
849
|
Object.assign(u, g), Object.assign(l, g);
|
|
841
850
|
});
|
|
842
851
|
function w(g, y) {
|
|
843
|
-
|
|
852
|
+
o.value = y, Object.assign(u, g), t == null || t(u, y === "fixed");
|
|
844
853
|
}
|
|
845
854
|
function v(g) {
|
|
846
855
|
r.value = g;
|
|
847
856
|
}
|
|
848
857
|
return {
|
|
849
858
|
columnsMap: u,
|
|
850
|
-
operationType:
|
|
859
|
+
operationType: o,
|
|
851
860
|
setColumnsMap: w,
|
|
852
861
|
sortKeyColumns: r,
|
|
853
862
|
cacheColumnsMap: l,
|
|
854
863
|
setSortKeyColumns: v
|
|
855
864
|
};
|
|
856
865
|
}
|
|
857
|
-
function
|
|
858
|
-
const
|
|
866
|
+
function Ma(e) {
|
|
867
|
+
const n = S(() => e.draggabled), t = S(() => e.neverScroll), o = S(() => e.autoScroll);
|
|
859
868
|
return {
|
|
860
|
-
draggabled:
|
|
869
|
+
draggabled: n,
|
|
861
870
|
neverScroll: t,
|
|
862
|
-
autoScroll:
|
|
871
|
+
autoScroll: o
|
|
863
872
|
};
|
|
864
873
|
}
|
|
865
|
-
function
|
|
874
|
+
function Na({ scroll: e, columns: n, breakpoint: t, draggabled: o, autoScroll: u, neverScroll: l }) {
|
|
866
875
|
const s = O([]), r = O([]);
|
|
867
876
|
X([
|
|
868
877
|
() => e.value,
|
|
869
|
-
() => o.value,
|
|
870
|
-
() => t.value,
|
|
871
878
|
() => n.value,
|
|
879
|
+
() => t.value,
|
|
880
|
+
() => o.value,
|
|
872
881
|
() => u.value,
|
|
873
882
|
() => l.value
|
|
874
883
|
], () => {
|
|
875
|
-
s.value = J(g(h(
|
|
884
|
+
s.value = J(g(h(n))), r.value = J(g(h(n)));
|
|
876
885
|
}, {
|
|
877
886
|
deep: !0,
|
|
878
887
|
immediate: !0
|
|
879
888
|
});
|
|
880
|
-
const w =
|
|
881
|
-
const m = v(h(s).filter(($) => $.fixed === "left")), d = v(h(s).filter(($) => $.fixed !== "left" && $.fixed !== "right")),
|
|
889
|
+
const w = S(() => {
|
|
890
|
+
const m = v(h(s).filter(($) => $.fixed === "left")), d = v(h(s).filter(($) => $.fixed !== "left" && $.fixed !== "right")), x = v(h(s).filter(($) => $.fixed === "right"));
|
|
882
891
|
return [
|
|
883
892
|
...m,
|
|
884
893
|
...d,
|
|
885
|
-
...
|
|
894
|
+
...x
|
|
886
895
|
];
|
|
887
896
|
});
|
|
888
897
|
function v(m) {
|
|
889
|
-
return m.sort((d,
|
|
898
|
+
return m.sort((d, x) => qt(d, x, "order", 0));
|
|
890
899
|
}
|
|
891
900
|
function g(m) {
|
|
892
|
-
return J(m).map((d,
|
|
901
|
+
return J(m).map((d, x) => {
|
|
893
902
|
var $;
|
|
894
|
-
if (d.dataIndex === "action" ||
|
|
903
|
+
if (d.dataIndex === "action" || x === m.length - 1 ? d.resizable = !1 : d.resizable = te(d.resizable) ? d.resizable : !!(ut(d.width) && h(o)), !d.width || h(l))
|
|
895
904
|
return d;
|
|
896
905
|
if (d.dataIndex === "action" && h(u))
|
|
897
906
|
if (($ = h(e)) != null && $.x || !h(t))
|
|
898
907
|
d.width = d.width || 100, d.fixed = "right";
|
|
899
908
|
else {
|
|
900
|
-
const T = h(
|
|
909
|
+
const T = h(n).find((P) => P.dataIndex === d.dataIndex);
|
|
901
910
|
d.width = (T == null ? void 0 : T.width) || "", d.fixed = T == null ? void 0 : T.fixed;
|
|
902
911
|
}
|
|
903
912
|
return d;
|
|
904
913
|
});
|
|
905
914
|
}
|
|
906
915
|
function y(m, d) {
|
|
907
|
-
s.value = s.value.map((
|
|
916
|
+
s.value = s.value.map((x) => (x.uuid === d.uuid && (x.width = m), x));
|
|
908
917
|
}
|
|
909
918
|
function c(m) {
|
|
910
919
|
if (m.length <= 0) {
|
|
@@ -914,16 +923,16 @@ function Ma({ scroll: e, columns: o, breakpoint: t, draggabled: n, autoScroll: u
|
|
|
914
923
|
nt(g(J(m)), s.value) || (s.value = g(J(m)));
|
|
915
924
|
}
|
|
916
925
|
function b(m) {
|
|
917
|
-
let d = J(
|
|
918
|
-
d = d.map((
|
|
926
|
+
let d = J(n.value);
|
|
927
|
+
d = d.map((x) => {
|
|
919
928
|
var T, P, D;
|
|
920
|
-
const $ =
|
|
921
|
-
show: (T = m[
|
|
922
|
-
fixed: (P = m[
|
|
923
|
-
order: (D = m[
|
|
929
|
+
const $ = x.key ? {
|
|
930
|
+
show: (T = m[x.key]) == null ? void 0 : T.show,
|
|
931
|
+
fixed: (P = m[x.key]) == null ? void 0 : P.fixed,
|
|
932
|
+
order: (D = m[x.key]) == null ? void 0 : D.order
|
|
924
933
|
} : {};
|
|
925
934
|
return {
|
|
926
|
-
...
|
|
935
|
+
...x,
|
|
927
936
|
...$
|
|
928
937
|
};
|
|
929
938
|
}), c(d);
|
|
@@ -937,50 +946,50 @@ function Ma({ scroll: e, columns: o, breakpoint: t, draggabled: n, autoScroll: u
|
|
|
937
946
|
resizeColumnWidth: y
|
|
938
947
|
};
|
|
939
948
|
}
|
|
940
|
-
function
|
|
941
|
-
const
|
|
949
|
+
function ja(e) {
|
|
950
|
+
const n = S(() => e.scroll), t = S(() => e.autoScroll), o = S(() => e.modalScroll), u = S(() => e.neverScroll), l = S(() => e.rowSelection), s = S(() => e.scrollBreakpoint);
|
|
942
951
|
return {
|
|
943
|
-
scroll:
|
|
952
|
+
scroll: n,
|
|
944
953
|
neverScroll: u,
|
|
945
954
|
rowSelection: l,
|
|
946
955
|
autoScroll: t,
|
|
947
|
-
modalScroll:
|
|
956
|
+
modalScroll: o,
|
|
948
957
|
scrollBreakpoint: s
|
|
949
958
|
};
|
|
950
959
|
}
|
|
951
|
-
function
|
|
952
|
-
const v =
|
|
960
|
+
function ka({ scroll: e, columns: n, autoScroll: t, modalScroll: o, neverScroll: u, rowSelection: l, screens: s, innerWidth: r, scrollBreakpoint: w }) {
|
|
961
|
+
const v = S(() => {
|
|
953
962
|
var c, b, m;
|
|
954
|
-
return h(w) ? ut(h(w)) ? r.value > h(w) :
|
|
955
|
-
}), g =
|
|
963
|
+
return h(w) ? ut(h(w)) ? r.value > h(w) : Ut(h(w)) ? (c = s.value) == null ? void 0 : c[h(w)] : (b = s.value) == null ? void 0 : b.xl : (m = s.value) == null ? void 0 : m.xl;
|
|
964
|
+
}), g = S(() => {
|
|
956
965
|
let c = 0;
|
|
957
|
-
const b = h(l) ? 60 : 0, m = 150, d = J(h(
|
|
966
|
+
const b = h(l) ? 60 : 0, m = 150, d = J(h(n));
|
|
958
967
|
d.forEach((T) => {
|
|
959
968
|
c += Number.parseInt(T.width) || 0;
|
|
960
969
|
});
|
|
961
970
|
const $ = d.filter((T) => !Reflect.has(T, "width")).length;
|
|
962
971
|
return $ !== 0 && (c += $ * m), b && (c += b), c;
|
|
963
972
|
});
|
|
964
|
-
return { getScrollRef:
|
|
973
|
+
return { getScrollRef: S(() => {
|
|
965
974
|
var c, b;
|
|
966
|
-
return h(u) ? {} : h(e) && Object.keys(h(e)).length ? h(e) : h(
|
|
975
|
+
return h(u) ? {} : h(e) && Object.keys(h(e)).length ? h(e) : h(o) ? {
|
|
967
976
|
y: ((c = h(e)) == null ? void 0 : c.y) || ((b = s.value) != null && b.xl ? 400 : 235)
|
|
968
977
|
} : h(t) ? v.value ? {} : te(v.value) ? { x: h(g) } : {} : {};
|
|
969
978
|
}), breakpoint: v };
|
|
970
979
|
}
|
|
971
|
-
const ft = Symbol("table-context"),
|
|
972
|
-
|
|
973
|
-
}, ie = (e) =>
|
|
974
|
-
function
|
|
980
|
+
const ft = Symbol("table-context"), Ea = (e = Symbol(), n) => Yt(e, n || {}), za = (e) => {
|
|
981
|
+
Kt(ft, e);
|
|
982
|
+
}, ie = (e) => Ea(ft, e);
|
|
983
|
+
function Ka(e, n) {
|
|
975
984
|
const t = de({});
|
|
976
985
|
he(() => {
|
|
977
|
-
|
|
986
|
+
o();
|
|
978
987
|
});
|
|
979
|
-
function
|
|
988
|
+
function o() {
|
|
980
989
|
Object.keys(e).map((s) => {
|
|
981
990
|
u(s, e[s]);
|
|
982
991
|
});
|
|
983
|
-
const l =
|
|
992
|
+
const l = n.find((s) => s.valueType === "dateRange");
|
|
984
993
|
l && u(l.name || "", e[l.rangeStartName || "start"] ? [
|
|
985
994
|
e[l.rangeStartName || "start"],
|
|
986
995
|
e[l.rangeEndName || "end"]
|
|
@@ -991,11 +1000,11 @@ function za(e, o) {
|
|
|
991
1000
|
}
|
|
992
1001
|
return {
|
|
993
1002
|
formState: t,
|
|
994
|
-
resetFormState:
|
|
1003
|
+
resetFormState: o,
|
|
995
1004
|
changeFormState: u
|
|
996
1005
|
};
|
|
997
1006
|
}
|
|
998
|
-
const
|
|
1007
|
+
const Ya = (e) => ({
|
|
999
1008
|
[`${e.componentCls}-form`]: {
|
|
1000
1009
|
["&-collapse-button"]: {
|
|
1001
1010
|
display: "flex",
|
|
@@ -1023,10 +1032,10 @@ const Ka = (e) => ({
|
|
|
1023
1032
|
}
|
|
1024
1033
|
}
|
|
1025
1034
|
}), {
|
|
1026
|
-
useBreakpoint:
|
|
1035
|
+
useBreakpoint: La
|
|
1027
1036
|
} = He, {
|
|
1028
|
-
MonthPicker:
|
|
1029
|
-
RangePicker:
|
|
1037
|
+
MonthPicker: Aa,
|
|
1038
|
+
RangePicker: Va
|
|
1030
1039
|
} = rt, ht = /* @__PURE__ */ ae({
|
|
1031
1040
|
name: "ProTableForm",
|
|
1032
1041
|
props: {
|
|
@@ -1048,21 +1057,21 @@ const Ka = (e) => ({
|
|
|
1048
1057
|
},
|
|
1049
1058
|
emits: ["search"],
|
|
1050
1059
|
setup(e, {
|
|
1051
|
-
emit:
|
|
1060
|
+
emit: n,
|
|
1052
1061
|
slots: t,
|
|
1053
|
-
expose:
|
|
1062
|
+
expose: o
|
|
1054
1063
|
}) {
|
|
1055
1064
|
const {
|
|
1056
1065
|
wrapSSR: u,
|
|
1057
1066
|
hashId: l
|
|
1058
|
-
} = Pe("ProTableForm", [
|
|
1067
|
+
} = Pe("ProTableForm", [Ya], e.prefixCls), s = La(), {
|
|
1059
1068
|
formState: r,
|
|
1060
1069
|
resetFormState: w,
|
|
1061
1070
|
changeFormState: v
|
|
1062
|
-
} =
|
|
1071
|
+
} = Ka(e.defaultParams || {}, e.searchMap || []), g = O(!1), y = S(() => {
|
|
1063
1072
|
var a;
|
|
1064
1073
|
return !!((a = e.search) != null && a.showSearch);
|
|
1065
|
-
}), c =
|
|
1074
|
+
}), c = S(() => {
|
|
1066
1075
|
var a, p;
|
|
1067
1076
|
return ((a = e.search) == null ? void 0 : a.showReset) === void 0 ? y.value : (p = e.search) == null ? void 0 : p.showReset;
|
|
1068
1077
|
}), b = [{
|
|
@@ -1083,7 +1092,7 @@ const Ka = (e) => ({
|
|
|
1083
1092
|
}, {
|
|
1084
1093
|
value: "xs",
|
|
1085
1094
|
span: 1
|
|
1086
|
-
}], m =
|
|
1095
|
+
}], m = S(() => {
|
|
1087
1096
|
var a;
|
|
1088
1097
|
return d((a = e.search) == null ? void 0 : a.span);
|
|
1089
1098
|
});
|
|
@@ -1103,7 +1112,7 @@ const Ka = (e) => ({
|
|
|
1103
1112
|
}
|
|
1104
1113
|
}
|
|
1105
1114
|
return p;
|
|
1106
|
-
},
|
|
1115
|
+
}, x = (a) => {
|
|
1107
1116
|
g.value = a;
|
|
1108
1117
|
}, $ = (a, p, I) => (a + 1) % p === 0 ? {
|
|
1109
1118
|
...I,
|
|
@@ -1141,13 +1150,13 @@ const Ka = (e) => ({
|
|
|
1141
1150
|
const a = J(r), p = e.searchMap.find((B) => B.valueType === "text") || "", I = e.searchMap.find((B) => B.valueType === "dateRange") || "", F = e.searchMap.find((B) => B.valueType === "treeSelect") || "";
|
|
1142
1151
|
return p && (a[p.name] = r[p.name] || p.initialValue || ""), I && (a[I.rangeStartName || "start"] = a[I.name] ? a[I.name][0] : "", a[I.rangeEndName || "end"] = a[I.name] ? a[I.name][1] : "", delete a[I.name]), F && (Ke(r[F.name]) && (a[F.name] = r[F.name].length ? r[F.name].map((B) => B[F.valueKey === "text" ? "label" : "value"]).join() : ""), F && Ke(a[F.name]) && (a[F.name] = a[F.name].length ? a[F.name].map((B) => B[F.valueKey === "text" ? "label" : "value"]) : "")), a;
|
|
1143
1152
|
}, D = (a = !1, p) => {
|
|
1144
|
-
|
|
1145
|
-
(!y.value || a) &&
|
|
1153
|
+
Lt(() => {
|
|
1154
|
+
(!y.value || a) && n("search", P(), !!p);
|
|
1146
1155
|
});
|
|
1147
1156
|
}, Y = (a = !0) => {
|
|
1148
1157
|
w(), D(!0, a);
|
|
1149
1158
|
};
|
|
1150
|
-
|
|
1159
|
+
o({
|
|
1151
1160
|
getFormState: () => P(),
|
|
1152
1161
|
resetForm: Y
|
|
1153
1162
|
});
|
|
@@ -1183,8 +1192,8 @@ const Ka = (e) => ({
|
|
|
1183
1192
|
var F, B;
|
|
1184
1193
|
return [j(), I && i("span", {
|
|
1185
1194
|
class: `${e.prefixCls}-a ${l.value}`,
|
|
1186
|
-
onClick: () =>
|
|
1187
|
-
}, [p ? "收起" : "展开", (F = e.search) != null && F.collapseRender ? (B = e.search) == null ? void 0 : B.collapseRender() : p ? i(
|
|
1195
|
+
onClick: () => x(!p)
|
|
1196
|
+
}, [p ? "收起" : "展开", (F = e.search) != null && F.collapseRender ? (B = e.search) == null ? void 0 : B.collapseRender() : p ? i(da, null, null) : i(fa, null, null)])];
|
|
1188
1197
|
}
|
|
1189
1198
|
})]), G = (a) => {
|
|
1190
1199
|
var F, B;
|
|
@@ -1204,7 +1213,7 @@ const Ka = (e) => ({
|
|
|
1204
1213
|
}, a.field || {}), null);
|
|
1205
1214
|
break;
|
|
1206
1215
|
case "select":
|
|
1207
|
-
p = i(
|
|
1216
|
+
p = i(ta, U({
|
|
1208
1217
|
style: {
|
|
1209
1218
|
width: "100%"
|
|
1210
1219
|
},
|
|
@@ -1225,7 +1234,7 @@ const Ka = (e) => ({
|
|
|
1225
1234
|
}, a.field || {}), null);
|
|
1226
1235
|
break;
|
|
1227
1236
|
case "treeSelect":
|
|
1228
|
-
p = i(
|
|
1237
|
+
p = i(ea, U({
|
|
1229
1238
|
style: {
|
|
1230
1239
|
width: "100%"
|
|
1231
1240
|
},
|
|
@@ -1256,7 +1265,7 @@ const Ka = (e) => ({
|
|
|
1256
1265
|
}, a.field || {}), null);
|
|
1257
1266
|
break;
|
|
1258
1267
|
case "dateMonth":
|
|
1259
|
-
p = i(
|
|
1268
|
+
p = i(Aa, U({
|
|
1260
1269
|
style: {
|
|
1261
1270
|
width: "100%"
|
|
1262
1271
|
},
|
|
@@ -1267,7 +1276,7 @@ const Ka = (e) => ({
|
|
|
1267
1276
|
}, a.field || {}), null);
|
|
1268
1277
|
break;
|
|
1269
1278
|
case "dateRange":
|
|
1270
|
-
p = i(
|
|
1279
|
+
p = i(Va, U({
|
|
1271
1280
|
style: {
|
|
1272
1281
|
width: "100%"
|
|
1273
1282
|
},
|
|
@@ -1280,7 +1289,7 @@ const Ka = (e) => ({
|
|
|
1280
1289
|
}, a.field || {}), null);
|
|
1281
1290
|
break;
|
|
1282
1291
|
case "time":
|
|
1283
|
-
p = i(
|
|
1292
|
+
p = i(Zt, U({
|
|
1284
1293
|
style: {
|
|
1285
1294
|
width: "100%"
|
|
1286
1295
|
},
|
|
@@ -1356,21 +1365,21 @@ const Ka = (e) => ({
|
|
|
1356
1365
|
}
|
|
1357
1366
|
});
|
|
1358
1367
|
ht.inheritAttrs = !1;
|
|
1359
|
-
function
|
|
1368
|
+
function Ha(e, n) {
|
|
1360
1369
|
const t = Ae({}, e);
|
|
1361
|
-
for (let
|
|
1362
|
-
const u = o
|
|
1370
|
+
for (let o = 0; o < n.length; o += 1) {
|
|
1371
|
+
const u = n[o];
|
|
1363
1372
|
delete t[u];
|
|
1364
1373
|
}
|
|
1365
1374
|
return t;
|
|
1366
1375
|
}
|
|
1367
1376
|
const be = (e) => {
|
|
1368
|
-
const
|
|
1369
|
-
return
|
|
1370
|
-
var
|
|
1371
|
-
return (
|
|
1377
|
+
const n = O(null);
|
|
1378
|
+
return n.value = e, (...t) => {
|
|
1379
|
+
var o;
|
|
1380
|
+
return (o = n.value) == null ? void 0 : o.call(n, ...t);
|
|
1372
1381
|
};
|
|
1373
|
-
},
|
|
1382
|
+
}, Wa = (e) => ({
|
|
1374
1383
|
[`${e.componentCls}`]: {
|
|
1375
1384
|
width: "auto",
|
|
1376
1385
|
["&-title"]: {
|
|
@@ -1399,7 +1408,8 @@ const be = (e) => {
|
|
|
1399
1408
|
}
|
|
1400
1409
|
},
|
|
1401
1410
|
[`${e.antCls}-tree-checkbox`]: {
|
|
1402
|
-
marginInlineEnd: "4px"
|
|
1411
|
+
marginInlineEnd: "4px",
|
|
1412
|
+
alignSelf: "flex-start"
|
|
1403
1413
|
},
|
|
1404
1414
|
[`${e.antCls}-tree-title`]: {
|
|
1405
1415
|
width: "100%"
|
|
@@ -1431,7 +1441,10 @@ const be = (e) => {
|
|
|
1431
1441
|
maxHeight: 24,
|
|
1432
1442
|
justifyContent: "space-between",
|
|
1433
1443
|
"&-title": {
|
|
1434
|
-
|
|
1444
|
+
textOverflow: "ellipsis",
|
|
1445
|
+
overflow: "hidden",
|
|
1446
|
+
wordBreak: "break-all",
|
|
1447
|
+
whiteSpace: "nowrap"
|
|
1435
1448
|
},
|
|
1436
1449
|
"&-option": {
|
|
1437
1450
|
display: "none",
|
|
@@ -1450,9 +1463,9 @@ const be = (e) => {
|
|
|
1450
1463
|
}
|
|
1451
1464
|
}), Ne = ({
|
|
1452
1465
|
title: e,
|
|
1453
|
-
show:
|
|
1466
|
+
show: n,
|
|
1454
1467
|
treeKey: t,
|
|
1455
|
-
fixed:
|
|
1468
|
+
fixed: o
|
|
1456
1469
|
}, {
|
|
1457
1470
|
slots: u
|
|
1458
1471
|
}) => {
|
|
@@ -1460,7 +1473,7 @@ const be = (e) => {
|
|
|
1460
1473
|
cacheColumns: l,
|
|
1461
1474
|
settingsAction: s
|
|
1462
1475
|
} = ie();
|
|
1463
|
-
return
|
|
1476
|
+
return n ? i(ee, {
|
|
1464
1477
|
title: e
|
|
1465
1478
|
}, {
|
|
1466
1479
|
default: () => {
|
|
@@ -1476,7 +1489,7 @@ const be = (e) => {
|
|
|
1476
1489
|
...s == null ? void 0 : s.columnsMap,
|
|
1477
1490
|
[v]: {
|
|
1478
1491
|
...g,
|
|
1479
|
-
fixed:
|
|
1492
|
+
fixed: o
|
|
1480
1493
|
}
|
|
1481
1494
|
};
|
|
1482
1495
|
s == null || s.setColumnsMap(c, "fixed");
|
|
@@ -1484,7 +1497,7 @@ const be = (e) => {
|
|
|
1484
1497
|
}, [(r = u.default) == null ? void 0 : r.call(u)])];
|
|
1485
1498
|
}
|
|
1486
1499
|
}) : null;
|
|
1487
|
-
},
|
|
1500
|
+
}, _a = /* @__PURE__ */ ae({
|
|
1488
1501
|
props: {
|
|
1489
1502
|
treeKey: String,
|
|
1490
1503
|
hashId: String,
|
|
@@ -1495,11 +1508,11 @@ const be = (e) => {
|
|
|
1495
1508
|
},
|
|
1496
1509
|
setup(e) {
|
|
1497
1510
|
const {
|
|
1498
|
-
cacheColumns:
|
|
1499
|
-
} = ie(), t =
|
|
1511
|
+
cacheColumns: n
|
|
1512
|
+
} = ie(), t = S(() => {
|
|
1500
1513
|
var u;
|
|
1501
|
-
return ((u =
|
|
1502
|
-
}),
|
|
1514
|
+
return ((u = n.value.find((l) => l.uuid === e.treeKey)) == null ? void 0 : u.key) || "";
|
|
1515
|
+
}), o = S(() => t.value === "action" && e.autoScroll);
|
|
1503
1516
|
return () => {
|
|
1504
1517
|
const u = i("span", {
|
|
1505
1518
|
class: [`${e.className}-list-item-option`, e.hashId]
|
|
@@ -1507,23 +1520,23 @@ const be = (e) => {
|
|
|
1507
1520
|
treeKey: e.treeKey || "",
|
|
1508
1521
|
fixed: "left",
|
|
1509
1522
|
title: "固定在列首",
|
|
1510
|
-
show: e.fixed !== "left" && !
|
|
1523
|
+
show: e.fixed !== "left" && !o.value
|
|
1511
1524
|
}, {
|
|
1512
|
-
default: () => [i(
|
|
1525
|
+
default: () => [i(ha, null, null)]
|
|
1513
1526
|
}), i(Ne, {
|
|
1514
1527
|
treeKey: e.treeKey || "",
|
|
1515
1528
|
fixed: void 0,
|
|
1516
1529
|
title: "不固定",
|
|
1517
|
-
show: !!e.fixed && !
|
|
1530
|
+
show: !!e.fixed && !o.value
|
|
1518
1531
|
}, {
|
|
1519
|
-
default: () => [i(
|
|
1532
|
+
default: () => [i(va, null, null)]
|
|
1520
1533
|
}), i(Ne, {
|
|
1521
1534
|
treeKey: e.treeKey || "",
|
|
1522
1535
|
fixed: "right",
|
|
1523
1536
|
title: "固定在列尾",
|
|
1524
1537
|
show: e.fixed !== "right"
|
|
1525
1538
|
}, {
|
|
1526
|
-
default: () => [i(
|
|
1539
|
+
default: () => [i(ma, null, null)]
|
|
1527
1540
|
})]);
|
|
1528
1541
|
return i("span", {
|
|
1529
1542
|
class: [`${e.className}-list-item`, e.hashId],
|
|
@@ -1548,14 +1561,14 @@ const be = (e) => {
|
|
|
1548
1561
|
}
|
|
1549
1562
|
},
|
|
1550
1563
|
setup(e) {
|
|
1551
|
-
const
|
|
1564
|
+
const n = O(Ye().uuid(15)), t = S(() => e.list && e.list.length > 0), o = O([]), u = O([]), {
|
|
1552
1565
|
cacheColumns: l,
|
|
1553
1566
|
slots: s,
|
|
1554
1567
|
settingsAction: r
|
|
1555
1568
|
} = ie(), w = (c, b) => c.map(({
|
|
1556
1569
|
key: m,
|
|
1557
1570
|
children: d,
|
|
1558
|
-
uuid:
|
|
1571
|
+
uuid: x,
|
|
1559
1572
|
...$
|
|
1560
1573
|
}) => {
|
|
1561
1574
|
var Y;
|
|
@@ -1565,8 +1578,8 @@ const be = (e) => {
|
|
|
1565
1578
|
let P = !1;
|
|
1566
1579
|
T.show !== !1 && (b == null ? void 0 : b.show) !== !1 && !d && (P = !0);
|
|
1567
1580
|
const D = {
|
|
1568
|
-
key:
|
|
1569
|
-
...
|
|
1581
|
+
key: x || "",
|
|
1582
|
+
...Ha($, ["dataIndex"]),
|
|
1570
1583
|
checked: P,
|
|
1571
1584
|
selectable: !1,
|
|
1572
1585
|
disabled: T.disable === !0,
|
|
@@ -1577,13 +1590,13 @@ const be = (e) => {
|
|
|
1577
1590
|
});
|
|
1578
1591
|
he(() => {
|
|
1579
1592
|
const c = w(e.list || []);
|
|
1580
|
-
|
|
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));
|
|
1581
1594
|
});
|
|
1582
1595
|
const v = be((c, b, m) => {
|
|
1583
1596
|
var L, G;
|
|
1584
|
-
const d = ((L = h(l).find((M) => M.uuid === c)) == null ? void 0 : L.key) || "",
|
|
1597
|
+
const d = ((L = h(l).find((M) => M.uuid === c)) == null ? void 0 : L.key) || "", x = ((G = h(l).find((M) => M.uuid === b)) == null ? void 0 : G.key) || "", $ = {
|
|
1585
1598
|
...r == null ? void 0 : r.columnsMap
|
|
1586
|
-
}, T = [...r.sortKeyColumns.value], P = T.findIndex((M) => M === d), D = T.findIndex((M) => M ===
|
|
1599
|
+
}, T = [...r.sortKeyColumns.value], P = T.findIndex((M) => M === d), D = T.findIndex((M) => M === x), Y = m > P;
|
|
1587
1600
|
if (P < 0)
|
|
1588
1601
|
return;
|
|
1589
1602
|
const j = T[P];
|
|
@@ -1595,18 +1608,18 @@ const be = (e) => {
|
|
|
1595
1608
|
}), r == null || r.setColumnsMap($, "drop"), r == null || r.setSortKeyColumns(T);
|
|
1596
1609
|
}), g = be((c) => {
|
|
1597
1610
|
var T;
|
|
1598
|
-
const b = c.node.key, m = ((T = h(l).find((P) => P.uuid === b)) == null ? void 0 : T.key) || "",
|
|
1611
|
+
const b = c.node.key, m = ((T = h(l).find((P) => P.uuid === b)) == null ? void 0 : T.key) || "", x = {
|
|
1599
1612
|
...(r == null ? void 0 : r.columnsMap[m]) || {}
|
|
1600
1613
|
};
|
|
1601
|
-
|
|
1614
|
+
x.show = c.checked;
|
|
1602
1615
|
const $ = {
|
|
1603
1616
|
...r == null ? void 0 : r.columnsMap,
|
|
1604
|
-
[m]:
|
|
1617
|
+
[m]: x
|
|
1605
1618
|
};
|
|
1606
1619
|
r == null || r.setColumnsMap($, "show");
|
|
1607
1620
|
}), y = (c) => {
|
|
1608
1621
|
const b = h(l).find((m) => m.uuid === c.key);
|
|
1609
|
-
return c.title ||
|
|
1622
|
+
return c.title || At(s, "headerCell", {
|
|
1610
1623
|
title: b.title,
|
|
1611
1624
|
column: b
|
|
1612
1625
|
}, () => [b.title]);
|
|
@@ -1615,33 +1628,33 @@ const be = (e) => {
|
|
|
1615
1628
|
var c, b;
|
|
1616
1629
|
return t.value ? i(Ie, null, [e.showTitle && i("span", {
|
|
1617
1630
|
class: [`${e.className}-list-title`, e.hashId]
|
|
1618
|
-
}, [e.title]), i(
|
|
1619
|
-
key:
|
|
1620
|
-
draggable: e.draggable && !!((c =
|
|
1631
|
+
}, [e.title]), i(na, {
|
|
1632
|
+
key: n.value,
|
|
1633
|
+
draggable: e.draggable && !!((c = o.value) != null && c.length) && ((b = o.value) == null ? void 0 : b.length) > 1,
|
|
1621
1634
|
checkable: e.checkable,
|
|
1622
1635
|
blockNode: !0,
|
|
1623
1636
|
showLine: !1,
|
|
1624
1637
|
checkedKeys: u.value,
|
|
1625
1638
|
height: 280,
|
|
1626
1639
|
onDrop: (m) => {
|
|
1627
|
-
const d = m.node.key,
|
|
1640
|
+
const d = m.node.key, x = m.dragNode.key, {
|
|
1628
1641
|
dropPosition: $,
|
|
1629
1642
|
dropToGap: T
|
|
1630
1643
|
} = m, P = $ === -1 || !T ? $ + 1 : $;
|
|
1631
|
-
v(
|
|
1644
|
+
v(x, d, P);
|
|
1632
1645
|
},
|
|
1633
1646
|
onCheck: (m, d) => g(d),
|
|
1634
|
-
treeData:
|
|
1647
|
+
treeData: o.value
|
|
1635
1648
|
}, {
|
|
1636
1649
|
title: (m) => {
|
|
1637
|
-
var
|
|
1650
|
+
var x;
|
|
1638
1651
|
const d = {
|
|
1639
1652
|
...m,
|
|
1640
1653
|
children: void 0,
|
|
1641
1654
|
title: y(m),
|
|
1642
|
-
autoScroll: (
|
|
1655
|
+
autoScroll: (x = r == null ? void 0 : r.autoScroll) == null ? void 0 : x.value
|
|
1643
1656
|
};
|
|
1644
|
-
return i(
|
|
1657
|
+
return i(_a, U({
|
|
1645
1658
|
hashId: e.hashId,
|
|
1646
1659
|
className: e.className
|
|
1647
1660
|
}, d, {
|
|
@@ -1651,7 +1664,7 @@ const be = (e) => {
|
|
|
1651
1664
|
})]) : null;
|
|
1652
1665
|
};
|
|
1653
1666
|
}
|
|
1654
|
-
}),
|
|
1667
|
+
}), Ga = /* @__PURE__ */ ae({
|
|
1655
1668
|
props: {
|
|
1656
1669
|
hashId: String,
|
|
1657
1670
|
className: String,
|
|
@@ -1660,10 +1673,10 @@ const be = (e) => {
|
|
|
1660
1673
|
},
|
|
1661
1674
|
setup(e) {
|
|
1662
1675
|
const {
|
|
1663
|
-
columns:
|
|
1664
|
-
} = ie(), t = O([]),
|
|
1665
|
-
X(() =>
|
|
1666
|
-
t.value = [],
|
|
1676
|
+
columns: n
|
|
1677
|
+
} = ie(), t = O([]), o = O([]), u = O([]), l = O([]);
|
|
1678
|
+
X(() => n.value, (w) => {
|
|
1679
|
+
t.value = [], o.value = [], u.value = [], w.forEach((v) => {
|
|
1667
1680
|
if (v.hideInSetting)
|
|
1668
1681
|
return;
|
|
1669
1682
|
const {
|
|
@@ -1672,7 +1685,7 @@ const be = (e) => {
|
|
|
1672
1685
|
uuid: c
|
|
1673
1686
|
} = v;
|
|
1674
1687
|
if ((y || y === void 0) && c && l.value.push(c), g === "left") {
|
|
1675
|
-
|
|
1688
|
+
o.value.push(v);
|
|
1676
1689
|
return;
|
|
1677
1690
|
}
|
|
1678
1691
|
if (g === "right") {
|
|
@@ -1684,7 +1697,7 @@ const be = (e) => {
|
|
|
1684
1697
|
}, {
|
|
1685
1698
|
immediate: !0
|
|
1686
1699
|
});
|
|
1687
|
-
const s =
|
|
1700
|
+
const s = S(() => t.value && t.value.length > 0), r = S(() => o.value && o.value.length > 0);
|
|
1688
1701
|
return () => i("div", {
|
|
1689
1702
|
class: {
|
|
1690
1703
|
[`${e.hashId}`]: !0,
|
|
@@ -1693,7 +1706,7 @@ const be = (e) => {
|
|
|
1693
1706
|
}
|
|
1694
1707
|
}, [i(je, {
|
|
1695
1708
|
title: "固定在左侧",
|
|
1696
|
-
list:
|
|
1709
|
+
list: o.value,
|
|
1697
1710
|
keys: l.value,
|
|
1698
1711
|
hashId: e.hashId,
|
|
1699
1712
|
draggable: e.draggable,
|
|
@@ -1718,7 +1731,7 @@ const be = (e) => {
|
|
|
1718
1731
|
className: e.className
|
|
1719
1732
|
}, null)]);
|
|
1720
1733
|
}
|
|
1721
|
-
}),
|
|
1734
|
+
}), qa = /* @__PURE__ */ ae({
|
|
1722
1735
|
props: {
|
|
1723
1736
|
draggable: {
|
|
1724
1737
|
type: Boolean,
|
|
@@ -1732,27 +1745,27 @@ const be = (e) => {
|
|
|
1732
1745
|
extra: [Function, Object, String, Boolean]
|
|
1733
1746
|
},
|
|
1734
1747
|
setup(e) {
|
|
1735
|
-
const
|
|
1748
|
+
const n = Ve({
|
|
1736
1749
|
suffixCls: "table-column-setting",
|
|
1737
1750
|
isPor: !0
|
|
1738
1751
|
}), {
|
|
1739
1752
|
wrapSSR: t,
|
|
1740
|
-
hashId:
|
|
1741
|
-
} = Pe("ColumnSetting", [
|
|
1753
|
+
hashId: o
|
|
1754
|
+
} = Pe("ColumnSetting", [Wa], n), {
|
|
1742
1755
|
columns: u,
|
|
1743
1756
|
settingsAction: l
|
|
1744
1757
|
} = ie(), s = be((y = !0) => {
|
|
1745
1758
|
const c = {}, b = (m) => {
|
|
1746
1759
|
m.forEach(({
|
|
1747
1760
|
key: d,
|
|
1748
|
-
fixed:
|
|
1761
|
+
fixed: x,
|
|
1749
1762
|
index: $,
|
|
1750
1763
|
children: T
|
|
1751
1764
|
}) => {
|
|
1752
1765
|
const P = ot(d, $);
|
|
1753
1766
|
P && (c[P] = {
|
|
1754
1767
|
show: y,
|
|
1755
|
-
fixed:
|
|
1768
|
+
fixed: x
|
|
1756
1769
|
}), T && b(T);
|
|
1757
1770
|
});
|
|
1758
1771
|
};
|
|
@@ -1761,15 +1774,15 @@ const be = (e) => {
|
|
|
1761
1774
|
y.target.checked ? s() : s(!1);
|
|
1762
1775
|
}), w = be(() => {
|
|
1763
1776
|
l == null || l.setColumnsMap(l == null ? void 0 : l.cacheColumnsMap, "fixed");
|
|
1764
|
-
}), v =
|
|
1777
|
+
}), v = S(() => (
|
|
1765
1778
|
// @ts-ignore
|
|
1766
1779
|
Object.values(l == null ? void 0 : l.columnsMap).filter((y) => !y || y.show === !1)
|
|
1767
|
-
)), g =
|
|
1768
|
-
return () => t(i(
|
|
1780
|
+
)), g = S(() => h(v).length > 0 && h(v).length !== u.value.length);
|
|
1781
|
+
return () => t(i(aa, {
|
|
1769
1782
|
arrowPointAtCenter: !0,
|
|
1770
1783
|
title: i("div", {
|
|
1771
|
-
class: [`${
|
|
1772
|
-
}, [i(
|
|
1784
|
+
class: [`${n}-title`, o.value]
|
|
1785
|
+
}, [i(la, {
|
|
1773
1786
|
indeterminate: g.value,
|
|
1774
1787
|
checked: h(v).length === 0 && h(v).length !== u.value.length,
|
|
1775
1788
|
onChange: (y) => r(y)
|
|
@@ -1777,21 +1790,21 @@ const be = (e) => {
|
|
|
1777
1790
|
default: () => [pe("列展示")]
|
|
1778
1791
|
}), e.checkedReset ? i("a", {
|
|
1779
1792
|
onClick: w,
|
|
1780
|
-
class: [`${
|
|
1793
|
+
class: [`${n}-action-rest-button`, o.value]
|
|
1781
1794
|
}, [pe("重置")]) : null, e != null && e.extra ? i(oe, {
|
|
1782
1795
|
size: 12,
|
|
1783
1796
|
align: "center"
|
|
1784
1797
|
}, {
|
|
1785
1798
|
default: () => [e.extra]
|
|
1786
1799
|
}) : null]),
|
|
1787
|
-
overlayClassName: `${
|
|
1800
|
+
overlayClassName: `${n}-overlay ${o.value}`,
|
|
1788
1801
|
trigger: "click",
|
|
1789
1802
|
placement: "bottomRight",
|
|
1790
|
-
content: i(
|
|
1791
|
-
hashId:
|
|
1803
|
+
content: i(Ga, {
|
|
1804
|
+
hashId: o.value,
|
|
1792
1805
|
checkable: e.checkable ?? !0,
|
|
1793
1806
|
draggable: e.draggable ?? !0,
|
|
1794
|
-
className:
|
|
1807
|
+
className: n
|
|
1795
1808
|
}, null)
|
|
1796
1809
|
}, {
|
|
1797
1810
|
default: () => [i(ee, {
|
|
@@ -1809,26 +1822,26 @@ const be = (e) => {
|
|
|
1809
1822
|
return () => e.value ? i(ee, {
|
|
1810
1823
|
title: "退出全屏"
|
|
1811
1824
|
}, {
|
|
1812
|
-
default: () => [i(
|
|
1825
|
+
default: () => [i(ga, null, null)]
|
|
1813
1826
|
}) : i(ee, {
|
|
1814
1827
|
title: "全屏"
|
|
1815
1828
|
}, {
|
|
1816
|
-
default: () => [i(
|
|
1829
|
+
default: () => [i(ya, null, null)]
|
|
1817
1830
|
});
|
|
1818
1831
|
}
|
|
1819
|
-
}),
|
|
1832
|
+
}), Ua = () => {
|
|
1820
1833
|
const {
|
|
1821
1834
|
action: e,
|
|
1822
|
-
tableSize:
|
|
1835
|
+
tableSize: n
|
|
1823
1836
|
} = ie();
|
|
1824
|
-
return i(
|
|
1837
|
+
return i(oa, {
|
|
1825
1838
|
overlay: i(Re, {
|
|
1826
|
-
selectedKeys: [
|
|
1839
|
+
selectedKeys: [n.value],
|
|
1827
1840
|
onClick: ({
|
|
1828
1841
|
key: t
|
|
1829
1842
|
}) => {
|
|
1830
|
-
var
|
|
1831
|
-
(
|
|
1843
|
+
var o;
|
|
1844
|
+
(o = e.setTableSize) == null || o.call(e, t);
|
|
1832
1845
|
},
|
|
1833
1846
|
style: {
|
|
1834
1847
|
width: 80
|
|
@@ -1853,10 +1866,10 @@ const be = (e) => {
|
|
|
1853
1866
|
default: () => [i(ee, {
|
|
1854
1867
|
title: "表格密度"
|
|
1855
1868
|
}, {
|
|
1856
|
-
default: () => [i(
|
|
1869
|
+
default: () => [i(pa, null, null)]
|
|
1857
1870
|
})]
|
|
1858
1871
|
});
|
|
1859
|
-
},
|
|
1872
|
+
}, Xa = (e) => ({
|
|
1860
1873
|
[`${e.componentCls}`]: {
|
|
1861
1874
|
lineHeight: 1,
|
|
1862
1875
|
["&-container"]: {
|
|
@@ -1902,20 +1915,20 @@ function lt(e) {
|
|
|
1902
1915
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !Ce(e);
|
|
1903
1916
|
}
|
|
1904
1917
|
const {
|
|
1905
|
-
useBreakpoint:
|
|
1918
|
+
useBreakpoint: Ja
|
|
1906
1919
|
} = He;
|
|
1907
|
-
function
|
|
1920
|
+
function Qa(e) {
|
|
1908
1921
|
if (Ce(e))
|
|
1909
1922
|
return e;
|
|
1910
1923
|
if (e) {
|
|
1911
|
-
const
|
|
1924
|
+
const n = e, {
|
|
1912
1925
|
icon: t,
|
|
1913
|
-
tooltip:
|
|
1926
|
+
tooltip: o,
|
|
1914
1927
|
onClick: u,
|
|
1915
1928
|
key: l
|
|
1916
|
-
} =
|
|
1917
|
-
return t &&
|
|
1918
|
-
title:
|
|
1929
|
+
} = n;
|
|
1930
|
+
return t && o ? i(ee, {
|
|
1931
|
+
title: o
|
|
1919
1932
|
}, {
|
|
1920
1933
|
default: () => [i("span", {
|
|
1921
1934
|
key: l,
|
|
@@ -1939,22 +1952,22 @@ const mt = /* @__PURE__ */ ae({
|
|
|
1939
1952
|
},
|
|
1940
1953
|
setup(e) {
|
|
1941
1954
|
const {
|
|
1942
|
-
wrapSSR:
|
|
1955
|
+
wrapSSR: n,
|
|
1943
1956
|
hashId: t
|
|
1944
|
-
} = Pe("ListToolBar", [
|
|
1957
|
+
} = Pe("ListToolBar", [Xa], e.prefixCls), o = Ja(), {
|
|
1945
1958
|
isMobile: u
|
|
1946
|
-
} = ie(), l =
|
|
1959
|
+
} = ie(), l = S(() => {
|
|
1947
1960
|
var c;
|
|
1948
1961
|
return !!(e.titleTip || e.headerTitle || (c = e.actions) != null && c.length);
|
|
1949
|
-
}), s =
|
|
1962
|
+
}), s = S(() => {
|
|
1950
1963
|
var c;
|
|
1951
1964
|
return !!((c = e.settings) != null && c.length || e.optionsExtra);
|
|
1952
|
-
}), r =
|
|
1965
|
+
}), r = S(() => !!(e.titleTip || e.headerTitle)), w = S(() => {
|
|
1953
1966
|
var b;
|
|
1954
1967
|
let c;
|
|
1955
1968
|
return Array.isArray(e.actions) ? ((b = e.actions) == null ? void 0 : b.length) < 1 ? null : i(oe, {
|
|
1956
1969
|
align: "center"
|
|
1957
|
-
}, lt(c = e.actions.map((m, d) => Ce(m) ?
|
|
1970
|
+
}, lt(c = e.actions.map((m, d) => Ce(m) ? Vt(m, {
|
|
1958
1971
|
key: d,
|
|
1959
1972
|
...m == null ? void 0 : m.props
|
|
1960
1973
|
}) : i("template", {
|
|
@@ -1972,7 +1985,7 @@ const mt = /* @__PURE__ */ ae({
|
|
|
1972
1985
|
}, [e.headerTitle, e.titleTip && i(ee, {
|
|
1973
1986
|
title: e.titleTipText
|
|
1974
1987
|
}, {
|
|
1975
|
-
default: () => [te(e.titleTip) && e.titleTip ? i(
|
|
1988
|
+
default: () => [te(e.titleTip) && e.titleTip ? i(ba, null, null) : e.titleTip]
|
|
1976
1989
|
})]), w.value && i("div", {
|
|
1977
1990
|
class: `${e.prefixCls}-actions ${t.value}`
|
|
1978
1991
|
}, [w.value])]
|
|
@@ -1987,8 +2000,8 @@ const mt = /* @__PURE__ */ ae({
|
|
|
1987
2000
|
return s.value ? i(oe, {
|
|
1988
2001
|
size: 16,
|
|
1989
2002
|
class: `${e.prefixCls}-right ${t.value}`,
|
|
1990
|
-
align:
|
|
1991
|
-
direction:
|
|
2003
|
+
align: o.value.lg ? "center" : "end",
|
|
2004
|
+
direction: o.value.lg ? "horizontal" : "vertical"
|
|
1992
2005
|
}, {
|
|
1993
2006
|
default: () => {
|
|
1994
2007
|
var b;
|
|
@@ -1997,17 +2010,17 @@ const mt = /* @__PURE__ */ ae({
|
|
|
1997
2010
|
align: "center",
|
|
1998
2011
|
class: `${e.prefixCls}-setting-items`
|
|
1999
2012
|
}, lt(c = e.settings.map((m, d) => {
|
|
2000
|
-
const
|
|
2013
|
+
const x = Qa(m);
|
|
2001
2014
|
return i("div", {
|
|
2002
2015
|
key: d,
|
|
2003
2016
|
class: `${e.prefixCls}-setting-item`
|
|
2004
|
-
}, [
|
|
2017
|
+
}, [x]);
|
|
2005
2018
|
})) ? c : {
|
|
2006
2019
|
default: () => [c]
|
|
2007
2020
|
}) : null];
|
|
2008
2021
|
}
|
|
2009
2022
|
}) : null;
|
|
2010
|
-
}, [() =>
|
|
2023
|
+
}, [() => o.value, () => s.value, () => e.prefixCls, () => r.value, () => w.value, () => e.settings]), y = Fe(() => {
|
|
2011
2024
|
if (!s.value && !l.value)
|
|
2012
2025
|
return null;
|
|
2013
2026
|
const c = {
|
|
@@ -2019,21 +2032,21 @@ const mt = /* @__PURE__ */ ae({
|
|
|
2019
2032
|
class: c
|
|
2020
2033
|
}, [v.value, g.value]);
|
|
2021
2034
|
}, [() => u.value, () => l.value, () => s.value, () => v.value, () => e.prefixCls, () => g.value]);
|
|
2022
|
-
return () =>
|
|
2035
|
+
return () => n(i("div", {
|
|
2023
2036
|
class: `${e.prefixCls} ${t.value}`
|
|
2024
2037
|
}, [y.value]));
|
|
2025
2038
|
}
|
|
2026
2039
|
});
|
|
2027
2040
|
mt.inheritAttrs = !1;
|
|
2028
|
-
function
|
|
2041
|
+
function Za() {
|
|
2029
2042
|
return {
|
|
2030
2043
|
reload: {
|
|
2031
2044
|
text: "刷新",
|
|
2032
|
-
icon: i(
|
|
2045
|
+
icon: i(Ca, null, null)
|
|
2033
2046
|
},
|
|
2034
2047
|
density: {
|
|
2035
2048
|
text: "表格密度",
|
|
2036
|
-
icon: i(
|
|
2049
|
+
icon: i(Ua, null, null)
|
|
2037
2050
|
},
|
|
2038
2051
|
setting: {
|
|
2039
2052
|
text: "列设置",
|
|
@@ -2045,15 +2058,15 @@ function Qa() {
|
|
|
2045
2058
|
}
|
|
2046
2059
|
};
|
|
2047
2060
|
}
|
|
2048
|
-
function
|
|
2061
|
+
function el(e, n) {
|
|
2049
2062
|
return Object.keys(e).filter((t) => t).map((t) => {
|
|
2050
|
-
const
|
|
2051
|
-
if (!
|
|
2063
|
+
const o = e[t];
|
|
2064
|
+
if (!o)
|
|
2052
2065
|
return null;
|
|
2053
|
-
let u =
|
|
2066
|
+
let u = o === !0 ? n[t] : () => o == null ? void 0 : o();
|
|
2054
2067
|
if (typeof u != "function" && (u = () => {
|
|
2055
2068
|
}), t === "setting")
|
|
2056
|
-
return i(
|
|
2069
|
+
return i(qa, U(e[t], {
|
|
2057
2070
|
key: t
|
|
2058
2071
|
}), null);
|
|
2059
2072
|
if (t === "fullScreen")
|
|
@@ -2061,7 +2074,7 @@ function Za(e, o) {
|
|
|
2061
2074
|
key: t,
|
|
2062
2075
|
onClick: u
|
|
2063
2076
|
}, [i(vt, null, null)]);
|
|
2064
|
-
const l =
|
|
2077
|
+
const l = Za()[t];
|
|
2065
2078
|
return l ? i("span", {
|
|
2066
2079
|
key: t,
|
|
2067
2080
|
onClick: u
|
|
@@ -2072,7 +2085,7 @@ function Za(e, o) {
|
|
|
2072
2085
|
})]) : null;
|
|
2073
2086
|
}).filter((t) => t);
|
|
2074
2087
|
}
|
|
2075
|
-
const
|
|
2088
|
+
const tl = {
|
|
2076
2089
|
options: [Boolean, Object, Array],
|
|
2077
2090
|
titleTip: [Function, Boolean, Object, String],
|
|
2078
2091
|
settingExtra: [Function, Boolean, Object, Array],
|
|
@@ -2080,16 +2093,16 @@ const el = {
|
|
|
2080
2093
|
titleTipText: [String],
|
|
2081
2094
|
toolBarBtn: [Function, Boolean, Object, Array],
|
|
2082
2095
|
headerTitle: [Function, Boolean, Object, Array, String]
|
|
2083
|
-
},
|
|
2084
|
-
props:
|
|
2096
|
+
}, al = /* @__PURE__ */ ae({
|
|
2097
|
+
props: tl,
|
|
2085
2098
|
inheritAttrs: !1,
|
|
2086
2099
|
setup(e) {
|
|
2087
|
-
const
|
|
2100
|
+
const n = Ve({
|
|
2088
2101
|
suffixCls: "table-list-toolbar",
|
|
2089
2102
|
isPor: !0
|
|
2090
2103
|
}), {
|
|
2091
2104
|
action: t
|
|
2092
|
-
} = ie(),
|
|
2105
|
+
} = ie(), o = Fe(() => {
|
|
2093
2106
|
var s;
|
|
2094
2107
|
const u = {
|
|
2095
2108
|
reload: () => t == null ? void 0 : t.reload(),
|
|
@@ -2103,24 +2116,24 @@ const el = {
|
|
|
2103
2116
|
...u,
|
|
2104
2117
|
...e.options
|
|
2105
2118
|
};
|
|
2106
|
-
return l.setting !== !1 && e.settingExtra && (l.setting = {}, l.setting.extra = e.settingExtra),
|
|
2119
|
+
return l.setting !== !1 && e.settingExtra && (l.setting = {}, l.setting.extra = e.settingExtra), el(l, {
|
|
2107
2120
|
...u
|
|
2108
2121
|
});
|
|
2109
2122
|
}, [() => t, () => e.options]);
|
|
2110
2123
|
return () => {
|
|
2111
2124
|
const u = e.toolBarBtn || [];
|
|
2112
2125
|
return i(mt, {
|
|
2113
|
-
prefixCls:
|
|
2126
|
+
prefixCls: n,
|
|
2114
2127
|
optionsExtra: e.optionsExtra,
|
|
2115
2128
|
headerTitle: e.headerTitle,
|
|
2116
2129
|
actions: u,
|
|
2117
|
-
settings: h(
|
|
2130
|
+
settings: h(o),
|
|
2118
2131
|
titleTip: e.titleTip,
|
|
2119
2132
|
titleTipText: e.titleTipText
|
|
2120
2133
|
}, null);
|
|
2121
2134
|
};
|
|
2122
2135
|
}
|
|
2123
|
-
}),
|
|
2136
|
+
}), ll = [
|
|
2124
2137
|
"search",
|
|
2125
2138
|
"headerTitle",
|
|
2126
2139
|
"toolBarBtn",
|
|
@@ -2130,26 +2143,26 @@ const el = {
|
|
|
2130
2143
|
"pageItemRender",
|
|
2131
2144
|
"customize"
|
|
2132
2145
|
];
|
|
2133
|
-
function
|
|
2146
|
+
function nl(e) {
|
|
2134
2147
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !Ce(e);
|
|
2135
2148
|
}
|
|
2136
|
-
function
|
|
2137
|
-
if (!
|
|
2149
|
+
function ol(e, n, t, o) {
|
|
2150
|
+
if (!n)
|
|
2138
2151
|
return e;
|
|
2139
2152
|
let u = e;
|
|
2140
|
-
if (ue(
|
|
2141
|
-
const l =
|
|
2142
|
-
return i(l, U((
|
|
2143
|
-
class: [
|
|
2144
|
-
onClick:
|
|
2145
|
-
}),
|
|
2153
|
+
if (ue(n)) {
|
|
2154
|
+
const l = n.node === "a" ? "span" : n.node;
|
|
2155
|
+
return i(l, U((n == null ? void 0 : n.attr) || {}, {
|
|
2156
|
+
class: [n.class, n.node === "a" ? `${t}-a` : ""],
|
|
2157
|
+
onClick: n.click
|
|
2158
|
+
}), nl(e) ? e : {
|
|
2146
2159
|
default: () => [e]
|
|
2147
2160
|
});
|
|
2148
2161
|
}
|
|
2149
|
-
switch (
|
|
2162
|
+
switch (n) {
|
|
2150
2163
|
case "link":
|
|
2151
2164
|
u = i("span", {
|
|
2152
|
-
class: [`${t}-a`,
|
|
2165
|
+
class: [`${t}-a`, o]
|
|
2153
2166
|
}, [e]);
|
|
2154
2167
|
break;
|
|
2155
2168
|
case "time":
|
|
@@ -2177,7 +2190,7 @@ const ke = {
|
|
|
2177
2190
|
backgroundColor: "transparent",
|
|
2178
2191
|
borderRadius: 2
|
|
2179
2192
|
}
|
|
2180
|
-
},
|
|
2193
|
+
}, ul = (e) => ({
|
|
2181
2194
|
[e.componentCls]: {
|
|
2182
2195
|
["&-a"]: {
|
|
2183
2196
|
cursor: "pointer",
|
|
@@ -2359,9 +2372,9 @@ const ke = {
|
|
|
2359
2372
|
[`${e.antCls}-table-content`]: ke
|
|
2360
2373
|
}
|
|
2361
2374
|
}
|
|
2362
|
-
}),
|
|
2363
|
-
useBreakpoint:
|
|
2364
|
-
} = He,
|
|
2375
|
+
}), il = ct.PRESENTED_IMAGE_SIMPLE, {
|
|
2376
|
+
useBreakpoint: sl
|
|
2377
|
+
} = He, rl = {
|
|
2365
2378
|
reload: !0,
|
|
2366
2379
|
density: !0,
|
|
2367
2380
|
setting: !0,
|
|
@@ -2372,9 +2385,9 @@ const ke = {
|
|
|
2372
2385
|
props: ce,
|
|
2373
2386
|
emits: ["reset", "reload", "submit", "sizeChange", "expandedRowsChange", "expand", "change", "requestError", "beforeSearchSubmit", "columnsStateChange", "loadingChange"],
|
|
2374
2387
|
setup(e, {
|
|
2375
|
-
emit:
|
|
2388
|
+
emit: n,
|
|
2376
2389
|
slots: t,
|
|
2377
|
-
attrs:
|
|
2390
|
+
attrs: o,
|
|
2378
2391
|
expose: u
|
|
2379
2392
|
}) {
|
|
2380
2393
|
const l = Ve({
|
|
@@ -2383,66 +2396,66 @@ const ke = {
|
|
|
2383
2396
|
}), {
|
|
2384
2397
|
wrapSSR: s,
|
|
2385
2398
|
hashId: r
|
|
2386
|
-
} = Pe("ProBaseTable", [
|
|
2399
|
+
} = Pe("ProBaseTable", [ul], l), w = sl(), {
|
|
2387
2400
|
width: v
|
|
2388
|
-
} =
|
|
2401
|
+
} = Qt(), {
|
|
2389
2402
|
emptyText: g,
|
|
2390
2403
|
indicator: y
|
|
2391
|
-
} =
|
|
2404
|
+
} = ra(), c = O(), b = O(), m = O(e.waitRequest);
|
|
2392
2405
|
he(() => m.value = e.waitRequest);
|
|
2393
2406
|
const {
|
|
2394
2407
|
toggle: d,
|
|
2395
|
-
isFullscreen:
|
|
2396
|
-
} = st(c), $ =
|
|
2408
|
+
isFullscreen: x
|
|
2409
|
+
} = st(c), $ = S(() => ({
|
|
2397
2410
|
...e
|
|
2398
|
-
})), T =
|
|
2411
|
+
})), T = S(() => !w.value.xl), P = S(() => {
|
|
2399
2412
|
var C, R;
|
|
2400
|
-
return e.virtualScroll &&
|
|
2401
|
-
}), D =
|
|
2413
|
+
return e.virtualScroll && Sa(!((C = e.scroll) != null && C.y), "参数scroll的Y值不能为空!"), !!((R = e.scroll) != null && R.y && e.virtualScroll);
|
|
2414
|
+
}), D = S(() => {
|
|
2402
2415
|
const C = (e.columns || []).filter((R) => R.key || R.dataIndex).map((R) => ({
|
|
2403
2416
|
...R,
|
|
2404
2417
|
key: R.key || R.dataIndex,
|
|
2405
2418
|
align: R.align || e.align,
|
|
2406
2419
|
uuid: Ye().uuid(15)
|
|
2407
2420
|
}));
|
|
2408
|
-
return
|
|
2421
|
+
return Xt(C, {
|
|
2409
2422
|
align: e.align || "left",
|
|
2410
2423
|
showIndex: e.showIndex || !1
|
|
2411
2424
|
});
|
|
2412
2425
|
}), {
|
|
2413
2426
|
loadingStatus: Y,
|
|
2414
2427
|
setLoading: j
|
|
2415
|
-
} =
|
|
2416
|
-
emit:
|
|
2428
|
+
} = wa({
|
|
2429
|
+
emit: n,
|
|
2417
2430
|
loading: Z(e, "loading")
|
|
2418
2431
|
}), {
|
|
2419
2432
|
sizeRef: L,
|
|
2420
2433
|
setTableSize: G
|
|
2421
|
-
} =
|
|
2422
|
-
emit:
|
|
2434
|
+
} = Ta({
|
|
2435
|
+
emit: n,
|
|
2423
2436
|
size: Z(e, "size")
|
|
2424
2437
|
}), {
|
|
2425
2438
|
getPaginationInfo: M,
|
|
2426
2439
|
setPagination: H
|
|
2427
|
-
} =
|
|
2440
|
+
} = Ra({
|
|
2428
2441
|
slots: t,
|
|
2429
2442
|
props: $,
|
|
2430
2443
|
pagination: Z(e, "pagination")
|
|
2431
|
-
}), a =
|
|
2444
|
+
}), a = ja(e), {
|
|
2432
2445
|
getScrollRef: p,
|
|
2433
2446
|
breakpoint: I
|
|
2434
|
-
} =
|
|
2447
|
+
} = ka({
|
|
2435
2448
|
...a,
|
|
2436
2449
|
innerWidth: v,
|
|
2437
2450
|
columns: D,
|
|
2438
2451
|
screens: w
|
|
2439
|
-
}), F =
|
|
2452
|
+
}), F = Ma(e), {
|
|
2440
2453
|
getProColumns: B,
|
|
2441
2454
|
cacheProColumns: f,
|
|
2442
2455
|
setColumns: N,
|
|
2443
2456
|
changeColumns: A,
|
|
2444
2457
|
resizeColumnWidth: K
|
|
2445
|
-
} =
|
|
2458
|
+
} = Na({
|
|
2446
2459
|
...F,
|
|
2447
2460
|
breakpoint: I,
|
|
2448
2461
|
scroll: p,
|
|
@@ -2454,7 +2467,7 @@ const ke = {
|
|
|
2454
2467
|
sortKeyColumns: xe,
|
|
2455
2468
|
cacheColumnsMap: we,
|
|
2456
2469
|
setSortKeyColumns: le
|
|
2457
|
-
} =
|
|
2470
|
+
} = Da({
|
|
2458
2471
|
columns: f,
|
|
2459
2472
|
columnsState: Z(e, "columnsState"),
|
|
2460
2473
|
changeColumns: A
|
|
@@ -2463,48 +2476,49 @@ const ke = {
|
|
|
2463
2476
|
formParamsRef: fe,
|
|
2464
2477
|
defaultParamsRef: V,
|
|
2465
2478
|
setFormParams: ne
|
|
2466
|
-
} =
|
|
2479
|
+
} = Ba({
|
|
2467
2480
|
search: Z(e, "search"),
|
|
2468
2481
|
searchMap: Z(e, "searchMap"),
|
|
2469
2482
|
params: Z(e, "params"),
|
|
2470
2483
|
columns: D,
|
|
2471
2484
|
setPagination: H
|
|
2472
2485
|
}), {
|
|
2473
|
-
selectedKey:
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
|
|
2479
|
-
|
|
2486
|
+
selectedKey: k,
|
|
2487
|
+
selectedItem: se,
|
|
2488
|
+
changeRowKey: q,
|
|
2489
|
+
selectRowKey: gt,
|
|
2490
|
+
selectAllRowKey: yt,
|
|
2491
|
+
syncSelectedRows: pt,
|
|
2492
|
+
removeRowKeys: bt
|
|
2493
|
+
} = $a(Z(e, "rowKey"), Z(e, "rowSelection")), Ct = Ia(e), {
|
|
2480
2494
|
reload: De,
|
|
2481
|
-
reSetDataList:
|
|
2482
|
-
changeDataValue:
|
|
2495
|
+
reSetDataList: St,
|
|
2496
|
+
changeDataValue: xt,
|
|
2483
2497
|
isTreeDataRef: We,
|
|
2484
2498
|
getDataSourceRef: me,
|
|
2485
2499
|
handleTableChange: _e
|
|
2486
|
-
} =
|
|
2487
|
-
...
|
|
2500
|
+
} = Pa({
|
|
2501
|
+
...Ct,
|
|
2488
2502
|
waitRequest: m
|
|
2489
2503
|
}, {
|
|
2490
2504
|
loadingStatus: Y,
|
|
2491
2505
|
getPaginationInfo: M,
|
|
2492
2506
|
setPagination: H,
|
|
2493
|
-
removeRowKeys:
|
|
2494
|
-
syncSelectedRows:
|
|
2507
|
+
removeRowKeys: bt,
|
|
2508
|
+
syncSelectedRows: pt,
|
|
2495
2509
|
setLoading: j,
|
|
2496
2510
|
setColumns: N,
|
|
2497
2511
|
columns: B,
|
|
2498
2512
|
formParamsRef: fe,
|
|
2499
2513
|
onBeforeSearchSubmit: e.onBeforeSearchSubmit,
|
|
2500
|
-
hasCustomRender:
|
|
2501
|
-
},
|
|
2502
|
-
...
|
|
2514
|
+
hasCustomRender: S(() => !!ze(t, e, "customRender"))
|
|
2515
|
+
}, n), wt = S(() => e.options ? {
|
|
2516
|
+
...rl,
|
|
2503
2517
|
...J(ue(e.options) ? e.options : {})
|
|
2504
|
-
} : !1), Ge =
|
|
2518
|
+
} : !1), Ge = S(() => {
|
|
2505
2519
|
const C = ue(e.loading) ? ye(e.loading, "spinning") : {};
|
|
2506
2520
|
return !C.indicator && (y != null && y.value) && (C.indicator = y == null ? void 0 : y.value), ye({
|
|
2507
|
-
...(ye(
|
|
2521
|
+
...(ye(o), ["class", "style", "id"]),
|
|
2508
2522
|
...e,
|
|
2509
2523
|
virtualScroll: P.value,
|
|
2510
2524
|
size: h(L),
|
|
@@ -2517,19 +2531,19 @@ const ke = {
|
|
|
2517
2531
|
pagination: Me(h(M)),
|
|
2518
2532
|
dataSource: h(me)
|
|
2519
2533
|
}, ["class", "onChange", "onExpand", "onExpandedRowsChange"]);
|
|
2520
|
-
}),
|
|
2534
|
+
}), Tt = S(() => [{
|
|
2521
2535
|
[`${r.value}`]: !0,
|
|
2522
2536
|
[`${l}`]: !0,
|
|
2523
|
-
[`${
|
|
2537
|
+
[`${o.class}`]: o.class,
|
|
2524
2538
|
[`${l}-no-scroll`]: !Object.keys(h(p) || {}).length,
|
|
2525
2539
|
[`${l}-table-tree`]: We.value,
|
|
2526
|
-
[`${l}-full-screen`]:
|
|
2527
|
-
}]), qe =
|
|
2540
|
+
[`${l}-full-screen`]: x.value
|
|
2541
|
+
}]), qe = S(() => {
|
|
2528
2542
|
var Q;
|
|
2529
2543
|
let C;
|
|
2530
|
-
const R = h($).direction === "rtl" ? "bottomLeft" : "right",
|
|
2531
|
-
if (
|
|
2532
|
-
const z =
|
|
2544
|
+
const R = h($).direction === "rtl" ? "bottomLeft" : "right", E = (Q = h(M)) == null ? void 0 : Q.position;
|
|
2545
|
+
if (E !== null && Array.isArray(E)) {
|
|
2546
|
+
const z = E.find((re) => re.indexOf("top") !== -1), W = E.find((re) => re.indexOf("bottom") !== -1), Te = E.every((re) => `${re}` == "none");
|
|
2533
2547
|
!z && !W && !Te && (C = R), z && (C = z.toLowerCase().replace("top", "")), W && (C = W.toLowerCase().replace("bottom", ""));
|
|
2534
2548
|
} else
|
|
2535
2549
|
C = R;
|
|
@@ -2540,27 +2554,27 @@ const ke = {
|
|
|
2540
2554
|
...C,
|
|
2541
2555
|
...e.params || {}
|
|
2542
2556
|
}), await De()) : ne(C);
|
|
2543
|
-
},
|
|
2544
|
-
R ? (
|
|
2545
|
-
}, Xe = (C, R,
|
|
2546
|
-
H(it(C, ["current", "pageSize"])), _e(C, R,
|
|
2547
|
-
},
|
|
2548
|
-
var
|
|
2557
|
+
}, Rt = async (C, R) => {
|
|
2558
|
+
R ? (n("reset", C), e.request && await Ue(C)) : e.request ? (n("submit", C), await Ue(C)) : n("submit", C);
|
|
2559
|
+
}, Xe = (C, R, E, Q) => {
|
|
2560
|
+
H(it(C, ["current", "pageSize"])), _e(C, R, E, Q);
|
|
2561
|
+
}, $t = (C, R) => {
|
|
2562
|
+
var E;
|
|
2549
2563
|
H({
|
|
2550
2564
|
current: C,
|
|
2551
2565
|
pageSize: R
|
|
2552
2566
|
}), _e({
|
|
2553
2567
|
current: C,
|
|
2554
2568
|
pageSize: R,
|
|
2555
|
-
total: M.value && ((
|
|
2569
|
+
total: M.value && ((E = M.value) == null ? void 0 : E.total) || 0
|
|
2556
2570
|
}, {}, {});
|
|
2557
|
-
},
|
|
2558
|
-
|
|
2559
|
-
},
|
|
2560
|
-
|
|
2561
|
-
},
|
|
2562
|
-
const Q =
|
|
2563
|
-
return R &&
|
|
2571
|
+
}, Ft = (C) => {
|
|
2572
|
+
n("expandedRowsChange", C);
|
|
2573
|
+
}, It = (C, R) => {
|
|
2574
|
+
n("expand", C, R);
|
|
2575
|
+
}, Pt = (C, R) => K(C, R), Ot = (C, R, E) => {
|
|
2576
|
+
const Q = E.align === "center" ? "top" : E.align === "left" || !E.align ? "topLeft" : "topRight";
|
|
2577
|
+
return R && E.copyable ? i(sa.Paragraph, {
|
|
2564
2578
|
class: `${l}-copyable`,
|
|
2565
2579
|
style: {
|
|
2566
2580
|
margin: "0",
|
|
@@ -2577,7 +2591,7 @@ const ke = {
|
|
|
2577
2591
|
class: `${l}-ellipsis`
|
|
2578
2592
|
}, [C])]
|
|
2579
2593
|
})]
|
|
2580
|
-
}) : R && !
|
|
2594
|
+
}) : R && !E.copyable ? i(ee, {
|
|
2581
2595
|
title: C,
|
|
2582
2596
|
placement: Q
|
|
2583
2597
|
}, {
|
|
@@ -2585,22 +2599,22 @@ const ke = {
|
|
|
2585
2599
|
class: `${l}-ellipsis`
|
|
2586
2600
|
}, [C])]
|
|
2587
2601
|
}) : C;
|
|
2588
|
-
},
|
|
2602
|
+
}, Bt = () => {
|
|
2589
2603
|
var R;
|
|
2590
2604
|
const C = ze(t, e, "customRender");
|
|
2591
2605
|
return C ? (R = me.value) != null && R.length ? C(me.value) : (g == null ? void 0 : g.value) || i(ct, {
|
|
2592
|
-
image:
|
|
2606
|
+
image: il
|
|
2593
2607
|
}, null) : i(Ie, null, null);
|
|
2594
|
-
},
|
|
2608
|
+
}, Dt = (C, R, E) => i(al, {
|
|
2595
2609
|
headerTitle: C,
|
|
2596
|
-
titleTip:
|
|
2610
|
+
titleTip: E,
|
|
2597
2611
|
titleTipText: e.titleTipText,
|
|
2598
|
-
options: h(
|
|
2612
|
+
options: h(wt),
|
|
2599
2613
|
settingExtra: ge(t, e, "settingExtra"),
|
|
2600
2614
|
optionsExtra: ge(t, e, "optionsExtra"),
|
|
2601
2615
|
toolBarBtn: R
|
|
2602
2616
|
}, null);
|
|
2603
|
-
|
|
2617
|
+
za({
|
|
2604
2618
|
tableSize: L,
|
|
2605
2619
|
columns: B,
|
|
2606
2620
|
cacheColumns: D,
|
|
@@ -2638,6 +2652,8 @@ const ke = {
|
|
|
2638
2652
|
actionRef: () => ({
|
|
2639
2653
|
dataSource: me.value,
|
|
2640
2654
|
pageParams: M.value,
|
|
2655
|
+
selectedKey: k.value,
|
|
2656
|
+
selectedItem: se.value,
|
|
2641
2657
|
reload: De,
|
|
2642
2658
|
getLoadingStatus: () => h(Y),
|
|
2643
2659
|
reloadAndRest: async (C) => {
|
|
@@ -2646,21 +2662,21 @@ const ke = {
|
|
|
2646
2662
|
pageSize: 10
|
|
2647
2663
|
}), C && (C == null || C()), m.value = !1;
|
|
2648
2664
|
},
|
|
2649
|
-
reSetDataList:
|
|
2665
|
+
reSetDataList: St,
|
|
2650
2666
|
setPageAndReload: Xe,
|
|
2651
2667
|
setPagination: H,
|
|
2652
|
-
changeDataValue:
|
|
2668
|
+
changeDataValue: xt,
|
|
2653
2669
|
loadingOperation: j
|
|
2654
2670
|
})
|
|
2655
2671
|
});
|
|
2656
|
-
const
|
|
2672
|
+
const Mt = S(() => (o == null ? void 0 : o.style) || {});
|
|
2657
2673
|
return () => {
|
|
2658
2674
|
var Q;
|
|
2659
|
-
const C = ge(t, e, "headerTitle"), R = ge(t, e, "titleTip"),
|
|
2675
|
+
const C = ge(t, e, "headerTitle"), R = ge(t, e, "titleTip"), E = ge(t, e, "toolBarBtn");
|
|
2660
2676
|
return s(i("div", {
|
|
2661
2677
|
ref: c,
|
|
2662
|
-
class:
|
|
2663
|
-
style:
|
|
2678
|
+
class: Tt.value,
|
|
2679
|
+
style: Mt.value
|
|
2664
2680
|
}, [i("div", {
|
|
2665
2681
|
class: [`${l}-content`, r.value]
|
|
2666
2682
|
}, [(!!Be.value.length || !!((Q = t.search) != null && Q.call(t))) && i(ht, {
|
|
@@ -2670,28 +2686,28 @@ const ke = {
|
|
|
2670
2686
|
searchMap: Be.value,
|
|
2671
2687
|
prefixCls: l,
|
|
2672
2688
|
loading: !!h(Y),
|
|
2673
|
-
onSearch:
|
|
2689
|
+
onSearch: Rt,
|
|
2674
2690
|
defaultParams: V
|
|
2675
2691
|
}, {
|
|
2676
2692
|
default: t.search ? () => {
|
|
2677
2693
|
var z;
|
|
2678
2694
|
return (z = t.search) == null ? void 0 : z.call(t);
|
|
2679
2695
|
} : null
|
|
2680
|
-
}), !P.value &&
|
|
2696
|
+
}), !P.value && Dt(C, E, R), e.customRender ?? t.customRender ? i(Le, h(Ge).loading, {
|
|
2681
2697
|
default: () => {
|
|
2682
2698
|
var z;
|
|
2683
2699
|
return [i("div", {
|
|
2684
2700
|
class: `${l}-wrapper ${r.value}`
|
|
2685
|
-
}, [
|
|
2701
|
+
}, [Bt(), e.pagination !== !1 && ((z = me.value) == null ? void 0 : z.length) > 0 && i(ua, U({
|
|
2686
2702
|
class: {
|
|
2687
2703
|
[`${l}-pagination ${r.value}`]: !0,
|
|
2688
2704
|
[`${l}-pagination-${qe.value} ${r.value}`]: !!qe.value
|
|
2689
2705
|
}
|
|
2690
2706
|
}, Me(h(M)), {
|
|
2691
|
-
onChange:
|
|
2707
|
+
onChange: $t
|
|
2692
2708
|
}), null)])];
|
|
2693
2709
|
}
|
|
2694
|
-
}) : i(
|
|
2710
|
+
}) : i(ia, U(Ge.value, {
|
|
2695
2711
|
style: e.tableStyle || void 0,
|
|
2696
2712
|
class: e.tableClassName,
|
|
2697
2713
|
rowKey: (z) => z[e.rowKey || "sortIndex"],
|
|
@@ -2705,24 +2721,24 @@ const ke = {
|
|
|
2705
2721
|
return z;
|
|
2706
2722
|
const {
|
|
2707
2723
|
value: re,
|
|
2708
|
-
success:
|
|
2709
|
-
} =
|
|
2710
|
-
return W != null && W.ellipsis ?
|
|
2724
|
+
success: Nt
|
|
2725
|
+
} = Jt(Te, (W == null ? void 0 : W.columnEmptyText) || (e == null ? void 0 : e.columnEmptyText) || ""), Je = ol(re, ((Ze = (Qe = e.columns) == null ? void 0 : Qe.find((jt) => jt.key === W.key)) == null ? void 0 : Ze.valueType) || W.valueType, l, r.value);
|
|
2726
|
+
return W != null && W.ellipsis ? Ot(Je, Nt, W) : Je;
|
|
2711
2727
|
},
|
|
2712
2728
|
rowSelection: e.rowSelection ? {
|
|
2713
2729
|
...ye(e.rowSelection, ["onSelect", "onSelectAll", "onChange", "selectedRowKeys"]),
|
|
2714
|
-
selectedRowKeys:
|
|
2715
|
-
onSelect:
|
|
2716
|
-
onSelectAll:
|
|
2717
|
-
onChange:
|
|
2730
|
+
selectedRowKeys: k.value,
|
|
2731
|
+
onSelect: gt,
|
|
2732
|
+
onSelectAll: yt,
|
|
2733
|
+
onChange: q
|
|
2718
2734
|
} : void 0,
|
|
2719
2735
|
onChange: Xe,
|
|
2720
|
-
onExpandedRowsChange:
|
|
2721
|
-
onExpand:
|
|
2722
|
-
onResizeColumn:
|
|
2736
|
+
onExpandedRowsChange: Ft,
|
|
2737
|
+
onExpand: It,
|
|
2738
|
+
onResizeColumn: Pt
|
|
2723
2739
|
}), {
|
|
2724
2740
|
emptyText: g != null && g.value ? () => g == null ? void 0 : g.value : null,
|
|
2725
|
-
...ye(t,
|
|
2741
|
+
...ye(t, ll)
|
|
2726
2742
|
})])]));
|
|
2727
2743
|
};
|
|
2728
2744
|
}
|
|
@@ -2732,5 +2748,5 @@ export {
|
|
|
2732
2748
|
Ee as GProTable,
|
|
2733
2749
|
Ee as default,
|
|
2734
2750
|
ce as proTableProps,
|
|
2735
|
-
|
|
2751
|
+
Cl as useTable
|
|
2736
2752
|
};
|