@gx-design-vue/pro-table 0.2.0-beta.41 → 0.2.0-beta.43
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/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 +587 -575
- 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 v, watchEffect as he, reactive as de, onUnmounted as kt, onDeactivated as Et, onMounted as zt, provide as Kt, inject as Yt, defineComponent as ae, createVNode as i, Fragment as Ie, nextTick as Lt, mergeProps as U, createTextVNode as pe, renderSlot as At, isVNode as Ce, cloneVNode as Vt, toRef as Z, toRaw as Me } from "vue";
|
|
2
|
+
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
|
-
var w,
|
|
40
|
-
return (
|
|
47
|
+
var w, m;
|
|
48
|
+
return (m = (w = n.value) == null ? void 0 : w.setPageAndReload) == null ? void 0 : m.call(w, u, l, s, r);
|
|
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(() => v(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 =
|
|
553
|
-
var
|
|
560
|
+
const u = S(() => {
|
|
561
|
+
var m;
|
|
554
562
|
if (te(t.value) && !t.value)
|
|
555
563
|
return !1;
|
|
556
|
-
const s = ze(e,
|
|
564
|
+
const s = ze(e, v(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
|
-
...
|
|
582
|
+
...v(o),
|
|
575
583
|
...r || {}
|
|
576
584
|
};
|
|
577
|
-
return (
|
|
585
|
+
return (m = t.value) != null && m.showTotal || (w.showTotal = (g) => `共${g < w.pageSize ? 1 : Math.ceil(g / (w.pageSize || 10))}页 ${g}条记录`), w;
|
|
578
586
|
});
|
|
579
587
|
function l(s) {
|
|
580
|
-
const r =
|
|
581
|
-
Object.assign(
|
|
588
|
+
const r = v(u);
|
|
589
|
+
Object.assign(o, {
|
|
582
590
|
...r || {},
|
|
583
591
|
...s
|
|
584
592
|
});
|
|
@@ -588,138 +596,139 @@ 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
|
-
var
|
|
595
|
-
return (
|
|
596
|
-
}, (
|
|
597
|
-
t.value =
|
|
602
|
+
var m;
|
|
603
|
+
return (m = n.value) == null ? void 0 : m.selectedRowKeys;
|
|
604
|
+
}, (m) => {
|
|
605
|
+
t.value = Ht([...m || []]);
|
|
598
606
|
}, {
|
|
599
607
|
deep: !0,
|
|
600
608
|
immediate: !0
|
|
601
609
|
});
|
|
602
|
-
const u = (
|
|
603
|
-
e.value && (g ?
|
|
610
|
+
const u = (m, g) => {
|
|
611
|
+
e.value && (g ? m != null && m[e.value] && (t.value.push(m[e.value]), o.value.push(m)) : (t.value = t.value.filter((y) => y !== m[e.value]), o.value = o.value.filter((y) => y[e.value] !== m[e.value])));
|
|
604
612
|
}, l = () => {
|
|
605
|
-
var
|
|
606
|
-
|
|
613
|
+
var m, g;
|
|
614
|
+
n.value && ((g = (m = n.value) == null ? void 0 : m.onChange) == null || g.call(m, t.value, o.value));
|
|
607
615
|
};
|
|
608
616
|
return {
|
|
609
617
|
selectedKey: t,
|
|
618
|
+
selectedItem: o,
|
|
610
619
|
selectRowKey: u,
|
|
611
|
-
selectAllRowKey: (
|
|
612
|
-
e.value && (
|
|
620
|
+
selectAllRowKey: (m, g, y) => {
|
|
621
|
+
e.value && (m ? g.map((c) => (t.value.every((b) => b !== (c == null ? void 0 : c[e.value])) && c != null && c[e.value] && (t.value.push(c[e.value]), o.value.push(c)), c)) : y.map((c) => (t.value.some((b) => b === (c == null ? void 0 : c[e.value])) && (t.value = t.value.filter((b) => b !== c[e.value]), o.value = o.value.filter((b) => b[e.value] !== c[e.value])), c)));
|
|
613
622
|
},
|
|
614
|
-
removeRowKeys: (
|
|
615
|
-
t.value = t.value.filter((g) => !
|
|
623
|
+
removeRowKeys: (m) => {
|
|
624
|
+
t.value = t.value.filter((g) => !m.includes(g)), o.value = o.value.filter((g) => !m.includes(g == null ? void 0 : g[e.value || ""])), l();
|
|
616
625
|
},
|
|
617
626
|
changeRowKey: l,
|
|
618
|
-
syncSelectedRows: (
|
|
619
|
-
if (e.value && t.value.length !==
|
|
620
|
-
const g =
|
|
621
|
-
|
|
622
|
-
y.includes(c[e.value]) &&
|
|
627
|
+
syncSelectedRows: (m) => {
|
|
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));
|
|
630
|
+
m.forEach((c) => {
|
|
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
|
-
var
|
|
636
|
-
(
|
|
644
|
+
var m;
|
|
645
|
+
(m = r[0]) != null && m.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: m, removeRowKeys: g, syncSelectedRows: y, formParamsRef: c, setPagination: b, getPaginationInfo: d, onBeforeSearchSubmit: f, hasCustomRender: x }, $) {
|
|
666
|
+
const T = O(), P = O(!0), D = O(!1), Y = O(!1), j = O([]), L = O(), G = Fa(async (h) => {
|
|
658
667
|
L.value && clearTimeout(L.value);
|
|
659
|
-
const N = await I(
|
|
668
|
+
const N = await I(h), A = Wt(e.value, N);
|
|
660
669
|
return A && !T.value && (L.value = setTimeout(() => {
|
|
661
|
-
G.run({ ...
|
|
670
|
+
G.run({ ...h, 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 (
|
|
682
|
-
return
|
|
683
|
-
const
|
|
684
|
-
return !
|
|
685
|
-
}), H =
|
|
686
|
-
function a(
|
|
687
|
-
Y.value =
|
|
689
|
+
const M = S(() => {
|
|
690
|
+
if (x.value)
|
|
691
|
+
return v(j);
|
|
692
|
+
const h = v(s).filter((N) => N.show || N.show === void 0);
|
|
693
|
+
return !v(j) || !h || h.length === 0 ? [] : v(j);
|
|
694
|
+
}), H = S(() => v(j).some((h) => h.children && h.children.length > 0));
|
|
695
|
+
function a(h) {
|
|
696
|
+
Y.value = h;
|
|
688
697
|
}
|
|
689
|
-
function p(
|
|
690
|
-
G.run({ pagination:
|
|
698
|
+
function p(h, N, A, K) {
|
|
699
|
+
G.run({ pagination: h, filters: N, sorter: A, extra: K, isPolling: !1 }), $("change", h, N, A, K);
|
|
691
700
|
}
|
|
692
|
-
const I = async (
|
|
701
|
+
const I = async (h = {}) => {
|
|
693
702
|
var Se, xe, we;
|
|
694
|
-
const { pagination: N, filters: A = {}, sorter: K = {}, removeKeys: ve = [], isPolling: Oe = !1 } =
|
|
695
|
-
if (!
|
|
696
|
-
return
|
|
697
|
-
if (D.value = !0, !Oe ||
|
|
703
|
+
const { pagination: N, filters: A = {}, sorter: K = {}, removeKeys: ve = [], isPolling: Oe = !1 } = h;
|
|
704
|
+
if (!v(n) || !$e(v(n)) || v(u) && r.value || D.value)
|
|
705
|
+
return o.value || [];
|
|
706
|
+
if (D.value = !0, !Oe || v(u) || P.value ? w(!0) : a(!0), v(u)) {
|
|
698
707
|
P.value = !1, D.value = !1;
|
|
699
708
|
return;
|
|
700
709
|
}
|
|
701
710
|
N && b(N);
|
|
702
711
|
try {
|
|
703
712
|
let le = {};
|
|
704
|
-
if (te(N) && !N || te(
|
|
713
|
+
if (te(N) && !N || te(d))
|
|
705
714
|
le = {};
|
|
706
715
|
else {
|
|
707
|
-
const { current:
|
|
708
|
-
le.pageNum =
|
|
716
|
+
const { current: k = 1, pageSize: se = 10, total: q } = v(d) || {};
|
|
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) ? m(v(s).map((q) => (q.dataIndex === se ? q.sortOrder = k == null ? void 0 : k.order : q.sortOrder = null, q))) : k && m(v(s).map((q) => (q.dataIndex === se && (q.sortOrder = null), q)));
|
|
713
722
|
});
|
|
714
723
|
let fe = {
|
|
715
724
|
...le || {},
|
|
716
|
-
...
|
|
725
|
+
...h.params,
|
|
717
726
|
...c
|
|
718
727
|
};
|
|
719
|
-
|
|
728
|
+
f && $e(f) && (fe = await f(fe, K, A));
|
|
720
729
|
let V = [];
|
|
721
|
-
const ne = await ((Se =
|
|
722
|
-
return D.value = !1, ne && ne.success ? (V = ne.data || [],
|
|
730
|
+
const ne = await ((Se = v(n)) == null ? void 0 : Se(fe, K, A));
|
|
731
|
+
return D.value = !1, ne && ne.success ? (V = ne.data || [], v(t) && $e(v(t)) && (V = await ((xe = v(t)) == null ? void 0 : xe(V))), y(V), (ne.total || (V == null ? void 0 : V.length) || 0) !== ((we = v(d)) == null ? void 0 : we.total) && b({
|
|
723
732
|
total: ne.total || (V == null ? void 0 : V.length) || 0
|
|
724
733
|
}), F(V), V) : [];
|
|
725
734
|
} catch (le) {
|
|
@@ -729,20 +738,20 @@ function Ia({ polling: e, request: o, postData: t, dataSource: n, waitRequest: u
|
|
|
729
738
|
}
|
|
730
739
|
return [];
|
|
731
740
|
};
|
|
732
|
-
function F(
|
|
733
|
-
const N =
|
|
741
|
+
function F(h) {
|
|
742
|
+
const N = Gt(J(h), v(d.value));
|
|
734
743
|
nt(N, j.value) || (j.value = N);
|
|
735
744
|
}
|
|
736
|
-
function B({ key:
|
|
745
|
+
function B({ key: h, params: N, type: A = "update" }) {
|
|
737
746
|
switch (A) {
|
|
738
747
|
case "update":
|
|
739
|
-
j.value = j.value.map((K) =>
|
|
748
|
+
j.value = j.value.map((K) => h && N[h] === K[h] ? { ...K, ...N } : K);
|
|
740
749
|
break;
|
|
741
750
|
case "add":
|
|
742
751
|
j.value.push(N);
|
|
743
752
|
break;
|
|
744
753
|
case "delete":
|
|
745
|
-
j.value = j.value.filter((K) =>
|
|
754
|
+
j.value = j.value.filter((K) => h ? h && N[h] !== K[h] : !0);
|
|
746
755
|
break;
|
|
747
756
|
}
|
|
748
757
|
}
|
|
@@ -752,60 +761,60 @@ function Ia({ polling: e, request: o, postData: t, dataSource: n, waitRequest: u
|
|
|
752
761
|
reSetDataList: F,
|
|
753
762
|
changeDataValue: B,
|
|
754
763
|
handleTableChange: p,
|
|
755
|
-
reload: async (
|
|
756
|
-
|
|
764
|
+
reload: async (h) => {
|
|
765
|
+
v(n) ? await G.run({ ...h, 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
|
-
|
|
774
|
-
|
|
782
|
+
zt(() => {
|
|
783
|
+
m("all");
|
|
775
784
|
}), X(() => t.value, () => {
|
|
776
|
-
|
|
785
|
+
m("params");
|
|
777
786
|
}, {
|
|
778
787
|
deep: !0
|
|
779
|
-
}), X(() =>
|
|
780
|
-
|
|
788
|
+
}), X(() => n.value, () => {
|
|
789
|
+
m("searchMap");
|
|
781
790
|
}, {
|
|
782
791
|
deep: !0
|
|
783
|
-
}), X(() =>
|
|
784
|
-
|
|
792
|
+
}), X(() => o.value, () => {
|
|
793
|
+
m("columns");
|
|
785
794
|
}, {
|
|
786
795
|
deep: !0
|
|
787
796
|
});
|
|
788
|
-
const
|
|
789
|
-
var b,
|
|
797
|
+
const m = (y) => {
|
|
798
|
+
var b, d;
|
|
790
799
|
const c = [];
|
|
791
|
-
if ((y === "all" || y === "searchMap") && ((b =
|
|
792
|
-
r.value.some((
|
|
793
|
-
...
|
|
794
|
-
...
|
|
795
|
-
} :
|
|
796
|
-
})), (y === "all" || y === "columns") && ((
|
|
797
|
-
|
|
798
|
-
}), c.forEach((
|
|
799
|
-
r.value.some((
|
|
800
|
-
...
|
|
801
|
-
...
|
|
802
|
-
} :
|
|
800
|
+
if ((y === "all" || y === "searchMap") && ((b = n.value) == null || b.forEach((f) => c.push(f)), c.forEach((f) => {
|
|
801
|
+
r.value.some((x) => x.name === f.name) ? r.value = r.value.map((x) => x.name === f.name ? {
|
|
802
|
+
...x,
|
|
803
|
+
...f
|
|
804
|
+
} : x) : r.value.push(f);
|
|
805
|
+
})), (y === "all" || y === "columns") && ((d = o.value) != null && d.length) && (o.value && o.value.forEach((f) => {
|
|
806
|
+
f.searchConfig && c.push(f.searchConfig);
|
|
807
|
+
}), c.forEach((f) => {
|
|
808
|
+
r.value.some((x) => x.name === f.name) ? r.value = r.value.map((x) => x.name === f.name ? {
|
|
809
|
+
...x,
|
|
810
|
+
...f
|
|
811
|
+
} : x) : r.value.push(f);
|
|
803
812
|
})), y === "all" || y === "searchMap" || y === "columns") {
|
|
804
813
|
u({ current: 1 });
|
|
805
|
-
const
|
|
806
|
-
Object.assign(s, { ...
|
|
807
|
-
for (const
|
|
808
|
-
l[
|
|
814
|
+
const f = Oa(c);
|
|
815
|
+
Object.assign(s, { ...f });
|
|
816
|
+
for (const x in f)
|
|
817
|
+
l[x] || (l[x] = f[x]);
|
|
809
818
|
}
|
|
810
819
|
(y === "all" || y === "params") && !w.value && (u({ current: 1 }), Object.assign(l, t.value));
|
|
811
820
|
};
|
|
@@ -814,119 +823,119 @@ 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
|
-
(g =
|
|
822
|
-
const
|
|
823
|
-
|
|
830
|
+
(g = v(e)) == null || g.forEach(({ show: y, key: c, fixed: b }, d) => {
|
|
831
|
+
const f = ot(c, d);
|
|
832
|
+
f && (s[f] = { show: y === void 0 ? !0 : y, fixed: b });
|
|
824
833
|
});
|
|
825
834
|
}, {
|
|
826
835
|
deep: !0,
|
|
827
836
|
immediate: !0
|
|
828
837
|
}), X(() => e.value, () => {
|
|
829
|
-
const g =
|
|
830
|
-
|
|
838
|
+
const g = v(e).map((y) => y.key);
|
|
839
|
+
m(g);
|
|
831
840
|
}, {
|
|
832
841
|
deep: !0,
|
|
833
842
|
immediate: !0
|
|
834
843
|
}), he(() => {
|
|
835
844
|
var y;
|
|
836
845
|
const g = {
|
|
837
|
-
...(y =
|
|
838
|
-
...
|
|
846
|
+
...(y = v(n)) == null ? void 0 : y.value,
|
|
847
|
+
...v(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
|
-
function
|
|
854
|
+
function m(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
|
-
setSortKeyColumns:
|
|
863
|
+
setSortKeyColumns: m
|
|
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(
|
|
884
|
+
s.value = J(g(v(n))), r.value = J(g(v(n)));
|
|
876
885
|
}, {
|
|
877
886
|
deep: !0,
|
|
878
887
|
immediate: !0
|
|
879
888
|
});
|
|
880
|
-
const w =
|
|
881
|
-
const
|
|
889
|
+
const w = S(() => {
|
|
890
|
+
const d = m(v(s).filter(($) => $.fixed === "left")), f = m(v(s).filter(($) => $.fixed !== "left" && $.fixed !== "right")), x = m(v(s).filter(($) => $.fixed === "right"));
|
|
882
891
|
return [
|
|
883
|
-
...m,
|
|
884
892
|
...d,
|
|
885
|
-
...
|
|
893
|
+
...f,
|
|
894
|
+
...x
|
|
886
895
|
];
|
|
887
896
|
});
|
|
888
|
-
function
|
|
889
|
-
return
|
|
897
|
+
function m(d) {
|
|
898
|
+
return d.sort((f, x) => qt(f, x, "order", 0));
|
|
890
899
|
}
|
|
891
|
-
function g(
|
|
892
|
-
return J(
|
|
900
|
+
function g(d) {
|
|
901
|
+
return J(d).map((f, x) => {
|
|
893
902
|
var $;
|
|
894
|
-
if (
|
|
895
|
-
return
|
|
896
|
-
if (
|
|
897
|
-
if (($ =
|
|
898
|
-
|
|
903
|
+
if (f.dataIndex === "action" || x === d.length - 1 ? f.resizable = !1 : f.resizable = te(f.resizable) ? f.resizable : !!(ut(f.width) && v(o)), !f.width || v(l))
|
|
904
|
+
return f;
|
|
905
|
+
if (f.dataIndex === "action" && v(u))
|
|
906
|
+
if (($ = v(e)) != null && $.x || !v(t))
|
|
907
|
+
f.width = f.width || 100, f.fixed = "right";
|
|
899
908
|
else {
|
|
900
|
-
const T =
|
|
901
|
-
|
|
909
|
+
const T = v(n).find((P) => P.dataIndex === f.dataIndex);
|
|
910
|
+
f.width = (T == null ? void 0 : T.width) || "", f.fixed = T == null ? void 0 : T.fixed;
|
|
902
911
|
}
|
|
903
|
-
return
|
|
912
|
+
return f;
|
|
904
913
|
});
|
|
905
914
|
}
|
|
906
|
-
function y(
|
|
907
|
-
s.value = s.value.map((
|
|
915
|
+
function y(d, f) {
|
|
916
|
+
s.value = s.value.map((x) => (x.uuid === f.uuid && (x.width = d), x));
|
|
908
917
|
}
|
|
909
|
-
function c(
|
|
910
|
-
if (
|
|
918
|
+
function c(d) {
|
|
919
|
+
if (d.length <= 0) {
|
|
911
920
|
s.value = [];
|
|
912
921
|
return;
|
|
913
922
|
}
|
|
914
|
-
nt(g(J(
|
|
923
|
+
nt(g(J(d)), s.value) || (s.value = g(J(d)));
|
|
915
924
|
}
|
|
916
|
-
function b(
|
|
917
|
-
let
|
|
918
|
-
|
|
925
|
+
function b(d) {
|
|
926
|
+
let f = J(n.value);
|
|
927
|
+
f = f.map((x) => {
|
|
919
928
|
var T, P, D;
|
|
920
|
-
const $ =
|
|
921
|
-
show: (T =
|
|
922
|
-
fixed: (P =
|
|
923
|
-
order: (D =
|
|
929
|
+
const $ = x.key ? {
|
|
930
|
+
show: (T = d[x.key]) == null ? void 0 : T.show,
|
|
931
|
+
fixed: (P = d[x.key]) == null ? void 0 : P.fixed,
|
|
932
|
+
order: (D = d[x.key]) == null ? void 0 : D.order
|
|
924
933
|
} : {};
|
|
925
934
|
return {
|
|
926
|
-
...
|
|
935
|
+
...x,
|
|
927
936
|
...$
|
|
928
937
|
};
|
|
929
|
-
}), c(
|
|
938
|
+
}), c(f);
|
|
930
939
|
}
|
|
931
940
|
return {
|
|
932
941
|
breakpoint: t,
|
|
@@ -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
|
|
953
|
-
var c, b,
|
|
954
|
-
return
|
|
955
|
-
}), g =
|
|
960
|
+
function ka({ scroll: e, columns: n, autoScroll: t, modalScroll: o, neverScroll: u, rowSelection: l, screens: s, innerWidth: r, scrollBreakpoint: w }) {
|
|
961
|
+
const m = S(() => {
|
|
962
|
+
var c, b, d;
|
|
963
|
+
return v(w) ? ut(v(w)) ? r.value > v(w) : Ut(v(w)) ? (c = s.value) == null ? void 0 : c[v(w)] : (b = s.value) == null ? void 0 : b.xl : (d = s.value) == null ? void 0 : d.xl;
|
|
964
|
+
}), g = S(() => {
|
|
956
965
|
let c = 0;
|
|
957
|
-
const b =
|
|
958
|
-
|
|
966
|
+
const b = v(l) ? 60 : 0, d = 150, f = J(v(n));
|
|
967
|
+
f.forEach((T) => {
|
|
959
968
|
c += Number.parseInt(T.width) || 0;
|
|
960
969
|
});
|
|
961
|
-
const $ =
|
|
962
|
-
return $ !== 0 && (c += $ *
|
|
970
|
+
const $ = f.filter((T) => !Reflect.has(T, "width")).length;
|
|
971
|
+
return $ !== 0 && (c += $ * d), b && (c += b), c;
|
|
963
972
|
});
|
|
964
|
-
return { getScrollRef:
|
|
973
|
+
return { getScrollRef: S(() => {
|
|
965
974
|
var c, b;
|
|
966
|
-
return
|
|
967
|
-
y: ((c =
|
|
968
|
-
} :
|
|
969
|
-
}), breakpoint:
|
|
975
|
+
return v(u) ? {} : v(e) && Object.keys(v(e)).length ? v(e) : v(o) ? {
|
|
976
|
+
y: ((c = v(e)) == null ? void 0 : c.y) || ((b = s.value) != null && b.xl ? 400 : 235)
|
|
977
|
+
} : v(t) ? m.value ? {} : te(m.value) ? { x: v(g) } : {} : {};
|
|
978
|
+
}), breakpoint: m };
|
|
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
|
-
changeFormState:
|
|
1062
|
-
} =
|
|
1070
|
+
changeFormState: m
|
|
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,9 +1092,9 @@ const Ka = (e) => ({
|
|
|
1083
1092
|
}, {
|
|
1084
1093
|
value: "xs",
|
|
1085
1094
|
span: 1
|
|
1086
|
-
}],
|
|
1095
|
+
}], d = S(() => {
|
|
1087
1096
|
var a;
|
|
1088
|
-
return
|
|
1097
|
+
return f((a = e.search) == null ? void 0 : a.span);
|
|
1089
1098
|
});
|
|
1090
1099
|
X(() => {
|
|
1091
1100
|
var a;
|
|
@@ -1093,7 +1102,7 @@ const Ka = (e) => ({
|
|
|
1093
1102
|
}, (a) => {
|
|
1094
1103
|
g.value = g.value || !!a;
|
|
1095
1104
|
});
|
|
1096
|
-
const
|
|
1105
|
+
const f = (a) => {
|
|
1097
1106
|
let p = 4;
|
|
1098
1107
|
for (let I = 0; I < b.length; I += 1) {
|
|
1099
1108
|
const F = b[I].value;
|
|
@@ -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,
|
|
@@ -1115,25 +1124,25 @@ const Ka = (e) => ({
|
|
|
1115
1124
|
var I, F, B;
|
|
1116
1125
|
switch (p.valueType) {
|
|
1117
1126
|
case "text":
|
|
1118
|
-
|
|
1127
|
+
m(p.name || "", a || p.initialValue || "");
|
|
1119
1128
|
break;
|
|
1120
1129
|
case "select":
|
|
1121
|
-
|
|
1130
|
+
m(p.name || "", a || a === 0 ? a : p.initialValue || void 0);
|
|
1122
1131
|
break;
|
|
1123
1132
|
case "treeSelect":
|
|
1124
|
-
|
|
1133
|
+
m(p.name || "", a || a === 0 ? a : p.initialValue || ((I = p.field) != null && I.treeCheckable || (F = p.field) != null && F.multiple ? [] : null));
|
|
1125
1134
|
break;
|
|
1126
1135
|
case "date":
|
|
1127
|
-
|
|
1136
|
+
m(p.name || "", a ? _(a).format(p.valueFormat || "YYYY-MM-DD") : p.initialValue || null);
|
|
1128
1137
|
break;
|
|
1129
1138
|
case "dateMonth":
|
|
1130
|
-
|
|
1139
|
+
m(p.name || "", a ? _(a).format("YYYY-MM") : p.initialValue || null);
|
|
1131
1140
|
break;
|
|
1132
1141
|
case "dateRange":
|
|
1133
|
-
|
|
1142
|
+
m(p.name || "", a && a.length > 0 ? [_(a[0]).format(p.valueFormat || "YYYY-MM-DD"), _(a[1]).format(p.valueFormat || "YYYY-MM-DD")] : p.initialValue || null);
|
|
1134
1143
|
break;
|
|
1135
1144
|
case "time":
|
|
1136
|
-
|
|
1145
|
+
m(p.name || "", a ? _(a).format(p.valueFormat || "HH:mm:ss") : p.initialValue || null);
|
|
1137
1146
|
break;
|
|
1138
1147
|
}
|
|
1139
1148
|
(B = e.search) != null && B.showSearch || p.valueType === "text" || (p.valueType === "treeSelect" || p.valueType, D());
|
|
@@ -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;
|
|
@@ -1199,12 +1208,12 @@ const Ka = (e) => ({
|
|
|
1199
1208
|
value: r[a.name],
|
|
1200
1209
|
placeholder: a.placeholder || "请输入",
|
|
1201
1210
|
allowClear: a.allowClear || a.allowClear === !1 ? a.allowClear : !0,
|
|
1202
|
-
onChange: (
|
|
1203
|
-
onSearch: (
|
|
1211
|
+
onChange: (h) => T(h.target.value, a),
|
|
1212
|
+
onSearch: (h) => D()
|
|
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
|
},
|
|
@@ -1213,19 +1222,19 @@ const Ka = (e) => ({
|
|
|
1213
1222
|
placeholder: a.placeholder || "请选择",
|
|
1214
1223
|
showSearch: a.showSearch,
|
|
1215
1224
|
allowClear: a.allowClear || a.allowClear === !1 ? a.allowClear : !0,
|
|
1216
|
-
getPopupContainer: (
|
|
1225
|
+
getPopupContainer: (h) => h && h.parentNode ? h.parentNode : h,
|
|
1217
1226
|
notFoundContent: a.loading === void 0 ? void 0 : a.loading ? i(Le, {
|
|
1218
1227
|
size: "small"
|
|
1219
1228
|
}, null) : void 0,
|
|
1220
|
-
onChange: (
|
|
1221
|
-
options: (F = a == null ? void 0 : a.valueEnum) == null ? void 0 : F.map((
|
|
1222
|
-
label:
|
|
1223
|
-
value:
|
|
1229
|
+
onChange: (h) => T(h, a),
|
|
1230
|
+
options: (F = a == null ? void 0 : a.valueEnum) == null ? void 0 : F.map((h) => ({
|
|
1231
|
+
label: h.text,
|
|
1232
|
+
value: h.value
|
|
1224
1233
|
}))
|
|
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
|
},
|
|
@@ -1233,11 +1242,11 @@ const Ka = (e) => ({
|
|
|
1233
1242
|
placeholder: a.placeholder || "请选择",
|
|
1234
1243
|
allowClear: a.allowClear || a.allowClear === !1 ? a.allowClear : !0,
|
|
1235
1244
|
treeData: a.valueEnum,
|
|
1236
|
-
getPopupContainer: (
|
|
1245
|
+
getPopupContainer: (h) => h && h.parentNode ? h.parentNode : h,
|
|
1237
1246
|
notFoundContent: a.loading === void 0 ? void 0 : a.loading ? i(Le, {
|
|
1238
1247
|
size: "small"
|
|
1239
1248
|
}, null) : void 0,
|
|
1240
|
-
onChange: (
|
|
1249
|
+
onChange: (h) => T(h, a)
|
|
1241
1250
|
}, a.field || {}), null);
|
|
1242
1251
|
break;
|
|
1243
1252
|
case "date":
|
|
@@ -1246,51 +1255,51 @@ const Ka = (e) => ({
|
|
|
1246
1255
|
width: "100%"
|
|
1247
1256
|
},
|
|
1248
1257
|
value: r[a.name] ? _(r[a.name], a.valueFormat || "YYYY-MM-DD") : void 0,
|
|
1249
|
-
getPopupContainer: (
|
|
1258
|
+
getPopupContainer: (h) => h && h.parentNode ? h.parentNode : h,
|
|
1250
1259
|
placeholder: a.placeholder || "请选择",
|
|
1251
1260
|
allowClear: a.allowClear || a.allowClear === !1 ? a.allowClear : !0,
|
|
1252
1261
|
format: a.valueFormat || "YYYY-MM-DD",
|
|
1253
1262
|
showTime: a.showTime,
|
|
1254
1263
|
showToday: a.showToday || !0,
|
|
1255
|
-
onChange: (
|
|
1264
|
+
onChange: (h) => T(h, a)
|
|
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
|
},
|
|
1263
1272
|
value: r[a.name] ? _(r[a.name], a.valueFormat || "YYYY-MM") : void 0,
|
|
1264
|
-
getPopupContainer: (
|
|
1273
|
+
getPopupContainer: (h) => h && h.parentNode ? h.parentNode : h,
|
|
1265
1274
|
placeholder: a.placeholder || "请选择",
|
|
1266
|
-
onChange: (
|
|
1275
|
+
onChange: (h) => T(h, a)
|
|
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
|
},
|
|
1274
1283
|
value: (B = r[a.name]) != null && B.length ? [_(r[a.name][0], a.valueFormat || "YYYY-MM-DD HH:mm:ss"), _(r[a.name][1], a.valueFormat || "YYYY-MM-DD HH:mm:ss")] : void 0,
|
|
1275
|
-
getPopupContainer: (
|
|
1284
|
+
getPopupContainer: (h) => h && h.parentNode ? h.parentNode : h,
|
|
1276
1285
|
placeholder: a.placeholder || ["开始日期", "结束日期"],
|
|
1277
1286
|
format: a.valueFormat || "YYYY-MM-DD HH:mm:ss",
|
|
1278
1287
|
showTime: a.showTime,
|
|
1279
|
-
onChange: (
|
|
1288
|
+
onChange: (h) => T(h, a)
|
|
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
|
},
|
|
1287
1296
|
value: r[a.name] ? _(r[a.name], a.valueFormat || "HH:mm:ss") : void 0,
|
|
1288
|
-
getPopupContainer: (
|
|
1297
|
+
getPopupContainer: (h) => h && h.parentNode ? h.parentNode : h,
|
|
1289
1298
|
placeholder: a.placeholder || "请选择",
|
|
1290
1299
|
allowClear: a.allowClear || a.allowClear === !1 ? a.allowClear : !0,
|
|
1291
1300
|
use12Hours: a.use12Hours,
|
|
1292
1301
|
format: a.valueFormat || "HH:mm:ss",
|
|
1293
|
-
onChange: (
|
|
1302
|
+
onChange: (h) => T(h, a)
|
|
1294
1303
|
}, a.field || {}), null);
|
|
1295
1304
|
break;
|
|
1296
1305
|
}
|
|
@@ -1308,10 +1317,10 @@ const Ka = (e) => ({
|
|
|
1308
1317
|
const a = [...e.searchMap, ...((p = t.default) == null ? void 0 : p.call(t)) || []];
|
|
1309
1318
|
return a.map((I, F) => {
|
|
1310
1319
|
const B = {
|
|
1311
|
-
width: `${(100 - (
|
|
1312
|
-
},
|
|
1313
|
-
return a.length <
|
|
1314
|
-
formItemStyle:
|
|
1320
|
+
width: `${(100 - (d.value - 1) * 2) / d.value}%`
|
|
1321
|
+
}, h = $(F, d.value, B);
|
|
1322
|
+
return a.length < d.value || g.value ? i(Ie, null, [M({
|
|
1323
|
+
formItemStyle: h,
|
|
1315
1324
|
item: I
|
|
1316
1325
|
}), F === a.length - 1 && L({
|
|
1317
1326
|
formItemStyle: {
|
|
@@ -1320,19 +1329,19 @@ const Ka = (e) => ({
|
|
|
1320
1329
|
},
|
|
1321
1330
|
advanced: g.value,
|
|
1322
1331
|
showAdvanced: g.value
|
|
1323
|
-
})]) : i(Ie, null, [F <
|
|
1324
|
-
formItemStyle:
|
|
1332
|
+
})]) : i(Ie, null, [F < d.value - 1 && M({
|
|
1333
|
+
formItemStyle: h,
|
|
1325
1334
|
item: I
|
|
1326
|
-
}), F ===
|
|
1327
|
-
formItemStyle:
|
|
1335
|
+
}), F === d.value - 1 && (d.value - 1 === 0 || a.length === d.value) && M({
|
|
1336
|
+
formItemStyle: h,
|
|
1328
1337
|
item: I
|
|
1329
|
-
}), F ===
|
|
1338
|
+
}), F === d.value - 1 && a.length !== d.value && L({
|
|
1330
1339
|
formItemStyle: {
|
|
1331
1340
|
flex: 1,
|
|
1332
1341
|
justifyContent: "flex-end"
|
|
1333
1342
|
},
|
|
1334
1343
|
advanced: !1,
|
|
1335
|
-
showAdvanced: a.length >=
|
|
1344
|
+
showAdvanced: a.length >= d.value
|
|
1336
1345
|
})]);
|
|
1337
1346
|
});
|
|
1338
1347
|
};
|
|
@@ -1341,36 +1350,36 @@ const Ka = (e) => ({
|
|
|
1341
1350
|
return u(i("div", {
|
|
1342
1351
|
class: {
|
|
1343
1352
|
[`${l.value}`]: !0,
|
|
1344
|
-
[`${
|
|
1353
|
+
[`${v(e.prefixCls)}-search`]: !0,
|
|
1345
1354
|
[`${(a = e.search) == null ? void 0 : a.className}`]: (p = e.search) == null ? void 0 : p.className
|
|
1346
1355
|
}
|
|
1347
1356
|
}, [i(et, {
|
|
1348
|
-
class: `${
|
|
1357
|
+
class: `${v(e.prefixCls)}-form ${l.value}`,
|
|
1349
1358
|
layout: "horizontal"
|
|
1350
1359
|
}, {
|
|
1351
1360
|
default: () => [i("div", {
|
|
1352
|
-
class: `${
|
|
1361
|
+
class: `${v(e.prefixCls)}-form-container ${l.value}`
|
|
1353
1362
|
}, [H()])]
|
|
1354
1363
|
})]));
|
|
1355
1364
|
};
|
|
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"]: {
|
|
@@ -1454,9 +1463,9 @@ const be = (e) => {
|
|
|
1454
1463
|
}
|
|
1455
1464
|
}), Ne = ({
|
|
1456
1465
|
title: e,
|
|
1457
|
-
show:
|
|
1466
|
+
show: n,
|
|
1458
1467
|
treeKey: t,
|
|
1459
|
-
fixed:
|
|
1468
|
+
fixed: o
|
|
1460
1469
|
}, {
|
|
1461
1470
|
slots: u
|
|
1462
1471
|
}) => {
|
|
@@ -1464,23 +1473,23 @@ const be = (e) => {
|
|
|
1464
1473
|
cacheColumns: l,
|
|
1465
1474
|
settingsAction: s
|
|
1466
1475
|
} = ie();
|
|
1467
|
-
return
|
|
1476
|
+
return n ? i(ee, {
|
|
1468
1477
|
title: e
|
|
1469
1478
|
}, {
|
|
1470
1479
|
default: () => {
|
|
1471
1480
|
var r;
|
|
1472
1481
|
return [i("span", {
|
|
1473
1482
|
onClick: (w) => {
|
|
1474
|
-
var b,
|
|
1483
|
+
var b, d;
|
|
1475
1484
|
w.stopPropagation(), w.preventDefault();
|
|
1476
|
-
const
|
|
1477
|
-
if (typeof g.disable == "boolean" ? g.disable : (
|
|
1485
|
+
const m = ((b = v(l).find((f) => f.uuid === t)) == null ? void 0 : b.key) || "", g = (s == null ? void 0 : s.columnsMap[m]) || {};
|
|
1486
|
+
if (typeof g.disable == "boolean" ? g.disable : (d = g.disable) == null ? void 0 : d.icon)
|
|
1478
1487
|
return;
|
|
1479
1488
|
const c = {
|
|
1480
1489
|
...s == null ? void 0 : s.columnsMap,
|
|
1481
|
-
[
|
|
1490
|
+
[m]: {
|
|
1482
1491
|
...g,
|
|
1483
|
-
fixed:
|
|
1492
|
+
fixed: o
|
|
1484
1493
|
}
|
|
1485
1494
|
};
|
|
1486
1495
|
s == null || s.setColumnsMap(c, "fixed");
|
|
@@ -1488,7 +1497,7 @@ const be = (e) => {
|
|
|
1488
1497
|
}, [(r = u.default) == null ? void 0 : r.call(u)])];
|
|
1489
1498
|
}
|
|
1490
1499
|
}) : null;
|
|
1491
|
-
},
|
|
1500
|
+
}, _a = /* @__PURE__ */ ae({
|
|
1492
1501
|
props: {
|
|
1493
1502
|
treeKey: String,
|
|
1494
1503
|
hashId: String,
|
|
@@ -1499,11 +1508,11 @@ const be = (e) => {
|
|
|
1499
1508
|
},
|
|
1500
1509
|
setup(e) {
|
|
1501
1510
|
const {
|
|
1502
|
-
cacheColumns:
|
|
1503
|
-
} = ie(), t =
|
|
1511
|
+
cacheColumns: n
|
|
1512
|
+
} = ie(), t = S(() => {
|
|
1504
1513
|
var u;
|
|
1505
|
-
return ((u =
|
|
1506
|
-
}),
|
|
1514
|
+
return ((u = n.value.find((l) => l.uuid === e.treeKey)) == null ? void 0 : u.key) || "";
|
|
1515
|
+
}), o = S(() => t.value === "action" && e.autoScroll);
|
|
1507
1516
|
return () => {
|
|
1508
1517
|
const u = i("span", {
|
|
1509
1518
|
class: [`${e.className}-list-item-option`, e.hashId]
|
|
@@ -1511,23 +1520,23 @@ const be = (e) => {
|
|
|
1511
1520
|
treeKey: e.treeKey || "",
|
|
1512
1521
|
fixed: "left",
|
|
1513
1522
|
title: "固定在列首",
|
|
1514
|
-
show: e.fixed !== "left" && !
|
|
1523
|
+
show: e.fixed !== "left" && !o.value
|
|
1515
1524
|
}, {
|
|
1516
|
-
default: () => [i(
|
|
1525
|
+
default: () => [i(ha, null, null)]
|
|
1517
1526
|
}), i(Ne, {
|
|
1518
1527
|
treeKey: e.treeKey || "",
|
|
1519
1528
|
fixed: void 0,
|
|
1520
1529
|
title: "不固定",
|
|
1521
|
-
show: !!e.fixed && !
|
|
1530
|
+
show: !!e.fixed && !o.value
|
|
1522
1531
|
}, {
|
|
1523
|
-
default: () => [i(
|
|
1532
|
+
default: () => [i(va, null, null)]
|
|
1524
1533
|
}), i(Ne, {
|
|
1525
1534
|
treeKey: e.treeKey || "",
|
|
1526
1535
|
fixed: "right",
|
|
1527
1536
|
title: "固定在列尾",
|
|
1528
1537
|
show: e.fixed !== "right"
|
|
1529
1538
|
}, {
|
|
1530
|
-
default: () => [i(
|
|
1539
|
+
default: () => [i(ma, null, null)]
|
|
1531
1540
|
})]);
|
|
1532
1541
|
return i("span", {
|
|
1533
1542
|
class: [`${e.className}-list-item`, e.hashId],
|
|
@@ -1552,46 +1561,46 @@ const be = (e) => {
|
|
|
1552
1561
|
}
|
|
1553
1562
|
},
|
|
1554
1563
|
setup(e) {
|
|
1555
|
-
const
|
|
1564
|
+
const n = O(Ye().uuid(15)), t = S(() => e.list && e.list.length > 0), o = O([]), u = O([]), {
|
|
1556
1565
|
cacheColumns: l,
|
|
1557
1566
|
slots: s,
|
|
1558
1567
|
settingsAction: r
|
|
1559
1568
|
} = ie(), w = (c, b) => c.map(({
|
|
1560
|
-
key:
|
|
1561
|
-
children:
|
|
1562
|
-
uuid:
|
|
1569
|
+
key: d,
|
|
1570
|
+
children: f,
|
|
1571
|
+
uuid: x,
|
|
1563
1572
|
...$
|
|
1564
1573
|
}) => {
|
|
1565
1574
|
var Y;
|
|
1566
|
-
const T = (r == null ? void 0 : r.columnsMap[
|
|
1575
|
+
const T = (r == null ? void 0 : r.columnsMap[d || "null"]) || {
|
|
1567
1576
|
show: !0
|
|
1568
1577
|
};
|
|
1569
1578
|
let P = !1;
|
|
1570
|
-
T.show !== !1 && (b == null ? void 0 : b.show) !== !1 && !
|
|
1579
|
+
T.show !== !1 && (b == null ? void 0 : b.show) !== !1 && !f && (P = !0);
|
|
1571
1580
|
const D = {
|
|
1572
|
-
key:
|
|
1573
|
-
...
|
|
1581
|
+
key: x || "",
|
|
1582
|
+
...Ha($, ["dataIndex"]),
|
|
1574
1583
|
checked: P,
|
|
1575
1584
|
selectable: !1,
|
|
1576
1585
|
disabled: T.disable === !0,
|
|
1577
1586
|
disableCheckbox: typeof T.disable == "boolean" ? T.disable : (Y = T.disable) == null ? void 0 : Y.checkbox,
|
|
1578
1587
|
isLeaf: !0
|
|
1579
1588
|
};
|
|
1580
|
-
return
|
|
1589
|
+
return f && (D.children = w(f, T)), D;
|
|
1581
1590
|
});
|
|
1582
1591
|
he(() => {
|
|
1583
1592
|
const c = w(e.list || []);
|
|
1584
|
-
|
|
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));
|
|
1585
1594
|
});
|
|
1586
|
-
const
|
|
1595
|
+
const m = be((c, b, d) => {
|
|
1587
1596
|
var L, G;
|
|
1588
|
-
const
|
|
1597
|
+
const f = ((L = v(l).find((M) => M.uuid === c)) == null ? void 0 : L.key) || "", x = ((G = v(l).find((M) => M.uuid === b)) == null ? void 0 : G.key) || "", $ = {
|
|
1589
1598
|
...r == null ? void 0 : r.columnsMap
|
|
1590
|
-
}, T = [...r.sortKeyColumns.value], P = T.findIndex((M) => M ===
|
|
1599
|
+
}, T = [...r.sortKeyColumns.value], P = T.findIndex((M) => M === f), D = T.findIndex((M) => M === x), Y = d > P;
|
|
1591
1600
|
if (P < 0)
|
|
1592
1601
|
return;
|
|
1593
1602
|
const j = T[P];
|
|
1594
|
-
T.splice(P, 1),
|
|
1603
|
+
T.splice(P, 1), d === 0 ? T.unshift(j) : T.splice(Y ? D : D + 1, 0, j), T.forEach((M, H) => {
|
|
1595
1604
|
$[M] = {
|
|
1596
1605
|
...$[M] || {},
|
|
1597
1606
|
order: H
|
|
@@ -1599,18 +1608,18 @@ const be = (e) => {
|
|
|
1599
1608
|
}), r == null || r.setColumnsMap($, "drop"), r == null || r.setSortKeyColumns(T);
|
|
1600
1609
|
}), g = be((c) => {
|
|
1601
1610
|
var T;
|
|
1602
|
-
const b = c.node.key,
|
|
1603
|
-
...(r == null ? void 0 : r.columnsMap[
|
|
1611
|
+
const b = c.node.key, d = ((T = v(l).find((P) => P.uuid === b)) == null ? void 0 : T.key) || "", x = {
|
|
1612
|
+
...(r == null ? void 0 : r.columnsMap[d]) || {}
|
|
1604
1613
|
};
|
|
1605
|
-
|
|
1614
|
+
x.show = c.checked;
|
|
1606
1615
|
const $ = {
|
|
1607
1616
|
...r == null ? void 0 : r.columnsMap,
|
|
1608
|
-
[
|
|
1617
|
+
[d]: x
|
|
1609
1618
|
};
|
|
1610
1619
|
r == null || r.setColumnsMap($, "show");
|
|
1611
1620
|
}), y = (c) => {
|
|
1612
|
-
const b =
|
|
1613
|
-
return c.title ||
|
|
1621
|
+
const b = v(l).find((d) => d.uuid === c.key);
|
|
1622
|
+
return c.title || At(s, "headerCell", {
|
|
1614
1623
|
title: b.title,
|
|
1615
1624
|
column: b
|
|
1616
1625
|
}, () => [b.title]);
|
|
@@ -1619,43 +1628,43 @@ const be = (e) => {
|
|
|
1619
1628
|
var c, b;
|
|
1620
1629
|
return t.value ? i(Ie, null, [e.showTitle && i("span", {
|
|
1621
1630
|
class: [`${e.className}-list-title`, e.hashId]
|
|
1622
|
-
}, [e.title]), i(
|
|
1623
|
-
key:
|
|
1624
|
-
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,
|
|
1625
1634
|
checkable: e.checkable,
|
|
1626
1635
|
blockNode: !0,
|
|
1627
1636
|
showLine: !1,
|
|
1628
1637
|
checkedKeys: u.value,
|
|
1629
1638
|
height: 280,
|
|
1630
|
-
onDrop: (
|
|
1631
|
-
const
|
|
1639
|
+
onDrop: (d) => {
|
|
1640
|
+
const f = d.node.key, x = d.dragNode.key, {
|
|
1632
1641
|
dropPosition: $,
|
|
1633
1642
|
dropToGap: T
|
|
1634
|
-
} =
|
|
1635
|
-
|
|
1643
|
+
} = d, P = $ === -1 || !T ? $ + 1 : $;
|
|
1644
|
+
m(x, f, P);
|
|
1636
1645
|
},
|
|
1637
|
-
onCheck: (
|
|
1638
|
-
treeData:
|
|
1646
|
+
onCheck: (d, f) => g(f),
|
|
1647
|
+
treeData: o.value
|
|
1639
1648
|
}, {
|
|
1640
|
-
title: (
|
|
1641
|
-
var
|
|
1642
|
-
const
|
|
1643
|
-
...
|
|
1649
|
+
title: (d) => {
|
|
1650
|
+
var x;
|
|
1651
|
+
const f = {
|
|
1652
|
+
...d,
|
|
1644
1653
|
children: void 0,
|
|
1645
|
-
title: y(
|
|
1646
|
-
autoScroll: (
|
|
1654
|
+
title: y(d),
|
|
1655
|
+
autoScroll: (x = r == null ? void 0 : r.autoScroll) == null ? void 0 : x.value
|
|
1647
1656
|
};
|
|
1648
|
-
return i(
|
|
1657
|
+
return i(_a, U({
|
|
1649
1658
|
hashId: e.hashId,
|
|
1650
1659
|
className: e.className
|
|
1651
|
-
},
|
|
1652
|
-
treeKey:
|
|
1660
|
+
}, f, {
|
|
1661
|
+
treeKey: f.key
|
|
1653
1662
|
}), null);
|
|
1654
1663
|
}
|
|
1655
1664
|
})]) : null;
|
|
1656
1665
|
};
|
|
1657
1666
|
}
|
|
1658
|
-
}),
|
|
1667
|
+
}), Ga = /* @__PURE__ */ ae({
|
|
1659
1668
|
props: {
|
|
1660
1669
|
hashId: String,
|
|
1661
1670
|
className: String,
|
|
@@ -1664,31 +1673,31 @@ const be = (e) => {
|
|
|
1664
1673
|
},
|
|
1665
1674
|
setup(e) {
|
|
1666
1675
|
const {
|
|
1667
|
-
columns:
|
|
1668
|
-
} = ie(), t = O([]),
|
|
1669
|
-
X(() =>
|
|
1670
|
-
t.value = [],
|
|
1671
|
-
if (
|
|
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((m) => {
|
|
1680
|
+
if (m.hideInSetting)
|
|
1672
1681
|
return;
|
|
1673
1682
|
const {
|
|
1674
1683
|
fixed: g,
|
|
1675
1684
|
show: y,
|
|
1676
1685
|
uuid: c
|
|
1677
|
-
} =
|
|
1686
|
+
} = m;
|
|
1678
1687
|
if ((y || y === void 0) && c && l.value.push(c), g === "left") {
|
|
1679
|
-
|
|
1688
|
+
o.value.push(m);
|
|
1680
1689
|
return;
|
|
1681
1690
|
}
|
|
1682
1691
|
if (g === "right") {
|
|
1683
|
-
t.value.push(
|
|
1692
|
+
t.value.push(m);
|
|
1684
1693
|
return;
|
|
1685
1694
|
}
|
|
1686
|
-
u.value.push(
|
|
1695
|
+
u.value.push(m);
|
|
1687
1696
|
});
|
|
1688
1697
|
}, {
|
|
1689
1698
|
immediate: !0
|
|
1690
1699
|
});
|
|
1691
|
-
const s =
|
|
1700
|
+
const s = S(() => t.value && t.value.length > 0), r = S(() => o.value && o.value.length > 0);
|
|
1692
1701
|
return () => i("div", {
|
|
1693
1702
|
class: {
|
|
1694
1703
|
[`${e.hashId}`]: !0,
|
|
@@ -1697,7 +1706,7 @@ const be = (e) => {
|
|
|
1697
1706
|
}
|
|
1698
1707
|
}, [i(je, {
|
|
1699
1708
|
title: "固定在左侧",
|
|
1700
|
-
list:
|
|
1709
|
+
list: o.value,
|
|
1701
1710
|
keys: l.value,
|
|
1702
1711
|
hashId: e.hashId,
|
|
1703
1712
|
draggable: e.draggable,
|
|
@@ -1722,7 +1731,7 @@ const be = (e) => {
|
|
|
1722
1731
|
className: e.className
|
|
1723
1732
|
}, null)]);
|
|
1724
1733
|
}
|
|
1725
|
-
}),
|
|
1734
|
+
}), qa = /* @__PURE__ */ ae({
|
|
1726
1735
|
props: {
|
|
1727
1736
|
draggable: {
|
|
1728
1737
|
type: Boolean,
|
|
@@ -1736,27 +1745,27 @@ const be = (e) => {
|
|
|
1736
1745
|
extra: [Function, Object, String, Boolean]
|
|
1737
1746
|
},
|
|
1738
1747
|
setup(e) {
|
|
1739
|
-
const
|
|
1748
|
+
const n = Ve({
|
|
1740
1749
|
suffixCls: "table-column-setting",
|
|
1741
1750
|
isPor: !0
|
|
1742
1751
|
}), {
|
|
1743
1752
|
wrapSSR: t,
|
|
1744
|
-
hashId:
|
|
1745
|
-
} = Pe("ColumnSetting", [
|
|
1753
|
+
hashId: o
|
|
1754
|
+
} = Pe("ColumnSetting", [Wa], n), {
|
|
1746
1755
|
columns: u,
|
|
1747
1756
|
settingsAction: l
|
|
1748
1757
|
} = ie(), s = be((y = !0) => {
|
|
1749
|
-
const c = {}, b = (
|
|
1750
|
-
|
|
1751
|
-
key:
|
|
1752
|
-
fixed:
|
|
1758
|
+
const c = {}, b = (d) => {
|
|
1759
|
+
d.forEach(({
|
|
1760
|
+
key: f,
|
|
1761
|
+
fixed: x,
|
|
1753
1762
|
index: $,
|
|
1754
1763
|
children: T
|
|
1755
1764
|
}) => {
|
|
1756
|
-
const P = ot(
|
|
1765
|
+
const P = ot(f, $);
|
|
1757
1766
|
P && (c[P] = {
|
|
1758
1767
|
show: y,
|
|
1759
|
-
fixed:
|
|
1768
|
+
fixed: x
|
|
1760
1769
|
}), T && b(T);
|
|
1761
1770
|
});
|
|
1762
1771
|
};
|
|
@@ -1765,37 +1774,37 @@ const be = (e) => {
|
|
|
1765
1774
|
y.target.checked ? s() : s(!1);
|
|
1766
1775
|
}), w = be(() => {
|
|
1767
1776
|
l == null || l.setColumnsMap(l == null ? void 0 : l.cacheColumnsMap, "fixed");
|
|
1768
|
-
}),
|
|
1777
|
+
}), m = S(() => (
|
|
1769
1778
|
// @ts-ignore
|
|
1770
1779
|
Object.values(l == null ? void 0 : l.columnsMap).filter((y) => !y || y.show === !1)
|
|
1771
|
-
)), g =
|
|
1772
|
-
return () => t(i(
|
|
1780
|
+
)), g = S(() => v(m).length > 0 && v(m).length !== u.value.length);
|
|
1781
|
+
return () => t(i(aa, {
|
|
1773
1782
|
arrowPointAtCenter: !0,
|
|
1774
1783
|
title: i("div", {
|
|
1775
|
-
class: [`${
|
|
1776
|
-
}, [i(
|
|
1784
|
+
class: [`${n}-title`, o.value]
|
|
1785
|
+
}, [i(la, {
|
|
1777
1786
|
indeterminate: g.value,
|
|
1778
|
-
checked:
|
|
1787
|
+
checked: v(m).length === 0 && v(m).length !== u.value.length,
|
|
1779
1788
|
onChange: (y) => r(y)
|
|
1780
1789
|
}, {
|
|
1781
1790
|
default: () => [pe("列展示")]
|
|
1782
1791
|
}), e.checkedReset ? i("a", {
|
|
1783
1792
|
onClick: w,
|
|
1784
|
-
class: [`${
|
|
1793
|
+
class: [`${n}-action-rest-button`, o.value]
|
|
1785
1794
|
}, [pe("重置")]) : null, e != null && e.extra ? i(oe, {
|
|
1786
1795
|
size: 12,
|
|
1787
1796
|
align: "center"
|
|
1788
1797
|
}, {
|
|
1789
1798
|
default: () => [e.extra]
|
|
1790
1799
|
}) : null]),
|
|
1791
|
-
overlayClassName: `${
|
|
1800
|
+
overlayClassName: `${n}-overlay ${o.value}`,
|
|
1792
1801
|
trigger: "click",
|
|
1793
1802
|
placement: "bottomRight",
|
|
1794
|
-
content: i(
|
|
1795
|
-
hashId:
|
|
1803
|
+
content: i(Ga, {
|
|
1804
|
+
hashId: o.value,
|
|
1796
1805
|
checkable: e.checkable ?? !0,
|
|
1797
1806
|
draggable: e.draggable ?? !0,
|
|
1798
|
-
className:
|
|
1807
|
+
className: n
|
|
1799
1808
|
}, null)
|
|
1800
1809
|
}, {
|
|
1801
1810
|
default: () => [i(ee, {
|
|
@@ -1813,26 +1822,26 @@ const be = (e) => {
|
|
|
1813
1822
|
return () => e.value ? i(ee, {
|
|
1814
1823
|
title: "退出全屏"
|
|
1815
1824
|
}, {
|
|
1816
|
-
default: () => [i(
|
|
1825
|
+
default: () => [i(ga, null, null)]
|
|
1817
1826
|
}) : i(ee, {
|
|
1818
1827
|
title: "全屏"
|
|
1819
1828
|
}, {
|
|
1820
|
-
default: () => [i(
|
|
1829
|
+
default: () => [i(ya, null, null)]
|
|
1821
1830
|
});
|
|
1822
1831
|
}
|
|
1823
|
-
}),
|
|
1832
|
+
}), Ua = () => {
|
|
1824
1833
|
const {
|
|
1825
1834
|
action: e,
|
|
1826
|
-
tableSize:
|
|
1835
|
+
tableSize: n
|
|
1827
1836
|
} = ie();
|
|
1828
|
-
return i(
|
|
1837
|
+
return i(oa, {
|
|
1829
1838
|
overlay: i(Re, {
|
|
1830
|
-
selectedKeys: [
|
|
1839
|
+
selectedKeys: [n.value],
|
|
1831
1840
|
onClick: ({
|
|
1832
1841
|
key: t
|
|
1833
1842
|
}) => {
|
|
1834
|
-
var
|
|
1835
|
-
(
|
|
1843
|
+
var o;
|
|
1844
|
+
(o = e.setTableSize) == null || o.call(e, t);
|
|
1836
1845
|
},
|
|
1837
1846
|
style: {
|
|
1838
1847
|
width: 80
|
|
@@ -1857,10 +1866,10 @@ const be = (e) => {
|
|
|
1857
1866
|
default: () => [i(ee, {
|
|
1858
1867
|
title: "表格密度"
|
|
1859
1868
|
}, {
|
|
1860
|
-
default: () => [i(
|
|
1869
|
+
default: () => [i(pa, null, null)]
|
|
1861
1870
|
})]
|
|
1862
1871
|
});
|
|
1863
|
-
},
|
|
1872
|
+
}, Xa = (e) => ({
|
|
1864
1873
|
[`${e.componentCls}`]: {
|
|
1865
1874
|
lineHeight: 1,
|
|
1866
1875
|
["&-container"]: {
|
|
@@ -1906,20 +1915,20 @@ function lt(e) {
|
|
|
1906
1915
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !Ce(e);
|
|
1907
1916
|
}
|
|
1908
1917
|
const {
|
|
1909
|
-
useBreakpoint:
|
|
1918
|
+
useBreakpoint: Ja
|
|
1910
1919
|
} = He;
|
|
1911
|
-
function
|
|
1920
|
+
function Qa(e) {
|
|
1912
1921
|
if (Ce(e))
|
|
1913
1922
|
return e;
|
|
1914
1923
|
if (e) {
|
|
1915
|
-
const
|
|
1924
|
+
const n = e, {
|
|
1916
1925
|
icon: t,
|
|
1917
|
-
tooltip:
|
|
1926
|
+
tooltip: o,
|
|
1918
1927
|
onClick: u,
|
|
1919
1928
|
key: l
|
|
1920
|
-
} =
|
|
1921
|
-
return t &&
|
|
1922
|
-
title:
|
|
1929
|
+
} = n;
|
|
1930
|
+
return t && o ? i(ee, {
|
|
1931
|
+
title: o
|
|
1923
1932
|
}, {
|
|
1924
1933
|
default: () => [i("span", {
|
|
1925
1934
|
key: l,
|
|
@@ -1943,30 +1952,30 @@ const mt = /* @__PURE__ */ ae({
|
|
|
1943
1952
|
},
|
|
1944
1953
|
setup(e) {
|
|
1945
1954
|
const {
|
|
1946
|
-
wrapSSR:
|
|
1955
|
+
wrapSSR: n,
|
|
1947
1956
|
hashId: t
|
|
1948
|
-
} = Pe("ListToolBar", [
|
|
1957
|
+
} = Pe("ListToolBar", [Xa], e.prefixCls), o = Ja(), {
|
|
1949
1958
|
isMobile: u
|
|
1950
|
-
} = ie(), l =
|
|
1959
|
+
} = ie(), l = S(() => {
|
|
1951
1960
|
var c;
|
|
1952
1961
|
return !!(e.titleTip || e.headerTitle || (c = e.actions) != null && c.length);
|
|
1953
|
-
}), s =
|
|
1962
|
+
}), s = S(() => {
|
|
1954
1963
|
var c;
|
|
1955
1964
|
return !!((c = e.settings) != null && c.length || e.optionsExtra);
|
|
1956
|
-
}), r =
|
|
1965
|
+
}), r = S(() => !!(e.titleTip || e.headerTitle)), w = S(() => {
|
|
1957
1966
|
var b;
|
|
1958
1967
|
let c;
|
|
1959
1968
|
return Array.isArray(e.actions) ? ((b = e.actions) == null ? void 0 : b.length) < 1 ? null : i(oe, {
|
|
1960
1969
|
align: "center"
|
|
1961
|
-
}, lt(c = e.actions.map((
|
|
1962
|
-
key:
|
|
1963
|
-
...
|
|
1970
|
+
}, lt(c = e.actions.map((d, f) => Ce(d) ? Vt(d, {
|
|
1971
|
+
key: f,
|
|
1972
|
+
...d == null ? void 0 : d.props
|
|
1964
1973
|
}) : i("template", {
|
|
1965
|
-
key:
|
|
1966
|
-
}, [
|
|
1974
|
+
key: f
|
|
1975
|
+
}, [d]))) ? c : {
|
|
1967
1976
|
default: () => [c]
|
|
1968
1977
|
}) : e.actions;
|
|
1969
|
-
}),
|
|
1978
|
+
}), m = Fe(() => !l.value && s.value ? i("div", {
|
|
1970
1979
|
class: `${e.prefixCls}-left ${t.value}`
|
|
1971
1980
|
}, null) : r.value ? i(oe, {
|
|
1972
1981
|
class: `${e.prefixCls}-left ${t.value}`
|
|
@@ -1976,7 +1985,7 @@ const mt = /* @__PURE__ */ ae({
|
|
|
1976
1985
|
}, [e.headerTitle, e.titleTip && i(ee, {
|
|
1977
1986
|
title: e.titleTipText
|
|
1978
1987
|
}, {
|
|
1979
|
-
default: () => [te(e.titleTip) && e.titleTip ? i(
|
|
1988
|
+
default: () => [te(e.titleTip) && e.titleTip ? i(ba, null, null) : e.titleTip]
|
|
1980
1989
|
})]), w.value && i("div", {
|
|
1981
1990
|
class: `${e.prefixCls}-actions ${t.value}`
|
|
1982
1991
|
}, [w.value])]
|
|
@@ -1991,8 +2000,8 @@ const mt = /* @__PURE__ */ ae({
|
|
|
1991
2000
|
return s.value ? i(oe, {
|
|
1992
2001
|
size: 16,
|
|
1993
2002
|
class: `${e.prefixCls}-right ${t.value}`,
|
|
1994
|
-
align:
|
|
1995
|
-
direction:
|
|
2003
|
+
align: o.value.lg ? "center" : "end",
|
|
2004
|
+
direction: o.value.lg ? "horizontal" : "vertical"
|
|
1996
2005
|
}, {
|
|
1997
2006
|
default: () => {
|
|
1998
2007
|
var b;
|
|
@@ -2000,18 +2009,18 @@ const mt = /* @__PURE__ */ ae({
|
|
|
2000
2009
|
size: 12,
|
|
2001
2010
|
align: "center",
|
|
2002
2011
|
class: `${e.prefixCls}-setting-items`
|
|
2003
|
-
}, lt(c = e.settings.map((
|
|
2004
|
-
const
|
|
2012
|
+
}, lt(c = e.settings.map((d, f) => {
|
|
2013
|
+
const x = Qa(d);
|
|
2005
2014
|
return i("div", {
|
|
2006
|
-
key:
|
|
2015
|
+
key: f,
|
|
2007
2016
|
class: `${e.prefixCls}-setting-item`
|
|
2008
|
-
}, [
|
|
2017
|
+
}, [x]);
|
|
2009
2018
|
})) ? c : {
|
|
2010
2019
|
default: () => [c]
|
|
2011
2020
|
}) : null];
|
|
2012
2021
|
}
|
|
2013
2022
|
}) : null;
|
|
2014
|
-
}, [() =>
|
|
2023
|
+
}, [() => o.value, () => s.value, () => e.prefixCls, () => r.value, () => w.value, () => e.settings]), y = Fe(() => {
|
|
2015
2024
|
if (!s.value && !l.value)
|
|
2016
2025
|
return null;
|
|
2017
2026
|
const c = {
|
|
@@ -2021,23 +2030,23 @@ const mt = /* @__PURE__ */ ae({
|
|
|
2021
2030
|
};
|
|
2022
2031
|
return i("div", {
|
|
2023
2032
|
class: c
|
|
2024
|
-
}, [
|
|
2025
|
-
}, [() => u.value, () => l.value, () => s.value, () =>
|
|
2026
|
-
return () =>
|
|
2033
|
+
}, [m.value, g.value]);
|
|
2034
|
+
}, [() => u.value, () => l.value, () => s.value, () => m.value, () => e.prefixCls, () => g.value]);
|
|
2035
|
+
return () => n(i("div", {
|
|
2027
2036
|
class: `${e.prefixCls} ${t.value}`
|
|
2028
2037
|
}, [y.value]));
|
|
2029
2038
|
}
|
|
2030
2039
|
});
|
|
2031
2040
|
mt.inheritAttrs = !1;
|
|
2032
|
-
function
|
|
2041
|
+
function Za() {
|
|
2033
2042
|
return {
|
|
2034
2043
|
reload: {
|
|
2035
2044
|
text: "刷新",
|
|
2036
|
-
icon: i(
|
|
2045
|
+
icon: i(Ca, null, null)
|
|
2037
2046
|
},
|
|
2038
2047
|
density: {
|
|
2039
2048
|
text: "表格密度",
|
|
2040
|
-
icon: i(
|
|
2049
|
+
icon: i(Ua, null, null)
|
|
2041
2050
|
},
|
|
2042
2051
|
setting: {
|
|
2043
2052
|
text: "列设置",
|
|
@@ -2049,15 +2058,15 @@ function Qa() {
|
|
|
2049
2058
|
}
|
|
2050
2059
|
};
|
|
2051
2060
|
}
|
|
2052
|
-
function
|
|
2061
|
+
function el(e, n) {
|
|
2053
2062
|
return Object.keys(e).filter((t) => t).map((t) => {
|
|
2054
|
-
const
|
|
2055
|
-
if (!
|
|
2063
|
+
const o = e[t];
|
|
2064
|
+
if (!o)
|
|
2056
2065
|
return null;
|
|
2057
|
-
let u =
|
|
2066
|
+
let u = o === !0 ? n[t] : () => o == null ? void 0 : o();
|
|
2058
2067
|
if (typeof u != "function" && (u = () => {
|
|
2059
2068
|
}), t === "setting")
|
|
2060
|
-
return i(
|
|
2069
|
+
return i(qa, U(e[t], {
|
|
2061
2070
|
key: t
|
|
2062
2071
|
}), null);
|
|
2063
2072
|
if (t === "fullScreen")
|
|
@@ -2065,7 +2074,7 @@ function Za(e, o) {
|
|
|
2065
2074
|
key: t,
|
|
2066
2075
|
onClick: u
|
|
2067
2076
|
}, [i(vt, null, null)]);
|
|
2068
|
-
const l =
|
|
2077
|
+
const l = Za()[t];
|
|
2069
2078
|
return l ? i("span", {
|
|
2070
2079
|
key: t,
|
|
2071
2080
|
onClick: u
|
|
@@ -2076,7 +2085,7 @@ function Za(e, o) {
|
|
|
2076
2085
|
})]) : null;
|
|
2077
2086
|
}).filter((t) => t);
|
|
2078
2087
|
}
|
|
2079
|
-
const
|
|
2088
|
+
const tl = {
|
|
2080
2089
|
options: [Boolean, Object, Array],
|
|
2081
2090
|
titleTip: [Function, Boolean, Object, String],
|
|
2082
2091
|
settingExtra: [Function, Boolean, Object, Array],
|
|
@@ -2084,16 +2093,16 @@ const el = {
|
|
|
2084
2093
|
titleTipText: [String],
|
|
2085
2094
|
toolBarBtn: [Function, Boolean, Object, Array],
|
|
2086
2095
|
headerTitle: [Function, Boolean, Object, Array, String]
|
|
2087
|
-
},
|
|
2088
|
-
props:
|
|
2096
|
+
}, al = /* @__PURE__ */ ae({
|
|
2097
|
+
props: tl,
|
|
2089
2098
|
inheritAttrs: !1,
|
|
2090
2099
|
setup(e) {
|
|
2091
|
-
const
|
|
2100
|
+
const n = Ve({
|
|
2092
2101
|
suffixCls: "table-list-toolbar",
|
|
2093
2102
|
isPor: !0
|
|
2094
2103
|
}), {
|
|
2095
2104
|
action: t
|
|
2096
|
-
} = ie(),
|
|
2105
|
+
} = ie(), o = Fe(() => {
|
|
2097
2106
|
var s;
|
|
2098
2107
|
const u = {
|
|
2099
2108
|
reload: () => t == null ? void 0 : t.reload(),
|
|
@@ -2107,24 +2116,24 @@ const el = {
|
|
|
2107
2116
|
...u,
|
|
2108
2117
|
...e.options
|
|
2109
2118
|
};
|
|
2110
|
-
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, {
|
|
2111
2120
|
...u
|
|
2112
2121
|
});
|
|
2113
2122
|
}, [() => t, () => e.options]);
|
|
2114
2123
|
return () => {
|
|
2115
2124
|
const u = e.toolBarBtn || [];
|
|
2116
2125
|
return i(mt, {
|
|
2117
|
-
prefixCls:
|
|
2126
|
+
prefixCls: n,
|
|
2118
2127
|
optionsExtra: e.optionsExtra,
|
|
2119
2128
|
headerTitle: e.headerTitle,
|
|
2120
2129
|
actions: u,
|
|
2121
|
-
settings:
|
|
2130
|
+
settings: v(o),
|
|
2122
2131
|
titleTip: e.titleTip,
|
|
2123
2132
|
titleTipText: e.titleTipText
|
|
2124
2133
|
}, null);
|
|
2125
2134
|
};
|
|
2126
2135
|
}
|
|
2127
|
-
}),
|
|
2136
|
+
}), ll = [
|
|
2128
2137
|
"search",
|
|
2129
2138
|
"headerTitle",
|
|
2130
2139
|
"toolBarBtn",
|
|
@@ -2134,26 +2143,26 @@ const el = {
|
|
|
2134
2143
|
"pageItemRender",
|
|
2135
2144
|
"customize"
|
|
2136
2145
|
];
|
|
2137
|
-
function
|
|
2146
|
+
function nl(e) {
|
|
2138
2147
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !Ce(e);
|
|
2139
2148
|
}
|
|
2140
|
-
function
|
|
2141
|
-
if (!
|
|
2149
|
+
function ol(e, n, t, o) {
|
|
2150
|
+
if (!n)
|
|
2142
2151
|
return e;
|
|
2143
2152
|
let u = e;
|
|
2144
|
-
if (ue(
|
|
2145
|
-
const l =
|
|
2146
|
-
return i(l, U((
|
|
2147
|
-
class: [
|
|
2148
|
-
onClick:
|
|
2149
|
-
}),
|
|
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 : {
|
|
2150
2159
|
default: () => [e]
|
|
2151
2160
|
});
|
|
2152
2161
|
}
|
|
2153
|
-
switch (
|
|
2162
|
+
switch (n) {
|
|
2154
2163
|
case "link":
|
|
2155
2164
|
u = i("span", {
|
|
2156
|
-
class: [`${t}-a`,
|
|
2165
|
+
class: [`${t}-a`, o]
|
|
2157
2166
|
}, [e]);
|
|
2158
2167
|
break;
|
|
2159
2168
|
case "time":
|
|
@@ -2181,7 +2190,7 @@ const ke = {
|
|
|
2181
2190
|
backgroundColor: "transparent",
|
|
2182
2191
|
borderRadius: 2
|
|
2183
2192
|
}
|
|
2184
|
-
},
|
|
2193
|
+
}, ul = (e) => ({
|
|
2185
2194
|
[e.componentCls]: {
|
|
2186
2195
|
["&-a"]: {
|
|
2187
2196
|
cursor: "pointer",
|
|
@@ -2363,9 +2372,9 @@ const ke = {
|
|
|
2363
2372
|
[`${e.antCls}-table-content`]: ke
|
|
2364
2373
|
}
|
|
2365
2374
|
}
|
|
2366
|
-
}),
|
|
2367
|
-
useBreakpoint:
|
|
2368
|
-
} = He,
|
|
2375
|
+
}), il = ct.PRESENTED_IMAGE_SIMPLE, {
|
|
2376
|
+
useBreakpoint: sl
|
|
2377
|
+
} = He, rl = {
|
|
2369
2378
|
reload: !0,
|
|
2370
2379
|
density: !0,
|
|
2371
2380
|
setting: !0,
|
|
@@ -2376,9 +2385,9 @@ const ke = {
|
|
|
2376
2385
|
props: ce,
|
|
2377
2386
|
emits: ["reset", "reload", "submit", "sizeChange", "expandedRowsChange", "expand", "change", "requestError", "beforeSearchSubmit", "columnsStateChange", "loadingChange"],
|
|
2378
2387
|
setup(e, {
|
|
2379
|
-
emit:
|
|
2388
|
+
emit: n,
|
|
2380
2389
|
slots: t,
|
|
2381
|
-
attrs:
|
|
2390
|
+
attrs: o,
|
|
2382
2391
|
expose: u
|
|
2383
2392
|
}) {
|
|
2384
2393
|
const l = Ve({
|
|
@@ -2387,66 +2396,66 @@ const ke = {
|
|
|
2387
2396
|
}), {
|
|
2388
2397
|
wrapSSR: s,
|
|
2389
2398
|
hashId: r
|
|
2390
|
-
} = Pe("ProBaseTable", [
|
|
2391
|
-
width:
|
|
2392
|
-
} =
|
|
2399
|
+
} = Pe("ProBaseTable", [ul], l), w = sl(), {
|
|
2400
|
+
width: m
|
|
2401
|
+
} = Qt(), {
|
|
2393
2402
|
emptyText: g,
|
|
2394
2403
|
indicator: y
|
|
2395
|
-
} =
|
|
2396
|
-
he(() =>
|
|
2404
|
+
} = ra(), c = O(), b = O(), d = O(e.waitRequest);
|
|
2405
|
+
he(() => d.value = e.waitRequest);
|
|
2397
2406
|
const {
|
|
2398
|
-
toggle:
|
|
2399
|
-
isFullscreen:
|
|
2400
|
-
} = st(c), $ =
|
|
2407
|
+
toggle: f,
|
|
2408
|
+
isFullscreen: x
|
|
2409
|
+
} = st(c), $ = S(() => ({
|
|
2401
2410
|
...e
|
|
2402
|
-
})), T =
|
|
2411
|
+
})), T = S(() => !w.value.xl), P = S(() => {
|
|
2403
2412
|
var C, R;
|
|
2404
|
-
return e.virtualScroll &&
|
|
2405
|
-
}), 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(() => {
|
|
2406
2415
|
const C = (e.columns || []).filter((R) => R.key || R.dataIndex).map((R) => ({
|
|
2407
2416
|
...R,
|
|
2408
2417
|
key: R.key || R.dataIndex,
|
|
2409
2418
|
align: R.align || e.align,
|
|
2410
2419
|
uuid: Ye().uuid(15)
|
|
2411
2420
|
}));
|
|
2412
|
-
return
|
|
2421
|
+
return Xt(C, {
|
|
2413
2422
|
align: e.align || "left",
|
|
2414
2423
|
showIndex: e.showIndex || !1
|
|
2415
2424
|
});
|
|
2416
2425
|
}), {
|
|
2417
2426
|
loadingStatus: Y,
|
|
2418
2427
|
setLoading: j
|
|
2419
|
-
} =
|
|
2420
|
-
emit:
|
|
2428
|
+
} = wa({
|
|
2429
|
+
emit: n,
|
|
2421
2430
|
loading: Z(e, "loading")
|
|
2422
2431
|
}), {
|
|
2423
2432
|
sizeRef: L,
|
|
2424
2433
|
setTableSize: G
|
|
2425
|
-
} =
|
|
2426
|
-
emit:
|
|
2434
|
+
} = Ta({
|
|
2435
|
+
emit: n,
|
|
2427
2436
|
size: Z(e, "size")
|
|
2428
2437
|
}), {
|
|
2429
2438
|
getPaginationInfo: M,
|
|
2430
2439
|
setPagination: H
|
|
2431
|
-
} =
|
|
2440
|
+
} = Ra({
|
|
2432
2441
|
slots: t,
|
|
2433
2442
|
props: $,
|
|
2434
2443
|
pagination: Z(e, "pagination")
|
|
2435
|
-
}), a =
|
|
2444
|
+
}), a = ja(e), {
|
|
2436
2445
|
getScrollRef: p,
|
|
2437
2446
|
breakpoint: I
|
|
2438
|
-
} =
|
|
2447
|
+
} = ka({
|
|
2439
2448
|
...a,
|
|
2440
|
-
innerWidth:
|
|
2449
|
+
innerWidth: m,
|
|
2441
2450
|
columns: D,
|
|
2442
2451
|
screens: w
|
|
2443
|
-
}), F =
|
|
2452
|
+
}), F = Ma(e), {
|
|
2444
2453
|
getProColumns: B,
|
|
2445
|
-
cacheProColumns:
|
|
2454
|
+
cacheProColumns: h,
|
|
2446
2455
|
setColumns: N,
|
|
2447
2456
|
changeColumns: A,
|
|
2448
2457
|
resizeColumnWidth: K
|
|
2449
|
-
} =
|
|
2458
|
+
} = Na({
|
|
2450
2459
|
...F,
|
|
2451
2460
|
breakpoint: I,
|
|
2452
2461
|
scroll: p,
|
|
@@ -2458,8 +2467,8 @@ const ke = {
|
|
|
2458
2467
|
sortKeyColumns: xe,
|
|
2459
2468
|
cacheColumnsMap: we,
|
|
2460
2469
|
setSortKeyColumns: le
|
|
2461
|
-
} =
|
|
2462
|
-
columns:
|
|
2470
|
+
} = Da({
|
|
2471
|
+
columns: h,
|
|
2463
2472
|
columnsState: Z(e, "columnsState"),
|
|
2464
2473
|
changeColumns: A
|
|
2465
2474
|
}), {
|
|
@@ -2467,73 +2476,74 @@ const ke = {
|
|
|
2467
2476
|
formParamsRef: fe,
|
|
2468
2477
|
defaultParamsRef: V,
|
|
2469
2478
|
setFormParams: ne
|
|
2470
|
-
} =
|
|
2479
|
+
} = Ba({
|
|
2471
2480
|
search: Z(e, "search"),
|
|
2472
2481
|
searchMap: Z(e, "searchMap"),
|
|
2473
2482
|
params: Z(e, "params"),
|
|
2474
2483
|
columns: D,
|
|
2475
2484
|
setPagination: H
|
|
2476
2485
|
}), {
|
|
2477
|
-
selectedKey:
|
|
2478
|
-
|
|
2479
|
-
|
|
2480
|
-
|
|
2481
|
-
|
|
2482
|
-
|
|
2483
|
-
|
|
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), {
|
|
2484
2494
|
reload: De,
|
|
2485
|
-
reSetDataList:
|
|
2486
|
-
changeDataValue:
|
|
2495
|
+
reSetDataList: St,
|
|
2496
|
+
changeDataValue: xt,
|
|
2487
2497
|
isTreeDataRef: We,
|
|
2488
2498
|
getDataSourceRef: me,
|
|
2489
2499
|
handleTableChange: _e
|
|
2490
|
-
} =
|
|
2491
|
-
...
|
|
2492
|
-
waitRequest:
|
|
2500
|
+
} = Pa({
|
|
2501
|
+
...Ct,
|
|
2502
|
+
waitRequest: d
|
|
2493
2503
|
}, {
|
|
2494
2504
|
loadingStatus: Y,
|
|
2495
2505
|
getPaginationInfo: M,
|
|
2496
2506
|
setPagination: H,
|
|
2497
|
-
removeRowKeys:
|
|
2498
|
-
syncSelectedRows:
|
|
2507
|
+
removeRowKeys: bt,
|
|
2508
|
+
syncSelectedRows: pt,
|
|
2499
2509
|
setLoading: j,
|
|
2500
2510
|
setColumns: N,
|
|
2501
2511
|
columns: B,
|
|
2502
2512
|
formParamsRef: fe,
|
|
2503
2513
|
onBeforeSearchSubmit: e.onBeforeSearchSubmit,
|
|
2504
|
-
hasCustomRender:
|
|
2505
|
-
},
|
|
2506
|
-
...
|
|
2514
|
+
hasCustomRender: S(() => !!ze(t, e, "customRender"))
|
|
2515
|
+
}, n), wt = S(() => e.options ? {
|
|
2516
|
+
...rl,
|
|
2507
2517
|
...J(ue(e.options) ? e.options : {})
|
|
2508
|
-
} : !1), Ge =
|
|
2518
|
+
} : !1), Ge = S(() => {
|
|
2509
2519
|
const C = ue(e.loading) ? ye(e.loading, "spinning") : {};
|
|
2510
2520
|
return !C.indicator && (y != null && y.value) && (C.indicator = y == null ? void 0 : y.value), ye({
|
|
2511
|
-
...(ye(
|
|
2521
|
+
...(ye(o), ["class", "style", "id"]),
|
|
2512
2522
|
...e,
|
|
2513
2523
|
virtualScroll: P.value,
|
|
2514
|
-
size:
|
|
2515
|
-
scroll:
|
|
2524
|
+
size: v(L),
|
|
2525
|
+
scroll: v(p),
|
|
2516
2526
|
loading: {
|
|
2517
|
-
spinning: e.showLoading ? !!
|
|
2527
|
+
spinning: e.showLoading ? !!v(Y) : !1,
|
|
2518
2528
|
...C
|
|
2519
2529
|
},
|
|
2520
|
-
columns: Me(
|
|
2521
|
-
pagination: Me(
|
|
2522
|
-
dataSource:
|
|
2530
|
+
columns: Me(v(B).filter((R) => R.show || R.show === void 0)),
|
|
2531
|
+
pagination: Me(v(M)),
|
|
2532
|
+
dataSource: v(me)
|
|
2523
2533
|
}, ["class", "onChange", "onExpand", "onExpandedRowsChange"]);
|
|
2524
|
-
}),
|
|
2534
|
+
}), Tt = S(() => [{
|
|
2525
2535
|
[`${r.value}`]: !0,
|
|
2526
2536
|
[`${l}`]: !0,
|
|
2527
|
-
[`${
|
|
2528
|
-
[`${l}-no-scroll`]: !Object.keys(
|
|
2537
|
+
[`${o.class}`]: o.class,
|
|
2538
|
+
[`${l}-no-scroll`]: !Object.keys(v(p) || {}).length,
|
|
2529
2539
|
[`${l}-table-tree`]: We.value,
|
|
2530
|
-
[`${l}-full-screen`]:
|
|
2531
|
-
}]), qe =
|
|
2540
|
+
[`${l}-full-screen`]: x.value
|
|
2541
|
+
}]), qe = S(() => {
|
|
2532
2542
|
var Q;
|
|
2533
2543
|
let C;
|
|
2534
|
-
const R =
|
|
2535
|
-
if (
|
|
2536
|
-
const z =
|
|
2544
|
+
const R = v($).direction === "rtl" ? "bottomLeft" : "right", E = (Q = v(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");
|
|
2537
2547
|
!z && !W && !Te && (C = R), z && (C = z.toLowerCase().replace("top", "")), W && (C = W.toLowerCase().replace("bottom", ""));
|
|
2538
2548
|
} else
|
|
2539
2549
|
C = R;
|
|
@@ -2544,27 +2554,27 @@ const ke = {
|
|
|
2544
2554
|
...C,
|
|
2545
2555
|
...e.params || {}
|
|
2546
2556
|
}), await De()) : ne(C);
|
|
2547
|
-
},
|
|
2548
|
-
R ? (
|
|
2549
|
-
}, Xe = (C, R,
|
|
2550
|
-
H(it(C, ["current", "pageSize"])), _e(C, R,
|
|
2551
|
-
},
|
|
2552
|
-
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;
|
|
2553
2563
|
H({
|
|
2554
2564
|
current: C,
|
|
2555
2565
|
pageSize: R
|
|
2556
2566
|
}), _e({
|
|
2557
2567
|
current: C,
|
|
2558
2568
|
pageSize: R,
|
|
2559
|
-
total: M.value && ((
|
|
2569
|
+
total: M.value && ((E = M.value) == null ? void 0 : E.total) || 0
|
|
2560
2570
|
}, {}, {});
|
|
2561
|
-
},
|
|
2562
|
-
|
|
2563
|
-
},
|
|
2564
|
-
|
|
2565
|
-
},
|
|
2566
|
-
const Q =
|
|
2567
|
-
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, {
|
|
2568
2578
|
class: `${l}-copyable`,
|
|
2569
2579
|
style: {
|
|
2570
2580
|
margin: "0",
|
|
@@ -2581,7 +2591,7 @@ const ke = {
|
|
|
2581
2591
|
class: `${l}-ellipsis`
|
|
2582
2592
|
}, [C])]
|
|
2583
2593
|
})]
|
|
2584
|
-
}) : R && !
|
|
2594
|
+
}) : R && !E.copyable ? i(ee, {
|
|
2585
2595
|
title: C,
|
|
2586
2596
|
placement: Q
|
|
2587
2597
|
}, {
|
|
@@ -2589,22 +2599,22 @@ const ke = {
|
|
|
2589
2599
|
class: `${l}-ellipsis`
|
|
2590
2600
|
}, [C])]
|
|
2591
2601
|
}) : C;
|
|
2592
|
-
},
|
|
2602
|
+
}, Bt = () => {
|
|
2593
2603
|
var R;
|
|
2594
2604
|
const C = ze(t, e, "customRender");
|
|
2595
2605
|
return C ? (R = me.value) != null && R.length ? C(me.value) : (g == null ? void 0 : g.value) || i(ct, {
|
|
2596
|
-
image:
|
|
2606
|
+
image: il
|
|
2597
2607
|
}, null) : i(Ie, null, null);
|
|
2598
|
-
},
|
|
2608
|
+
}, Dt = (C, R, E) => i(al, {
|
|
2599
2609
|
headerTitle: C,
|
|
2600
|
-
titleTip:
|
|
2610
|
+
titleTip: E,
|
|
2601
2611
|
titleTipText: e.titleTipText,
|
|
2602
|
-
options:
|
|
2612
|
+
options: v(wt),
|
|
2603
2613
|
settingExtra: ge(t, e, "settingExtra"),
|
|
2604
2614
|
optionsExtra: ge(t, e, "optionsExtra"),
|
|
2605
2615
|
toolBarBtn: R
|
|
2606
2616
|
}, null);
|
|
2607
|
-
|
|
2617
|
+
za({
|
|
2608
2618
|
tableSize: L,
|
|
2609
2619
|
columns: B,
|
|
2610
2620
|
cacheColumns: D,
|
|
@@ -2612,7 +2622,7 @@ const ke = {
|
|
|
2612
2622
|
action: {
|
|
2613
2623
|
setTableSize: G,
|
|
2614
2624
|
reload: (C) => De(C),
|
|
2615
|
-
toggle:
|
|
2625
|
+
toggle: f
|
|
2616
2626
|
},
|
|
2617
2627
|
settingsAction: {
|
|
2618
2628
|
autoScroll: Z(e, "autoScroll"),
|
|
@@ -2633,38 +2643,40 @@ const ke = {
|
|
|
2633
2643
|
var C;
|
|
2634
2644
|
return ((C = b.value) == null ? void 0 : C.getFormState()) || {};
|
|
2635
2645
|
},
|
|
2636
|
-
getTableFormState: () =>
|
|
2646
|
+
getTableFormState: () => v(fe),
|
|
2637
2647
|
restForm: (C) => {
|
|
2638
2648
|
var R;
|
|
2639
|
-
|
|
2649
|
+
d.value = !0, C && (C == null || C()), (R = b.value) == null || R.resetForm(!1), d.value = !1;
|
|
2640
2650
|
}
|
|
2641
2651
|
}),
|
|
2642
2652
|
actionRef: () => ({
|
|
2643
2653
|
dataSource: me.value,
|
|
2644
2654
|
pageParams: M.value,
|
|
2655
|
+
selectedKey: k.value,
|
|
2656
|
+
selectedItem: se.value,
|
|
2645
2657
|
reload: De,
|
|
2646
|
-
getLoadingStatus: () =>
|
|
2658
|
+
getLoadingStatus: () => v(Y),
|
|
2647
2659
|
reloadAndRest: async (C) => {
|
|
2648
|
-
|
|
2660
|
+
d.value = !0, H({
|
|
2649
2661
|
current: 1,
|
|
2650
2662
|
pageSize: 10
|
|
2651
|
-
}), C && (C == null || C()),
|
|
2663
|
+
}), C && (C == null || C()), d.value = !1;
|
|
2652
2664
|
},
|
|
2653
|
-
reSetDataList:
|
|
2665
|
+
reSetDataList: St,
|
|
2654
2666
|
setPageAndReload: Xe,
|
|
2655
2667
|
setPagination: H,
|
|
2656
|
-
changeDataValue:
|
|
2668
|
+
changeDataValue: xt,
|
|
2657
2669
|
loadingOperation: j
|
|
2658
2670
|
})
|
|
2659
2671
|
});
|
|
2660
|
-
const
|
|
2672
|
+
const Mt = S(() => (o == null ? void 0 : o.style) || {});
|
|
2661
2673
|
return () => {
|
|
2662
2674
|
var Q;
|
|
2663
|
-
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");
|
|
2664
2676
|
return s(i("div", {
|
|
2665
2677
|
ref: c,
|
|
2666
|
-
class:
|
|
2667
|
-
style:
|
|
2678
|
+
class: Tt.value,
|
|
2679
|
+
style: Mt.value
|
|
2668
2680
|
}, [i("div", {
|
|
2669
2681
|
class: [`${l}-content`, r.value]
|
|
2670
2682
|
}, [(!!Be.value.length || !!((Q = t.search) != null && Q.call(t))) && i(ht, {
|
|
@@ -2673,29 +2685,29 @@ const ke = {
|
|
|
2673
2685
|
modal: e.modalScroll,
|
|
2674
2686
|
searchMap: Be.value,
|
|
2675
2687
|
prefixCls: l,
|
|
2676
|
-
loading: !!
|
|
2677
|
-
onSearch:
|
|
2688
|
+
loading: !!v(Y),
|
|
2689
|
+
onSearch: Rt,
|
|
2678
2690
|
defaultParams: V
|
|
2679
2691
|
}, {
|
|
2680
2692
|
default: t.search ? () => {
|
|
2681
2693
|
var z;
|
|
2682
2694
|
return (z = t.search) == null ? void 0 : z.call(t);
|
|
2683
2695
|
} : null
|
|
2684
|
-
}), !P.value &&
|
|
2696
|
+
}), !P.value && Dt(C, E, R), e.customRender ?? t.customRender ? i(Le, v(Ge).loading, {
|
|
2685
2697
|
default: () => {
|
|
2686
2698
|
var z;
|
|
2687
2699
|
return [i("div", {
|
|
2688
2700
|
class: `${l}-wrapper ${r.value}`
|
|
2689
|
-
}, [
|
|
2701
|
+
}, [Bt(), e.pagination !== !1 && ((z = me.value) == null ? void 0 : z.length) > 0 && i(ua, U({
|
|
2690
2702
|
class: {
|
|
2691
2703
|
[`${l}-pagination ${r.value}`]: !0,
|
|
2692
2704
|
[`${l}-pagination-${qe.value} ${r.value}`]: !!qe.value
|
|
2693
2705
|
}
|
|
2694
|
-
}, Me(
|
|
2695
|
-
onChange:
|
|
2706
|
+
}, Me(v(M)), {
|
|
2707
|
+
onChange: $t
|
|
2696
2708
|
}), null)])];
|
|
2697
2709
|
}
|
|
2698
|
-
}) : i(
|
|
2710
|
+
}) : i(ia, U(Ge.value, {
|
|
2699
2711
|
style: e.tableStyle || void 0,
|
|
2700
2712
|
class: e.tableClassName,
|
|
2701
2713
|
rowKey: (z) => z[e.rowKey || "sortIndex"],
|
|
@@ -2709,24 +2721,24 @@ const ke = {
|
|
|
2709
2721
|
return z;
|
|
2710
2722
|
const {
|
|
2711
2723
|
value: re,
|
|
2712
|
-
success:
|
|
2713
|
-
} =
|
|
2714
|
-
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;
|
|
2715
2727
|
},
|
|
2716
2728
|
rowSelection: e.rowSelection ? {
|
|
2717
2729
|
...ye(e.rowSelection, ["onSelect", "onSelectAll", "onChange", "selectedRowKeys"]),
|
|
2718
|
-
selectedRowKeys:
|
|
2719
|
-
onSelect:
|
|
2720
|
-
onSelectAll:
|
|
2721
|
-
onChange:
|
|
2730
|
+
selectedRowKeys: k.value,
|
|
2731
|
+
onSelect: gt,
|
|
2732
|
+
onSelectAll: yt,
|
|
2733
|
+
onChange: q
|
|
2722
2734
|
} : void 0,
|
|
2723
2735
|
onChange: Xe,
|
|
2724
|
-
onExpandedRowsChange:
|
|
2725
|
-
onExpand:
|
|
2726
|
-
onResizeColumn:
|
|
2736
|
+
onExpandedRowsChange: Ft,
|
|
2737
|
+
onExpand: It,
|
|
2738
|
+
onResizeColumn: Pt
|
|
2727
2739
|
}), {
|
|
2728
2740
|
emptyText: g != null && g.value ? () => g == null ? void 0 : g.value : null,
|
|
2729
|
-
...ye(t,
|
|
2741
|
+
...ye(t, ll)
|
|
2730
2742
|
})])]));
|
|
2731
2743
|
};
|
|
2732
2744
|
}
|
|
@@ -2736,5 +2748,5 @@ export {
|
|
|
2736
2748
|
Ee as GProTable,
|
|
2737
2749
|
Ee as default,
|
|
2738
2750
|
ce as proTableProps,
|
|
2739
|
-
|
|
2751
|
+
Cl as useTable
|
|
2740
2752
|
};
|