@gx-design-vue/pro-table 0.2.0-beta.39 → 0.2.0-beta.40
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 +16 -26
- package/dist/context/TableContext.d.ts +1 -0
- package/dist/hooks/useColums.d.ts +2 -2
- package/dist/hooks/useTableScroll.d.ts +3 -3
- package/dist/pro-table.mjs +800 -798
- package/dist/pro-table.umd.js +1 -1
- package/package.json +1 -1
package/dist/pro-table.mjs
CHANGED
|
@@ -1,63 +1,63 @@
|
|
|
1
|
-
import { computed as
|
|
2
|
-
import { isBoolean as te, isObject as
|
|
3
|
-
import { pick as it, cloneDeep as
|
|
4
|
-
import { useFullscreen as st, useWindowSize as
|
|
5
|
-
import { Form as et, Grid as He, Space as
|
|
6
|
-
import { useProAppContext as
|
|
1
|
+
import { computed as x, ref as O, watch as X, unref as h, watchEffect as he, reactive as de, onUnmounted as jt, onDeactivated as kt, onMounted as Et, provide as zt, inject as Kt, defineComponent as ae, createVNode as i, Fragment as Ie, nextTick as Yt, mergeProps as U, createTextVNode as pe, renderSlot as Lt, isVNode as Ce, cloneVNode as At, toRef as Z, toRaw as Me } from "vue";
|
|
2
|
+
import { isBoolean as te, isObject as ue, getSlot as ze, isFunction as $e, arrayRepeat as Vt, runFunction as Ht, handleCurrentPage as Wt, getSortIndex as _t, isDeepEqualReact as nt, genColumnKey as ot, compareArray as Gt, isNumber as ut, isString as qt, isArray as Ke, getPrefixCls as Ve, getRandomNumber as Ye, handleShowIndex as Ut, getSlotVNode as ge, hanndleField as Xt } from "@gx-design-vue/pro-utils";
|
|
3
|
+
import { pick as it, cloneDeep as J, omit as ye } from "lodash-es";
|
|
4
|
+
import { useFullscreen as st, useWindowSize as Jt } from "@vueuse/core";
|
|
5
|
+
import { Form as et, Grid as He, Space as oe, Button as tt, Input as at, TimePicker as Qt, DatePicker as rt, TreeSelect as Zt, Spin as Le, Select as ea, Popover as ta, Checkbox as aa, Tooltip as ee, Tree as la, Dropdown as na, Menu as Re, Empty as ct, Pagination as oa, Table as ua, Typography as ia } from "ant-design-vue";
|
|
6
|
+
import { useProAppContext as sa } from "@gx-design-vue/pro-app";
|
|
7
7
|
import { useProStyle as Pe } from "@gx-design-vue/pro-provider";
|
|
8
|
-
import { tryOnUnmounted as
|
|
9
|
-
import
|
|
10
|
-
import { UpOutlined as
|
|
11
|
-
function
|
|
12
|
-
const o =
|
|
8
|
+
import { tryOnUnmounted as ra, useMemo as Fe } from "@gx-design-vue/pro-hooks";
|
|
9
|
+
import _ from "dayjs";
|
|
10
|
+
import { UpOutlined as ca, DownOutlined as da, SettingOutlined as dt, VerticalAlignTopOutlined as fa, VerticalAlignMiddleOutlined as ha, VerticalAlignBottomOutlined as va, FullscreenExitOutlined as ma, FullscreenOutlined as ga, ColumnHeightOutlined as ya, InfoCircleOutlined as pa, ReloadOutlined as ba } from "@ant-design/icons-vue";
|
|
11
|
+
function bl(e) {
|
|
12
|
+
const o = x(() => {
|
|
13
13
|
var u;
|
|
14
14
|
return (u = e.value) == null ? void 0 : u.actionRef();
|
|
15
|
-
}), t =
|
|
15
|
+
}), t = x(() => {
|
|
16
16
|
var u;
|
|
17
17
|
return (u = e.value) == null ? void 0 : u.formRef();
|
|
18
|
-
}), n =
|
|
19
|
-
var l,
|
|
20
|
-
const u = te((l = o.value) == null ? void 0 : l.pageParams) ? {} : ((
|
|
18
|
+
}), n = x(() => {
|
|
19
|
+
var l, s, r, w;
|
|
20
|
+
const u = te((l = o.value) == null ? void 0 : l.pageParams) ? {} : ((s = o.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)) || {}
|
|
24
24
|
};
|
|
25
25
|
});
|
|
26
26
|
return {
|
|
27
27
|
formRef: t,
|
|
28
28
|
actionRef: o,
|
|
29
|
-
loading:
|
|
29
|
+
loading: x(() => {
|
|
30
30
|
var u;
|
|
31
31
|
return (u = e.value) == null ? void 0 : u.loading;
|
|
32
32
|
}),
|
|
33
33
|
params: n,
|
|
34
|
-
dataSource:
|
|
34
|
+
dataSource: x(() => {
|
|
35
35
|
var u;
|
|
36
36
|
return (u = o == null ? void 0 : o.value) == null ? void 0 : u.dataSource;
|
|
37
37
|
}),
|
|
38
|
-
setPageAndReload: (u, l,
|
|
39
|
-
var
|
|
40
|
-
return (v = (
|
|
38
|
+
setPageAndReload: (u, l, s, r) => {
|
|
39
|
+
var w, v;
|
|
40
|
+
return (v = (w = o.value) == null ? void 0 : w.setPageAndReload) == null ? void 0 : v.call(w, u, l, s, r);
|
|
41
41
|
},
|
|
42
42
|
setPagination: (u) => {
|
|
43
|
-
var l,
|
|
44
|
-
return (
|
|
43
|
+
var l, s;
|
|
44
|
+
return (s = (l = o.value) == null ? void 0 : l.setPagination) == null ? void 0 : s.call(l, u);
|
|
45
45
|
},
|
|
46
46
|
mutate: (u) => {
|
|
47
|
-
var l,
|
|
48
|
-
return (
|
|
47
|
+
var l, s;
|
|
48
|
+
return (s = (l = o.value) == null ? void 0 : l.reSetDataList) == null ? void 0 : s.call(l, u);
|
|
49
49
|
},
|
|
50
50
|
changeLoading: (u) => {
|
|
51
|
-
var l,
|
|
52
|
-
return (
|
|
51
|
+
var l, s;
|
|
52
|
+
return (s = (l = o.value) == null ? void 0 : l.loadingOperation) == null ? void 0 : s.call(l, u);
|
|
53
53
|
},
|
|
54
54
|
changeDataValue: (u) => {
|
|
55
|
-
var l,
|
|
56
|
-
return (
|
|
55
|
+
var l, s;
|
|
56
|
+
return (s = (l = o.value) == null ? void 0 : l.changeDataValue) == null ? void 0 : s.call(l, u);
|
|
57
57
|
},
|
|
58
58
|
reload: (u) => {
|
|
59
|
-
var l,
|
|
60
|
-
return (
|
|
59
|
+
var l, s;
|
|
60
|
+
return (s = (l = o.value) == null ? void 0 : l.reload) == null ? void 0 : s.call(l, u);
|
|
61
61
|
}
|
|
62
62
|
};
|
|
63
63
|
}
|
|
@@ -71,10 +71,10 @@ function Ae() {
|
|
|
71
71
|
return e;
|
|
72
72
|
}, Ae.apply(this, arguments);
|
|
73
73
|
}
|
|
74
|
-
function
|
|
74
|
+
function Ca(e, o) {
|
|
75
75
|
process.env.NODE_ENV !== "production" && !e && console !== void 0 && console.error(`Warning: ${o}`);
|
|
76
76
|
}
|
|
77
|
-
const
|
|
77
|
+
const Sa = () => ({
|
|
78
78
|
prefixCls: {
|
|
79
79
|
type: String,
|
|
80
80
|
default: void 0
|
|
@@ -248,8 +248,8 @@ const Ca = () => ({
|
|
|
248
248
|
type: Function,
|
|
249
249
|
default: void 0
|
|
250
250
|
}
|
|
251
|
-
}),
|
|
252
|
-
...
|
|
251
|
+
}), ce = {
|
|
252
|
+
...Sa(),
|
|
253
253
|
rowSelection: {
|
|
254
254
|
type: Object,
|
|
255
255
|
default: void 0
|
|
@@ -512,21 +512,21 @@ const Ca = () => ({
|
|
|
512
512
|
onBeforeSearchSubmit: Function,
|
|
513
513
|
onColumnsStateChange: Function
|
|
514
514
|
};
|
|
515
|
-
function
|
|
515
|
+
function xa({ emit: e, loading: o }) {
|
|
516
516
|
var l;
|
|
517
|
-
const t = O(te(o.value) ? o.value :
|
|
518
|
-
|
|
519
|
-
t.value = te(
|
|
517
|
+
const t = O(te(o.value) ? o.value : ue(o.value) ? (l = o.value) == null ? void 0 : l.spinning : !1);
|
|
518
|
+
X(() => o.value, (s) => {
|
|
519
|
+
t.value = te(s) ? s : ue(s) ? s == null ? void 0 : s.spinning : t.value;
|
|
520
520
|
});
|
|
521
|
-
const n =
|
|
522
|
-
function u(
|
|
523
|
-
t.value =
|
|
521
|
+
const n = x(() => h(t) || !1);
|
|
522
|
+
function u(s) {
|
|
523
|
+
t.value = s, e("loadingChange", !0);
|
|
524
524
|
}
|
|
525
525
|
return { loadingStatus: n, setLoading: u };
|
|
526
526
|
}
|
|
527
|
-
function
|
|
527
|
+
function wa({ size: e, emit: o }) {
|
|
528
528
|
const t = O("middle");
|
|
529
|
-
|
|
529
|
+
he(() => {
|
|
530
530
|
t.value = e.value;
|
|
531
531
|
});
|
|
532
532
|
function n(u) {
|
|
@@ -534,36 +534,36 @@ function xa({ size: e, emit: o }) {
|
|
|
534
534
|
}
|
|
535
535
|
return { sizeRef: t, setTableSize: n };
|
|
536
536
|
}
|
|
537
|
-
function
|
|
537
|
+
function Ta({
|
|
538
538
|
slots: e,
|
|
539
539
|
props: o,
|
|
540
540
|
pagination: t
|
|
541
541
|
}) {
|
|
542
|
-
const n =
|
|
543
|
-
|
|
542
|
+
const n = de({});
|
|
543
|
+
he(() => {
|
|
544
544
|
if (t.value || t.value === void 0)
|
|
545
545
|
Object.assign(n, {
|
|
546
546
|
...t.value ?? {}
|
|
547
547
|
});
|
|
548
548
|
else
|
|
549
|
-
for (const
|
|
550
|
-
delete n[
|
|
549
|
+
for (const s in n)
|
|
550
|
+
delete n[s];
|
|
551
551
|
});
|
|
552
|
-
const u =
|
|
552
|
+
const u = x(() => {
|
|
553
553
|
var v;
|
|
554
554
|
if (te(t.value) && !t.value)
|
|
555
555
|
return !1;
|
|
556
|
-
const
|
|
556
|
+
const s = ze(e, h(o), "pageItemRender"), r = $e(s) ? {
|
|
557
557
|
itemRender: ({
|
|
558
|
-
page:
|
|
559
|
-
type:
|
|
558
|
+
page: g,
|
|
559
|
+
type: y,
|
|
560
560
|
originalElement: c
|
|
561
|
-
}) =>
|
|
562
|
-
page:
|
|
563
|
-
type:
|
|
561
|
+
}) => s ? s({
|
|
562
|
+
page: g,
|
|
563
|
+
type: y,
|
|
564
564
|
originalElement: c
|
|
565
565
|
}) : null
|
|
566
|
-
} : null,
|
|
566
|
+
} : null, w = {
|
|
567
567
|
current: 1,
|
|
568
568
|
pageSize: 10,
|
|
569
569
|
size: "default",
|
|
@@ -572,15 +572,15 @@ function wa({
|
|
|
572
572
|
pageSizeOptions: ["10", "20", "50", "100"],
|
|
573
573
|
...t.value || {},
|
|
574
574
|
...h(n),
|
|
575
|
-
...
|
|
575
|
+
...r || {}
|
|
576
576
|
};
|
|
577
|
-
return (v = t.value) != null && v.showTotal || (
|
|
577
|
+
return (v = t.value) != null && v.showTotal || (w.showTotal = (g) => `共${g < w.pageSize ? 1 : Math.ceil(g / (w.pageSize || 10))}页 ${g}条记录`), w;
|
|
578
578
|
});
|
|
579
|
-
function l(
|
|
580
|
-
const
|
|
579
|
+
function l(s) {
|
|
580
|
+
const r = h(u);
|
|
581
581
|
Object.assign(n, {
|
|
582
|
-
...
|
|
583
|
-
...
|
|
582
|
+
...r || {},
|
|
583
|
+
...s
|
|
584
584
|
});
|
|
585
585
|
}
|
|
586
586
|
return {
|
|
@@ -588,63 +588,63 @@ function wa({
|
|
|
588
588
|
setPagination: l
|
|
589
589
|
};
|
|
590
590
|
}
|
|
591
|
-
function
|
|
591
|
+
function Ra(e, o) {
|
|
592
592
|
const t = O([]), n = O([]);
|
|
593
|
-
|
|
593
|
+
X(() => {
|
|
594
594
|
var v;
|
|
595
595
|
return (v = o.value) == null ? void 0 : v.selectedRowKeys;
|
|
596
596
|
}, (v) => {
|
|
597
|
-
t.value =
|
|
597
|
+
t.value = Vt([...v || []]);
|
|
598
598
|
}, {
|
|
599
599
|
deep: !0,
|
|
600
600
|
immediate: !0
|
|
601
601
|
});
|
|
602
|
-
const u = (v,
|
|
603
|
-
e.value && (
|
|
602
|
+
const u = (v, g) => {
|
|
603
|
+
e.value && (g ? v != null && v[e.value] && (t.value.push(v[e.value]), n.value.push(v)) : (t.value = t.value.filter((y) => y !== v[e.value]), n.value = n.value.filter((y) => y[e.value] !== v[e.value])));
|
|
604
604
|
}, l = () => {
|
|
605
|
-
var v,
|
|
606
|
-
o.value && ((
|
|
605
|
+
var v, g;
|
|
606
|
+
o.value && ((g = (v = o.value) == null ? void 0 : v.onChange) == null || g.call(v, t.value, n.value));
|
|
607
607
|
};
|
|
608
608
|
return {
|
|
609
609
|
selectedKey: t,
|
|
610
610
|
selectRowKey: u,
|
|
611
|
-
selectAllRowKey: (v,
|
|
612
|
-
e.value && (v ?
|
|
611
|
+
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]), n.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]), n.value = n.value.filter((b) => b[e.value] !== c[e.value])), c)));
|
|
613
613
|
},
|
|
614
614
|
removeRowKeys: (v) => {
|
|
615
|
-
t.value = t.value.filter((
|
|
615
|
+
t.value = t.value.filter((g) => !v.includes(g)), n.value = n.value.filter((g) => !v.includes(g == null ? void 0 : g[e.value || ""])), l();
|
|
616
616
|
},
|
|
617
617
|
changeRowKey: l,
|
|
618
618
|
syncSelectedRows: (v) => {
|
|
619
619
|
if (e.value && t.value.length !== n.value.length) {
|
|
620
|
-
const
|
|
620
|
+
const g = n.value.map((c) => c[e.value]), y = t.value.filter((c) => !g.includes(c));
|
|
621
621
|
v.forEach((c) => {
|
|
622
|
-
|
|
622
|
+
y.includes(c[e.value]) && n.value.push(J(c));
|
|
623
623
|
});
|
|
624
624
|
}
|
|
625
625
|
}
|
|
626
626
|
};
|
|
627
627
|
}
|
|
628
|
-
function
|
|
629
|
-
const t =
|
|
628
|
+
function $a(e, o) {
|
|
629
|
+
const t = x(() => o || 0), n = O(), u = O(e);
|
|
630
630
|
function l() {
|
|
631
631
|
n.value && clearTimeout(n.value);
|
|
632
632
|
}
|
|
633
|
-
async function
|
|
634
|
-
return t.value === 0 || t.value === void 0 ? u.value(...
|
|
633
|
+
async function s(...r) {
|
|
634
|
+
return t.value === 0 || t.value === void 0 ? u.value(...r) : (l(), new Promise(async (w) => {
|
|
635
635
|
var v;
|
|
636
|
-
(v =
|
|
637
|
-
|
|
636
|
+
(v = r[0]) != null && v.immediate ? w(await u.value(...r)) : n.value = setTimeout(async () => {
|
|
637
|
+
w(await u.value(...r));
|
|
638
638
|
}, t.value);
|
|
639
639
|
}));
|
|
640
640
|
}
|
|
641
|
-
return
|
|
641
|
+
return ra(l), {
|
|
642
642
|
cancel: l,
|
|
643
|
-
run:
|
|
643
|
+
run: s
|
|
644
644
|
};
|
|
645
645
|
}
|
|
646
|
-
function
|
|
647
|
-
const o =
|
|
646
|
+
function Fa(e) {
|
|
647
|
+
const o = x(() => e.polling), t = x(() => e.request), n = x(() => e.postData), u = x(() => e.debounceTime), l = x(() => e.dataSource);
|
|
648
648
|
return {
|
|
649
649
|
polling: o,
|
|
650
650
|
request: t,
|
|
@@ -653,111 +653,111 @@ function $a(e) {
|
|
|
653
653
|
dataSource: l
|
|
654
654
|
};
|
|
655
655
|
}
|
|
656
|
-
function
|
|
657
|
-
const
|
|
658
|
-
|
|
659
|
-
const
|
|
660
|
-
return
|
|
661
|
-
|
|
662
|
-
}, Math.max(
|
|
656
|
+
function Ia({ polling: e, request: o, postData: t, dataSource: n, 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: S }, $) {
|
|
657
|
+
const T = O(), P = O(!0), D = O(!1), Y = O(!1), j = O([]), L = O(), G = $a(async (f) => {
|
|
658
|
+
L.value && clearTimeout(L.value);
|
|
659
|
+
const N = await I(f), A = Ht(e.value, N);
|
|
660
|
+
return A && !T.value && (L.value = setTimeout(() => {
|
|
661
|
+
G.run({ ...f, isPolling: A });
|
|
662
|
+
}, Math.max(A, 2e3))), N;
|
|
663
663
|
}, l.value || 10);
|
|
664
664
|
jt(() => {
|
|
665
|
-
|
|
666
|
-
}),
|
|
667
|
-
|
|
668
|
-
}),
|
|
669
|
-
e.value ?
|
|
670
|
-
}, { immediate: !0 }),
|
|
665
|
+
T.value = !0, clearTimeout(L.value);
|
|
666
|
+
}), kt(() => {
|
|
667
|
+
T.value = !0, clearTimeout(L.value);
|
|
668
|
+
}), X(() => e.value, () => {
|
|
669
|
+
e.value ? G.run({ isPolling: !0 }) : clearTimeout(L.value);
|
|
670
|
+
}, { immediate: !0 }), X([
|
|
671
671
|
() => u.value,
|
|
672
672
|
() => n.value,
|
|
673
673
|
() => c
|
|
674
674
|
], () => {
|
|
675
|
-
o.value ? (!
|
|
675
|
+
o.value ? (!P.value || !e.value) && G.run({ isPolling: !1 }) : F(n.value || []);
|
|
676
676
|
}, {
|
|
677
677
|
deep: !0,
|
|
678
678
|
immediate: !0
|
|
679
679
|
});
|
|
680
|
-
const
|
|
680
|
+
const M = x(() => {
|
|
681
681
|
if (S.value)
|
|
682
|
-
return h(
|
|
683
|
-
const f = h(
|
|
684
|
-
return !h(
|
|
685
|
-
}),
|
|
682
|
+
return h(j);
|
|
683
|
+
const f = h(s).filter((N) => N.show || N.show === void 0);
|
|
684
|
+
return !h(j) || !f || f.length === 0 ? [] : h(j);
|
|
685
|
+
}), H = x(() => h(j).some((f) => f.children && f.children.length > 0));
|
|
686
686
|
function a(f) {
|
|
687
|
-
|
|
687
|
+
Y.value = f;
|
|
688
688
|
}
|
|
689
|
-
function
|
|
690
|
-
|
|
689
|
+
function p(f, N, A, K) {
|
|
690
|
+
G.run({ pagination: f, filters: N, sorter: A, extra: K, isPolling: !1 }), $("change", f, N, A, K);
|
|
691
691
|
}
|
|
692
|
-
const
|
|
692
|
+
const I = async (f = {}) => {
|
|
693
693
|
var Se, xe, we;
|
|
694
|
-
const { pagination:
|
|
695
|
-
if (!h(o) || !$e(h(o)) || h(u) &&
|
|
694
|
+
const { pagination: N, filters: A = {}, sorter: K = {}, removeKeys: ve = [], isPolling: Oe = !1 } = f;
|
|
695
|
+
if (!h(o) || !$e(h(o)) || h(u) && r.value || D.value)
|
|
696
696
|
return n.value || [];
|
|
697
|
-
if (
|
|
698
|
-
|
|
697
|
+
if (D.value = !0, !Oe || h(u) || P.value ? w(!0) : a(!0), h(u)) {
|
|
698
|
+
P.value = !1, D.value = !1;
|
|
699
699
|
return;
|
|
700
700
|
}
|
|
701
|
-
|
|
701
|
+
N && b(N);
|
|
702
702
|
try {
|
|
703
|
-
let
|
|
704
|
-
if (te(
|
|
705
|
-
|
|
703
|
+
let le = {};
|
|
704
|
+
if (te(N) && !N || te(m))
|
|
705
|
+
le = {};
|
|
706
706
|
else {
|
|
707
|
-
const { current: E = 1, pageSize:
|
|
708
|
-
|
|
707
|
+
const { current: E = 1, pageSize: se = 10, total: q } = h(m) || {};
|
|
708
|
+
le.pageNum = Wt({ current: E, pageSize: se, total: q }, ve.length), ve.length && g(ve), le.pageSize = se;
|
|
709
709
|
}
|
|
710
|
-
(
|
|
711
|
-
const
|
|
712
|
-
E && (E != null && E.order) ? v(h(
|
|
710
|
+
(ue(K) ? [K] : K).forEach((E) => {
|
|
711
|
+
const se = (E == null ? void 0 : E.columnKey) || (E == null ? void 0 : E.field);
|
|
712
|
+
E && (E != null && E.order) ? v(h(s).map((q) => (q.dataIndex === se ? q.sortOrder = E == null ? void 0 : E.order : q.sortOrder = null, q))) : E && v(h(s).map((q) => (q.dataIndex === se && (q.sortOrder = null), q)));
|
|
713
713
|
});
|
|
714
|
-
let
|
|
715
|
-
...
|
|
714
|
+
let fe = {
|
|
715
|
+
...le || {},
|
|
716
716
|
...f.params,
|
|
717
717
|
...c
|
|
718
718
|
};
|
|
719
|
-
|
|
720
|
-
let
|
|
721
|
-
const
|
|
722
|
-
return
|
|
723
|
-
total:
|
|
724
|
-
}),
|
|
725
|
-
} catch (
|
|
726
|
-
|
|
719
|
+
d && $e(d) && (fe = await d(fe, K, A));
|
|
720
|
+
let V = [];
|
|
721
|
+
const ne = await ((Se = h(o)) == null ? void 0 : Se(fe, K, A));
|
|
722
|
+
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
|
+
total: ne.total || (V == null ? void 0 : V.length) || 0
|
|
724
|
+
}), F(V), V) : [];
|
|
725
|
+
} catch (le) {
|
|
726
|
+
j.value === void 0 && F([]), $("requestError", le);
|
|
727
727
|
} finally {
|
|
728
|
-
|
|
728
|
+
P.value = !1, w(!1);
|
|
729
729
|
}
|
|
730
730
|
return [];
|
|
731
731
|
};
|
|
732
|
-
function
|
|
733
|
-
const
|
|
734
|
-
nt(
|
|
732
|
+
function F(f) {
|
|
733
|
+
const N = _t(J(f), h(m.value));
|
|
734
|
+
nt(N, j.value) || (j.value = N);
|
|
735
735
|
}
|
|
736
|
-
function
|
|
737
|
-
switch (
|
|
736
|
+
function B({ key: f, params: N, type: A = "update" }) {
|
|
737
|
+
switch (A) {
|
|
738
738
|
case "update":
|
|
739
|
-
|
|
739
|
+
j.value = j.value.map((K) => f && N[f] === K[f] ? { ...K, ...N } : K);
|
|
740
740
|
break;
|
|
741
741
|
case "add":
|
|
742
|
-
|
|
742
|
+
j.value.push(N);
|
|
743
743
|
break;
|
|
744
744
|
case "delete":
|
|
745
|
-
|
|
745
|
+
j.value = j.value.filter((K) => f ? f && N[f] !== K[f] : !0);
|
|
746
746
|
break;
|
|
747
747
|
}
|
|
748
748
|
}
|
|
749
749
|
return {
|
|
750
|
-
getDataSourceRef:
|
|
751
|
-
isTreeDataRef:
|
|
752
|
-
reSetDataList:
|
|
753
|
-
changeDataValue:
|
|
754
|
-
handleTableChange:
|
|
750
|
+
getDataSourceRef: M,
|
|
751
|
+
isTreeDataRef: H,
|
|
752
|
+
reSetDataList: F,
|
|
753
|
+
changeDataValue: B,
|
|
754
|
+
handleTableChange: p,
|
|
755
755
|
reload: async (f) => {
|
|
756
|
-
h(o) ? await
|
|
756
|
+
h(o) ? await G.run({ ...f, isPolling: !1 }) : $("reload");
|
|
757
757
|
}
|
|
758
758
|
};
|
|
759
759
|
}
|
|
760
|
-
function
|
|
760
|
+
function Pa(e) {
|
|
761
761
|
const o = {};
|
|
762
762
|
return e.forEach((t) => {
|
|
763
763
|
let n = t.initialValue;
|
|
@@ -765,106 +765,106 @@ function Ia(e) {
|
|
|
765
765
|
!n && u.includes(t.valueType) ? n = void 0 : !n && l.includes(t.valueType) ? n = null : n || (n = ""), t.name === "dateRange" ? (o[t.rangeStartName || "start"] = n ? n[0] : null, o[t.rangeEndName || "end"] = n ? n[1] : null) : t.name && (o[t.name] = n);
|
|
766
766
|
}), o;
|
|
767
767
|
}
|
|
768
|
-
function
|
|
769
|
-
const l =
|
|
770
|
-
var
|
|
771
|
-
return
|
|
768
|
+
function Oa({ search: e, searchMap: o, params: t, columns: n, setPagination: u }) {
|
|
769
|
+
const l = de({}), s = de({}), r = O([]), w = x(() => {
|
|
770
|
+
var y;
|
|
771
|
+
return ue(e.value) ? !!((y = e.value) != null && y.showSearch) : !!e.value;
|
|
772
772
|
});
|
|
773
|
-
|
|
773
|
+
Et(() => {
|
|
774
774
|
v("all");
|
|
775
|
-
}),
|
|
775
|
+
}), X(() => t.value, () => {
|
|
776
776
|
v("params");
|
|
777
777
|
}, {
|
|
778
778
|
deep: !0
|
|
779
|
-
}),
|
|
779
|
+
}), X(() => o.value, () => {
|
|
780
780
|
v("searchMap");
|
|
781
781
|
}, {
|
|
782
782
|
deep: !0
|
|
783
|
-
}),
|
|
783
|
+
}), X(() => n.value, () => {
|
|
784
784
|
v("columns");
|
|
785
785
|
}, {
|
|
786
786
|
deep: !0
|
|
787
787
|
});
|
|
788
|
-
const v = (
|
|
789
|
-
var
|
|
788
|
+
const v = (y) => {
|
|
789
|
+
var b, m;
|
|
790
790
|
const c = [];
|
|
791
|
-
if ((
|
|
792
|
-
|
|
791
|
+
if ((y === "all" || y === "searchMap") && ((b = o.value) == null || b.forEach((d) => c.push(d)), c.forEach((d) => {
|
|
792
|
+
r.value.some((S) => S.name === d.name) ? r.value = r.value.map((S) => S.name === d.name ? {
|
|
793
793
|
...S,
|
|
794
|
-
...
|
|
795
|
-
} : S) :
|
|
796
|
-
})), (
|
|
797
|
-
|
|
798
|
-
}), c.forEach((
|
|
799
|
-
|
|
794
|
+
...d
|
|
795
|
+
} : S) : r.value.push(d);
|
|
796
|
+
})), (y === "all" || y === "columns") && ((m = n.value) != null && m.length) && (n.value && n.value.forEach((d) => {
|
|
797
|
+
d.searchConfig && c.push(d.searchConfig);
|
|
798
|
+
}), c.forEach((d) => {
|
|
799
|
+
r.value.some((S) => S.name === d.name) ? r.value = r.value.map((S) => S.name === d.name ? {
|
|
800
800
|
...S,
|
|
801
|
-
...
|
|
802
|
-
} : S) :
|
|
803
|
-
})),
|
|
801
|
+
...d
|
|
802
|
+
} : S) : r.value.push(d);
|
|
803
|
+
})), y === "all" || y === "searchMap" || y === "columns") {
|
|
804
804
|
u({ current: 1 });
|
|
805
|
-
const
|
|
806
|
-
Object.assign(
|
|
807
|
-
for (const S in
|
|
808
|
-
l[S] || (l[S] =
|
|
805
|
+
const d = Pa(c);
|
|
806
|
+
Object.assign(s, { ...d });
|
|
807
|
+
for (const S in d)
|
|
808
|
+
l[S] || (l[S] = d[S]);
|
|
809
809
|
}
|
|
810
|
-
(
|
|
810
|
+
(y === "all" || y === "params") && !w.value && (u({ current: 1 }), Object.assign(l, t.value));
|
|
811
811
|
};
|
|
812
|
-
function y
|
|
813
|
-
u({ current: 1 }), Object.assign(l,
|
|
812
|
+
function g(y) {
|
|
813
|
+
u({ current: 1 }), Object.assign(l, y);
|
|
814
814
|
}
|
|
815
|
-
return { formDataRef:
|
|
815
|
+
return { formDataRef: r, formParamsRef: l, defaultParamsRef: s, setFormParams: g };
|
|
816
816
|
}
|
|
817
|
-
function
|
|
818
|
-
const n = O(void 0), u =
|
|
819
|
-
|
|
820
|
-
var
|
|
821
|
-
(
|
|
822
|
-
const
|
|
823
|
-
|
|
817
|
+
function Ba({ columns: e, columnsState: o, changeColumns: t }) {
|
|
818
|
+
const n = O(void 0), u = de({}), l = de({}), s = de({}), r = O([]);
|
|
819
|
+
X(() => e.value, () => {
|
|
820
|
+
var g;
|
|
821
|
+
(g = h(e)) == null || g.forEach(({ show: y, key: c, fixed: b }, m) => {
|
|
822
|
+
const d = ot(c, m);
|
|
823
|
+
d && (s[d] = { show: y === void 0 ? !0 : y, fixed: b });
|
|
824
824
|
});
|
|
825
825
|
}, {
|
|
826
826
|
deep: !0,
|
|
827
827
|
immediate: !0
|
|
828
|
-
}),
|
|
829
|
-
const
|
|
830
|
-
v(
|
|
828
|
+
}), X(() => e.value, () => {
|
|
829
|
+
const g = h(e).map((y) => y.key);
|
|
830
|
+
v(g);
|
|
831
831
|
}, {
|
|
832
832
|
deep: !0,
|
|
833
833
|
immediate: !0
|
|
834
|
-
}),
|
|
835
|
-
var
|
|
836
|
-
const
|
|
837
|
-
...(
|
|
838
|
-
...h(
|
|
834
|
+
}), he(() => {
|
|
835
|
+
var y;
|
|
836
|
+
const g = {
|
|
837
|
+
...(y = h(o)) == null ? void 0 : y.value,
|
|
838
|
+
...h(s)
|
|
839
839
|
};
|
|
840
|
-
Object.assign(u,
|
|
840
|
+
Object.assign(u, g), Object.assign(l, g);
|
|
841
841
|
});
|
|
842
|
-
function
|
|
843
|
-
n.value =
|
|
842
|
+
function w(g, y) {
|
|
843
|
+
n.value = y, Object.assign(u, g), t == null || t(u, y === "fixed");
|
|
844
844
|
}
|
|
845
|
-
function v(
|
|
846
|
-
|
|
845
|
+
function v(g) {
|
|
846
|
+
r.value = g;
|
|
847
847
|
}
|
|
848
848
|
return {
|
|
849
849
|
columnsMap: u,
|
|
850
850
|
operationType: n,
|
|
851
|
-
setColumnsMap:
|
|
852
|
-
sortKeyColumns:
|
|
851
|
+
setColumnsMap: w,
|
|
852
|
+
sortKeyColumns: r,
|
|
853
853
|
cacheColumnsMap: l,
|
|
854
854
|
setSortKeyColumns: v
|
|
855
855
|
};
|
|
856
856
|
}
|
|
857
|
-
function
|
|
858
|
-
const o =
|
|
857
|
+
function Da(e) {
|
|
858
|
+
const o = x(() => e.draggabled), t = x(() => e.neverScroll), n = x(() => e.autoScroll);
|
|
859
859
|
return {
|
|
860
860
|
draggabled: o,
|
|
861
861
|
neverScroll: t,
|
|
862
862
|
autoScroll: n
|
|
863
863
|
};
|
|
864
864
|
}
|
|
865
|
-
function
|
|
866
|
-
const
|
|
867
|
-
|
|
865
|
+
function Ma({ scroll: e, columns: o, breakpoint: t, draggabled: n, autoScroll: u, neverScroll: l }) {
|
|
866
|
+
const s = O([]), r = O([]);
|
|
867
|
+
X([
|
|
868
868
|
() => e.value,
|
|
869
869
|
() => o.value,
|
|
870
870
|
() => t.value,
|
|
@@ -872,123 +872,122 @@ function Da({ scroll: e, columns: o, breakpoint: t, draggabled: n, autoScroll: u
|
|
|
872
872
|
() => u.value,
|
|
873
873
|
() => l.value
|
|
874
874
|
], () => {
|
|
875
|
-
|
|
875
|
+
s.value = J(g(h(o))), r.value = J(g(h(o)));
|
|
876
876
|
}, {
|
|
877
877
|
deep: !0,
|
|
878
878
|
immediate: !0
|
|
879
879
|
});
|
|
880
|
-
const
|
|
881
|
-
const
|
|
880
|
+
const w = x(() => {
|
|
881
|
+
const m = v(h(s).filter(($) => $.fixed === "left")), d = v(h(s).filter(($) => $.fixed !== "left" && $.fixed !== "right")), S = v(h(s).filter(($) => $.fixed === "right"));
|
|
882
882
|
return [
|
|
883
|
-
...g,
|
|
884
883
|
...m,
|
|
884
|
+
...d,
|
|
885
885
|
...S
|
|
886
886
|
];
|
|
887
887
|
});
|
|
888
|
-
function v(
|
|
889
|
-
return
|
|
888
|
+
function v(m) {
|
|
889
|
+
return m.sort((d, S) => Gt(d, S, "order", 0));
|
|
890
890
|
}
|
|
891
|
-
function
|
|
892
|
-
return
|
|
893
|
-
var
|
|
894
|
-
if (
|
|
895
|
-
return
|
|
896
|
-
if (
|
|
897
|
-
if ((
|
|
898
|
-
|
|
891
|
+
function g(m) {
|
|
892
|
+
return J(m).map((d, S) => {
|
|
893
|
+
var $;
|
|
894
|
+
if (d.dataIndex === "action" || S === m.length - 1 ? d.resizable = !1 : d.resizable = te(d.resizable) ? d.resizable : !!(ut(d.width) && h(n)), !d.width || h(l))
|
|
895
|
+
return d;
|
|
896
|
+
if (d.dataIndex === "action" && h(u))
|
|
897
|
+
if (($ = h(e)) != null && $.x || !h(t))
|
|
898
|
+
d.width = d.width || 100, d.fixed = "right";
|
|
899
899
|
else {
|
|
900
|
-
const
|
|
901
|
-
|
|
900
|
+
const T = h(o).find((P) => P.dataIndex === d.dataIndex);
|
|
901
|
+
d.width = (T == null ? void 0 : T.width) || "", d.fixed = T == null ? void 0 : T.fixed;
|
|
902
902
|
}
|
|
903
|
-
return
|
|
903
|
+
return d;
|
|
904
904
|
});
|
|
905
905
|
}
|
|
906
|
-
function
|
|
907
|
-
|
|
906
|
+
function y(m, d) {
|
|
907
|
+
s.value = s.value.map((S) => (S.uuid === d.uuid && (S.width = m), S));
|
|
908
908
|
}
|
|
909
|
-
function c(
|
|
910
|
-
if (
|
|
911
|
-
|
|
909
|
+
function c(m) {
|
|
910
|
+
if (m.length <= 0) {
|
|
911
|
+
s.value = [];
|
|
912
912
|
return;
|
|
913
913
|
}
|
|
914
|
-
nt(
|
|
914
|
+
nt(g(J(m)), s.value) || (s.value = g(J(m)));
|
|
915
915
|
}
|
|
916
|
-
function
|
|
917
|
-
let
|
|
918
|
-
|
|
919
|
-
var
|
|
920
|
-
const
|
|
921
|
-
show: (
|
|
922
|
-
fixed: (
|
|
923
|
-
order: (
|
|
916
|
+
function b(m) {
|
|
917
|
+
let d = J(o.value);
|
|
918
|
+
d = d.map((S) => {
|
|
919
|
+
var T, P, D;
|
|
920
|
+
const $ = S.key ? {
|
|
921
|
+
show: (T = m[S.key]) == null ? void 0 : T.show,
|
|
922
|
+
fixed: (P = m[S.key]) == null ? void 0 : P.fixed,
|
|
923
|
+
order: (D = m[S.key]) == null ? void 0 : D.order
|
|
924
924
|
} : {};
|
|
925
925
|
return {
|
|
926
926
|
...S,
|
|
927
|
-
|
|
927
|
+
...$
|
|
928
928
|
};
|
|
929
|
-
}), c(
|
|
929
|
+
}), c(d);
|
|
930
930
|
}
|
|
931
931
|
return {
|
|
932
932
|
breakpoint: t,
|
|
933
|
-
getProColumns:
|
|
934
|
-
cacheProColumns:
|
|
933
|
+
getProColumns: w,
|
|
934
|
+
cacheProColumns: r,
|
|
935
935
|
setColumns: c,
|
|
936
|
-
changeColumns:
|
|
937
|
-
resizeColumnWidth:
|
|
936
|
+
changeColumns: b,
|
|
937
|
+
resizeColumnWidth: y
|
|
938
938
|
};
|
|
939
939
|
}
|
|
940
940
|
function Na(e) {
|
|
941
|
-
const o =
|
|
941
|
+
const o = x(() => e.scroll), t = x(() => e.autoScroll), n = x(() => e.modalScroll), u = x(() => e.neverScroll), l = x(() => e.rowSelection), s = x(() => e.scrollBreakpoint);
|
|
942
942
|
return {
|
|
943
943
|
scroll: o,
|
|
944
944
|
neverScroll: u,
|
|
945
945
|
rowSelection: l,
|
|
946
946
|
autoScroll: t,
|
|
947
947
|
modalScroll: n,
|
|
948
|
-
scrollBreakpoint:
|
|
948
|
+
scrollBreakpoint: s
|
|
949
949
|
};
|
|
950
950
|
}
|
|
951
|
-
function ja({ scroll: e, columns: o, autoScroll: t, modalScroll: n, neverScroll: u, rowSelection: l,
|
|
952
|
-
const v =
|
|
953
|
-
var c,
|
|
954
|
-
return h(
|
|
955
|
-
}),
|
|
951
|
+
function ja({ scroll: e, columns: o, autoScroll: t, modalScroll: n, neverScroll: u, rowSelection: l, screens: s, innerWidth: r, scrollBreakpoint: w }) {
|
|
952
|
+
const v = x(() => {
|
|
953
|
+
var c, b, m;
|
|
954
|
+
return h(w) ? ut(h(w)) ? r.value > h(w) : qt(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;
|
|
955
|
+
}), g = x(() => {
|
|
956
956
|
let c = 0;
|
|
957
|
-
const
|
|
958
|
-
|
|
959
|
-
c += Number.parseInt(
|
|
957
|
+
const b = h(l) ? 60 : 0, m = 150, d = J(h(o));
|
|
958
|
+
d.forEach((T) => {
|
|
959
|
+
c += Number.parseInt(T.width) || 0;
|
|
960
960
|
});
|
|
961
|
-
const
|
|
962
|
-
return
|
|
961
|
+
const $ = d.filter((T) => !Reflect.has(T, "width")).length;
|
|
962
|
+
return $ !== 0 && (c += $ * m), b && (c += b), c;
|
|
963
963
|
});
|
|
964
|
-
return { getScrollRef:
|
|
965
|
-
var
|
|
966
|
-
const { xl: c } = r.value;
|
|
964
|
+
return { getScrollRef: x(() => {
|
|
965
|
+
var c, b;
|
|
967
966
|
return h(u) ? {} : h(e) && Object.keys(h(e)).length ? h(e) : h(n) ? {
|
|
968
|
-
y: ((
|
|
969
|
-
} : h(t) ? v.value ? {} : te(v.value) ? { x: h(
|
|
967
|
+
y: ((c = h(e)) == null ? void 0 : c.y) || ((b = s.value) != null && b.xl ? 400 : 235)
|
|
968
|
+
} : h(t) ? v.value ? {} : te(v.value) ? { x: h(g) } : {} : {};
|
|
970
969
|
}), breakpoint: v };
|
|
971
970
|
}
|
|
972
|
-
const ft = Symbol("table-context"),
|
|
973
|
-
|
|
974
|
-
},
|
|
975
|
-
function
|
|
976
|
-
const t =
|
|
977
|
-
|
|
971
|
+
const ft = Symbol("table-context"), ka = (e = Symbol(), o) => Kt(e, o || {}), Ea = (e) => {
|
|
972
|
+
zt(ft, e);
|
|
973
|
+
}, ie = (e) => ka(ft, e);
|
|
974
|
+
function za(e, o) {
|
|
975
|
+
const t = de({});
|
|
976
|
+
he(() => {
|
|
978
977
|
n();
|
|
979
978
|
});
|
|
980
979
|
function n() {
|
|
981
|
-
Object.keys(e).map((
|
|
982
|
-
u(
|
|
980
|
+
Object.keys(e).map((s) => {
|
|
981
|
+
u(s, e[s]);
|
|
983
982
|
});
|
|
984
|
-
const l = o.find((
|
|
983
|
+
const l = o.find((s) => s.valueType === "dateRange");
|
|
985
984
|
l && u(l.name || "", e[l.rangeStartName || "start"] ? [
|
|
986
985
|
e[l.rangeStartName || "start"],
|
|
987
986
|
e[l.rangeEndName || "end"]
|
|
988
987
|
] : []);
|
|
989
988
|
}
|
|
990
|
-
function u(l,
|
|
991
|
-
t[l] =
|
|
989
|
+
function u(l, s) {
|
|
990
|
+
t[l] = s;
|
|
992
991
|
}
|
|
993
992
|
return {
|
|
994
993
|
formState: t,
|
|
@@ -996,7 +995,7 @@ function Ea(e, o) {
|
|
|
996
995
|
changeFormState: u
|
|
997
996
|
};
|
|
998
997
|
}
|
|
999
|
-
const
|
|
998
|
+
const Ka = (e) => ({
|
|
1000
999
|
[`${e.componentCls}-form`]: {
|
|
1001
1000
|
["&-collapse-button"]: {
|
|
1002
1001
|
display: "flex",
|
|
@@ -1024,10 +1023,10 @@ const za = (e) => ({
|
|
|
1024
1023
|
}
|
|
1025
1024
|
}
|
|
1026
1025
|
}), {
|
|
1027
|
-
useBreakpoint:
|
|
1026
|
+
useBreakpoint: Ya
|
|
1028
1027
|
} = He, {
|
|
1029
|
-
MonthPicker:
|
|
1030
|
-
RangePicker:
|
|
1028
|
+
MonthPicker: La,
|
|
1029
|
+
RangePicker: Aa
|
|
1031
1030
|
} = rt, ht = /* @__PURE__ */ ae({
|
|
1032
1031
|
name: "ProTableForm",
|
|
1033
1032
|
props: {
|
|
@@ -1038,7 +1037,7 @@ const za = (e) => ({
|
|
|
1038
1037
|
searchText: "查询"
|
|
1039
1038
|
})
|
|
1040
1039
|
},
|
|
1041
|
-
modal:
|
|
1040
|
+
modal: ce.modalScroll,
|
|
1042
1041
|
searchMap: {
|
|
1043
1042
|
type: Array,
|
|
1044
1043
|
default: () => []
|
|
@@ -1056,17 +1055,17 @@ const za = (e) => ({
|
|
|
1056
1055
|
const {
|
|
1057
1056
|
wrapSSR: u,
|
|
1058
1057
|
hashId: l
|
|
1059
|
-
} = Pe("ProTableForm", [
|
|
1060
|
-
formState:
|
|
1061
|
-
resetFormState:
|
|
1058
|
+
} = Pe("ProTableForm", [Ka], e.prefixCls), s = Ya(), {
|
|
1059
|
+
formState: r,
|
|
1060
|
+
resetFormState: w,
|
|
1062
1061
|
changeFormState: v
|
|
1063
|
-
} =
|
|
1062
|
+
} = za(e.defaultParams || {}, e.searchMap || []), g = O(!1), y = x(() => {
|
|
1064
1063
|
var a;
|
|
1065
1064
|
return !!((a = e.search) != null && a.showSearch);
|
|
1066
|
-
}), c =
|
|
1067
|
-
var a,
|
|
1068
|
-
return ((a = e.search) == null ? void 0 : a.showReset) === void 0 ?
|
|
1069
|
-
}),
|
|
1065
|
+
}), c = x(() => {
|
|
1066
|
+
var a, p;
|
|
1067
|
+
return ((a = e.search) == null ? void 0 : a.showReset) === void 0 ? y.value : (p = e.search) == null ? void 0 : p.showReset;
|
|
1068
|
+
}), b = [{
|
|
1070
1069
|
value: "xxl",
|
|
1071
1070
|
span: 4
|
|
1072
1071
|
}, {
|
|
@@ -1084,132 +1083,132 @@ const za = (e) => ({
|
|
|
1084
1083
|
}, {
|
|
1085
1084
|
value: "xs",
|
|
1086
1085
|
span: 1
|
|
1087
|
-
}],
|
|
1086
|
+
}], m = x(() => {
|
|
1088
1087
|
var a;
|
|
1089
|
-
return
|
|
1088
|
+
return d((a = e.search) == null ? void 0 : a.span);
|
|
1090
1089
|
});
|
|
1091
|
-
|
|
1090
|
+
X(() => {
|
|
1092
1091
|
var a;
|
|
1093
1092
|
return (a = e.search) == null ? void 0 : a.defaultCollapsed;
|
|
1094
1093
|
}, (a) => {
|
|
1095
|
-
|
|
1094
|
+
g.value = g.value || !!a;
|
|
1096
1095
|
});
|
|
1097
|
-
const
|
|
1098
|
-
let
|
|
1099
|
-
for (let
|
|
1100
|
-
const
|
|
1101
|
-
if (
|
|
1102
|
-
|
|
1096
|
+
const d = (a) => {
|
|
1097
|
+
let p = 4;
|
|
1098
|
+
for (let I = 0; I < b.length; I += 1) {
|
|
1099
|
+
const F = b[I].value;
|
|
1100
|
+
if (s.value[F]) {
|
|
1101
|
+
p = (a == null ? void 0 : a[F]) || (e.modal ? 3 : b[I].span);
|
|
1103
1102
|
break;
|
|
1104
1103
|
}
|
|
1105
1104
|
}
|
|
1106
|
-
return
|
|
1105
|
+
return p;
|
|
1107
1106
|
}, S = (a) => {
|
|
1108
|
-
|
|
1109
|
-
},
|
|
1110
|
-
...
|
|
1107
|
+
g.value = a;
|
|
1108
|
+
}, $ = (a, p, I) => (a + 1) % p === 0 ? {
|
|
1109
|
+
...I,
|
|
1111
1110
|
marginRight: 0
|
|
1112
1111
|
} : {
|
|
1113
|
-
...
|
|
1112
|
+
...I,
|
|
1114
1113
|
marginRight: "2%"
|
|
1115
|
-
},
|
|
1116
|
-
var
|
|
1117
|
-
switch (
|
|
1114
|
+
}, T = (a, p) => {
|
|
1115
|
+
var I, F, B;
|
|
1116
|
+
switch (p.valueType) {
|
|
1118
1117
|
case "text":
|
|
1119
|
-
v(
|
|
1118
|
+
v(p.name || "", a || p.initialValue || "");
|
|
1120
1119
|
break;
|
|
1121
1120
|
case "select":
|
|
1122
|
-
v(
|
|
1121
|
+
v(p.name || "", a || a === 0 ? a : p.initialValue || void 0);
|
|
1123
1122
|
break;
|
|
1124
1123
|
case "treeSelect":
|
|
1125
|
-
v(
|
|
1124
|
+
v(p.name || "", a || a === 0 ? a : p.initialValue || ((I = p.field) != null && I.treeCheckable || (F = p.field) != null && F.multiple ? [] : null));
|
|
1126
1125
|
break;
|
|
1127
1126
|
case "date":
|
|
1128
|
-
v(
|
|
1127
|
+
v(p.name || "", a ? _(a).format(p.valueFormat || "YYYY-MM-DD") : p.initialValue || null);
|
|
1129
1128
|
break;
|
|
1130
1129
|
case "dateMonth":
|
|
1131
|
-
v(
|
|
1130
|
+
v(p.name || "", a ? _(a).format("YYYY-MM") : p.initialValue || null);
|
|
1132
1131
|
break;
|
|
1133
1132
|
case "dateRange":
|
|
1134
|
-
v(
|
|
1133
|
+
v(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);
|
|
1135
1134
|
break;
|
|
1136
1135
|
case "time":
|
|
1137
|
-
v(
|
|
1136
|
+
v(p.name || "", a ? _(a).format(p.valueFormat || "HH:mm:ss") : p.initialValue || null);
|
|
1138
1137
|
break;
|
|
1139
1138
|
}
|
|
1140
|
-
(
|
|
1141
|
-
},
|
|
1142
|
-
const a =
|
|
1143
|
-
return
|
|
1144
|
-
},
|
|
1145
|
-
|
|
1146
|
-
(!
|
|
1139
|
+
(B = e.search) != null && B.showSearch || p.valueType === "text" || (p.valueType === "treeSelect" || p.valueType, D());
|
|
1140
|
+
}, P = () => {
|
|
1141
|
+
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
|
+
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
|
+
}, D = (a = !1, p) => {
|
|
1144
|
+
Yt(() => {
|
|
1145
|
+
(!y.value || a) && o("search", P(), !!p);
|
|
1147
1146
|
});
|
|
1148
|
-
},
|
|
1149
|
-
|
|
1147
|
+
}, Y = (a = !0) => {
|
|
1148
|
+
w(), D(!0, a);
|
|
1150
1149
|
};
|
|
1151
1150
|
n({
|
|
1152
|
-
getFormState: () =>
|
|
1153
|
-
resetForm:
|
|
1151
|
+
getFormState: () => P(),
|
|
1152
|
+
resetForm: Y
|
|
1154
1153
|
});
|
|
1155
|
-
const
|
|
1154
|
+
const j = () => (y.value || c.value) && i(oe, null, {
|
|
1156
1155
|
default: () => [c.value && i(tt, {
|
|
1157
|
-
onClick: () =>
|
|
1156
|
+
onClick: () => Y()
|
|
1158
1157
|
}, {
|
|
1159
1158
|
default: () => {
|
|
1160
1159
|
var a;
|
|
1161
1160
|
return [((a = e.search) == null ? void 0 : a.resetText) || "重置"];
|
|
1162
1161
|
}
|
|
1163
|
-
}),
|
|
1162
|
+
}), y.value && i(tt, {
|
|
1164
1163
|
loading: e.loading,
|
|
1165
1164
|
type: "primary",
|
|
1166
|
-
onClick: () =>
|
|
1165
|
+
onClick: () => D(!0)
|
|
1167
1166
|
}, {
|
|
1168
1167
|
default: () => {
|
|
1169
1168
|
var a;
|
|
1170
1169
|
return [((a = e.search) == null ? void 0 : a.searchText) || "查询"];
|
|
1171
1170
|
}
|
|
1172
1171
|
})]
|
|
1173
|
-
}),
|
|
1172
|
+
}), L = ({
|
|
1174
1173
|
formItemStyle: a,
|
|
1175
|
-
advanced:
|
|
1176
|
-
showAdvanced:
|
|
1174
|
+
advanced: p,
|
|
1175
|
+
showAdvanced: I = !0
|
|
1177
1176
|
}) => i("div", {
|
|
1178
1177
|
style: a,
|
|
1179
1178
|
class: `${e.prefixCls}-form-collapse-button ${l.value}`
|
|
1180
|
-
}, [i(
|
|
1179
|
+
}, [i(oe, {
|
|
1181
1180
|
size: 16
|
|
1182
1181
|
}, {
|
|
1183
1182
|
default: () => {
|
|
1184
|
-
var
|
|
1185
|
-
return [
|
|
1183
|
+
var F, B;
|
|
1184
|
+
return [j(), I && i("span", {
|
|
1186
1185
|
class: `${e.prefixCls}-a ${l.value}`,
|
|
1187
|
-
onClick: () => S(!
|
|
1188
|
-
}, [
|
|
1186
|
+
onClick: () => S(!p)
|
|
1187
|
+
}, [p ? "收起" : "展开", (F = e.search) != null && F.collapseRender ? (B = e.search) == null ? void 0 : B.collapseRender() : p ? i(ca, null, null) : i(da, null, null)])];
|
|
1189
1188
|
}
|
|
1190
|
-
})]),
|
|
1191
|
-
var
|
|
1192
|
-
let
|
|
1193
|
-
const
|
|
1189
|
+
})]), G = (a) => {
|
|
1190
|
+
var F, B;
|
|
1191
|
+
let p;
|
|
1192
|
+
const I = y.value ? at : at.Search;
|
|
1194
1193
|
switch (a.valueType) {
|
|
1195
1194
|
case "text":
|
|
1196
|
-
|
|
1195
|
+
p = i(I, U({
|
|
1197
1196
|
style: {
|
|
1198
1197
|
width: "100%"
|
|
1199
1198
|
},
|
|
1200
|
-
value:
|
|
1199
|
+
value: r[a.name],
|
|
1201
1200
|
placeholder: a.placeholder || "请输入",
|
|
1202
1201
|
allowClear: a.allowClear || a.allowClear === !1 ? a.allowClear : !0,
|
|
1203
|
-
onChange: (f) =>
|
|
1204
|
-
onSearch: (f) =>
|
|
1202
|
+
onChange: (f) => T(f.target.value, a),
|
|
1203
|
+
onSearch: (f) => D()
|
|
1205
1204
|
}, a.field || {}), null);
|
|
1206
1205
|
break;
|
|
1207
1206
|
case "select":
|
|
1208
|
-
|
|
1207
|
+
p = i(ea, U({
|
|
1209
1208
|
style: {
|
|
1210
1209
|
width: "100%"
|
|
1211
1210
|
},
|
|
1212
|
-
value: a.loading ? void 0 :
|
|
1211
|
+
value: a.loading ? void 0 : r[a.name],
|
|
1213
1212
|
optionFilterProp: "label",
|
|
1214
1213
|
placeholder: a.placeholder || "请选择",
|
|
1215
1214
|
showSearch: a.showSearch,
|
|
@@ -1218,19 +1217,19 @@ const za = (e) => ({
|
|
|
1218
1217
|
notFoundContent: a.loading === void 0 ? void 0 : a.loading ? i(Le, {
|
|
1219
1218
|
size: "small"
|
|
1220
1219
|
}, null) : void 0,
|
|
1221
|
-
onChange: (f) =>
|
|
1222
|
-
options: (
|
|
1220
|
+
onChange: (f) => T(f, a),
|
|
1221
|
+
options: (F = a == null ? void 0 : a.valueEnum) == null ? void 0 : F.map((f) => ({
|
|
1223
1222
|
label: f.text,
|
|
1224
1223
|
value: f.value
|
|
1225
1224
|
}))
|
|
1226
1225
|
}, a.field || {}), null);
|
|
1227
1226
|
break;
|
|
1228
1227
|
case "treeSelect":
|
|
1229
|
-
|
|
1228
|
+
p = i(Zt, U({
|
|
1230
1229
|
style: {
|
|
1231
1230
|
width: "100%"
|
|
1232
1231
|
},
|
|
1233
|
-
value:
|
|
1232
|
+
value: r[a.name],
|
|
1234
1233
|
placeholder: a.placeholder || "请选择",
|
|
1235
1234
|
allowClear: a.allowClear || a.allowClear === !1 ? a.allowClear : !0,
|
|
1236
1235
|
treeData: a.valueEnum,
|
|
@@ -1238,112 +1237,112 @@ const za = (e) => ({
|
|
|
1238
1237
|
notFoundContent: a.loading === void 0 ? void 0 : a.loading ? i(Le, {
|
|
1239
1238
|
size: "small"
|
|
1240
1239
|
}, null) : void 0,
|
|
1241
|
-
onChange: (f) =>
|
|
1240
|
+
onChange: (f) => T(f, a)
|
|
1242
1241
|
}, a.field || {}), null);
|
|
1243
1242
|
break;
|
|
1244
1243
|
case "date":
|
|
1245
|
-
|
|
1244
|
+
p = i(rt, U({
|
|
1246
1245
|
style: {
|
|
1247
1246
|
width: "100%"
|
|
1248
1247
|
},
|
|
1249
|
-
value:
|
|
1248
|
+
value: r[a.name] ? _(r[a.name], a.valueFormat || "YYYY-MM-DD") : void 0,
|
|
1250
1249
|
getPopupContainer: (f) => f && f.parentNode ? f.parentNode : f,
|
|
1251
1250
|
placeholder: a.placeholder || "请选择",
|
|
1252
1251
|
allowClear: a.allowClear || a.allowClear === !1 ? a.allowClear : !0,
|
|
1253
1252
|
format: a.valueFormat || "YYYY-MM-DD",
|
|
1254
1253
|
showTime: a.showTime,
|
|
1255
1254
|
showToday: a.showToday || !0,
|
|
1256
|
-
onChange: (f) =>
|
|
1255
|
+
onChange: (f) => T(f, a)
|
|
1257
1256
|
}, a.field || {}), null);
|
|
1258
1257
|
break;
|
|
1259
1258
|
case "dateMonth":
|
|
1260
|
-
|
|
1259
|
+
p = i(La, U({
|
|
1261
1260
|
style: {
|
|
1262
1261
|
width: "100%"
|
|
1263
1262
|
},
|
|
1264
|
-
value:
|
|
1263
|
+
value: r[a.name] ? _(r[a.name], a.valueFormat || "YYYY-MM") : void 0,
|
|
1265
1264
|
getPopupContainer: (f) => f && f.parentNode ? f.parentNode : f,
|
|
1266
1265
|
placeholder: a.placeholder || "请选择",
|
|
1267
|
-
onChange: (f) =>
|
|
1266
|
+
onChange: (f) => T(f, a)
|
|
1268
1267
|
}, a.field || {}), null);
|
|
1269
1268
|
break;
|
|
1270
1269
|
case "dateRange":
|
|
1271
|
-
|
|
1270
|
+
p = i(Aa, U({
|
|
1272
1271
|
style: {
|
|
1273
1272
|
width: "100%"
|
|
1274
1273
|
},
|
|
1275
|
-
value: (
|
|
1274
|
+
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,
|
|
1276
1275
|
getPopupContainer: (f) => f && f.parentNode ? f.parentNode : f,
|
|
1277
1276
|
placeholder: a.placeholder || ["开始日期", "结束日期"],
|
|
1278
1277
|
format: a.valueFormat || "YYYY-MM-DD HH:mm:ss",
|
|
1279
1278
|
showTime: a.showTime,
|
|
1280
|
-
onChange: (f) =>
|
|
1279
|
+
onChange: (f) => T(f, a)
|
|
1281
1280
|
}, a.field || {}), null);
|
|
1282
1281
|
break;
|
|
1283
1282
|
case "time":
|
|
1284
|
-
|
|
1283
|
+
p = i(Qt, U({
|
|
1285
1284
|
style: {
|
|
1286
1285
|
width: "100%"
|
|
1287
1286
|
},
|
|
1288
|
-
value:
|
|
1287
|
+
value: r[a.name] ? _(r[a.name], a.valueFormat || "HH:mm:ss") : void 0,
|
|
1289
1288
|
getPopupContainer: (f) => f && f.parentNode ? f.parentNode : f,
|
|
1290
1289
|
placeholder: a.placeholder || "请选择",
|
|
1291
1290
|
allowClear: a.allowClear || a.allowClear === !1 ? a.allowClear : !0,
|
|
1292
1291
|
use12Hours: a.use12Hours,
|
|
1293
1292
|
format: a.valueFormat || "HH:mm:ss",
|
|
1294
|
-
onChange: (f) =>
|
|
1293
|
+
onChange: (f) => T(f, a)
|
|
1295
1294
|
}, a.field || {}), null);
|
|
1296
1295
|
break;
|
|
1297
1296
|
}
|
|
1298
|
-
return
|
|
1299
|
-
},
|
|
1297
|
+
return p;
|
|
1298
|
+
}, M = ({
|
|
1300
1299
|
formItemStyle: a,
|
|
1301
|
-
item:
|
|
1300
|
+
item: p
|
|
1302
1301
|
}) => i("div", {
|
|
1303
1302
|
class: `${e.prefixCls}-form-item`,
|
|
1304
1303
|
style: a
|
|
1305
1304
|
}, [i(et.Item, null, {
|
|
1306
|
-
default: () => [
|
|
1307
|
-
})]),
|
|
1308
|
-
var
|
|
1309
|
-
const a = [...e.searchMap, ...((
|
|
1310
|
-
return a.map((
|
|
1311
|
-
const
|
|
1312
|
-
width: `${(100 - (
|
|
1313
|
-
}, f = F
|
|
1314
|
-
return a.length <
|
|
1305
|
+
default: () => [p.__v_isVNode ? p : G(p)]
|
|
1306
|
+
})]), H = () => {
|
|
1307
|
+
var p;
|
|
1308
|
+
const a = [...e.searchMap, ...((p = t.default) == null ? void 0 : p.call(t)) || []];
|
|
1309
|
+
return a.map((I, F) => {
|
|
1310
|
+
const B = {
|
|
1311
|
+
width: `${(100 - (m.value - 1) * 2) / m.value}%`
|
|
1312
|
+
}, f = $(F, m.value, B);
|
|
1313
|
+
return a.length < m.value || g.value ? i(Ie, null, [M({
|
|
1315
1314
|
formItemStyle: f,
|
|
1316
|
-
item:
|
|
1317
|
-
}),
|
|
1315
|
+
item: I
|
|
1316
|
+
}), F === a.length - 1 && L({
|
|
1318
1317
|
formItemStyle: {
|
|
1319
1318
|
flex: 1,
|
|
1320
1319
|
justifyContent: "flex-end"
|
|
1321
1320
|
},
|
|
1322
|
-
advanced:
|
|
1323
|
-
showAdvanced:
|
|
1324
|
-
})]) : i(Ie, null, [
|
|
1321
|
+
advanced: g.value,
|
|
1322
|
+
showAdvanced: g.value
|
|
1323
|
+
})]) : i(Ie, null, [F < m.value - 1 && M({
|
|
1325
1324
|
formItemStyle: f,
|
|
1326
|
-
item:
|
|
1327
|
-
}),
|
|
1325
|
+
item: I
|
|
1326
|
+
}), F === m.value - 1 && m.value - 1 === 0 && M({
|
|
1328
1327
|
formItemStyle: f,
|
|
1329
|
-
item:
|
|
1330
|
-
}),
|
|
1328
|
+
item: I
|
|
1329
|
+
}), F === m.value - 1 && L({
|
|
1331
1330
|
formItemStyle: {
|
|
1332
1331
|
flex: 1,
|
|
1333
1332
|
justifyContent: "flex-end"
|
|
1334
1333
|
},
|
|
1335
1334
|
advanced: !1,
|
|
1336
|
-
showAdvanced: a.length >=
|
|
1335
|
+
showAdvanced: a.length >= m.value
|
|
1337
1336
|
})]);
|
|
1338
1337
|
});
|
|
1339
1338
|
};
|
|
1340
1339
|
return () => {
|
|
1341
|
-
var a,
|
|
1340
|
+
var a, p;
|
|
1342
1341
|
return u(i("div", {
|
|
1343
1342
|
class: {
|
|
1344
1343
|
[`${l.value}`]: !0,
|
|
1345
1344
|
[`${h(e.prefixCls)}-search`]: !0,
|
|
1346
|
-
[`${(a = e.search) == null ? void 0 : a.className}`]: (
|
|
1345
|
+
[`${(a = e.search) == null ? void 0 : a.className}`]: (p = e.search) == null ? void 0 : p.className
|
|
1347
1346
|
}
|
|
1348
1347
|
}, [i(et, {
|
|
1349
1348
|
class: `${h(e.prefixCls)}-form ${l.value}`,
|
|
@@ -1351,13 +1350,13 @@ const za = (e) => ({
|
|
|
1351
1350
|
}, {
|
|
1352
1351
|
default: () => [i("div", {
|
|
1353
1352
|
class: `${h(e.prefixCls)}-form-container ${l.value}`
|
|
1354
|
-
}, [
|
|
1353
|
+
}, [H()])]
|
|
1355
1354
|
})]));
|
|
1356
1355
|
};
|
|
1357
1356
|
}
|
|
1358
1357
|
});
|
|
1359
1358
|
ht.inheritAttrs = !1;
|
|
1360
|
-
function
|
|
1359
|
+
function Va(e, o) {
|
|
1361
1360
|
const t = Ae({}, e);
|
|
1362
1361
|
for (let n = 0; n < o.length; n += 1) {
|
|
1363
1362
|
const u = o[n];
|
|
@@ -1371,7 +1370,7 @@ const be = (e) => {
|
|
|
1371
1370
|
var n;
|
|
1372
1371
|
return (n = o.value) == null ? void 0 : n.call(o, ...t);
|
|
1373
1372
|
};
|
|
1374
|
-
},
|
|
1373
|
+
}, Ha = (e) => ({
|
|
1375
1374
|
[`${e.componentCls}`]: {
|
|
1376
1375
|
width: "auto",
|
|
1377
1376
|
["&-title"]: {
|
|
@@ -1449,7 +1448,7 @@ const be = (e) => {
|
|
|
1449
1448
|
}
|
|
1450
1449
|
}
|
|
1451
1450
|
}
|
|
1452
|
-
}),
|
|
1451
|
+
}), Ne = ({
|
|
1453
1452
|
title: e,
|
|
1454
1453
|
show: o,
|
|
1455
1454
|
treeKey: t,
|
|
@@ -1459,33 +1458,33 @@ const be = (e) => {
|
|
|
1459
1458
|
}) => {
|
|
1460
1459
|
const {
|
|
1461
1460
|
cacheColumns: l,
|
|
1462
|
-
settingsAction:
|
|
1463
|
-
} =
|
|
1464
|
-
return o ? i(
|
|
1461
|
+
settingsAction: s
|
|
1462
|
+
} = ie();
|
|
1463
|
+
return o ? i(ee, {
|
|
1465
1464
|
title: e
|
|
1466
1465
|
}, {
|
|
1467
1466
|
default: () => {
|
|
1468
|
-
var
|
|
1467
|
+
var r;
|
|
1469
1468
|
return [i("span", {
|
|
1470
|
-
onClick: (
|
|
1471
|
-
var
|
|
1472
|
-
|
|
1473
|
-
const v = ((
|
|
1474
|
-
if (typeof
|
|
1469
|
+
onClick: (w) => {
|
|
1470
|
+
var b, m;
|
|
1471
|
+
w.stopPropagation(), w.preventDefault();
|
|
1472
|
+
const v = ((b = h(l).find((d) => d.uuid === t)) == null ? void 0 : b.key) || "", g = (s == null ? void 0 : s.columnsMap[v]) || {};
|
|
1473
|
+
if (typeof g.disable == "boolean" ? g.disable : (m = g.disable) == null ? void 0 : m.icon)
|
|
1475
1474
|
return;
|
|
1476
1475
|
const c = {
|
|
1477
|
-
...
|
|
1476
|
+
...s == null ? void 0 : s.columnsMap,
|
|
1478
1477
|
[v]: {
|
|
1479
|
-
...
|
|
1478
|
+
...g,
|
|
1480
1479
|
fixed: n
|
|
1481
1480
|
}
|
|
1482
1481
|
};
|
|
1483
|
-
|
|
1482
|
+
s == null || s.setColumnsMap(c, "fixed");
|
|
1484
1483
|
}
|
|
1485
|
-
}, [(
|
|
1484
|
+
}, [(r = u.default) == null ? void 0 : r.call(u)])];
|
|
1486
1485
|
}
|
|
1487
1486
|
}) : null;
|
|
1488
|
-
},
|
|
1487
|
+
}, Wa = /* @__PURE__ */ ae({
|
|
1489
1488
|
props: {
|
|
1490
1489
|
treeKey: String,
|
|
1491
1490
|
hashId: String,
|
|
@@ -1497,34 +1496,34 @@ const be = (e) => {
|
|
|
1497
1496
|
setup(e) {
|
|
1498
1497
|
const {
|
|
1499
1498
|
cacheColumns: o
|
|
1500
|
-
} =
|
|
1499
|
+
} = ie(), t = x(() => {
|
|
1501
1500
|
var u;
|
|
1502
1501
|
return ((u = o.value.find((l) => l.uuid === e.treeKey)) == null ? void 0 : u.key) || "";
|
|
1503
|
-
}), n =
|
|
1502
|
+
}), n = x(() => t.value === "action" && e.autoScroll);
|
|
1504
1503
|
return () => {
|
|
1505
1504
|
const u = i("span", {
|
|
1506
1505
|
class: [`${e.className}-list-item-option`, e.hashId]
|
|
1507
|
-
}, [i(
|
|
1506
|
+
}, [i(Ne, {
|
|
1508
1507
|
treeKey: e.treeKey || "",
|
|
1509
1508
|
fixed: "left",
|
|
1510
1509
|
title: "固定在列首",
|
|
1511
1510
|
show: e.fixed !== "left" && !n.value
|
|
1512
1511
|
}, {
|
|
1513
|
-
default: () => [i(
|
|
1514
|
-
}), i(
|
|
1512
|
+
default: () => [i(fa, null, null)]
|
|
1513
|
+
}), i(Ne, {
|
|
1515
1514
|
treeKey: e.treeKey || "",
|
|
1516
1515
|
fixed: void 0,
|
|
1517
1516
|
title: "不固定",
|
|
1518
1517
|
show: !!e.fixed && !n.value
|
|
1519
1518
|
}, {
|
|
1520
|
-
default: () => [i(
|
|
1521
|
-
}), i(
|
|
1519
|
+
default: () => [i(ha, null, null)]
|
|
1520
|
+
}), i(Ne, {
|
|
1522
1521
|
treeKey: e.treeKey || "",
|
|
1523
1522
|
fixed: "right",
|
|
1524
1523
|
title: "固定在列尾",
|
|
1525
1524
|
show: e.fixed !== "right"
|
|
1526
1525
|
}, {
|
|
1527
|
-
default: () => [i(
|
|
1526
|
+
default: () => [i(va, null, null)]
|
|
1528
1527
|
})]);
|
|
1529
1528
|
return i("span", {
|
|
1530
1529
|
class: [`${e.className}-list-item`, e.hashId],
|
|
@@ -1534,7 +1533,7 @@ const be = (e) => {
|
|
|
1534
1533
|
}, [e.title]), u]);
|
|
1535
1534
|
};
|
|
1536
1535
|
}
|
|
1537
|
-
}),
|
|
1536
|
+
}), je = /* @__PURE__ */ ae({
|
|
1538
1537
|
props: {
|
|
1539
1538
|
list: Array,
|
|
1540
1539
|
keys: Array,
|
|
@@ -1549,110 +1548,110 @@ const be = (e) => {
|
|
|
1549
1548
|
}
|
|
1550
1549
|
},
|
|
1551
1550
|
setup(e) {
|
|
1552
|
-
const o = O(Ye().uuid(15)), t =
|
|
1551
|
+
const o = O(Ye().uuid(15)), t = x(() => e.list && e.list.length > 0), n = O([]), u = O([]), {
|
|
1553
1552
|
cacheColumns: l,
|
|
1554
|
-
slots:
|
|
1555
|
-
settingsAction:
|
|
1556
|
-
} =
|
|
1557
|
-
key:
|
|
1558
|
-
children:
|
|
1553
|
+
slots: s,
|
|
1554
|
+
settingsAction: r
|
|
1555
|
+
} = ie(), w = (c, b) => c.map(({
|
|
1556
|
+
key: m,
|
|
1557
|
+
children: d,
|
|
1559
1558
|
uuid: S,
|
|
1560
|
-
|
|
1559
|
+
...$
|
|
1561
1560
|
}) => {
|
|
1562
|
-
var
|
|
1563
|
-
const
|
|
1561
|
+
var Y;
|
|
1562
|
+
const T = (r == null ? void 0 : r.columnsMap[m || "null"]) || {
|
|
1564
1563
|
show: !0
|
|
1565
1564
|
};
|
|
1566
|
-
let
|
|
1567
|
-
|
|
1568
|
-
const
|
|
1565
|
+
let P = !1;
|
|
1566
|
+
T.show !== !1 && (b == null ? void 0 : b.show) !== !1 && !d && (P = !0);
|
|
1567
|
+
const D = {
|
|
1569
1568
|
key: S || "",
|
|
1570
|
-
...
|
|
1571
|
-
checked:
|
|
1569
|
+
...Va($, ["dataIndex"]),
|
|
1570
|
+
checked: P,
|
|
1572
1571
|
selectable: !1,
|
|
1573
|
-
disabled:
|
|
1574
|
-
disableCheckbox: typeof
|
|
1572
|
+
disabled: T.disable === !0,
|
|
1573
|
+
disableCheckbox: typeof T.disable == "boolean" ? T.disable : (Y = T.disable) == null ? void 0 : Y.checkbox,
|
|
1575
1574
|
isLeaf: !0
|
|
1576
1575
|
};
|
|
1577
|
-
return
|
|
1576
|
+
return d && (D.children = w(d, T)), D;
|
|
1578
1577
|
});
|
|
1579
|
-
|
|
1580
|
-
const c =
|
|
1581
|
-
n.value = c, u.value = c.filter((
|
|
1578
|
+
he(() => {
|
|
1579
|
+
const c = w(e.list || []);
|
|
1580
|
+
n.value = c, u.value = c.filter((b) => b.checked).map((b) => b.key), (r == null ? void 0 : r.operationType.value) === "fixed" && (o.value = Ye().uuid(15));
|
|
1582
1581
|
});
|
|
1583
|
-
const v = be((c,
|
|
1584
|
-
var
|
|
1585
|
-
const
|
|
1586
|
-
...
|
|
1587
|
-
},
|
|
1588
|
-
if (
|
|
1582
|
+
const v = be((c, b, m) => {
|
|
1583
|
+
var L, G;
|
|
1584
|
+
const d = ((L = h(l).find((M) => M.uuid === c)) == null ? void 0 : L.key) || "", S = ((G = h(l).find((M) => M.uuid === b)) == null ? void 0 : G.key) || "", $ = {
|
|
1585
|
+
...r == null ? void 0 : r.columnsMap
|
|
1586
|
+
}, T = [...r.sortKeyColumns.value], P = T.findIndex((M) => M === d), D = T.findIndex((M) => M === S), Y = m > P;
|
|
1587
|
+
if (P < 0)
|
|
1589
1588
|
return;
|
|
1590
|
-
const
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
order:
|
|
1589
|
+
const j = T[P];
|
|
1590
|
+
T.splice(P, 1), m === 0 ? T.unshift(j) : T.splice(Y ? D : D + 1, 0, j), T.forEach((M, H) => {
|
|
1591
|
+
$[M] = {
|
|
1592
|
+
...$[M] || {},
|
|
1593
|
+
order: H
|
|
1595
1594
|
};
|
|
1596
|
-
}),
|
|
1597
|
-
}),
|
|
1598
|
-
var
|
|
1599
|
-
const
|
|
1600
|
-
...(
|
|
1595
|
+
}), r == null || r.setColumnsMap($, "drop"), r == null || r.setSortKeyColumns(T);
|
|
1596
|
+
}), g = be((c) => {
|
|
1597
|
+
var T;
|
|
1598
|
+
const b = c.node.key, m = ((T = h(l).find((P) => P.uuid === b)) == null ? void 0 : T.key) || "", S = {
|
|
1599
|
+
...(r == null ? void 0 : r.columnsMap[m]) || {}
|
|
1601
1600
|
};
|
|
1602
1601
|
S.show = c.checked;
|
|
1603
|
-
const
|
|
1604
|
-
...
|
|
1605
|
-
[
|
|
1602
|
+
const $ = {
|
|
1603
|
+
...r == null ? void 0 : r.columnsMap,
|
|
1604
|
+
[m]: S
|
|
1606
1605
|
};
|
|
1607
|
-
|
|
1608
|
-
}),
|
|
1609
|
-
const
|
|
1610
|
-
return c.title ||
|
|
1611
|
-
title:
|
|
1612
|
-
column:
|
|
1613
|
-
}, () => [
|
|
1606
|
+
r == null || r.setColumnsMap($, "show");
|
|
1607
|
+
}), y = (c) => {
|
|
1608
|
+
const b = h(l).find((m) => m.uuid === c.key);
|
|
1609
|
+
return c.title || Lt(s, "headerCell", {
|
|
1610
|
+
title: b.title,
|
|
1611
|
+
column: b
|
|
1612
|
+
}, () => [b.title]);
|
|
1614
1613
|
};
|
|
1615
1614
|
return () => {
|
|
1616
|
-
var c,
|
|
1615
|
+
var c, b;
|
|
1617
1616
|
return t.value ? i(Ie, null, [e.showTitle && i("span", {
|
|
1618
1617
|
class: [`${e.className}-list-title`, e.hashId]
|
|
1619
|
-
}, [e.title]), i(
|
|
1618
|
+
}, [e.title]), i(la, {
|
|
1620
1619
|
key: o.value,
|
|
1621
|
-
draggable: e.draggable && !!((c = n.value) != null && c.length) && ((
|
|
1620
|
+
draggable: e.draggable && !!((c = n.value) != null && c.length) && ((b = n.value) == null ? void 0 : b.length) > 1,
|
|
1622
1621
|
checkable: e.checkable,
|
|
1623
1622
|
blockNode: !0,
|
|
1624
1623
|
showLine: !1,
|
|
1625
1624
|
checkedKeys: u.value,
|
|
1626
1625
|
height: 280,
|
|
1627
|
-
onDrop: (
|
|
1628
|
-
const
|
|
1629
|
-
dropPosition:
|
|
1630
|
-
dropToGap:
|
|
1631
|
-
} =
|
|
1632
|
-
v(S,
|
|
1626
|
+
onDrop: (m) => {
|
|
1627
|
+
const d = m.node.key, S = m.dragNode.key, {
|
|
1628
|
+
dropPosition: $,
|
|
1629
|
+
dropToGap: T
|
|
1630
|
+
} = m, P = $ === -1 || !T ? $ + 1 : $;
|
|
1631
|
+
v(S, d, P);
|
|
1633
1632
|
},
|
|
1634
|
-
onCheck: (
|
|
1633
|
+
onCheck: (m, d) => g(d),
|
|
1635
1634
|
treeData: n.value
|
|
1636
1635
|
}, {
|
|
1637
|
-
title: (
|
|
1636
|
+
title: (m) => {
|
|
1638
1637
|
var S;
|
|
1639
|
-
const
|
|
1640
|
-
...
|
|
1638
|
+
const d = {
|
|
1639
|
+
...m,
|
|
1641
1640
|
children: void 0,
|
|
1642
|
-
title:
|
|
1643
|
-
autoScroll: (S =
|
|
1641
|
+
title: y(m),
|
|
1642
|
+
autoScroll: (S = r == null ? void 0 : r.autoScroll) == null ? void 0 : S.value
|
|
1644
1643
|
};
|
|
1645
|
-
return i(
|
|
1644
|
+
return i(Wa, U({
|
|
1646
1645
|
hashId: e.hashId,
|
|
1647
1646
|
className: e.className
|
|
1648
|
-
},
|
|
1649
|
-
treeKey:
|
|
1647
|
+
}, d, {
|
|
1648
|
+
treeKey: d.key
|
|
1650
1649
|
}), null);
|
|
1651
1650
|
}
|
|
1652
1651
|
})]) : null;
|
|
1653
1652
|
};
|
|
1654
1653
|
}
|
|
1655
|
-
}),
|
|
1654
|
+
}), _a = /* @__PURE__ */ ae({
|
|
1656
1655
|
props: {
|
|
1657
1656
|
hashId: String,
|
|
1658
1657
|
className: String,
|
|
@@ -1662,21 +1661,21 @@ const be = (e) => {
|
|
|
1662
1661
|
setup(e) {
|
|
1663
1662
|
const {
|
|
1664
1663
|
columns: o
|
|
1665
|
-
} =
|
|
1666
|
-
|
|
1667
|
-
t.value = [], n.value = [], u.value = [],
|
|
1664
|
+
} = ie(), t = O([]), n = O([]), u = O([]), l = O([]);
|
|
1665
|
+
X(() => o.value, (w) => {
|
|
1666
|
+
t.value = [], n.value = [], u.value = [], w.forEach((v) => {
|
|
1668
1667
|
if (v.hideInSetting)
|
|
1669
1668
|
return;
|
|
1670
1669
|
const {
|
|
1671
|
-
fixed:
|
|
1672
|
-
show:
|
|
1670
|
+
fixed: g,
|
|
1671
|
+
show: y,
|
|
1673
1672
|
uuid: c
|
|
1674
1673
|
} = v;
|
|
1675
|
-
if ((
|
|
1674
|
+
if ((y || y === void 0) && c && l.value.push(c), g === "left") {
|
|
1676
1675
|
n.value.push(v);
|
|
1677
1676
|
return;
|
|
1678
1677
|
}
|
|
1679
|
-
if (
|
|
1678
|
+
if (g === "right") {
|
|
1680
1679
|
t.value.push(v);
|
|
1681
1680
|
return;
|
|
1682
1681
|
}
|
|
@@ -1685,14 +1684,14 @@ const be = (e) => {
|
|
|
1685
1684
|
}, {
|
|
1686
1685
|
immediate: !0
|
|
1687
1686
|
});
|
|
1688
|
-
const
|
|
1687
|
+
const s = x(() => t.value && t.value.length > 0), r = x(() => n.value && n.value.length > 0);
|
|
1689
1688
|
return () => i("div", {
|
|
1690
1689
|
class: {
|
|
1691
1690
|
[`${e.hashId}`]: !0,
|
|
1692
1691
|
[`${e.className}-list`]: !0,
|
|
1693
|
-
[`${e.className}-list-group`]:
|
|
1692
|
+
[`${e.className}-list-group`]: s.value || r.value
|
|
1694
1693
|
}
|
|
1695
|
-
}, [i(
|
|
1694
|
+
}, [i(je, {
|
|
1696
1695
|
title: "固定在左侧",
|
|
1697
1696
|
list: n.value,
|
|
1698
1697
|
keys: l.value,
|
|
@@ -1700,16 +1699,16 @@ const be = (e) => {
|
|
|
1700
1699
|
draggable: e.draggable,
|
|
1701
1700
|
checkable: e.checkable,
|
|
1702
1701
|
className: e.className
|
|
1703
|
-
}, null), i(
|
|
1702
|
+
}, null), i(je, {
|
|
1704
1703
|
list: u.value,
|
|
1705
1704
|
keys: l.value,
|
|
1706
1705
|
hashId: e.hashId,
|
|
1707
1706
|
draggable: e.draggable,
|
|
1708
1707
|
checkable: e.checkable,
|
|
1709
1708
|
title: "不固定",
|
|
1710
|
-
showTitle:
|
|
1709
|
+
showTitle: r.value || s.value,
|
|
1711
1710
|
className: e.className
|
|
1712
|
-
}, null), i(
|
|
1711
|
+
}, null), i(je, {
|
|
1713
1712
|
title: "固定在右侧",
|
|
1714
1713
|
list: t.value,
|
|
1715
1714
|
keys: l.value,
|
|
@@ -1719,7 +1718,7 @@ const be = (e) => {
|
|
|
1719
1718
|
className: e.className
|
|
1720
1719
|
}, null)]);
|
|
1721
1720
|
}
|
|
1722
|
-
}),
|
|
1721
|
+
}), Ga = /* @__PURE__ */ ae({
|
|
1723
1722
|
props: {
|
|
1724
1723
|
draggable: {
|
|
1725
1724
|
type: Boolean,
|
|
@@ -1739,47 +1738,47 @@ const be = (e) => {
|
|
|
1739
1738
|
}), {
|
|
1740
1739
|
wrapSSR: t,
|
|
1741
1740
|
hashId: n
|
|
1742
|
-
} = Pe("ColumnSetting", [
|
|
1741
|
+
} = Pe("ColumnSetting", [Ha], o), {
|
|
1743
1742
|
columns: u,
|
|
1744
1743
|
settingsAction: l
|
|
1745
|
-
} =
|
|
1746
|
-
const c = {},
|
|
1747
|
-
|
|
1748
|
-
key:
|
|
1744
|
+
} = ie(), s = be((y = !0) => {
|
|
1745
|
+
const c = {}, b = (m) => {
|
|
1746
|
+
m.forEach(({
|
|
1747
|
+
key: d,
|
|
1749
1748
|
fixed: S,
|
|
1750
|
-
index:
|
|
1751
|
-
children:
|
|
1749
|
+
index: $,
|
|
1750
|
+
children: T
|
|
1752
1751
|
}) => {
|
|
1753
|
-
const
|
|
1754
|
-
|
|
1755
|
-
show:
|
|
1752
|
+
const P = ot(d, $);
|
|
1753
|
+
P && (c[P] = {
|
|
1754
|
+
show: y,
|
|
1756
1755
|
fixed: S
|
|
1757
|
-
}),
|
|
1756
|
+
}), T && b(T);
|
|
1758
1757
|
});
|
|
1759
1758
|
};
|
|
1760
|
-
|
|
1761
|
-
}),
|
|
1762
|
-
|
|
1763
|
-
}),
|
|
1759
|
+
b(u.value), l == null || l.setColumnsMap(c, "show");
|
|
1760
|
+
}), r = be((y) => {
|
|
1761
|
+
y.target.checked ? s() : s(!1);
|
|
1762
|
+
}), w = be(() => {
|
|
1764
1763
|
l == null || l.setColumnsMap(l == null ? void 0 : l.cacheColumnsMap, "fixed");
|
|
1765
|
-
}), v =
|
|
1764
|
+
}), v = x(() => (
|
|
1766
1765
|
// @ts-ignore
|
|
1767
|
-
Object.values(l == null ? void 0 : l.columnsMap).filter((
|
|
1768
|
-
)),
|
|
1769
|
-
return () => t(i(
|
|
1766
|
+
Object.values(l == null ? void 0 : l.columnsMap).filter((y) => !y || y.show === !1)
|
|
1767
|
+
)), g = x(() => h(v).length > 0 && h(v).length !== u.value.length);
|
|
1768
|
+
return () => t(i(ta, {
|
|
1770
1769
|
arrowPointAtCenter: !0,
|
|
1771
1770
|
title: i("div", {
|
|
1772
1771
|
class: [`${o}-title`, n.value]
|
|
1773
|
-
}, [i(
|
|
1774
|
-
indeterminate:
|
|
1772
|
+
}, [i(aa, {
|
|
1773
|
+
indeterminate: g.value,
|
|
1775
1774
|
checked: h(v).length === 0 && h(v).length !== u.value.length,
|
|
1776
|
-
onChange: (
|
|
1775
|
+
onChange: (y) => r(y)
|
|
1777
1776
|
}, {
|
|
1778
1777
|
default: () => [pe("列展示")]
|
|
1779
1778
|
}), e.checkedReset ? i("a", {
|
|
1780
|
-
onClick:
|
|
1779
|
+
onClick: w,
|
|
1781
1780
|
class: [`${o}-action-rest-button`, n.value]
|
|
1782
|
-
}, [pe("重置")]) : null, e != null && e.extra ? i(
|
|
1781
|
+
}, [pe("重置")]) : null, e != null && e.extra ? i(oe, {
|
|
1783
1782
|
size: 12,
|
|
1784
1783
|
align: "center"
|
|
1785
1784
|
}, {
|
|
@@ -1788,14 +1787,14 @@ const be = (e) => {
|
|
|
1788
1787
|
overlayClassName: `${o}-overlay ${n.value}`,
|
|
1789
1788
|
trigger: "click",
|
|
1790
1789
|
placement: "bottomRight",
|
|
1791
|
-
content: i(
|
|
1790
|
+
content: i(_a, {
|
|
1792
1791
|
hashId: n.value,
|
|
1793
1792
|
checkable: e.checkable ?? !0,
|
|
1794
1793
|
draggable: e.draggable ?? !0,
|
|
1795
1794
|
className: o
|
|
1796
1795
|
}, null)
|
|
1797
1796
|
}, {
|
|
1798
|
-
default: () => [i(
|
|
1797
|
+
default: () => [i(ee, {
|
|
1799
1798
|
title: "列设置"
|
|
1800
1799
|
}, {
|
|
1801
1800
|
default: () => [i(dt, null, null)]
|
|
@@ -1807,22 +1806,22 @@ const be = (e) => {
|
|
|
1807
1806
|
const {
|
|
1808
1807
|
isFullscreen: e
|
|
1809
1808
|
} = st();
|
|
1810
|
-
return () => e.value ? i(
|
|
1809
|
+
return () => e.value ? i(ee, {
|
|
1811
1810
|
title: "退出全屏"
|
|
1812
1811
|
}, {
|
|
1813
|
-
default: () => [i(
|
|
1814
|
-
}) : i(
|
|
1812
|
+
default: () => [i(ma, null, null)]
|
|
1813
|
+
}) : i(ee, {
|
|
1815
1814
|
title: "全屏"
|
|
1816
1815
|
}, {
|
|
1817
|
-
default: () => [i(
|
|
1816
|
+
default: () => [i(ga, null, null)]
|
|
1818
1817
|
});
|
|
1819
1818
|
}
|
|
1820
|
-
}),
|
|
1819
|
+
}), qa = () => {
|
|
1821
1820
|
const {
|
|
1822
1821
|
action: e,
|
|
1823
1822
|
tableSize: o
|
|
1824
|
-
} =
|
|
1825
|
-
return i(
|
|
1823
|
+
} = ie();
|
|
1824
|
+
return i(na, {
|
|
1826
1825
|
overlay: i(Re, {
|
|
1827
1826
|
selectedKeys: [o.value],
|
|
1828
1827
|
onClick: ({
|
|
@@ -1851,13 +1850,13 @@ const be = (e) => {
|
|
|
1851
1850
|
}),
|
|
1852
1851
|
trigger: ["click"]
|
|
1853
1852
|
}, {
|
|
1854
|
-
default: () => [i(
|
|
1853
|
+
default: () => [i(ee, {
|
|
1855
1854
|
title: "表格密度"
|
|
1856
1855
|
}, {
|
|
1857
|
-
default: () => [i(
|
|
1856
|
+
default: () => [i(ya, null, null)]
|
|
1858
1857
|
})]
|
|
1859
1858
|
});
|
|
1860
|
-
},
|
|
1859
|
+
}, Ua = (e) => ({
|
|
1861
1860
|
[`${e.componentCls}`]: {
|
|
1862
1861
|
lineHeight: 1,
|
|
1863
1862
|
["&-container"]: {
|
|
@@ -1903,9 +1902,9 @@ function lt(e) {
|
|
|
1903
1902
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !Ce(e);
|
|
1904
1903
|
}
|
|
1905
1904
|
const {
|
|
1906
|
-
useBreakpoint:
|
|
1905
|
+
useBreakpoint: Xa
|
|
1907
1906
|
} = He;
|
|
1908
|
-
function
|
|
1907
|
+
function Ja(e) {
|
|
1909
1908
|
if (Ce(e))
|
|
1910
1909
|
return e;
|
|
1911
1910
|
if (e) {
|
|
@@ -1915,7 +1914,7 @@ function Xa(e) {
|
|
|
1915
1914
|
onClick: u,
|
|
1916
1915
|
key: l
|
|
1917
1916
|
} = o;
|
|
1918
|
-
return t && n ? i(
|
|
1917
|
+
return t && n ? i(ee, {
|
|
1919
1918
|
title: n
|
|
1920
1919
|
}, {
|
|
1921
1920
|
default: () => [i("span", {
|
|
@@ -1930,109 +1929,111 @@ function Xa(e) {
|
|
|
1930
1929
|
}
|
|
1931
1930
|
const mt = /* @__PURE__ */ ae({
|
|
1932
1931
|
props: {
|
|
1933
|
-
actions:
|
|
1932
|
+
actions: ce.toolBarBtn,
|
|
1934
1933
|
settings: [Array],
|
|
1935
|
-
titleTip:
|
|
1934
|
+
titleTip: ce.titleTip,
|
|
1936
1935
|
prefixCls: String,
|
|
1937
|
-
headerTitle:
|
|
1938
|
-
titleTipText:
|
|
1939
|
-
optionsExtra:
|
|
1936
|
+
headerTitle: ce.headerTitle,
|
|
1937
|
+
titleTipText: ce.titleTipText,
|
|
1938
|
+
optionsExtra: ce.optionsExtra
|
|
1940
1939
|
},
|
|
1941
1940
|
setup(e) {
|
|
1942
1941
|
const {
|
|
1943
1942
|
wrapSSR: o,
|
|
1944
1943
|
hashId: t
|
|
1945
|
-
} = Pe("ListToolBar", [
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
}), r = w(() => !!(e.titleTip || e.headerTitle)), s = w(() => {
|
|
1944
|
+
} = Pe("ListToolBar", [Ua], e.prefixCls), n = Xa(), {
|
|
1945
|
+
isMobile: u
|
|
1946
|
+
} = ie(), l = x(() => {
|
|
1947
|
+
var c;
|
|
1948
|
+
return !!(e.titleTip || e.headerTitle || (c = e.actions) != null && c.length);
|
|
1949
|
+
}), s = x(() => {
|
|
1952
1950
|
var c;
|
|
1953
|
-
|
|
1954
|
-
|
|
1951
|
+
return !!((c = e.settings) != null && c.length || e.optionsExtra);
|
|
1952
|
+
}), r = x(() => !!(e.titleTip || e.headerTitle)), w = x(() => {
|
|
1953
|
+
var b;
|
|
1954
|
+
let c;
|
|
1955
|
+
return Array.isArray(e.actions) ? ((b = e.actions) == null ? void 0 : b.length) < 1 ? null : i(oe, {
|
|
1955
1956
|
align: "center"
|
|
1956
|
-
}, lt(
|
|
1957
|
-
key:
|
|
1958
|
-
...
|
|
1957
|
+
}, lt(c = e.actions.map((m, d) => Ce(m) ? At(m, {
|
|
1958
|
+
key: d,
|
|
1959
|
+
...m == null ? void 0 : m.props
|
|
1959
1960
|
}) : i("template", {
|
|
1960
|
-
key:
|
|
1961
|
-
}, [
|
|
1962
|
-
default: () => [
|
|
1961
|
+
key: d
|
|
1962
|
+
}, [m]))) ? c : {
|
|
1963
|
+
default: () => [c]
|
|
1963
1964
|
}) : e.actions;
|
|
1964
|
-
}),
|
|
1965
|
+
}), v = Fe(() => !l.value && s.value ? i("div", {
|
|
1965
1966
|
class: `${e.prefixCls}-left ${t.value}`
|
|
1966
|
-
}, null) : r.value ? i(
|
|
1967
|
+
}, null) : r.value ? i(oe, {
|
|
1967
1968
|
class: `${e.prefixCls}-left ${t.value}`
|
|
1968
1969
|
}, {
|
|
1969
1970
|
default: () => [i("div", {
|
|
1970
1971
|
class: `${e.prefixCls}-title ${t.value}`
|
|
1971
|
-
}, [e.headerTitle, e.titleTip && i(
|
|
1972
|
+
}, [e.headerTitle, e.titleTip && i(ee, {
|
|
1972
1973
|
title: e.titleTipText
|
|
1973
1974
|
}, {
|
|
1974
|
-
default: () => [te(e.titleTip) && e.titleTip ? i(
|
|
1975
|
-
})]),
|
|
1975
|
+
default: () => [te(e.titleTip) && e.titleTip ? i(pa, null, null) : e.titleTip]
|
|
1976
|
+
})]), w.value && i("div", {
|
|
1976
1977
|
class: `${e.prefixCls}-actions ${t.value}`
|
|
1977
|
-
}, [
|
|
1978
|
-
}) : i(
|
|
1978
|
+
}, [w.value])]
|
|
1979
|
+
}) : i(oe, {
|
|
1979
1980
|
class: `${e.prefixCls}-left ${t.value}`
|
|
1980
1981
|
}, {
|
|
1981
|
-
default: () => [
|
|
1982
|
+
default: () => [w.value && i("div", {
|
|
1982
1983
|
class: `${e.prefixCls}-actions`
|
|
1983
|
-
}, [
|
|
1984
|
-
}), [() =>
|
|
1985
|
-
let
|
|
1986
|
-
return
|
|
1984
|
+
}, [w.value])]
|
|
1985
|
+
}), [() => l.value, () => s.value, () => r.value, () => e.prefixCls, () => e.headerTitle, () => e.titleTipText, () => e.titleTip]), g = Fe(() => {
|
|
1986
|
+
let c;
|
|
1987
|
+
return s.value ? i(oe, {
|
|
1987
1988
|
size: 16,
|
|
1988
1989
|
class: `${e.prefixCls}-right ${t.value}`,
|
|
1989
1990
|
align: n.value.lg ? "center" : "end",
|
|
1990
1991
|
direction: n.value.lg ? "horizontal" : "vertical"
|
|
1991
1992
|
}, {
|
|
1992
1993
|
default: () => {
|
|
1993
|
-
var
|
|
1994
|
-
return [e.optionsExtra, (
|
|
1994
|
+
var b;
|
|
1995
|
+
return [e.optionsExtra, (b = e.settings) != null && b.length ? i(oe, {
|
|
1995
1996
|
size: 12,
|
|
1996
1997
|
align: "center",
|
|
1997
1998
|
class: `${e.prefixCls}-setting-items`
|
|
1998
|
-
}, lt(
|
|
1999
|
-
const
|
|
1999
|
+
}, lt(c = e.settings.map((m, d) => {
|
|
2000
|
+
const S = Ja(m);
|
|
2000
2001
|
return i("div", {
|
|
2001
|
-
key:
|
|
2002
|
+
key: d,
|
|
2002
2003
|
class: `${e.prefixCls}-setting-item`
|
|
2003
|
-
}, [
|
|
2004
|
-
})) ?
|
|
2005
|
-
default: () => [
|
|
2004
|
+
}, [S]);
|
|
2005
|
+
})) ? c : {
|
|
2006
|
+
default: () => [c]
|
|
2006
2007
|
}) : null];
|
|
2007
2008
|
}
|
|
2008
2009
|
}) : null;
|
|
2009
|
-
}, [() =>
|
|
2010
|
-
if (!
|
|
2010
|
+
}, [() => n.value, () => s.value, () => e.prefixCls, () => r.value, () => w.value, () => e.settings]), y = Fe(() => {
|
|
2011
|
+
if (!s.value && !l.value)
|
|
2011
2012
|
return null;
|
|
2012
|
-
const
|
|
2013
|
+
const c = {
|
|
2013
2014
|
[`${t.value}`]: !0,
|
|
2014
2015
|
[`${e.prefixCls}-container`]: !0,
|
|
2015
|
-
[`${e.prefixCls}-container-mobile`]:
|
|
2016
|
+
[`${e.prefixCls}-container-mobile`]: u.value
|
|
2016
2017
|
};
|
|
2017
2018
|
return i("div", {
|
|
2018
|
-
class:
|
|
2019
|
-
}, [
|
|
2020
|
-
}, [() => u.value, () => l.value, () =>
|
|
2019
|
+
class: c
|
|
2020
|
+
}, [v.value, g.value]);
|
|
2021
|
+
}, [() => u.value, () => l.value, () => s.value, () => v.value, () => e.prefixCls, () => g.value]);
|
|
2021
2022
|
return () => o(i("div", {
|
|
2022
2023
|
class: `${e.prefixCls} ${t.value}`
|
|
2023
2024
|
}, [y.value]));
|
|
2024
2025
|
}
|
|
2025
2026
|
});
|
|
2026
2027
|
mt.inheritAttrs = !1;
|
|
2027
|
-
function
|
|
2028
|
+
function Qa() {
|
|
2028
2029
|
return {
|
|
2029
2030
|
reload: {
|
|
2030
2031
|
text: "刷新",
|
|
2031
|
-
icon: i(
|
|
2032
|
+
icon: i(ba, null, null)
|
|
2032
2033
|
},
|
|
2033
2034
|
density: {
|
|
2034
2035
|
text: "表格密度",
|
|
2035
|
-
icon: i(
|
|
2036
|
+
icon: i(qa, null, null)
|
|
2036
2037
|
},
|
|
2037
2038
|
setting: {
|
|
2038
2039
|
text: "列设置",
|
|
@@ -2044,7 +2045,7 @@ function Ja() {
|
|
|
2044
2045
|
}
|
|
2045
2046
|
};
|
|
2046
2047
|
}
|
|
2047
|
-
function
|
|
2048
|
+
function Za(e, o) {
|
|
2048
2049
|
return Object.keys(e).filter((t) => t).map((t) => {
|
|
2049
2050
|
const n = e[t];
|
|
2050
2051
|
if (!n)
|
|
@@ -2052,7 +2053,7 @@ function Qa(e, o) {
|
|
|
2052
2053
|
let u = n === !0 ? o[t] : () => n == null ? void 0 : n();
|
|
2053
2054
|
if (typeof u != "function" && (u = () => {
|
|
2054
2055
|
}), t === "setting")
|
|
2055
|
-
return i(
|
|
2056
|
+
return i(Ga, U(e[t], {
|
|
2056
2057
|
key: t
|
|
2057
2058
|
}), null);
|
|
2058
2059
|
if (t === "fullScreen")
|
|
@@ -2060,18 +2061,18 @@ function Qa(e, o) {
|
|
|
2060
2061
|
key: t,
|
|
2061
2062
|
onClick: u
|
|
2062
2063
|
}, [i(vt, null, null)]);
|
|
2063
|
-
const l =
|
|
2064
|
+
const l = Qa()[t];
|
|
2064
2065
|
return l ? i("span", {
|
|
2065
2066
|
key: t,
|
|
2066
2067
|
onClick: u
|
|
2067
|
-
}, [i(
|
|
2068
|
+
}, [i(ee, {
|
|
2068
2069
|
title: l.text
|
|
2069
2070
|
}, {
|
|
2070
2071
|
default: () => [l.icon]
|
|
2071
2072
|
})]) : null;
|
|
2072
2073
|
}).filter((t) => t);
|
|
2073
2074
|
}
|
|
2074
|
-
const
|
|
2075
|
+
const el = {
|
|
2075
2076
|
options: [Boolean, Object, Array],
|
|
2076
2077
|
titleTip: [Function, Boolean, Object, String],
|
|
2077
2078
|
settingExtra: [Function, Boolean, Object, Array],
|
|
@@ -2079,8 +2080,8 @@ const Za = {
|
|
|
2079
2080
|
titleTipText: [String],
|
|
2080
2081
|
toolBarBtn: [Function, Boolean, Object, Array],
|
|
2081
2082
|
headerTitle: [Function, Boolean, Object, Array, String]
|
|
2082
|
-
},
|
|
2083
|
-
props:
|
|
2083
|
+
}, tl = /* @__PURE__ */ ae({
|
|
2084
|
+
props: el,
|
|
2084
2085
|
inheritAttrs: !1,
|
|
2085
2086
|
setup(e) {
|
|
2086
2087
|
const o = Ve({
|
|
@@ -2088,21 +2089,21 @@ const Za = {
|
|
|
2088
2089
|
isPor: !0
|
|
2089
2090
|
}), {
|
|
2090
2091
|
action: t
|
|
2091
|
-
} =
|
|
2092
|
-
var
|
|
2092
|
+
} = ie(), n = Fe(() => {
|
|
2093
|
+
var s;
|
|
2093
2094
|
const u = {
|
|
2094
2095
|
reload: () => t == null ? void 0 : t.reload(),
|
|
2095
2096
|
density: !0,
|
|
2096
2097
|
setting: !0,
|
|
2097
2098
|
fullScreen: () => t == null ? void 0 : t.toggle()
|
|
2098
2099
|
};
|
|
2099
|
-
if (e.options === !1 || ((
|
|
2100
|
+
if (e.options === !1 || ((s = Object.keys(e.options)) == null ? void 0 : s.length) === 0)
|
|
2100
2101
|
return [];
|
|
2101
2102
|
const l = {
|
|
2102
2103
|
...u,
|
|
2103
2104
|
...e.options
|
|
2104
2105
|
};
|
|
2105
|
-
return l.setting !== !1 && e.settingExtra && (l.setting = {}, l.setting.extra = e.settingExtra),
|
|
2106
|
+
return l.setting !== !1 && e.settingExtra && (l.setting = {}, l.setting.extra = e.settingExtra), Za(l, {
|
|
2106
2107
|
...u
|
|
2107
2108
|
});
|
|
2108
2109
|
}, [() => t, () => e.options]);
|
|
@@ -2119,7 +2120,7 @@ const Za = {
|
|
|
2119
2120
|
}, null);
|
|
2120
2121
|
};
|
|
2121
2122
|
}
|
|
2122
|
-
}),
|
|
2123
|
+
}), al = [
|
|
2123
2124
|
"search",
|
|
2124
2125
|
"headerTitle",
|
|
2125
2126
|
"toolBarBtn",
|
|
@@ -2129,19 +2130,19 @@ const Za = {
|
|
|
2129
2130
|
"pageItemRender",
|
|
2130
2131
|
"customize"
|
|
2131
2132
|
];
|
|
2132
|
-
function
|
|
2133
|
+
function ll(e) {
|
|
2133
2134
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !Ce(e);
|
|
2134
2135
|
}
|
|
2135
|
-
function
|
|
2136
|
+
function nl(e, o, t, n) {
|
|
2136
2137
|
if (!o)
|
|
2137
2138
|
return e;
|
|
2138
2139
|
let u = e;
|
|
2139
|
-
if (
|
|
2140
|
+
if (ue(o)) {
|
|
2140
2141
|
const l = o.node === "a" ? "span" : o.node;
|
|
2141
|
-
return i(l,
|
|
2142
|
+
return i(l, U((o == null ? void 0 : o.attr) || {}, {
|
|
2142
2143
|
class: [o.class, o.node === "a" ? `${t}-a` : ""],
|
|
2143
2144
|
onClick: o.click
|
|
2144
|
-
}),
|
|
2145
|
+
}), ll(e) ? e : {
|
|
2145
2146
|
default: () => [e]
|
|
2146
2147
|
});
|
|
2147
2148
|
}
|
|
@@ -2152,13 +2153,13 @@ function ll(e, o, t, n) {
|
|
|
2152
2153
|
}, [e]);
|
|
2153
2154
|
break;
|
|
2154
2155
|
case "time":
|
|
2155
|
-
u =
|
|
2156
|
+
u = _(e).format("HH:mm:ss");
|
|
2156
2157
|
break;
|
|
2157
2158
|
case "dateMonth":
|
|
2158
|
-
u = `${
|
|
2159
|
+
u = `${_(e).month() + 1}月`;
|
|
2159
2160
|
break;
|
|
2160
2161
|
case "dateTime":
|
|
2161
|
-
u =
|
|
2162
|
+
u = _(e).format("YYYY-MM-DD HH:mm:ss");
|
|
2162
2163
|
break;
|
|
2163
2164
|
}
|
|
2164
2165
|
return u;
|
|
@@ -2176,7 +2177,7 @@ const ke = {
|
|
|
2176
2177
|
backgroundColor: "transparent",
|
|
2177
2178
|
borderRadius: 2
|
|
2178
2179
|
}
|
|
2179
|
-
},
|
|
2180
|
+
}, ol = (e) => ({
|
|
2180
2181
|
[e.componentCls]: {
|
|
2181
2182
|
["&-a"]: {
|
|
2182
2183
|
cursor: "pointer",
|
|
@@ -2358,9 +2359,9 @@ const ke = {
|
|
|
2358
2359
|
[`${e.antCls}-table-content`]: ke
|
|
2359
2360
|
}
|
|
2360
2361
|
}
|
|
2361
|
-
}),
|
|
2362
|
-
useBreakpoint:
|
|
2363
|
-
} = He,
|
|
2362
|
+
}), ul = ct.PRESENTED_IMAGE_SIMPLE, {
|
|
2363
|
+
useBreakpoint: il
|
|
2364
|
+
} = He, sl = {
|
|
2364
2365
|
reload: !0,
|
|
2365
2366
|
density: !0,
|
|
2366
2367
|
setting: !0,
|
|
@@ -2368,7 +2369,7 @@ const ke = {
|
|
|
2368
2369
|
}, Ee = /* @__PURE__ */ ae({
|
|
2369
2370
|
name: "GProTable",
|
|
2370
2371
|
inheritAttrs: !1,
|
|
2371
|
-
props:
|
|
2372
|
+
props: ce,
|
|
2372
2373
|
emits: ["reset", "reload", "submit", "sizeChange", "expandedRowsChange", "expand", "change", "requestError", "beforeSearchSubmit", "columnsStateChange", "loadingChange"],
|
|
2373
2374
|
setup(e, {
|
|
2374
2375
|
emit: o,
|
|
@@ -2380,186 +2381,186 @@ const ke = {
|
|
|
2380
2381
|
suffixCls: "table",
|
|
2381
2382
|
isPor: !0
|
|
2382
2383
|
}), {
|
|
2383
|
-
wrapSSR:
|
|
2384
|
-
hashId:
|
|
2385
|
-
} = Pe("ProBaseTable", [
|
|
2384
|
+
wrapSSR: s,
|
|
2385
|
+
hashId: r
|
|
2386
|
+
} = Pe("ProBaseTable", [ol], l), w = il(), {
|
|
2386
2387
|
width: v
|
|
2387
|
-
} =
|
|
2388
|
-
emptyText:
|
|
2389
|
-
indicator:
|
|
2390
|
-
} =
|
|
2391
|
-
|
|
2388
|
+
} = Jt(), {
|
|
2389
|
+
emptyText: g,
|
|
2390
|
+
indicator: y
|
|
2391
|
+
} = sa(), c = O(), b = O(), m = O(e.waitRequest);
|
|
2392
|
+
he(() => m.value = e.waitRequest);
|
|
2392
2393
|
const {
|
|
2393
|
-
toggle:
|
|
2394
|
+
toggle: d,
|
|
2394
2395
|
isFullscreen: S
|
|
2395
|
-
} = st(c),
|
|
2396
|
+
} = st(c), $ = x(() => ({
|
|
2396
2397
|
...e
|
|
2397
|
-
})), x =
|
|
2398
|
+
})), T = x(() => !w.value.xl), P = x(() => {
|
|
2398
2399
|
var C, R;
|
|
2399
|
-
return e.virtualScroll &&
|
|
2400
|
-
}),
|
|
2400
|
+
return e.virtualScroll && Ca(!((C = e.scroll) != null && C.y), "参数scroll的Y值不能为空!"), !!((R = e.scroll) != null && R.y && e.virtualScroll);
|
|
2401
|
+
}), D = x(() => {
|
|
2401
2402
|
const C = (e.columns || []).filter((R) => R.key || R.dataIndex).map((R) => ({
|
|
2402
2403
|
...R,
|
|
2403
2404
|
key: R.key || R.dataIndex,
|
|
2404
2405
|
align: R.align || e.align,
|
|
2405
2406
|
uuid: Ye().uuid(15)
|
|
2406
2407
|
}));
|
|
2407
|
-
return
|
|
2408
|
+
return Ut(C, {
|
|
2408
2409
|
align: e.align || "left",
|
|
2409
2410
|
showIndex: e.showIndex || !1
|
|
2410
2411
|
});
|
|
2411
2412
|
}), {
|
|
2412
|
-
loadingStatus:
|
|
2413
|
-
setLoading:
|
|
2414
|
-
} = Sa({
|
|
2415
|
-
emit: o,
|
|
2416
|
-
loading: Q(e, "loading")
|
|
2417
|
-
}), {
|
|
2418
|
-
sizeRef: M,
|
|
2419
|
-
setTableSize: A
|
|
2413
|
+
loadingStatus: Y,
|
|
2414
|
+
setLoading: j
|
|
2420
2415
|
} = xa({
|
|
2421
2416
|
emit: o,
|
|
2422
|
-
|
|
2417
|
+
loading: Z(e, "loading")
|
|
2423
2418
|
}), {
|
|
2424
|
-
|
|
2425
|
-
|
|
2419
|
+
sizeRef: L,
|
|
2420
|
+
setTableSize: G
|
|
2426
2421
|
} = wa({
|
|
2422
|
+
emit: o,
|
|
2423
|
+
size: Z(e, "size")
|
|
2424
|
+
}), {
|
|
2425
|
+
getPaginationInfo: M,
|
|
2426
|
+
setPagination: H
|
|
2427
|
+
} = Ta({
|
|
2427
2428
|
slots: t,
|
|
2428
|
-
props:
|
|
2429
|
-
pagination:
|
|
2430
|
-
}),
|
|
2431
|
-
getScrollRef:
|
|
2432
|
-
breakpoint:
|
|
2429
|
+
props: $,
|
|
2430
|
+
pagination: Z(e, "pagination")
|
|
2431
|
+
}), a = Na(e), {
|
|
2432
|
+
getScrollRef: p,
|
|
2433
|
+
breakpoint: I
|
|
2433
2434
|
} = ja({
|
|
2434
|
-
...
|
|
2435
|
+
...a,
|
|
2435
2436
|
innerWidth: v,
|
|
2436
|
-
columns:
|
|
2437
|
-
|
|
2438
|
-
}),
|
|
2439
|
-
getProColumns:
|
|
2440
|
-
cacheProColumns:
|
|
2441
|
-
setColumns:
|
|
2442
|
-
changeColumns:
|
|
2443
|
-
resizeColumnWidth:
|
|
2444
|
-
} =
|
|
2445
|
-
...
|
|
2446
|
-
breakpoint:
|
|
2447
|
-
scroll:
|
|
2448
|
-
columns:
|
|
2437
|
+
columns: D,
|
|
2438
|
+
screens: w
|
|
2439
|
+
}), F = Da(e), {
|
|
2440
|
+
getProColumns: B,
|
|
2441
|
+
cacheProColumns: f,
|
|
2442
|
+
setColumns: N,
|
|
2443
|
+
changeColumns: A,
|
|
2444
|
+
resizeColumnWidth: K
|
|
2445
|
+
} = Ma({
|
|
2446
|
+
...F,
|
|
2447
|
+
breakpoint: I,
|
|
2448
|
+
scroll: p,
|
|
2449
|
+
columns: D
|
|
2449
2450
|
}), {
|
|
2450
|
-
columnsMap:
|
|
2451
|
-
operationType:
|
|
2452
|
-
setColumnsMap:
|
|
2453
|
-
sortKeyColumns:
|
|
2454
|
-
cacheColumnsMap:
|
|
2455
|
-
setSortKeyColumns:
|
|
2456
|
-
} =
|
|
2457
|
-
columns:
|
|
2458
|
-
columnsState:
|
|
2459
|
-
changeColumns:
|
|
2451
|
+
columnsMap: ve,
|
|
2452
|
+
operationType: Oe,
|
|
2453
|
+
setColumnsMap: Se,
|
|
2454
|
+
sortKeyColumns: xe,
|
|
2455
|
+
cacheColumnsMap: we,
|
|
2456
|
+
setSortKeyColumns: le
|
|
2457
|
+
} = Ba({
|
|
2458
|
+
columns: f,
|
|
2459
|
+
columnsState: Z(e, "columnsState"),
|
|
2460
|
+
changeColumns: A
|
|
2460
2461
|
}), {
|
|
2461
|
-
formDataRef:
|
|
2462
|
-
formParamsRef:
|
|
2463
|
-
defaultParamsRef:
|
|
2464
|
-
setFormParams:
|
|
2465
|
-
} =
|
|
2466
|
-
search:
|
|
2467
|
-
searchMap:
|
|
2468
|
-
params:
|
|
2469
|
-
columns:
|
|
2470
|
-
setPagination:
|
|
2462
|
+
formDataRef: Be,
|
|
2463
|
+
formParamsRef: fe,
|
|
2464
|
+
defaultParamsRef: V,
|
|
2465
|
+
setFormParams: ne
|
|
2466
|
+
} = Oa({
|
|
2467
|
+
search: Z(e, "search"),
|
|
2468
|
+
searchMap: Z(e, "searchMap"),
|
|
2469
|
+
params: Z(e, "params"),
|
|
2470
|
+
columns: D,
|
|
2471
|
+
setPagination: H
|
|
2471
2472
|
}), {
|
|
2472
|
-
selectedKey:
|
|
2473
|
-
changeRowKey:
|
|
2474
|
-
selectRowKey:
|
|
2475
|
-
selectAllRowKey:
|
|
2476
|
-
syncSelectedRows:
|
|
2477
|
-
removeRowKeys:
|
|
2478
|
-
} =
|
|
2473
|
+
selectedKey: E,
|
|
2474
|
+
changeRowKey: se,
|
|
2475
|
+
selectRowKey: q,
|
|
2476
|
+
selectAllRowKey: gt,
|
|
2477
|
+
syncSelectedRows: yt,
|
|
2478
|
+
removeRowKeys: pt
|
|
2479
|
+
} = Ra(Z(e, "rowKey"), Z(e, "rowSelection")), bt = Fa(e), {
|
|
2479
2480
|
reload: De,
|
|
2480
|
-
reSetDataList:
|
|
2481
|
-
changeDataValue:
|
|
2481
|
+
reSetDataList: Ct,
|
|
2482
|
+
changeDataValue: St,
|
|
2482
2483
|
isTreeDataRef: We,
|
|
2483
2484
|
getDataSourceRef: me,
|
|
2484
2485
|
handleTableChange: _e
|
|
2485
|
-
} =
|
|
2486
|
-
...
|
|
2487
|
-
waitRequest:
|
|
2486
|
+
} = Ia({
|
|
2487
|
+
...bt,
|
|
2488
|
+
waitRequest: m
|
|
2488
2489
|
}, {
|
|
2489
|
-
loadingStatus:
|
|
2490
|
-
getPaginationInfo:
|
|
2491
|
-
setPagination:
|
|
2492
|
-
removeRowKeys:
|
|
2493
|
-
syncSelectedRows:
|
|
2494
|
-
setLoading:
|
|
2495
|
-
setColumns:
|
|
2496
|
-
columns:
|
|
2497
|
-
formParamsRef:
|
|
2490
|
+
loadingStatus: Y,
|
|
2491
|
+
getPaginationInfo: M,
|
|
2492
|
+
setPagination: H,
|
|
2493
|
+
removeRowKeys: pt,
|
|
2494
|
+
syncSelectedRows: yt,
|
|
2495
|
+
setLoading: j,
|
|
2496
|
+
setColumns: N,
|
|
2497
|
+
columns: B,
|
|
2498
|
+
formParamsRef: fe,
|
|
2498
2499
|
onBeforeSearchSubmit: e.onBeforeSearchSubmit,
|
|
2499
|
-
hasCustomRender:
|
|
2500
|
-
}, o),
|
|
2501
|
-
...
|
|
2502
|
-
...
|
|
2503
|
-
} : !1), Ge =
|
|
2504
|
-
const C =
|
|
2505
|
-
return !C.indicator && (
|
|
2500
|
+
hasCustomRender: x(() => !!ze(t, e, "customRender"))
|
|
2501
|
+
}, o), xt = x(() => e.options ? {
|
|
2502
|
+
...sl,
|
|
2503
|
+
...J(ue(e.options) ? e.options : {})
|
|
2504
|
+
} : !1), Ge = x(() => {
|
|
2505
|
+
const C = ue(e.loading) ? ye(e.loading, "spinning") : {};
|
|
2506
|
+
return !C.indicator && (y != null && y.value) && (C.indicator = y == null ? void 0 : y.value), ye({
|
|
2506
2507
|
...(ye(n), ["class", "style", "id"]),
|
|
2507
2508
|
...e,
|
|
2508
|
-
virtualScroll:
|
|
2509
|
-
size: h(
|
|
2510
|
-
scroll: h(
|
|
2509
|
+
virtualScroll: P.value,
|
|
2510
|
+
size: h(L),
|
|
2511
|
+
scroll: h(p),
|
|
2511
2512
|
loading: {
|
|
2512
|
-
spinning: e.showLoading ? !!h(
|
|
2513
|
+
spinning: e.showLoading ? !!h(Y) : !1,
|
|
2513
2514
|
...C
|
|
2514
2515
|
},
|
|
2515
|
-
columns:
|
|
2516
|
-
pagination:
|
|
2516
|
+
columns: Me(h(B).filter((R) => R.show || R.show === void 0)),
|
|
2517
|
+
pagination: Me(h(M)),
|
|
2517
2518
|
dataSource: h(me)
|
|
2518
2519
|
}, ["class", "onChange", "onExpand", "onExpandedRowsChange"]);
|
|
2519
|
-
}),
|
|
2520
|
-
[`${
|
|
2520
|
+
}), wt = x(() => [{
|
|
2521
|
+
[`${r.value}`]: !0,
|
|
2521
2522
|
[`${l}`]: !0,
|
|
2522
2523
|
[`${n.class}`]: n.class,
|
|
2523
|
-
[`${l}-no-scroll`]: !Object.keys(h(
|
|
2524
|
+
[`${l}-no-scroll`]: !Object.keys(h(p) || {}).length,
|
|
2524
2525
|
[`${l}-table-tree`]: We.value,
|
|
2525
2526
|
[`${l}-full-screen`]: S.value
|
|
2526
|
-
}]), qe =
|
|
2527
|
-
var
|
|
2527
|
+
}]), qe = x(() => {
|
|
2528
|
+
var Q;
|
|
2528
2529
|
let C;
|
|
2529
|
-
const R = h(
|
|
2530
|
+
const R = h($).direction === "rtl" ? "bottomLeft" : "right", k = (Q = h(M)) == null ? void 0 : Q.position;
|
|
2530
2531
|
if (k !== null && Array.isArray(k)) {
|
|
2531
|
-
const
|
|
2532
|
-
!
|
|
2532
|
+
const z = k.find((re) => re.indexOf("top") !== -1), W = k.find((re) => re.indexOf("bottom") !== -1), Te = k.every((re) => `${re}` == "none");
|
|
2533
|
+
!z && !W && !Te && (C = R), z && (C = z.toLowerCase().replace("top", "")), W && (C = W.toLowerCase().replace("bottom", ""));
|
|
2533
2534
|
} else
|
|
2534
2535
|
C = R;
|
|
2535
2536
|
return C;
|
|
2536
2537
|
}), Ue = async (C) => {
|
|
2537
2538
|
var R;
|
|
2538
|
-
|
|
2539
|
+
ue(e.search) && ((R = e.search) != null && R.showSearch) ? (ne({
|
|
2539
2540
|
...C,
|
|
2540
2541
|
...e.params || {}
|
|
2541
|
-
}), await De()) :
|
|
2542
|
-
},
|
|
2542
|
+
}), await De()) : ne(C);
|
|
2543
|
+
}, Tt = async (C, R) => {
|
|
2543
2544
|
R ? (o("reset", C), e.request && await Ue(C)) : e.request ? (o("submit", C), await Ue(C)) : o("submit", C);
|
|
2544
|
-
}, Xe = (C, R, k,
|
|
2545
|
-
|
|
2546
|
-
},
|
|
2545
|
+
}, Xe = (C, R, k, Q) => {
|
|
2546
|
+
H(it(C, ["current", "pageSize"])), _e(C, R, k, Q);
|
|
2547
|
+
}, Rt = (C, R) => {
|
|
2547
2548
|
var k;
|
|
2548
|
-
|
|
2549
|
+
H({
|
|
2549
2550
|
current: C,
|
|
2550
2551
|
pageSize: R
|
|
2551
2552
|
}), _e({
|
|
2552
2553
|
current: C,
|
|
2553
2554
|
pageSize: R,
|
|
2554
|
-
total:
|
|
2555
|
+
total: M.value && ((k = M.value) == null ? void 0 : k.total) || 0
|
|
2555
2556
|
}, {}, {});
|
|
2556
|
-
},
|
|
2557
|
+
}, $t = (C) => {
|
|
2557
2558
|
o("expandedRowsChange", C);
|
|
2558
|
-
},
|
|
2559
|
+
}, Ft = (C, R) => {
|
|
2559
2560
|
o("expand", C, R);
|
|
2560
|
-
},
|
|
2561
|
-
const
|
|
2562
|
-
return R && k.copyable ? i(
|
|
2561
|
+
}, It = (C, R) => K(C, R), Pt = (C, R, k) => {
|
|
2562
|
+
const Q = k.align === "center" ? "top" : k.align === "left" || !k.align ? "topLeft" : "topRight";
|
|
2563
|
+
return R && k.copyable ? i(ia.Paragraph, {
|
|
2563
2564
|
class: `${l}-copyable`,
|
|
2564
2565
|
style: {
|
|
2565
2566
|
margin: "0",
|
|
@@ -2568,159 +2569,160 @@ const ke = {
|
|
|
2568
2569
|
},
|
|
2569
2570
|
copyable: !0
|
|
2570
2571
|
}, {
|
|
2571
|
-
default: () => [i(
|
|
2572
|
+
default: () => [i(ee, {
|
|
2572
2573
|
title: C,
|
|
2573
|
-
placement:
|
|
2574
|
+
placement: Q
|
|
2574
2575
|
}, {
|
|
2575
2576
|
default: () => [i("div", {
|
|
2576
2577
|
class: `${l}-ellipsis`
|
|
2577
2578
|
}, [C])]
|
|
2578
2579
|
})]
|
|
2579
|
-
}) : R && !k.copyable ? i(
|
|
2580
|
+
}) : R && !k.copyable ? i(ee, {
|
|
2580
2581
|
title: C,
|
|
2581
|
-
placement:
|
|
2582
|
+
placement: Q
|
|
2582
2583
|
}, {
|
|
2583
2584
|
default: () => [We.value ? C : i("div", {
|
|
2584
2585
|
class: `${l}-ellipsis`
|
|
2585
2586
|
}, [C])]
|
|
2586
2587
|
}) : C;
|
|
2587
|
-
},
|
|
2588
|
+
}, Ot = () => {
|
|
2588
2589
|
var R;
|
|
2589
2590
|
const C = ze(t, e, "customRender");
|
|
2590
|
-
return C ? (R = me.value) != null && R.length ? C(me.value) : (
|
|
2591
|
-
image:
|
|
2591
|
+
return C ? (R = me.value) != null && R.length ? C(me.value) : (g == null ? void 0 : g.value) || i(ct, {
|
|
2592
|
+
image: ul
|
|
2592
2593
|
}, null) : i(Ie, null, null);
|
|
2593
|
-
},
|
|
2594
|
+
}, Bt = (C, R, k) => i(tl, {
|
|
2594
2595
|
headerTitle: C,
|
|
2595
2596
|
titleTip: k,
|
|
2596
2597
|
titleTipText: e.titleTipText,
|
|
2597
|
-
options: h(
|
|
2598
|
+
options: h(xt),
|
|
2598
2599
|
settingExtra: ge(t, e, "settingExtra"),
|
|
2599
2600
|
optionsExtra: ge(t, e, "optionsExtra"),
|
|
2600
2601
|
toolBarBtn: R
|
|
2601
2602
|
}, null);
|
|
2602
|
-
|
|
2603
|
-
tableSize:
|
|
2604
|
-
columns:
|
|
2605
|
-
cacheColumns:
|
|
2603
|
+
Ea({
|
|
2604
|
+
tableSize: L,
|
|
2605
|
+
columns: B,
|
|
2606
|
+
cacheColumns: D,
|
|
2607
|
+
isMobile: T,
|
|
2606
2608
|
action: {
|
|
2607
|
-
setTableSize:
|
|
2609
|
+
setTableSize: G,
|
|
2608
2610
|
reload: (C) => De(C),
|
|
2609
|
-
toggle:
|
|
2611
|
+
toggle: d
|
|
2610
2612
|
},
|
|
2611
2613
|
settingsAction: {
|
|
2612
|
-
autoScroll:
|
|
2613
|
-
columnsMap:
|
|
2614
|
-
operationType:
|
|
2615
|
-
setColumnsMap:
|
|
2616
|
-
sortKeyColumns:
|
|
2617
|
-
cacheColumnsMap:
|
|
2618
|
-
setSortKeyColumns:
|
|
2614
|
+
autoScroll: Z(e, "autoScroll"),
|
|
2615
|
+
columnsMap: ve,
|
|
2616
|
+
operationType: Oe,
|
|
2617
|
+
setColumnsMap: Se,
|
|
2618
|
+
sortKeyColumns: xe,
|
|
2619
|
+
cacheColumnsMap: we,
|
|
2620
|
+
setSortKeyColumns: le
|
|
2619
2621
|
},
|
|
2620
|
-
setPagination:
|
|
2621
|
-
changeColumns:
|
|
2622
|
+
setPagination: H,
|
|
2623
|
+
changeColumns: A,
|
|
2622
2624
|
slots: t
|
|
2623
2625
|
}), u({
|
|
2624
|
-
loading:
|
|
2626
|
+
loading: Y,
|
|
2625
2627
|
formRef: () => ({
|
|
2626
2628
|
getFormState: () => {
|
|
2627
2629
|
var C;
|
|
2628
|
-
return ((C =
|
|
2630
|
+
return ((C = b.value) == null ? void 0 : C.getFormState()) || {};
|
|
2629
2631
|
},
|
|
2630
|
-
getTableFormState: () => h(
|
|
2632
|
+
getTableFormState: () => h(fe),
|
|
2631
2633
|
restForm: (C) => {
|
|
2632
2634
|
var R;
|
|
2633
|
-
|
|
2635
|
+
m.value = !0, C && (C == null || C()), (R = b.value) == null || R.resetForm(!1), m.value = !1;
|
|
2634
2636
|
}
|
|
2635
2637
|
}),
|
|
2636
2638
|
actionRef: () => ({
|
|
2637
2639
|
dataSource: me.value,
|
|
2638
|
-
pageParams:
|
|
2640
|
+
pageParams: M.value,
|
|
2639
2641
|
reload: De,
|
|
2640
|
-
getLoadingStatus: () => h(
|
|
2642
|
+
getLoadingStatus: () => h(Y),
|
|
2641
2643
|
reloadAndRest: async (C) => {
|
|
2642
|
-
|
|
2644
|
+
m.value = !0, H({
|
|
2643
2645
|
current: 1,
|
|
2644
2646
|
pageSize: 10
|
|
2645
|
-
}), C && (C == null || C()),
|
|
2647
|
+
}), C && (C == null || C()), m.value = !1;
|
|
2646
2648
|
},
|
|
2647
|
-
reSetDataList:
|
|
2649
|
+
reSetDataList: Ct,
|
|
2648
2650
|
setPageAndReload: Xe,
|
|
2649
|
-
setPagination:
|
|
2650
|
-
changeDataValue:
|
|
2651
|
-
loadingOperation:
|
|
2651
|
+
setPagination: H,
|
|
2652
|
+
changeDataValue: St,
|
|
2653
|
+
loadingOperation: j
|
|
2652
2654
|
})
|
|
2653
2655
|
});
|
|
2654
|
-
const
|
|
2656
|
+
const Dt = x(() => (n == null ? void 0 : n.style) || {});
|
|
2655
2657
|
return () => {
|
|
2656
|
-
var
|
|
2658
|
+
var Q;
|
|
2657
2659
|
const C = ge(t, e, "headerTitle"), R = ge(t, e, "titleTip"), k = ge(t, e, "toolBarBtn");
|
|
2658
|
-
return
|
|
2660
|
+
return s(i("div", {
|
|
2659
2661
|
ref: c,
|
|
2660
|
-
class:
|
|
2661
|
-
style:
|
|
2662
|
+
class: wt.value,
|
|
2663
|
+
style: Dt.value
|
|
2662
2664
|
}, [i("div", {
|
|
2663
|
-
class: [`${l}-content`,
|
|
2664
|
-
}, [(!!
|
|
2665
|
-
ref:
|
|
2665
|
+
class: [`${l}-content`, r.value]
|
|
2666
|
+
}, [(!!Be.value.length || !!((Q = t.search) != null && Q.call(t))) && i(ht, {
|
|
2667
|
+
ref: b,
|
|
2666
2668
|
search: e.search,
|
|
2667
2669
|
modal: e.modalScroll,
|
|
2668
|
-
searchMap:
|
|
2670
|
+
searchMap: Be.value,
|
|
2669
2671
|
prefixCls: l,
|
|
2670
|
-
loading: !!h(
|
|
2671
|
-
onSearch:
|
|
2672
|
-
defaultParams:
|
|
2672
|
+
loading: !!h(Y),
|
|
2673
|
+
onSearch: Tt,
|
|
2674
|
+
defaultParams: V
|
|
2673
2675
|
}, {
|
|
2674
2676
|
default: t.search ? () => {
|
|
2675
|
-
var
|
|
2676
|
-
return (
|
|
2677
|
+
var z;
|
|
2678
|
+
return (z = t.search) == null ? void 0 : z.call(t);
|
|
2677
2679
|
} : null
|
|
2678
|
-
}), !
|
|
2680
|
+
}), !P.value && Bt(C, k, R), e.customRender ?? t.customRender ? i(Le, h(Ge).loading, {
|
|
2679
2681
|
default: () => {
|
|
2680
|
-
var
|
|
2682
|
+
var z;
|
|
2681
2683
|
return [i("div", {
|
|
2682
|
-
class: `${l}-wrapper ${
|
|
2683
|
-
}, [
|
|
2684
|
+
class: `${l}-wrapper ${r.value}`
|
|
2685
|
+
}, [Ot(), e.pagination !== !1 && ((z = me.value) == null ? void 0 : z.length) > 0 && i(oa, U({
|
|
2684
2686
|
class: {
|
|
2685
|
-
[`${l}-pagination ${
|
|
2686
|
-
[`${l}-pagination-${qe.value} ${
|
|
2687
|
+
[`${l}-pagination ${r.value}`]: !0,
|
|
2688
|
+
[`${l}-pagination-${qe.value} ${r.value}`]: !!qe.value
|
|
2687
2689
|
}
|
|
2688
|
-
},
|
|
2689
|
-
onChange:
|
|
2690
|
+
}, Me(h(M)), {
|
|
2691
|
+
onChange: Rt
|
|
2690
2692
|
}), null)])];
|
|
2691
2693
|
}
|
|
2692
|
-
}) : i(
|
|
2694
|
+
}) : i(ua, U(Ge.value, {
|
|
2693
2695
|
style: e.tableStyle || void 0,
|
|
2694
2696
|
class: e.tableClassName,
|
|
2695
|
-
rowKey: (
|
|
2697
|
+
rowKey: (z) => z[e.rowKey || "sortIndex"],
|
|
2696
2698
|
transformCellText: ({
|
|
2697
|
-
text:
|
|
2698
|
-
column:
|
|
2699
|
+
text: z,
|
|
2700
|
+
column: W
|
|
2699
2701
|
}) => {
|
|
2700
2702
|
var Qe, Ze;
|
|
2701
|
-
const Te = Ke(
|
|
2703
|
+
const Te = Ke(z) ? z == null ? void 0 : z[0] : z;
|
|
2702
2704
|
if (Ce(Te))
|
|
2703
|
-
return
|
|
2705
|
+
return z;
|
|
2704
2706
|
const {
|
|
2705
|
-
value:
|
|
2706
|
-
success:
|
|
2707
|
-
} =
|
|
2708
|
-
return
|
|
2707
|
+
value: re,
|
|
2708
|
+
success: Mt
|
|
2709
|
+
} = Xt(Te, (W == null ? void 0 : W.columnEmptyText) || (e == null ? void 0 : e.columnEmptyText) || ""), Je = nl(re, ((Ze = (Qe = e.columns) == null ? void 0 : Qe.find((Nt) => Nt.key === W.key)) == null ? void 0 : Ze.valueType) || W.valueType, l, r.value);
|
|
2710
|
+
return W != null && W.ellipsis ? Pt(Je, Mt, W) : Je;
|
|
2709
2711
|
},
|
|
2710
2712
|
rowSelection: e.rowSelection ? {
|
|
2711
2713
|
...ye(e.rowSelection, ["onSelect", "onSelectAll", "onChange", "selectedRowKeys"]),
|
|
2712
|
-
selectedRowKeys:
|
|
2713
|
-
onSelect:
|
|
2714
|
-
onSelectAll:
|
|
2715
|
-
onChange:
|
|
2714
|
+
selectedRowKeys: E.value,
|
|
2715
|
+
onSelect: q,
|
|
2716
|
+
onSelectAll: gt,
|
|
2717
|
+
onChange: se
|
|
2716
2718
|
} : void 0,
|
|
2717
2719
|
onChange: Xe,
|
|
2718
|
-
onExpandedRowsChange:
|
|
2719
|
-
onExpand:
|
|
2720
|
-
onResizeColumn:
|
|
2720
|
+
onExpandedRowsChange: $t,
|
|
2721
|
+
onExpand: Ft,
|
|
2722
|
+
onResizeColumn: It
|
|
2721
2723
|
}), {
|
|
2722
|
-
emptyText:
|
|
2723
|
-
...ye(t,
|
|
2724
|
+
emptyText: g != null && g.value ? () => g == null ? void 0 : g.value : null,
|
|
2725
|
+
...ye(t, al)
|
|
2724
2726
|
})])]));
|
|
2725
2727
|
};
|
|
2726
2728
|
}
|
|
@@ -2729,6 +2731,6 @@ Ee.install = (e) => (e.component(Ee.name, Ee), e);
|
|
|
2729
2731
|
export {
|
|
2730
2732
|
Ee as GProTable,
|
|
2731
2733
|
Ee as default,
|
|
2732
|
-
|
|
2733
|
-
|
|
2734
|
+
ce as proTableProps,
|
|
2735
|
+
bl as useTable
|
|
2734
2736
|
};
|