@gx-design-vue/pro-table 0.2.0-beta.64 → 0.2.0-beta.66
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 +1 -1
- package/dist/hooks/useColums.d.ts +15 -2
- package/dist/hooks/useFetchData.d.ts +2 -2
- package/dist/hooks/useLoading.d.ts +4 -3
- package/dist/hooks/useTable.d.ts +5 -3
- package/dist/pro-table.js +1009 -1017
- package/dist/pro-table.umd.cjs +1 -1
- package/dist/types/ColumnTypings.d.ts +5 -4
- package/dist/types/TableTypings.d.ts +10 -7
- package/package.json +4 -4
package/dist/pro-table.js
CHANGED
|
@@ -1,101 +1,99 @@
|
|
|
1
|
-
import { reactive as
|
|
2
|
-
import { pick as
|
|
3
|
-
import { isBoolean as
|
|
4
|
-
import { useFullscreen as
|
|
5
|
-
import { Form as
|
|
1
|
+
import { reactive as ce, isReactive as Mt, watch as W, computed as w, ref as P, createVNode as c, mergeProps as Q, isVNode as Te, watchEffect as me, unref as C, onUnmounted as Nt, onDeactivated as jt, onMounted as zt, defineComponent as ue, Fragment as Ie, nextTick as Kt, createTextVNode as we, renderSlot as At, cloneVNode as Yt, toRef as te, toRaw as De } from "vue";
|
|
2
|
+
import { pick as at, cloneDeep as Z, omit as xe } from "lodash-es";
|
|
3
|
+
import { isBoolean as le, isObject as ne, getSlot as nt, isFunction as Se, arrayRepeat as Lt, runFunction as Vt, convertValueBoolean as ve, getSortIndex as Ht, isDeepEqualReact as ut, handleCurrentPage as Wt, genColumnKey as it, compareArray as _t, isNumber as ot, isString as Gt, isArray as ze, getPrefixCls as Ye, getRandomNumber as Ke, handleShowIndex as qt, getSlotVNode as fe, classNames as Ut, hanndleEmptyField as Xt } from "@gx-design-vue/pro-utils";
|
|
4
|
+
import { useFullscreen as st, useWindowSize as Jt } from "@vueuse/core";
|
|
5
|
+
import { Form as Ze, Grid as Le, Space as re, Button as et, Input as tt, TimePicker as Qt, DatePicker as rt, TreeSelect as Zt, Spin as Ae, Select as el, Popover as tl, Checkbox as ll, Tooltip as ae, Tree as al, Dropdown as nl, Menu as Re, Empty as ct, Pagination as ul, Table as il, Typography as ol } from "ant-design-vue";
|
|
6
6
|
import { useProAppContext as sl } from "@gx-design-vue/pro-app";
|
|
7
7
|
import { useContext as rl, useProStyle as Pe } from "@gx-design-vue/pro-provider";
|
|
8
|
-
import
|
|
9
|
-
import { tryOnUnmounted as cl, useMemo as
|
|
10
|
-
import { UpOutlined as dl, DownOutlined as fl, SettingOutlined as
|
|
11
|
-
function
|
|
8
|
+
import U from "dayjs";
|
|
9
|
+
import { tryOnUnmounted as cl, useMemo as Be } from "@gx-design-vue/pro-hooks";
|
|
10
|
+
import { UpOutlined as dl, DownOutlined as fl, SettingOutlined as dt, VerticalAlignTopOutlined as hl, VerticalAlignMiddleOutlined as vl, VerticalAlignBottomOutlined as ml, FullscreenExitOutlined as gl, FullscreenOutlined as yl, ColumnHeightOutlined as bl, InfoCircleOutlined as Cl, ReloadOutlined as xl } from "@ant-design/icons-vue";
|
|
11
|
+
function ba(e, a) {
|
|
12
|
+
var T, m;
|
|
12
13
|
function t() {
|
|
13
14
|
return a != null && a.defaultValue && ne(a == null ? void 0 : a.defaultValue) ? a == null ? void 0 : a.defaultValue : {};
|
|
14
15
|
}
|
|
15
|
-
const
|
|
16
|
+
const u = ce({
|
|
16
17
|
...t(),
|
|
17
|
-
request: async (...
|
|
18
|
-
var
|
|
19
|
-
return a != null && a.request ? await ((
|
|
18
|
+
request: async (...n) => {
|
|
19
|
+
var o;
|
|
20
|
+
return a != null && a.request ? await ((o = a == null ? void 0 : a.request) == null ? void 0 : o.call(a, ...n)) : void 0;
|
|
20
21
|
}
|
|
21
22
|
});
|
|
22
|
-
a != null && a.defaultValue && Mt(a.defaultValue) &&
|
|
23
|
-
Object.assign(
|
|
23
|
+
a != null && a.defaultValue && Mt(a.defaultValue) && W(() => a == null ? void 0 : a.defaultValue, () => {
|
|
24
|
+
Object.assign(u, t());
|
|
24
25
|
}, { deep: !0 });
|
|
25
|
-
const
|
|
26
|
-
var
|
|
27
|
-
return (
|
|
28
|
-
}),
|
|
29
|
-
var
|
|
30
|
-
return (
|
|
26
|
+
const r = w(() => {
|
|
27
|
+
var n, o;
|
|
28
|
+
return (o = (n = e == null ? void 0 : e.value) == null ? void 0 : n.actionRef) == null ? void 0 : o.call(n);
|
|
29
|
+
}), s = w(() => {
|
|
30
|
+
var n, o;
|
|
31
|
+
return (o = (n = e == null ? void 0 : e.value) == null ? void 0 : n.formRef) == null ? void 0 : o.call(n);
|
|
31
32
|
}), h = w(() => {
|
|
32
|
-
var
|
|
33
|
-
const
|
|
33
|
+
var o, i, b, y;
|
|
34
|
+
const n = le((o = r.value) == null ? void 0 : o.pageParams) ? {} : ((i = r.value) == null ? void 0 : i.pageParams) || {};
|
|
34
35
|
return {
|
|
35
|
-
...
|
|
36
|
-
...((
|
|
36
|
+
...at(n, ["current", "pageSize"]),
|
|
37
|
+
...((y = (b = s.value) == null ? void 0 : b.getFormState) == null ? void 0 : y.call(b)) || {}
|
|
37
38
|
};
|
|
38
|
-
});
|
|
39
|
-
return {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
39
|
+
}), d = P(!!((m = (T = r.value) == null ? void 0 : T.loading) != null && m.value));
|
|
40
|
+
return W(() => {
|
|
41
|
+
var n, o;
|
|
42
|
+
return (o = (n = r.value) == null ? void 0 : n.loading) == null ? void 0 : o.value;
|
|
43
|
+
}, (n) => {
|
|
44
|
+
d.value = !!n;
|
|
45
|
+
}), W(d, (n) => {
|
|
46
|
+
var o, i;
|
|
47
|
+
(i = (o = r.value) == null ? void 0 : o.setLoading) == null || i.call(o, !!n);
|
|
48
|
+
}), {
|
|
49
|
+
formRef: s,
|
|
50
|
+
actionRef: r,
|
|
51
|
+
tableState: u,
|
|
43
52
|
requestParams: h,
|
|
44
|
-
loading:
|
|
45
|
-
var u, v;
|
|
46
|
-
return ve((v = (u = e == null ? void 0 : e.value) == null ? void 0 : u.loading) == null ? void 0 : v.value);
|
|
47
|
-
}),
|
|
53
|
+
loading: d,
|
|
48
54
|
dataSource: w(() => {
|
|
49
|
-
var
|
|
50
|
-
return ((
|
|
55
|
+
var n, o;
|
|
56
|
+
return ((o = (n = r == null ? void 0 : r.value) == null ? void 0 : n.dataSource) == null ? void 0 : o.value) || [];
|
|
51
57
|
}),
|
|
52
58
|
selectedKey: w(() => {
|
|
53
|
-
var
|
|
54
|
-
return ((
|
|
59
|
+
var n;
|
|
60
|
+
return ((n = r == null ? void 0 : r.value) == null ? void 0 : n.selectedKey) || [];
|
|
55
61
|
}),
|
|
56
62
|
selectedItem: w(() => {
|
|
57
|
-
var
|
|
58
|
-
return ((
|
|
63
|
+
var n;
|
|
64
|
+
return ((n = r == null ? void 0 : r.value) == null ? void 0 : n.selectedItem) || [];
|
|
59
65
|
}),
|
|
60
|
-
mutate: (
|
|
61
|
-
var
|
|
62
|
-
return (
|
|
66
|
+
mutate: (n) => {
|
|
67
|
+
var o, i;
|
|
68
|
+
return (i = (o = r.value) == null ? void 0 : o.reSetDataList) == null ? void 0 : i.call(o, n);
|
|
63
69
|
},
|
|
64
|
-
|
|
65
|
-
var
|
|
66
|
-
return (
|
|
70
|
+
reloadAndReset: (n) => {
|
|
71
|
+
var o, i;
|
|
72
|
+
return (i = (o = r.value) == null ? void 0 : o.reloadAndReset) == null ? void 0 : i.call(o, n);
|
|
67
73
|
},
|
|
68
|
-
|
|
69
|
-
var
|
|
70
|
-
return (
|
|
74
|
+
setPageAndReload: (n, o, i, b) => {
|
|
75
|
+
var y, f;
|
|
76
|
+
return (f = (y = r.value) == null ? void 0 : y.setPageAndReload) == null ? void 0 : f.call(y, n, o, i, b);
|
|
71
77
|
},
|
|
72
|
-
|
|
73
|
-
var
|
|
74
|
-
return (
|
|
78
|
+
setPagination: (n) => {
|
|
79
|
+
var o, i;
|
|
80
|
+
return (i = (o = r.value) == null ? void 0 : o.setPagination) == null ? void 0 : i.call(o, n);
|
|
75
81
|
},
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
82
|
+
setLoading: (n) => d.value = n,
|
|
83
|
+
setData: (n) => {
|
|
84
|
+
var o, i;
|
|
85
|
+
return (i = (o = r.value) == null ? void 0 : o.setData) == null ? void 0 : i.call(o, n);
|
|
79
86
|
},
|
|
80
|
-
reload: (
|
|
81
|
-
var
|
|
82
|
-
return (
|
|
87
|
+
reload: (n) => {
|
|
88
|
+
var o, i;
|
|
89
|
+
return (i = (o = r.value) == null ? void 0 : o.reload) == null ? void 0 : i.call(o, n);
|
|
83
90
|
}
|
|
84
91
|
};
|
|
85
92
|
}
|
|
86
|
-
function
|
|
87
|
-
return Ye = Object.assign ? Object.assign.bind() : function(e) {
|
|
88
|
-
for (var a = 1; a < arguments.length; a++) {
|
|
89
|
-
var t = arguments[a];
|
|
90
|
-
for (var n in t) ({}).hasOwnProperty.call(t, n) && (e[n] = t[n]);
|
|
91
|
-
}
|
|
92
|
-
return e;
|
|
93
|
-
}, Ye.apply(null, arguments);
|
|
94
|
-
}
|
|
95
|
-
function pl(e, a) {
|
|
93
|
+
function Sl(e, a) {
|
|
96
94
|
process.env.NODE_ENV !== "production" && !e && console !== void 0 && console.error(`Warning: ${a}`);
|
|
97
95
|
}
|
|
98
|
-
const
|
|
96
|
+
const wl = () => ({
|
|
99
97
|
prefixCls: {
|
|
100
98
|
type: String,
|
|
101
99
|
default: void 0
|
|
@@ -270,7 +268,7 @@ const Sl = () => ({
|
|
|
270
268
|
default: void 0
|
|
271
269
|
}
|
|
272
270
|
}), he = {
|
|
273
|
-
...
|
|
271
|
+
...wl(),
|
|
274
272
|
rowSelection: {
|
|
275
273
|
type: Object,
|
|
276
274
|
default: void 0
|
|
@@ -538,95 +536,95 @@ const Sl = () => ({
|
|
|
538
536
|
onBeforeSearchSubmit: Function,
|
|
539
537
|
onColumnsStateChange: Function
|
|
540
538
|
};
|
|
541
|
-
function
|
|
542
|
-
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !
|
|
539
|
+
function pl(e) {
|
|
540
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !Te(e);
|
|
543
541
|
}
|
|
544
|
-
function Tl(e, a, t,
|
|
542
|
+
function Tl(e, a, t, u) {
|
|
545
543
|
if (!a) return e;
|
|
546
|
-
let
|
|
544
|
+
let r = e;
|
|
547
545
|
if (ne(a)) {
|
|
548
|
-
const
|
|
549
|
-
return
|
|
546
|
+
const s = a.node === "a" ? "span" : a.node;
|
|
547
|
+
return c(s, Q((a == null ? void 0 : a.attr) || {}, {
|
|
550
548
|
class: [a.class, a.node === "a" ? `${t}-a` : ""],
|
|
551
549
|
onClick: a.click
|
|
552
|
-
}),
|
|
550
|
+
}), pl(e) ? e : {
|
|
553
551
|
default: () => [e]
|
|
554
552
|
});
|
|
555
553
|
}
|
|
556
554
|
switch (a) {
|
|
557
555
|
case "link":
|
|
558
|
-
|
|
559
|
-
class: [`${t}-a`,
|
|
556
|
+
r = c("span", {
|
|
557
|
+
class: [`${t}-a`, u]
|
|
560
558
|
}, [e]);
|
|
561
559
|
break;
|
|
562
560
|
case "time":
|
|
563
|
-
|
|
561
|
+
r = U(e).format("HH:mm:ss");
|
|
564
562
|
break;
|
|
565
563
|
case "dateMonth":
|
|
566
|
-
|
|
564
|
+
r = `${U(e).month() + 1}月`;
|
|
567
565
|
break;
|
|
568
566
|
case "dateTime":
|
|
569
|
-
|
|
567
|
+
r = U(e).format("YYYY-MM-DD HH:mm:ss");
|
|
570
568
|
break;
|
|
571
569
|
}
|
|
572
|
-
return
|
|
570
|
+
return r;
|
|
573
571
|
}
|
|
574
572
|
function $l(e, a) {
|
|
575
|
-
const t = a && a.current || 1,
|
|
576
|
-
return e.filter((
|
|
573
|
+
const t = a && a.current || 1, u = a && a.pageSize || 10;
|
|
574
|
+
return e.filter((r, s) => s < t * u && s >= u * (t - 1));
|
|
577
575
|
}
|
|
578
576
|
function Fl({ emit: e, loading: a }) {
|
|
579
|
-
var
|
|
580
|
-
const t = P(
|
|
581
|
-
|
|
582
|
-
t.value =
|
|
577
|
+
var s;
|
|
578
|
+
const t = P(le(a.value) ? a.value : ne(a.value) ? (s = a.value) == null ? void 0 : s.spinning : !1);
|
|
579
|
+
W(() => a.value, (h) => {
|
|
580
|
+
t.value = le(h) ? h : ne(h) ? h == null ? void 0 : h.spinning : t.value;
|
|
583
581
|
});
|
|
584
|
-
const
|
|
585
|
-
function
|
|
582
|
+
const u = w(() => t.value);
|
|
583
|
+
function r(h) {
|
|
586
584
|
t.value = h, e("loadingChange", !0);
|
|
587
585
|
}
|
|
588
|
-
return {
|
|
586
|
+
return { loadingComputed: u, loading: t, setLoading: r };
|
|
589
587
|
}
|
|
590
588
|
function Rl({ size: e, emit: a }) {
|
|
591
589
|
const t = P("middle");
|
|
592
|
-
|
|
590
|
+
me(() => {
|
|
593
591
|
t.value = e.value;
|
|
594
592
|
});
|
|
595
|
-
function
|
|
596
|
-
t.value =
|
|
593
|
+
function u(r) {
|
|
594
|
+
t.value = r, a("sizeChange", !0);
|
|
597
595
|
}
|
|
598
|
-
return { sizeRef: t, setTableSize:
|
|
596
|
+
return { sizeRef: t, setTableSize: u };
|
|
599
597
|
}
|
|
600
|
-
function
|
|
598
|
+
function Bl({
|
|
601
599
|
slots: e,
|
|
602
600
|
props: a,
|
|
603
601
|
pagination: t
|
|
604
602
|
}) {
|
|
605
|
-
const
|
|
606
|
-
|
|
603
|
+
const u = ce({});
|
|
604
|
+
me(() => {
|
|
607
605
|
if (t.value || t.value === void 0)
|
|
608
|
-
Object.assign(
|
|
606
|
+
Object.assign(u, {
|
|
609
607
|
...t.value ?? {}
|
|
610
608
|
});
|
|
611
609
|
else
|
|
612
|
-
for (const h in
|
|
613
|
-
delete
|
|
610
|
+
for (const h in u)
|
|
611
|
+
delete u[h];
|
|
614
612
|
});
|
|
615
|
-
const
|
|
616
|
-
var
|
|
617
|
-
if (
|
|
613
|
+
const r = w(() => {
|
|
614
|
+
var m;
|
|
615
|
+
if (le(t.value) && !t.value)
|
|
618
616
|
return !1;
|
|
619
|
-
const h =
|
|
617
|
+
const h = nt(e, C(a), "pageItemRender"), d = Se(h) ? {
|
|
620
618
|
itemRender: ({
|
|
621
|
-
page:
|
|
622
|
-
type:
|
|
623
|
-
originalElement:
|
|
619
|
+
page: n,
|
|
620
|
+
type: o,
|
|
621
|
+
originalElement: i
|
|
624
622
|
}) => h ? h({
|
|
625
|
-
page:
|
|
626
|
-
type:
|
|
627
|
-
originalElement:
|
|
623
|
+
page: n,
|
|
624
|
+
type: o,
|
|
625
|
+
originalElement: i
|
|
628
626
|
}) : null
|
|
629
|
-
} : null,
|
|
627
|
+
} : null, T = {
|
|
630
628
|
current: 1,
|
|
631
629
|
pageSize: 10,
|
|
632
630
|
size: "default",
|
|
@@ -634,431 +632,431 @@ function Il({
|
|
|
634
632
|
showSizeChanger: !0,
|
|
635
633
|
pageSizeOptions: ["10", "20", "50", "100"],
|
|
636
634
|
...t.value || {},
|
|
637
|
-
...
|
|
638
|
-
...
|
|
635
|
+
...C(u),
|
|
636
|
+
...d || {}
|
|
639
637
|
};
|
|
640
|
-
return (
|
|
638
|
+
return (m = t.value) != null && m.showTotal || (T.showTotal = (n) => `共${n < T.pageSize ? 1 : Math.ceil(n / (T.pageSize || 10))}页 ${n}条记录`), T;
|
|
641
639
|
});
|
|
642
|
-
function
|
|
643
|
-
const
|
|
644
|
-
Object.assign(
|
|
645
|
-
...
|
|
640
|
+
function s(h) {
|
|
641
|
+
const d = C(r);
|
|
642
|
+
Object.assign(u, {
|
|
643
|
+
...d || {},
|
|
646
644
|
...h
|
|
647
645
|
});
|
|
648
646
|
}
|
|
649
647
|
return {
|
|
650
|
-
getPaginationInfo:
|
|
651
|
-
setPagination:
|
|
648
|
+
getPaginationInfo: r,
|
|
649
|
+
setPagination: s
|
|
652
650
|
};
|
|
653
651
|
}
|
|
654
|
-
function
|
|
655
|
-
const t = P([]),
|
|
656
|
-
|
|
657
|
-
var
|
|
658
|
-
return (
|
|
659
|
-
}, (
|
|
660
|
-
t.value = Lt([...
|
|
652
|
+
function Il(e, a) {
|
|
653
|
+
const t = P([]), u = P([]);
|
|
654
|
+
W(() => {
|
|
655
|
+
var m;
|
|
656
|
+
return (m = a.value) == null ? void 0 : m.selectedRowKeys;
|
|
657
|
+
}, (m) => {
|
|
658
|
+
t.value = Lt([...m || []]);
|
|
661
659
|
}, {
|
|
662
660
|
deep: !0,
|
|
663
661
|
immediate: !0
|
|
664
662
|
});
|
|
665
|
-
const
|
|
666
|
-
e.value && (
|
|
667
|
-
},
|
|
668
|
-
var
|
|
669
|
-
a.value && ((
|
|
663
|
+
const r = (m, n) => {
|
|
664
|
+
e.value && (n ? m != null && m[e.value] && (t.value.push(m[e.value]), u.value.push(m)) : (t.value = t.value.filter((o) => o !== m[e.value]), u.value = u.value.filter((o) => o[e.value] !== m[e.value])));
|
|
665
|
+
}, s = () => {
|
|
666
|
+
var m, n;
|
|
667
|
+
a.value && ((n = (m = a.value) == null ? void 0 : m.onChange) == null || n.call(m, t.value, u.value));
|
|
670
668
|
};
|
|
671
669
|
return {
|
|
672
670
|
selectedKey: t,
|
|
673
|
-
selectedItem:
|
|
674
|
-
selectRowKey:
|
|
675
|
-
selectAllRowKey: (
|
|
676
|
-
e.value && (
|
|
671
|
+
selectedItem: u,
|
|
672
|
+
selectRowKey: r,
|
|
673
|
+
selectAllRowKey: (m, n, o) => {
|
|
674
|
+
e.value && (m ? n.map((i) => (t.value.every((b) => b !== (i == null ? void 0 : i[e.value])) && i != null && i[e.value] && (t.value.push(i[e.value]), u.value.push(i)), i)) : o.map((i) => (t.value.includes(i == null ? void 0 : i[e.value]) && (t.value = t.value.filter((b) => b !== i[e.value]), u.value = u.value.filter((b) => b[e.value] !== i[e.value])), i)));
|
|
677
675
|
},
|
|
678
|
-
removeRowKeys: (
|
|
679
|
-
t.value = t.value.filter((
|
|
676
|
+
removeRowKeys: (m) => {
|
|
677
|
+
t.value = t.value.filter((n) => !m.includes(n)), u.value = u.value.filter((n) => !m.includes(n == null ? void 0 : n[e.value || ""])), s();
|
|
680
678
|
},
|
|
681
|
-
changeRowKey:
|
|
682
|
-
syncSelectedRows: (
|
|
683
|
-
if (e.value && t.value.length !==
|
|
684
|
-
const
|
|
685
|
-
|
|
686
|
-
|
|
679
|
+
changeRowKey: s,
|
|
680
|
+
syncSelectedRows: (m) => {
|
|
681
|
+
if (e.value && t.value.length !== u.value.length) {
|
|
682
|
+
const n = u.value.map((i) => i[e.value]), o = t.value.filter((i) => !n.includes(i));
|
|
683
|
+
m.forEach((i) => {
|
|
684
|
+
o.includes(i[e.value]) && u.value.push(Z(i));
|
|
687
685
|
});
|
|
688
686
|
}
|
|
689
687
|
}
|
|
690
688
|
};
|
|
691
689
|
}
|
|
692
690
|
function Pl(e, a) {
|
|
693
|
-
const t = w(() => a || 0),
|
|
694
|
-
function
|
|
695
|
-
|
|
691
|
+
const t = w(() => a || 0), u = P(), r = P(e);
|
|
692
|
+
function s() {
|
|
693
|
+
u.value && clearTimeout(u.value);
|
|
696
694
|
}
|
|
697
|
-
async function h(...
|
|
698
|
-
return t.value === 0 || t.value === void 0 ?
|
|
699
|
-
var
|
|
700
|
-
(
|
|
701
|
-
|
|
695
|
+
async function h(...d) {
|
|
696
|
+
return t.value === 0 || t.value === void 0 ? r.value(...d) : (s(), new Promise(async (T) => {
|
|
697
|
+
var m;
|
|
698
|
+
(m = d[0]) != null && m.immediate ? T(await r.value(...d)) : u.value = setTimeout(async () => {
|
|
699
|
+
T(await r.value(...d));
|
|
702
700
|
}, t.value);
|
|
703
701
|
}));
|
|
704
702
|
}
|
|
705
|
-
return cl(
|
|
706
|
-
cancel:
|
|
703
|
+
return cl(s), {
|
|
704
|
+
cancel: s,
|
|
707
705
|
run: h
|
|
708
706
|
};
|
|
709
707
|
}
|
|
710
|
-
function
|
|
711
|
-
const a = w(() => e.polling), t = w(() => e.debounceTime),
|
|
708
|
+
function kl(e) {
|
|
709
|
+
const a = w(() => e.polling), t = w(() => e.debounceTime), u = w(() => e.dataSource);
|
|
712
710
|
return {
|
|
713
711
|
polling: a,
|
|
714
712
|
request: e.request,
|
|
715
713
|
postData: e.postData,
|
|
716
714
|
debounceTime: t,
|
|
717
|
-
dataSource:
|
|
715
|
+
dataSource: u
|
|
718
716
|
};
|
|
719
717
|
}
|
|
720
|
-
function
|
|
721
|
-
const
|
|
722
|
-
var
|
|
723
|
-
const { pagination:
|
|
724
|
-
if (!a || !
|
|
725
|
-
return
|
|
726
|
-
if (
|
|
727
|
-
|
|
718
|
+
function Ol({ polling: e, request: a, postData: t, dataSource: u, waitRequest: r, debounceTime: s }, { columns: h, loading: d, setLoading: T, setColumns: m, removeRowKeys: n, syncSelectedRows: o, formParamsRef: i, setPagination: b, getPaginationInfo: y, onBeforeSearchSubmit: f, hasCustomRender: S }, R) {
|
|
719
|
+
const $ = P(), B = P(!0), E = P(!1), X = P(!1), j = P([]), L = P(), ie = async (v = {}) => {
|
|
720
|
+
var $e;
|
|
721
|
+
const { pagination: M, filters: Y = {}, sorter: K = {}, removeKeys: ge = [], isPolling: ke = !1 } = v;
|
|
722
|
+
if (!a || !Se(a) || C(r) && d.value || E.value)
|
|
723
|
+
return u.value || [];
|
|
724
|
+
if (E.value = !0, !ke || C(r) || B.value ? T(!0) : x(!0), C(r)) {
|
|
725
|
+
B.value = !1, E.value = !1;
|
|
728
726
|
return;
|
|
729
727
|
}
|
|
730
|
-
|
|
728
|
+
M && b(M);
|
|
731
729
|
try {
|
|
732
730
|
let oe = {};
|
|
733
|
-
if (
|
|
731
|
+
if (le(M) && !M || le(y))
|
|
734
732
|
oe = {};
|
|
735
733
|
else {
|
|
736
|
-
const { current: z = 1, pageSize:
|
|
737
|
-
oe.pageNum = Wt({ current: z, pageSize:
|
|
734
|
+
const { current: z = 1, pageSize: se = 10, total: G } = C(y) || {};
|
|
735
|
+
oe.pageNum = Wt({ current: z, pageSize: se, total: G }, ge.length), ge.length && n(ge), oe.pageSize = se;
|
|
738
736
|
}
|
|
739
|
-
const
|
|
740
|
-
|
|
741
|
-
const
|
|
742
|
-
z && (z != null && z.order) ?
|
|
737
|
+
const Fe = ne(K) ? [K] : K;
|
|
738
|
+
Fe.forEach((z) => {
|
|
739
|
+
const se = (z == null ? void 0 : z.columnKey) || (z == null ? void 0 : z.field);
|
|
740
|
+
z && (z != null && z.order) ? m(C(h).map((G) => (G.dataIndex === se ? G.sortOrder = z == null ? void 0 : z.order : G.sortOrder = null, G))) : z && m(C(h).map((G) => (G.dataIndex === se && (G.sortOrder = null), G)));
|
|
743
741
|
});
|
|
744
|
-
let
|
|
742
|
+
let ye = {
|
|
745
743
|
...oe || {},
|
|
746
|
-
...
|
|
747
|
-
...
|
|
744
|
+
...v.params,
|
|
745
|
+
...i
|
|
748
746
|
};
|
|
749
|
-
f &&
|
|
747
|
+
f && Se(f) && (ye = await f(ye, K, Y));
|
|
750
748
|
let V = [];
|
|
751
|
-
const
|
|
752
|
-
return
|
|
753
|
-
total:
|
|
749
|
+
const ee = await (a == null ? void 0 : a(ye, Fe, Y));
|
|
750
|
+
return E.value = !1, ee && (ee != null && ee.success) ? (V = ee.data || [], t && Se(t) && (V = await (t == null ? void 0 : t(V))), o(V), (ee.total || (V == null ? void 0 : V.length) || 0) !== (($e = C(y)) == null ? void 0 : $e.total) && b({
|
|
751
|
+
total: ee.total || (V == null ? void 0 : V.length) || 0
|
|
754
752
|
}), F(V), V) : [];
|
|
755
753
|
} catch (oe) {
|
|
756
754
|
j.value === void 0 && F([]), R("requestError", oe);
|
|
757
755
|
} finally {
|
|
758
|
-
|
|
756
|
+
B.value = !1, T(!1);
|
|
759
757
|
}
|
|
760
758
|
return [];
|
|
761
|
-
},
|
|
762
|
-
|
|
763
|
-
const
|
|
764
|
-
return Y &&
|
|
765
|
-
|
|
766
|
-
}, Math.max(Y, 2e3))),
|
|
767
|
-
},
|
|
759
|
+
}, k = Pl(async (v) => {
|
|
760
|
+
L.value && clearTimeout(L.value);
|
|
761
|
+
const M = await ie(v), Y = Vt(e.value, M);
|
|
762
|
+
return Y && !$.value && (L.value = setTimeout(() => {
|
|
763
|
+
k.run({ ...v, isPolling: Y });
|
|
764
|
+
}, Math.max(Y, 2e3))), M;
|
|
765
|
+
}, s.value || 10);
|
|
768
766
|
Nt(() => {
|
|
769
|
-
|
|
767
|
+
$.value = !0, clearTimeout(L.value);
|
|
770
768
|
}), jt(() => {
|
|
771
|
-
|
|
772
|
-
}),
|
|
773
|
-
e.value ?
|
|
774
|
-
}, { immediate: !0 }),
|
|
775
|
-
ve(a) ? (!
|
|
769
|
+
$.value = !0, clearTimeout(L.value);
|
|
770
|
+
}), W(() => e.value, () => {
|
|
771
|
+
e.value ? k.run({ isPolling: !0 }) : clearTimeout(L.value);
|
|
772
|
+
}, { immediate: !0 }), W([() => r.value, () => u.value, () => i], () => {
|
|
773
|
+
ve(a) ? (!B.value || !e.value) && k.run({ isPolling: !1 }) : F(u.value || []);
|
|
776
774
|
}, {
|
|
777
775
|
deep: !0,
|
|
778
776
|
immediate: !0
|
|
779
777
|
});
|
|
780
|
-
const
|
|
778
|
+
const _ = w(() => {
|
|
781
779
|
if (S.value)
|
|
782
|
-
return
|
|
783
|
-
const
|
|
784
|
-
return !
|
|
785
|
-
}), l = w(() =>
|
|
786
|
-
function
|
|
787
|
-
|
|
780
|
+
return C(j);
|
|
781
|
+
const v = h.value.filter((M) => M.show || M.show === void 0);
|
|
782
|
+
return !C(j) || !v || v.length === 0 ? [] : C(j);
|
|
783
|
+
}), l = w(() => C(j).some((v) => v.children && v.children.length > 0));
|
|
784
|
+
function x(v) {
|
|
785
|
+
X.value = v;
|
|
788
786
|
}
|
|
789
|
-
function
|
|
790
|
-
|
|
787
|
+
function I(v, M, Y, K) {
|
|
788
|
+
k.run({ pagination: v, filters: M, sorter: Y, extra: K, isPolling: !1 }), R("change", v, M, Y, K);
|
|
791
789
|
}
|
|
792
|
-
function F(
|
|
790
|
+
function F(v) {
|
|
793
791
|
var Y;
|
|
794
|
-
const
|
|
795
|
-
if (!
|
|
796
|
-
const K =
|
|
797
|
-
K !== ((Y = y
|
|
792
|
+
const M = Ht(Z(v), C(y.value));
|
|
793
|
+
if (!ut(M, j.value) && (j.value = M, !a || !Se(a))) {
|
|
794
|
+
const K = M.length || 0;
|
|
795
|
+
K !== ((Y = C(y)) == null ? void 0 : Y.total) && b({
|
|
798
796
|
total: K
|
|
799
797
|
});
|
|
800
798
|
}
|
|
801
799
|
}
|
|
802
|
-
function
|
|
800
|
+
function D({ key: v, record: M, type: Y = "update" }) {
|
|
803
801
|
switch (Y) {
|
|
804
802
|
case "update":
|
|
805
|
-
j.value = j.value.map((K) =>
|
|
803
|
+
j.value = j.value.map((K) => v && M[v] === K[v] ? { ...K, ...M } : K);
|
|
806
804
|
break;
|
|
807
805
|
case "push":
|
|
808
|
-
j.value.push(
|
|
806
|
+
j.value.push(M);
|
|
809
807
|
break;
|
|
810
808
|
case "unshift":
|
|
811
|
-
j.value.unshift(
|
|
809
|
+
j.value.unshift(M);
|
|
812
810
|
break;
|
|
813
811
|
case "delete":
|
|
814
|
-
j.value = j.value.filter((K) =>
|
|
812
|
+
j.value = j.value.filter((K) => v ? v && M[v] !== K[v] : !0);
|
|
815
813
|
break;
|
|
816
814
|
}
|
|
817
815
|
}
|
|
818
816
|
return {
|
|
819
|
-
dataSource:
|
|
817
|
+
dataSource: _,
|
|
820
818
|
isTreeDataRef: l,
|
|
821
819
|
reSetDataList: F,
|
|
822
|
-
changeDataValue:
|
|
823
|
-
handleTableChange:
|
|
824
|
-
reload: async (
|
|
825
|
-
ve(a) ? await
|
|
820
|
+
changeDataValue: D,
|
|
821
|
+
handleTableChange: I,
|
|
822
|
+
reload: async (v) => {
|
|
823
|
+
ve(a) ? await k.run({ ...v, isPolling: !1 }) : R("reload");
|
|
826
824
|
}
|
|
827
825
|
};
|
|
828
826
|
}
|
|
829
|
-
function
|
|
827
|
+
function Dl(e) {
|
|
830
828
|
const a = {};
|
|
831
829
|
return e.forEach((t) => {
|
|
832
|
-
let
|
|
833
|
-
const
|
|
834
|
-
!
|
|
830
|
+
let u = t.initialValue;
|
|
831
|
+
const r = ["select"], s = ["date", "time", "dateRange"];
|
|
832
|
+
!u && r.includes(t.valueType) ? u = void 0 : !u && s.includes(t.valueType) ? u = null : u || (u = ""), t.name === "dateRange" ? (a[t.rangeStartName || "start"] = u ? u[0] : null, a[t.rangeEndName || "end"] = u ? u[1] : null) : t.name && (a[t.name] = u);
|
|
835
833
|
}), a;
|
|
836
834
|
}
|
|
837
|
-
function
|
|
838
|
-
const
|
|
839
|
-
var
|
|
840
|
-
return ne(e.value) ? !!((
|
|
841
|
-
}),
|
|
842
|
-
var
|
|
843
|
-
const
|
|
844
|
-
if ((
|
|
845
|
-
|
|
835
|
+
function El({ search: e, searchMap: a, params: t, columns: u, setPagination: r }) {
|
|
836
|
+
const s = ce({}), h = ce({}), d = P([]), T = w(() => {
|
|
837
|
+
var o;
|
|
838
|
+
return ne(e.value) ? !!((o = e.value) != null && o.showSearch) : !!e.value;
|
|
839
|
+
}), m = (o) => {
|
|
840
|
+
var b, y;
|
|
841
|
+
const i = [];
|
|
842
|
+
if ((o === "all" || o === "searchMap") && ((b = a.value) == null || b.forEach((f) => i.push(f)), i.forEach((f) => {
|
|
843
|
+
d.value.some((S) => S.name === f.name) ? d.value = d.value.map((S) => S.name === f.name ? {
|
|
846
844
|
...S,
|
|
847
845
|
...f
|
|
848
|
-
} : S) :
|
|
849
|
-
})), (
|
|
850
|
-
f.searchConfig &&
|
|
851
|
-
}),
|
|
852
|
-
|
|
846
|
+
} : S) : d.value.push(f);
|
|
847
|
+
})), (o === "all" || o === "columns") && ((y = u.value) != null && y.length) && (u.value && u.value.forEach((f) => {
|
|
848
|
+
f.searchConfig && i.push(f.searchConfig);
|
|
849
|
+
}), i.forEach((f) => {
|
|
850
|
+
d.value.some((S) => S.name === f.name) ? d.value = d.value.map((S) => S.name === f.name ? {
|
|
853
851
|
...S,
|
|
854
852
|
...f
|
|
855
|
-
} : S) :
|
|
856
|
-
})),
|
|
857
|
-
|
|
858
|
-
const f =
|
|
853
|
+
} : S) : d.value.push(f);
|
|
854
|
+
})), o === "all" || o === "searchMap" || o === "columns") {
|
|
855
|
+
r({ current: 1 });
|
|
856
|
+
const f = Dl(i);
|
|
859
857
|
Object.assign(h, { ...f });
|
|
860
858
|
for (const S in f)
|
|
861
|
-
|
|
859
|
+
s[S] || (s[S] = f[S]);
|
|
862
860
|
}
|
|
863
|
-
(
|
|
861
|
+
(o === "all" || o === "params") && !T.value && (r({ current: 1 }), Object.assign(s, t.value));
|
|
864
862
|
};
|
|
865
863
|
zt(() => {
|
|
866
|
-
|
|
867
|
-
}),
|
|
868
|
-
|
|
864
|
+
m("all");
|
|
865
|
+
}), W(() => t.value, () => {
|
|
866
|
+
m("params");
|
|
869
867
|
}, {
|
|
870
868
|
deep: !0
|
|
871
|
-
}),
|
|
872
|
-
|
|
869
|
+
}), W(() => a.value, () => {
|
|
870
|
+
m("searchMap");
|
|
873
871
|
}, {
|
|
874
872
|
deep: !0
|
|
875
|
-
}),
|
|
876
|
-
|
|
873
|
+
}), W(() => u.value, () => {
|
|
874
|
+
m("columns");
|
|
877
875
|
}, {
|
|
878
876
|
deep: !0
|
|
879
877
|
});
|
|
880
|
-
function
|
|
881
|
-
|
|
878
|
+
function n(o) {
|
|
879
|
+
r({ current: 1 }), Object.assign(s, o);
|
|
882
880
|
}
|
|
883
|
-
return { formDataRef:
|
|
881
|
+
return { formDataRef: d, formParamsRef: s, defaultParamsRef: h, setFormParams: n };
|
|
884
882
|
}
|
|
885
883
|
function Ml({ columns: e, columnsState: a, changeColumns: t }) {
|
|
886
|
-
const
|
|
887
|
-
|
|
888
|
-
var
|
|
889
|
-
(
|
|
890
|
-
const f = it(
|
|
891
|
-
f && (h[f] = { show:
|
|
884
|
+
const u = P(void 0), r = ce({}), s = ce({}), h = ce({}), d = P([]);
|
|
885
|
+
W(() => e.value, () => {
|
|
886
|
+
var n;
|
|
887
|
+
(n = C(e)) == null || n.forEach(({ show: o, key: i, fixed: b }, y) => {
|
|
888
|
+
const f = it(i, y);
|
|
889
|
+
f && (h[f] = { show: o === void 0 ? !0 : o, fixed: b });
|
|
892
890
|
});
|
|
893
891
|
}, {
|
|
894
892
|
deep: !0,
|
|
895
893
|
immediate: !0
|
|
896
|
-
}),
|
|
897
|
-
const
|
|
898
|
-
|
|
894
|
+
}), W(() => e.value, () => {
|
|
895
|
+
const n = C(e).map((o) => o.key);
|
|
896
|
+
m(n);
|
|
899
897
|
}, {
|
|
900
898
|
deep: !0,
|
|
901
899
|
immediate: !0
|
|
902
|
-
}),
|
|
903
|
-
var
|
|
904
|
-
const
|
|
905
|
-
...(
|
|
906
|
-
...
|
|
900
|
+
}), me(() => {
|
|
901
|
+
var o;
|
|
902
|
+
const n = {
|
|
903
|
+
...(o = C(a)) == null ? void 0 : o.value,
|
|
904
|
+
...C(h)
|
|
907
905
|
};
|
|
908
|
-
Object.assign(
|
|
906
|
+
Object.assign(r, n), Object.assign(s, n);
|
|
909
907
|
});
|
|
910
|
-
function
|
|
911
|
-
|
|
908
|
+
function T(n, o) {
|
|
909
|
+
u.value = o, Object.assign(r, n), t == null || t(r, o === "fixed");
|
|
912
910
|
}
|
|
913
|
-
function
|
|
914
|
-
|
|
911
|
+
function m(n) {
|
|
912
|
+
d.value = n;
|
|
915
913
|
}
|
|
916
914
|
return {
|
|
917
|
-
columnsMap:
|
|
918
|
-
operationType:
|
|
919
|
-
setColumnsMap:
|
|
920
|
-
sortKeyColumns:
|
|
921
|
-
cacheColumnsMap:
|
|
922
|
-
setSortKeyColumns:
|
|
915
|
+
columnsMap: r,
|
|
916
|
+
operationType: u,
|
|
917
|
+
setColumnsMap: T,
|
|
918
|
+
sortKeyColumns: d,
|
|
919
|
+
cacheColumnsMap: s,
|
|
920
|
+
setSortKeyColumns: m
|
|
923
921
|
};
|
|
924
922
|
}
|
|
925
923
|
function Nl(e) {
|
|
926
|
-
const a = w(() => e.draggabled), t = w(() => e.neverScroll),
|
|
924
|
+
const a = w(() => e.draggabled), t = w(() => e.neverScroll), u = w(() => e.autoScroll);
|
|
927
925
|
return {
|
|
928
926
|
draggabled: a,
|
|
929
927
|
neverScroll: t,
|
|
930
|
-
autoScroll:
|
|
928
|
+
autoScroll: u
|
|
931
929
|
};
|
|
932
930
|
}
|
|
933
|
-
function jl({ scroll: e, columns: a, breakpoint: t, draggabled:
|
|
934
|
-
const h = P([]),
|
|
935
|
-
|
|
931
|
+
function jl({ scroll: e, columns: a, breakpoint: t, draggabled: u, autoScroll: r, neverScroll: s }) {
|
|
932
|
+
const h = P([]), d = P([]);
|
|
933
|
+
W([
|
|
936
934
|
() => e.value,
|
|
937
935
|
() => a.value,
|
|
938
936
|
() => t.value,
|
|
939
|
-
() =>
|
|
940
|
-
() =>
|
|
941
|
-
() =>
|
|
937
|
+
() => u.value,
|
|
938
|
+
() => r.value,
|
|
939
|
+
() => s.value
|
|
942
940
|
], () => {
|
|
943
|
-
h.value = Z(
|
|
941
|
+
h.value = Z(n(C(a))), d.value = Z(n(C(a)));
|
|
944
942
|
}, {
|
|
945
943
|
deep: !0,
|
|
946
944
|
immediate: !0
|
|
947
945
|
});
|
|
948
|
-
const
|
|
949
|
-
const
|
|
946
|
+
const T = w(() => {
|
|
947
|
+
const y = m(C(h).filter((R) => R.fixed === "left")), f = m(C(h).filter((R) => R.fixed !== "left" && R.fixed !== "right")), S = m(C(h).filter((R) => R.fixed === "right"));
|
|
950
948
|
return [
|
|
951
|
-
...
|
|
949
|
+
...y,
|
|
952
950
|
...f,
|
|
953
951
|
...S
|
|
954
952
|
];
|
|
955
953
|
});
|
|
956
|
-
function
|
|
957
|
-
return
|
|
954
|
+
function m(y) {
|
|
955
|
+
return y.sort((f, S) => _t(f, S, "order", 0));
|
|
958
956
|
}
|
|
959
|
-
function
|
|
960
|
-
return Z(
|
|
957
|
+
function n(y) {
|
|
958
|
+
return Z(y).map((f, S) => {
|
|
961
959
|
var R;
|
|
962
|
-
if (f.dataIndex === "action" || S ===
|
|
960
|
+
if (f.dataIndex === "action" || S === y.length - 1 ? f.resizable = !1 : f.resizable = le(f.resizable) ? f.resizable : !!(ot(f.width) && C(u)), !f.width || C(s))
|
|
963
961
|
return f;
|
|
964
|
-
if (f.dataIndex === "action" &&
|
|
965
|
-
if ((R =
|
|
962
|
+
if (f.dataIndex === "action" && C(r))
|
|
963
|
+
if ((R = C(e)) != null && R.x || !C(t))
|
|
966
964
|
f.width = f.width || 100, f.fixed = "right";
|
|
967
965
|
else {
|
|
968
|
-
const
|
|
969
|
-
f.width = (
|
|
966
|
+
const $ = C(a).find((B) => B.dataIndex === f.dataIndex);
|
|
967
|
+
f.width = ($ == null ? void 0 : $.width) || "", f.fixed = $ == null ? void 0 : $.fixed;
|
|
970
968
|
}
|
|
971
969
|
return f;
|
|
972
970
|
});
|
|
973
971
|
}
|
|
974
|
-
function
|
|
975
|
-
h.value = h.value.map((S) => (S.uuid === f.uuid && (S.width =
|
|
972
|
+
function o(y, f) {
|
|
973
|
+
h.value = h.value.map((S) => (S.uuid === f.uuid && (S.width = y), S));
|
|
976
974
|
}
|
|
977
|
-
function
|
|
978
|
-
if (
|
|
975
|
+
function i(y) {
|
|
976
|
+
if (y.length <= 0) {
|
|
979
977
|
h.value = [];
|
|
980
978
|
return;
|
|
981
979
|
}
|
|
982
|
-
|
|
980
|
+
ut(n(Z(y)), h.value) || (h.value = n(Z(y)));
|
|
983
981
|
}
|
|
984
|
-
function
|
|
982
|
+
function b(y) {
|
|
985
983
|
let f = Z(a.value);
|
|
986
984
|
f = f.map((S) => {
|
|
987
|
-
var
|
|
985
|
+
var $, B, E;
|
|
988
986
|
const R = S.key ? {
|
|
989
|
-
show: (
|
|
990
|
-
fixed: (
|
|
991
|
-
order: (
|
|
987
|
+
show: ($ = y[S.key]) == null ? void 0 : $.show,
|
|
988
|
+
fixed: (B = y[S.key]) == null ? void 0 : B.fixed,
|
|
989
|
+
order: (E = y[S.key]) == null ? void 0 : E.order
|
|
992
990
|
} : {};
|
|
993
991
|
return {
|
|
994
992
|
...S,
|
|
995
993
|
...R
|
|
996
994
|
};
|
|
997
|
-
}),
|
|
995
|
+
}), i(f);
|
|
998
996
|
}
|
|
999
997
|
return {
|
|
1000
998
|
breakpoint: t,
|
|
1001
|
-
getProColumns:
|
|
1002
|
-
cacheProColumns:
|
|
1003
|
-
setColumns:
|
|
1004
|
-
changeColumns:
|
|
1005
|
-
resizeColumnWidth:
|
|
999
|
+
getProColumns: T,
|
|
1000
|
+
cacheProColumns: d,
|
|
1001
|
+
setColumns: i,
|
|
1002
|
+
changeColumns: b,
|
|
1003
|
+
resizeColumnWidth: o
|
|
1006
1004
|
};
|
|
1007
1005
|
}
|
|
1008
1006
|
function zl(e) {
|
|
1009
|
-
const a = w(() => e.scroll), t = w(() => e.autoScroll),
|
|
1007
|
+
const a = w(() => e.scroll), t = w(() => e.autoScroll), u = w(() => e.modalScroll), r = w(() => e.neverScroll), s = w(() => e.rowSelection), h = w(() => e.scrollBreakpoint);
|
|
1010
1008
|
return {
|
|
1011
1009
|
scroll: a,
|
|
1012
|
-
neverScroll:
|
|
1013
|
-
rowSelection:
|
|
1010
|
+
neverScroll: r,
|
|
1011
|
+
rowSelection: s,
|
|
1014
1012
|
autoScroll: t,
|
|
1015
|
-
modalScroll:
|
|
1013
|
+
modalScroll: u,
|
|
1016
1014
|
scrollBreakpoint: h
|
|
1017
1015
|
};
|
|
1018
1016
|
}
|
|
1019
|
-
function Kl({ scroll: e, columns: a, autoScroll: t, modalScroll:
|
|
1020
|
-
const
|
|
1021
|
-
var
|
|
1022
|
-
return
|
|
1023
|
-
}),
|
|
1024
|
-
let
|
|
1025
|
-
const
|
|
1026
|
-
f.forEach((
|
|
1027
|
-
|
|
1017
|
+
function Kl({ scroll: e, columns: a, autoScroll: t, modalScroll: u, neverScroll: r, rowSelection: s, screens: h, innerWidth: d, scrollBreakpoint: T }) {
|
|
1018
|
+
const m = w(() => {
|
|
1019
|
+
var i, b, y;
|
|
1020
|
+
return C(T) ? ot(C(T)) ? d.value > C(T) : Gt(C(T)) ? (i = h.value) == null ? void 0 : i[C(T)] : (b = h.value) == null ? void 0 : b.xl : (y = h.value) == null ? void 0 : y.xl;
|
|
1021
|
+
}), n = w(() => {
|
|
1022
|
+
let i = 0;
|
|
1023
|
+
const b = C(s) ? 60 : 0, y = 150, f = Z(C(a));
|
|
1024
|
+
f.forEach(($) => {
|
|
1025
|
+
i += Number.parseInt(String($.width)) || 0;
|
|
1028
1026
|
});
|
|
1029
|
-
const R = f.filter((
|
|
1030
|
-
return R !== 0 && (
|
|
1027
|
+
const R = f.filter(($) => !Reflect.has($, "width")).length;
|
|
1028
|
+
return R !== 0 && (i += R * y), b && (i += b), i;
|
|
1031
1029
|
});
|
|
1032
1030
|
return { getScrollRef: w(() => {
|
|
1033
|
-
var
|
|
1034
|
-
return
|
|
1035
|
-
y: ((
|
|
1036
|
-
} :
|
|
1037
|
-
}), breakpoint:
|
|
1031
|
+
var i, b;
|
|
1032
|
+
return C(r) ? {} : C(e) && Object.keys(C(e)).length ? C(e) : C(u) ? {
|
|
1033
|
+
y: ((i = C(e)) == null ? void 0 : i.y) || ((b = h.value) != null && b.xl ? 400 : 235)
|
|
1034
|
+
} : C(t) ? m.value ? {} : le(m.value) ? { x: C(n) } : {} : {};
|
|
1035
|
+
}), breakpoint: m };
|
|
1038
1036
|
}
|
|
1039
|
-
const { provideContext: Al, useInjectContext:
|
|
1037
|
+
const { provideContext: Al, useInjectContext: de } = rl("pro-table");
|
|
1040
1038
|
function Yl(e, a) {
|
|
1041
|
-
const t =
|
|
1042
|
-
function
|
|
1039
|
+
const t = ce({});
|
|
1040
|
+
function u() {
|
|
1043
1041
|
Object.keys(e).forEach((h) => {
|
|
1044
|
-
|
|
1042
|
+
r(h, e[h]);
|
|
1045
1043
|
});
|
|
1046
|
-
const
|
|
1047
|
-
|
|
1048
|
-
e[
|
|
1049
|
-
e[
|
|
1044
|
+
const s = a.find((h) => h.valueType === "dateRange");
|
|
1045
|
+
s && r(s.name || "", e[s.rangeStartName || "start"] ? [
|
|
1046
|
+
e[s.rangeStartName || "start"],
|
|
1047
|
+
e[s.rangeEndName || "end"]
|
|
1050
1048
|
] : []);
|
|
1051
1049
|
}
|
|
1052
|
-
|
|
1053
|
-
|
|
1050
|
+
me(() => {
|
|
1051
|
+
u();
|
|
1054
1052
|
});
|
|
1055
|
-
function s
|
|
1056
|
-
t[
|
|
1053
|
+
function r(s, h) {
|
|
1054
|
+
t[s] = h;
|
|
1057
1055
|
}
|
|
1058
1056
|
return {
|
|
1059
1057
|
formState: t,
|
|
1060
|
-
resetFormState:
|
|
1061
|
-
changeFormState:
|
|
1058
|
+
resetFormState: u,
|
|
1059
|
+
changeFormState: r
|
|
1062
1060
|
};
|
|
1063
1061
|
}
|
|
1064
1062
|
const Ll = (e) => ({
|
|
@@ -1090,10 +1088,10 @@ const Ll = (e) => ({
|
|
|
1090
1088
|
}
|
|
1091
1089
|
}), {
|
|
1092
1090
|
useBreakpoint: Vl
|
|
1093
|
-
} =
|
|
1091
|
+
} = Le, {
|
|
1094
1092
|
MonthPicker: Hl,
|
|
1095
1093
|
RangePicker: Wl
|
|
1096
|
-
} =
|
|
1094
|
+
} = rt, ft = /* @__PURE__ */ ue({
|
|
1097
1095
|
name: "ProTableForm",
|
|
1098
1096
|
props: {
|
|
1099
1097
|
search: {
|
|
@@ -1116,22 +1114,22 @@ const Ll = (e) => ({
|
|
|
1116
1114
|
setup(e, {
|
|
1117
1115
|
emit: a,
|
|
1118
1116
|
slots: t,
|
|
1119
|
-
expose:
|
|
1117
|
+
expose: u
|
|
1120
1118
|
}) {
|
|
1121
1119
|
const {
|
|
1122
|
-
wrapSSR:
|
|
1123
|
-
hashId:
|
|
1120
|
+
wrapSSR: r,
|
|
1121
|
+
hashId: s
|
|
1124
1122
|
} = Pe("ProTableForm", [Ll], e.prefixCls), h = Vl(), {
|
|
1125
|
-
formState:
|
|
1126
|
-
resetFormState:
|
|
1127
|
-
changeFormState:
|
|
1128
|
-
} = Yl(e.defaultParams || {}, e.searchMap || []),
|
|
1123
|
+
formState: d,
|
|
1124
|
+
resetFormState: T,
|
|
1125
|
+
changeFormState: m
|
|
1126
|
+
} = Yl(e.defaultParams || {}, e.searchMap || []), n = P(!1), o = w(() => {
|
|
1129
1127
|
var l;
|
|
1130
1128
|
return !!((l = e.search) != null && l.showSearch);
|
|
1131
|
-
}),
|
|
1132
|
-
var l,
|
|
1133
|
-
return ((l = e.search) == null ? void 0 : l.showReset) === void 0 ?
|
|
1134
|
-
}),
|
|
1129
|
+
}), i = w(() => {
|
|
1130
|
+
var l, x;
|
|
1131
|
+
return ((l = e.search) == null ? void 0 : l.showReset) === void 0 ? o.value : (x = e.search) == null ? void 0 : x.showReset;
|
|
1132
|
+
}), b = [{
|
|
1135
1133
|
value: "xxl",
|
|
1136
1134
|
span: 4
|
|
1137
1135
|
}, {
|
|
@@ -1149,250 +1147,250 @@ const Ll = (e) => ({
|
|
|
1149
1147
|
}, {
|
|
1150
1148
|
value: "xs",
|
|
1151
1149
|
span: 1
|
|
1152
|
-
}],
|
|
1153
|
-
let
|
|
1154
|
-
for (let
|
|
1155
|
-
const F =
|
|
1150
|
+
}], y = (l) => {
|
|
1151
|
+
let x = 4;
|
|
1152
|
+
for (let I = 0; I < b.length; I += 1) {
|
|
1153
|
+
const F = b[I].value;
|
|
1156
1154
|
if (h.value[F]) {
|
|
1157
|
-
|
|
1155
|
+
x = (l == null ? void 0 : l[F]) || (e.modal ? 3 : b[I].span);
|
|
1158
1156
|
break;
|
|
1159
1157
|
}
|
|
1160
1158
|
}
|
|
1161
|
-
return
|
|
1159
|
+
return x;
|
|
1162
1160
|
}, f = w(() => {
|
|
1163
1161
|
var l;
|
|
1164
|
-
return
|
|
1162
|
+
return y((l = e.search) == null ? void 0 : l.span);
|
|
1165
1163
|
});
|
|
1166
|
-
|
|
1164
|
+
W(() => {
|
|
1167
1165
|
var l;
|
|
1168
1166
|
return (l = e.search) == null ? void 0 : l.defaultCollapsed;
|
|
1169
1167
|
}, (l) => {
|
|
1170
|
-
|
|
1168
|
+
n.value = n.value || !!l;
|
|
1171
1169
|
});
|
|
1172
1170
|
const S = (l) => {
|
|
1173
|
-
|
|
1174
|
-
}, R = (l,
|
|
1175
|
-
...
|
|
1171
|
+
n.value = l;
|
|
1172
|
+
}, R = (l, x, I) => (l + 1) % x === 0 ? {
|
|
1173
|
+
...I,
|
|
1176
1174
|
marginRight: 0
|
|
1177
1175
|
} : {
|
|
1178
|
-
...
|
|
1176
|
+
...I,
|
|
1179
1177
|
marginRight: "2%"
|
|
1180
|
-
},
|
|
1181
|
-
const l = Z(
|
|
1182
|
-
return
|
|
1183
|
-
},
|
|
1178
|
+
}, $ = () => {
|
|
1179
|
+
const l = Z(d), x = e.searchMap.find((D) => D.valueType === "text") || "", I = e.searchMap.find((D) => D.valueType === "dateRange") || "", F = e.searchMap.find((D) => D.valueType === "treeSelect");
|
|
1180
|
+
return x && (l[x.name] = d[x.name] || x.initialValue || ""), I && (l[I.rangeStartName || "start"] = l[I.name] ? l[I.name][0] : "", l[I.rangeEndName || "end"] = l[I.name] ? l[I.name][1] : "", delete l[I.name]), F && (F != null && F.name && ze(d[F == null ? void 0 : F.name]) && (l[F.name] = d[F.name].length ? d[F.name].map((D) => D[F.valueKey === "text" ? "label" : "value"]).join() : ""), F != null && F.name && ze(l[F == null ? void 0 : F.name]) && (l[F.name] = l[F.name].length ? l[F.name].map((D) => D[F.valueKey === "text" ? "label" : "value"]) : "")), l;
|
|
1181
|
+
}, B = (l = !1, x) => {
|
|
1184
1182
|
Kt(() => {
|
|
1185
|
-
(!
|
|
1183
|
+
(!o.value || l) && a("search", $(), !!x);
|
|
1186
1184
|
});
|
|
1187
|
-
},
|
|
1188
|
-
var
|
|
1189
|
-
switch (
|
|
1185
|
+
}, E = (l, x) => {
|
|
1186
|
+
var I, F, D;
|
|
1187
|
+
switch (x.valueType) {
|
|
1190
1188
|
case "text":
|
|
1191
|
-
|
|
1189
|
+
m(x.name || "", l || x.initialValue || "");
|
|
1192
1190
|
break;
|
|
1193
1191
|
case "select":
|
|
1194
|
-
|
|
1192
|
+
m(x.name || "", l || l === 0 ? l : x.initialValue || void 0);
|
|
1195
1193
|
break;
|
|
1196
1194
|
case "treeSelect":
|
|
1197
|
-
|
|
1195
|
+
m(x.name || "", l || l === 0 ? l : x.initialValue || ((I = x.field) != null && I.treeCheckable || (F = x.field) != null && F.multiple ? [] : null));
|
|
1198
1196
|
break;
|
|
1199
1197
|
case "date":
|
|
1200
|
-
|
|
1198
|
+
m(x.name || "", l ? U(l).format(x.valueFormat || "YYYY-MM-DD") : x.initialValue || null);
|
|
1201
1199
|
break;
|
|
1202
1200
|
case "dateMonth":
|
|
1203
|
-
|
|
1201
|
+
m(x.name || "", l ? U(l).format("YYYY-MM") : x.initialValue || null);
|
|
1204
1202
|
break;
|
|
1205
1203
|
case "dateRange":
|
|
1206
|
-
|
|
1204
|
+
m(x.name || "", l && l.length > 0 ? [U(l[0]).format(x.valueFormat || "YYYY-MM-DD"), U(l[1]).format(x.valueFormat || "YYYY-MM-DD")] : x.initialValue || null);
|
|
1207
1205
|
break;
|
|
1208
1206
|
case "time":
|
|
1209
|
-
|
|
1207
|
+
m(x.name || "", l ? U(l).format(x.valueFormat || "HH:mm:ss") : x.initialValue || null);
|
|
1210
1208
|
break;
|
|
1211
1209
|
}
|
|
1212
|
-
(
|
|
1213
|
-
},
|
|
1214
|
-
|
|
1210
|
+
(D = e.search) != null && D.showSearch || x.valueType === "text" || (x.valueType === "treeSelect" || x.valueType, B());
|
|
1211
|
+
}, X = (l = !0) => {
|
|
1212
|
+
T(), B(!0, l);
|
|
1215
1213
|
};
|
|
1216
|
-
|
|
1217
|
-
getFormState: () =>
|
|
1218
|
-
resetForm:
|
|
1214
|
+
u({
|
|
1215
|
+
getFormState: () => $(),
|
|
1216
|
+
resetForm: X
|
|
1219
1217
|
});
|
|
1220
|
-
const j = () => (
|
|
1221
|
-
default: () => [
|
|
1222
|
-
onClick: () =>
|
|
1218
|
+
const j = () => (o.value || i.value) && c(re, null, {
|
|
1219
|
+
default: () => [i.value && c(et, {
|
|
1220
|
+
onClick: () => X()
|
|
1223
1221
|
}, {
|
|
1224
1222
|
default: () => {
|
|
1225
1223
|
var l;
|
|
1226
1224
|
return [((l = e.search) == null ? void 0 : l.resetText) || "重置"];
|
|
1227
1225
|
}
|
|
1228
|
-
}),
|
|
1226
|
+
}), o.value && c(et, {
|
|
1229
1227
|
loading: e.loading,
|
|
1230
1228
|
type: "primary",
|
|
1231
|
-
onClick: () =>
|
|
1229
|
+
onClick: () => B(!0)
|
|
1232
1230
|
}, {
|
|
1233
1231
|
default: () => {
|
|
1234
1232
|
var l;
|
|
1235
1233
|
return [((l = e.search) == null ? void 0 : l.searchText) || "查询"];
|
|
1236
1234
|
}
|
|
1237
1235
|
})]
|
|
1238
|
-
}),
|
|
1236
|
+
}), L = ({
|
|
1239
1237
|
formItemStyle: l,
|
|
1240
|
-
advanced:
|
|
1241
|
-
showAdvanced:
|
|
1242
|
-
}) =>
|
|
1238
|
+
advanced: x,
|
|
1239
|
+
showAdvanced: I = !0
|
|
1240
|
+
}) => c("div", {
|
|
1243
1241
|
style: l,
|
|
1244
|
-
class: `${e.prefixCls}-form-collapse-button ${
|
|
1245
|
-
}, [
|
|
1242
|
+
class: `${e.prefixCls}-form-collapse-button ${s.value}`
|
|
1243
|
+
}, [c(re, {
|
|
1246
1244
|
size: 16
|
|
1247
1245
|
}, {
|
|
1248
1246
|
default: () => {
|
|
1249
|
-
var F,
|
|
1250
|
-
return [j(),
|
|
1251
|
-
class: `${e.prefixCls}-a ${
|
|
1252
|
-
onClick: () => S(!
|
|
1253
|
-
}, [
|
|
1247
|
+
var F, D;
|
|
1248
|
+
return [j(), I && c("span", {
|
|
1249
|
+
class: `${e.prefixCls}-a ${s.value}`,
|
|
1250
|
+
onClick: () => S(!x)
|
|
1251
|
+
}, [x ? "收起" : "展开", (F = e.search) != null && F.collapseRender ? (D = e.search) == null ? void 0 : D.collapseRender() : x ? c(dl, null, null) : c(fl, null, null)])];
|
|
1254
1252
|
}
|
|
1255
|
-
})]),
|
|
1256
|
-
var F,
|
|
1257
|
-
let
|
|
1258
|
-
const
|
|
1253
|
+
})]), ie = (l) => {
|
|
1254
|
+
var F, D;
|
|
1255
|
+
let x;
|
|
1256
|
+
const I = o.value ? tt : tt.Search;
|
|
1259
1257
|
switch (l.valueType) {
|
|
1260
1258
|
case "text":
|
|
1261
|
-
|
|
1259
|
+
x = c(I, Q({
|
|
1262
1260
|
style: {
|
|
1263
1261
|
width: "100%"
|
|
1264
1262
|
},
|
|
1265
|
-
value:
|
|
1263
|
+
value: d[l.name],
|
|
1266
1264
|
placeholder: l.placeholder || "请输入",
|
|
1267
1265
|
allowClear: l.allowClear || l.allowClear === !1 ? l.allowClear : !0,
|
|
1268
|
-
onChange: (
|
|
1269
|
-
onSearch: (
|
|
1266
|
+
onChange: (v) => E(v.target.value, l),
|
|
1267
|
+
onSearch: (v) => B()
|
|
1270
1268
|
}, l.field || {}), null);
|
|
1271
1269
|
break;
|
|
1272
1270
|
case "select":
|
|
1273
|
-
|
|
1271
|
+
x = c(el, Q({
|
|
1274
1272
|
style: {
|
|
1275
1273
|
width: "100%"
|
|
1276
1274
|
},
|
|
1277
|
-
value: l.loading ? void 0 :
|
|
1275
|
+
value: l.loading ? void 0 : d[l.name],
|
|
1278
1276
|
optionFilterProp: "label",
|
|
1279
1277
|
placeholder: l.placeholder || "请选择",
|
|
1280
1278
|
showSearch: l.showSearch,
|
|
1281
1279
|
allowClear: l.allowClear || l.allowClear === !1 ? l.allowClear : !0,
|
|
1282
|
-
getPopupContainer: (
|
|
1283
|
-
notFoundContent: l.loading === void 0 ? void 0 : l.loading ?
|
|
1280
|
+
getPopupContainer: (v) => v && v.parentNode ? v.parentNode : v,
|
|
1281
|
+
notFoundContent: l.loading === void 0 ? void 0 : l.loading ? c(Ae, {
|
|
1284
1282
|
size: "small"
|
|
1285
1283
|
}, null) : void 0,
|
|
1286
|
-
onChange: (
|
|
1287
|
-
options: (F = l == null ? void 0 : l.valueEnum) == null ? void 0 : F.map((
|
|
1288
|
-
label:
|
|
1289
|
-
value:
|
|
1284
|
+
onChange: (v) => E(v, l),
|
|
1285
|
+
options: (F = l == null ? void 0 : l.valueEnum) == null ? void 0 : F.map((v) => ({
|
|
1286
|
+
label: v.text,
|
|
1287
|
+
value: v.value
|
|
1290
1288
|
}))
|
|
1291
1289
|
}, l.field || {}), null);
|
|
1292
1290
|
break;
|
|
1293
1291
|
case "treeSelect":
|
|
1294
|
-
|
|
1292
|
+
x = c(Zt, Q({
|
|
1295
1293
|
style: {
|
|
1296
1294
|
width: "100%"
|
|
1297
1295
|
},
|
|
1298
|
-
value:
|
|
1296
|
+
value: d[l.name],
|
|
1299
1297
|
placeholder: l.placeholder || "请选择",
|
|
1300
1298
|
allowClear: l.allowClear || l.allowClear === !1 ? l.allowClear : !0,
|
|
1301
1299
|
treeData: l.valueEnum,
|
|
1302
|
-
getPopupContainer: (
|
|
1303
|
-
notFoundContent: l.loading === void 0 ? void 0 : l.loading ?
|
|
1300
|
+
getPopupContainer: (v) => v && v.parentNode ? v.parentNode : v,
|
|
1301
|
+
notFoundContent: l.loading === void 0 ? void 0 : l.loading ? c(Ae, {
|
|
1304
1302
|
size: "small"
|
|
1305
1303
|
}, null) : void 0,
|
|
1306
|
-
onChange: (
|
|
1304
|
+
onChange: (v) => E(v, l)
|
|
1307
1305
|
}, l.field || {}), null);
|
|
1308
1306
|
break;
|
|
1309
1307
|
case "date":
|
|
1310
|
-
|
|
1308
|
+
x = c(rt, Q({
|
|
1311
1309
|
style: {
|
|
1312
1310
|
width: "100%"
|
|
1313
1311
|
},
|
|
1314
|
-
value:
|
|
1315
|
-
getPopupContainer: (
|
|
1312
|
+
value: d[l.name] ? U(d[l.name], l.valueFormat || "YYYY-MM-DD") : void 0,
|
|
1313
|
+
getPopupContainer: (v) => v && v.parentNode ? v.parentNode : v,
|
|
1316
1314
|
placeholder: l.placeholder || "请选择",
|
|
1317
1315
|
allowClear: l.allowClear || l.allowClear === !1 ? l.allowClear : !0,
|
|
1318
1316
|
format: l.valueFormat || "YYYY-MM-DD",
|
|
1319
1317
|
showTime: l.showTime,
|
|
1320
1318
|
showToday: l.showToday || !0,
|
|
1321
|
-
onChange: (
|
|
1319
|
+
onChange: (v) => E(v, l)
|
|
1322
1320
|
}, l.field || {}), null);
|
|
1323
1321
|
break;
|
|
1324
1322
|
case "dateMonth":
|
|
1325
|
-
|
|
1323
|
+
x = c(Hl, Q({
|
|
1326
1324
|
style: {
|
|
1327
1325
|
width: "100%"
|
|
1328
1326
|
},
|
|
1329
|
-
value:
|
|
1330
|
-
getPopupContainer: (
|
|
1327
|
+
value: d[l.name] ? U(d[l.name], l.valueFormat || "YYYY-MM") : void 0,
|
|
1328
|
+
getPopupContainer: (v) => v && v.parentNode ? v.parentNode : v,
|
|
1331
1329
|
placeholder: l.placeholder || "请选择",
|
|
1332
|
-
onChange: (
|
|
1330
|
+
onChange: (v) => E(v, l)
|
|
1333
1331
|
}, l.field || {}), null);
|
|
1334
1332
|
break;
|
|
1335
1333
|
case "dateRange":
|
|
1336
|
-
|
|
1334
|
+
x = c(Wl, Q({
|
|
1337
1335
|
style: {
|
|
1338
1336
|
width: "100%"
|
|
1339
1337
|
},
|
|
1340
|
-
value: (
|
|
1341
|
-
getPopupContainer: (
|
|
1338
|
+
value: (D = d[l.name]) != null && D.length ? [U(d[l.name][0], l.valueFormat || "YYYY-MM-DD HH:mm:ss"), U(d[l.name][1], l.valueFormat || "YYYY-MM-DD HH:mm:ss")] : void 0,
|
|
1339
|
+
getPopupContainer: (v) => v && v.parentNode ? v.parentNode : v,
|
|
1342
1340
|
placeholder: l.placeholder || ["开始日期", "结束日期"],
|
|
1343
1341
|
format: l.valueFormat || "YYYY-MM-DD HH:mm:ss",
|
|
1344
1342
|
showTime: l.showTime,
|
|
1345
|
-
onChange: (
|
|
1343
|
+
onChange: (v) => E(v, l)
|
|
1346
1344
|
}, l.field || {}), null);
|
|
1347
1345
|
break;
|
|
1348
1346
|
case "time":
|
|
1349
|
-
|
|
1347
|
+
x = c(Qt, Q({
|
|
1350
1348
|
style: {
|
|
1351
1349
|
width: "100%"
|
|
1352
1350
|
},
|
|
1353
|
-
value:
|
|
1354
|
-
getPopupContainer: (
|
|
1351
|
+
value: d[l.name] ? U(d[l.name], l.valueFormat || "HH:mm:ss") : void 0,
|
|
1352
|
+
getPopupContainer: (v) => v && v.parentNode ? v.parentNode : v,
|
|
1355
1353
|
placeholder: l.placeholder || "请选择",
|
|
1356
1354
|
allowClear: l.allowClear || l.allowClear === !1 ? l.allowClear : !0,
|
|
1357
1355
|
use12Hours: l.use12Hours,
|
|
1358
1356
|
format: l.valueFormat || "HH:mm:ss",
|
|
1359
|
-
onChange: (
|
|
1357
|
+
onChange: (v) => E(v, l)
|
|
1360
1358
|
}, l.field || {}), null);
|
|
1361
1359
|
break;
|
|
1362
1360
|
}
|
|
1363
|
-
return
|
|
1364
|
-
},
|
|
1361
|
+
return x;
|
|
1362
|
+
}, k = ({
|
|
1365
1363
|
formItemStyle: l,
|
|
1366
|
-
item:
|
|
1367
|
-
}) =>
|
|
1364
|
+
item: x
|
|
1365
|
+
}) => c("div", {
|
|
1368
1366
|
class: `${e.prefixCls}-form-item`,
|
|
1369
1367
|
style: l
|
|
1370
|
-
}, [
|
|
1371
|
-
default: () => [
|
|
1372
|
-
})]),
|
|
1373
|
-
var
|
|
1374
|
-
const l = [...e.searchMap, ...((
|
|
1375
|
-
return l.map((
|
|
1376
|
-
const
|
|
1368
|
+
}, [c(Ze.Item, null, {
|
|
1369
|
+
default: () => [x.__v_isVNode ? x : ie(x)]
|
|
1370
|
+
})]), _ = () => {
|
|
1371
|
+
var x;
|
|
1372
|
+
const l = [...e.searchMap, ...((x = t.default) == null ? void 0 : x.call(t)) || []];
|
|
1373
|
+
return l.map((I, F) => {
|
|
1374
|
+
const D = {
|
|
1377
1375
|
width: `${(100 - (f.value - 1) * 2) / f.value}%`
|
|
1378
|
-
},
|
|
1379
|
-
return l.length < f.value ||
|
|
1380
|
-
formItemStyle:
|
|
1381
|
-
item:
|
|
1382
|
-
}), F === l.length - 1 &&
|
|
1376
|
+
}, v = R(F, f.value, D);
|
|
1377
|
+
return l.length < f.value || n.value ? c(Ie, null, [k({
|
|
1378
|
+
formItemStyle: v,
|
|
1379
|
+
item: I
|
|
1380
|
+
}), F === l.length - 1 && L({
|
|
1383
1381
|
formItemStyle: {
|
|
1384
1382
|
flex: 1,
|
|
1385
1383
|
justifyContent: "flex-end"
|
|
1386
1384
|
},
|
|
1387
|
-
advanced:
|
|
1388
|
-
showAdvanced:
|
|
1389
|
-
})]) :
|
|
1390
|
-
formItemStyle:
|
|
1391
|
-
item:
|
|
1392
|
-
}), F === f.value - 1 && (f.value - 1 === 0 || l.length === f.value) &&
|
|
1393
|
-
formItemStyle:
|
|
1394
|
-
item:
|
|
1395
|
-
}), F === f.value - 1 && l.length !== f.value &&
|
|
1385
|
+
advanced: n.value,
|
|
1386
|
+
showAdvanced: n.value
|
|
1387
|
+
})]) : c(Ie, null, [F < f.value - 1 && k({
|
|
1388
|
+
formItemStyle: v,
|
|
1389
|
+
item: I
|
|
1390
|
+
}), F === f.value - 1 && (f.value - 1 === 0 || l.length === f.value) && k({
|
|
1391
|
+
formItemStyle: v,
|
|
1392
|
+
item: I
|
|
1393
|
+
}), F === f.value - 1 && l.length !== f.value && L({
|
|
1396
1394
|
formItemStyle: {
|
|
1397
1395
|
flex: 1,
|
|
1398
1396
|
justifyContent: "flex-end"
|
|
@@ -1403,40 +1401,32 @@ const Ll = (e) => ({
|
|
|
1403
1401
|
});
|
|
1404
1402
|
};
|
|
1405
1403
|
return () => {
|
|
1406
|
-
var l,
|
|
1407
|
-
return
|
|
1404
|
+
var l, x;
|
|
1405
|
+
return r(c("div", {
|
|
1408
1406
|
class: {
|
|
1409
|
-
[`${
|
|
1410
|
-
[`${
|
|
1411
|
-
[`${(l = e.search) == null ? void 0 : l.className}`]: (
|
|
1407
|
+
[`${s.value}`]: !0,
|
|
1408
|
+
[`${C(e.prefixCls)}-search`]: !0,
|
|
1409
|
+
[`${(l = e.search) == null ? void 0 : l.className}`]: (x = e.search) == null ? void 0 : x.className
|
|
1412
1410
|
}
|
|
1413
|
-
}, [
|
|
1414
|
-
class: `${
|
|
1411
|
+
}, [c(Ze, {
|
|
1412
|
+
class: `${C(e.prefixCls)}-form ${s.value}`,
|
|
1415
1413
|
layout: "horizontal"
|
|
1416
1414
|
}, {
|
|
1417
|
-
default: () => [
|
|
1418
|
-
class: `${
|
|
1419
|
-
}, [
|
|
1415
|
+
default: () => [c("div", {
|
|
1416
|
+
class: `${C(e.prefixCls)}-form-container ${s.value}`
|
|
1417
|
+
}, [_()])]
|
|
1420
1418
|
})]));
|
|
1421
1419
|
};
|
|
1422
1420
|
}
|
|
1423
1421
|
});
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
const t = Ye({}, e);
|
|
1427
|
-
for (let n = 0; n < a.length; n += 1) {
|
|
1428
|
-
const s = a[n];
|
|
1429
|
-
delete t[s];
|
|
1430
|
-
}
|
|
1431
|
-
return t;
|
|
1432
|
-
}
|
|
1433
|
-
const Se = (e) => {
|
|
1422
|
+
ft.inheritAttrs = !1;
|
|
1423
|
+
const pe = (e) => {
|
|
1434
1424
|
const a = P(null);
|
|
1435
1425
|
return a.value = e, (...t) => {
|
|
1436
|
-
var
|
|
1437
|
-
return (
|
|
1426
|
+
var u;
|
|
1427
|
+
return (u = a.value) == null ? void 0 : u.call(a, ...t);
|
|
1438
1428
|
};
|
|
1439
|
-
},
|
|
1429
|
+
}, _l = (e) => ({
|
|
1440
1430
|
[`${e.componentCls}`]: {
|
|
1441
1431
|
width: "auto",
|
|
1442
1432
|
"&-title": {
|
|
@@ -1518,42 +1508,42 @@ const Se = (e) => {
|
|
|
1518
1508
|
}
|
|
1519
1509
|
}
|
|
1520
1510
|
}
|
|
1521
|
-
}),
|
|
1511
|
+
}), Ee = ({
|
|
1522
1512
|
title: e,
|
|
1523
1513
|
show: a,
|
|
1524
1514
|
treeKey: t,
|
|
1525
|
-
fixed:
|
|
1515
|
+
fixed: u
|
|
1526
1516
|
}, {
|
|
1527
|
-
slots:
|
|
1517
|
+
slots: r
|
|
1528
1518
|
}) => {
|
|
1529
1519
|
const {
|
|
1530
|
-
cacheColumns:
|
|
1520
|
+
cacheColumns: s,
|
|
1531
1521
|
settingsAction: h
|
|
1532
|
-
} =
|
|
1533
|
-
return a ?
|
|
1522
|
+
} = de();
|
|
1523
|
+
return a ? c(ae, {
|
|
1534
1524
|
title: e
|
|
1535
1525
|
}, {
|
|
1536
1526
|
default: () => {
|
|
1537
|
-
var
|
|
1538
|
-
return [
|
|
1539
|
-
onClick: (
|
|
1540
|
-
var
|
|
1541
|
-
|
|
1542
|
-
const
|
|
1543
|
-
if (typeof
|
|
1544
|
-
const
|
|
1527
|
+
var d;
|
|
1528
|
+
return [c("span", {
|
|
1529
|
+
onClick: (T) => {
|
|
1530
|
+
var b, y, f;
|
|
1531
|
+
T.stopPropagation(), T.preventDefault();
|
|
1532
|
+
const m = ((y = (b = C(s)) == null ? void 0 : b.find((S) => S.uuid === t)) == null ? void 0 : y.key) || "", n = (h == null ? void 0 : h.columnsMap[m]) || {};
|
|
1533
|
+
if (typeof n.disable == "boolean" ? n.disable : (f = n.disable) == null ? void 0 : f.icon) return;
|
|
1534
|
+
const i = {
|
|
1545
1535
|
...h == null ? void 0 : h.columnsMap,
|
|
1546
|
-
[
|
|
1547
|
-
...
|
|
1548
|
-
fixed:
|
|
1536
|
+
[m]: {
|
|
1537
|
+
...n,
|
|
1538
|
+
fixed: u
|
|
1549
1539
|
}
|
|
1550
1540
|
};
|
|
1551
|
-
h == null || h.setColumnsMap(
|
|
1541
|
+
h == null || h.setColumnsMap(i, "fixed");
|
|
1552
1542
|
}
|
|
1553
|
-
}, [(
|
|
1543
|
+
}, [(d = r.default) == null ? void 0 : d.call(r)])];
|
|
1554
1544
|
}
|
|
1555
1545
|
}) : null;
|
|
1556
|
-
},
|
|
1546
|
+
}, Gl = /* @__PURE__ */ ue({
|
|
1557
1547
|
props: {
|
|
1558
1548
|
treeKey: String,
|
|
1559
1549
|
hashId: String,
|
|
@@ -1565,41 +1555,41 @@ const Se = (e) => {
|
|
|
1565
1555
|
setup(e) {
|
|
1566
1556
|
const {
|
|
1567
1557
|
cacheColumns: a
|
|
1568
|
-
} =
|
|
1569
|
-
var
|
|
1570
|
-
return ((
|
|
1571
|
-
}),
|
|
1558
|
+
} = de(), t = w(() => {
|
|
1559
|
+
var r, s;
|
|
1560
|
+
return ((s = (r = C(a)) == null ? void 0 : r.find((h) => h.uuid === e.treeKey)) == null ? void 0 : s.key) || "";
|
|
1561
|
+
}), u = w(() => t.value === "action" && e.autoScroll);
|
|
1572
1562
|
return () => {
|
|
1573
|
-
const
|
|
1563
|
+
const r = c("span", {
|
|
1574
1564
|
class: [`${e.className}-list-item-option`, e.hashId]
|
|
1575
|
-
}, [
|
|
1565
|
+
}, [c(Ee, {
|
|
1576
1566
|
treeKey: e.treeKey || "",
|
|
1577
1567
|
fixed: "left",
|
|
1578
1568
|
title: "固定在列首",
|
|
1579
|
-
show: e.fixed !== "left" && !
|
|
1569
|
+
show: e.fixed !== "left" && !u.value
|
|
1580
1570
|
}, {
|
|
1581
|
-
default: () => [
|
|
1582
|
-
}),
|
|
1571
|
+
default: () => [c(hl, null, null)]
|
|
1572
|
+
}), c(Ee, {
|
|
1583
1573
|
treeKey: e.treeKey || "",
|
|
1584
1574
|
fixed: void 0,
|
|
1585
1575
|
title: "不固定",
|
|
1586
|
-
show: !!e.fixed && !
|
|
1576
|
+
show: !!e.fixed && !u.value
|
|
1587
1577
|
}, {
|
|
1588
|
-
default: () => [
|
|
1589
|
-
}),
|
|
1578
|
+
default: () => [c(vl, null, null)]
|
|
1579
|
+
}), c(Ee, {
|
|
1590
1580
|
treeKey: e.treeKey || "",
|
|
1591
1581
|
fixed: "right",
|
|
1592
1582
|
title: "固定在列尾",
|
|
1593
1583
|
show: e.fixed !== "right"
|
|
1594
1584
|
}, {
|
|
1595
|
-
default: () => [
|
|
1585
|
+
default: () => [c(ml, null, null)]
|
|
1596
1586
|
})]);
|
|
1597
|
-
return
|
|
1587
|
+
return c("span", {
|
|
1598
1588
|
class: [`${e.className}-list-item`, e.hashId],
|
|
1599
1589
|
key: e.treeKey
|
|
1600
|
-
}, [
|
|
1590
|
+
}, [c("div", {
|
|
1601
1591
|
class: [`${e.className}-list-item-title`, e.hashId]
|
|
1602
|
-
}, [e.title]),
|
|
1592
|
+
}, [e.title]), r]);
|
|
1603
1593
|
};
|
|
1604
1594
|
}
|
|
1605
1595
|
}), Me = /* @__PURE__ */ ue({
|
|
@@ -1617,100 +1607,100 @@ const Se = (e) => {
|
|
|
1617
1607
|
}
|
|
1618
1608
|
},
|
|
1619
1609
|
setup(e) {
|
|
1620
|
-
const a = P(Ke().uuid(15)), t = w(() => e.list && e.list.length > 0),
|
|
1621
|
-
cacheColumns:
|
|
1610
|
+
const a = P(Ke().uuid(15)), t = w(() => e.list && e.list.length > 0), u = P([]), r = P([]), {
|
|
1611
|
+
cacheColumns: s,
|
|
1622
1612
|
slots: h,
|
|
1623
|
-
settingsAction:
|
|
1624
|
-
} =
|
|
1625
|
-
key:
|
|
1613
|
+
settingsAction: d
|
|
1614
|
+
} = de(), T = (i, b) => i.map(({
|
|
1615
|
+
key: y,
|
|
1626
1616
|
children: f,
|
|
1627
1617
|
uuid: S,
|
|
1628
1618
|
...R
|
|
1629
1619
|
}) => {
|
|
1630
|
-
var
|
|
1631
|
-
const
|
|
1620
|
+
var X;
|
|
1621
|
+
const $ = (d == null ? void 0 : d.columnsMap[y || "null"]) || {
|
|
1632
1622
|
show: !0
|
|
1633
1623
|
};
|
|
1634
|
-
let
|
|
1635
|
-
|
|
1636
|
-
const
|
|
1624
|
+
let B = !1;
|
|
1625
|
+
$.show !== !1 && (b == null ? void 0 : b.show) !== !1 && !f && (B = !0);
|
|
1626
|
+
const E = {
|
|
1637
1627
|
key: S || "",
|
|
1638
|
-
...
|
|
1639
|
-
checked:
|
|
1628
|
+
...xe(R, ["dataIndex"]),
|
|
1629
|
+
checked: B,
|
|
1640
1630
|
selectable: !1,
|
|
1641
|
-
disabled:
|
|
1642
|
-
disableCheckbox: typeof
|
|
1631
|
+
disabled: $.disable === !0,
|
|
1632
|
+
disableCheckbox: typeof $.disable == "boolean" ? $.disable : (X = $.disable) == null ? void 0 : X.checkbox,
|
|
1643
1633
|
isLeaf: !0
|
|
1644
1634
|
};
|
|
1645
|
-
return f && (
|
|
1635
|
+
return f && (E.children = T(f, $)), E;
|
|
1646
1636
|
});
|
|
1647
|
-
|
|
1648
|
-
const
|
|
1649
|
-
|
|
1637
|
+
me(() => {
|
|
1638
|
+
const i = T(e.list || []);
|
|
1639
|
+
u.value = i, r.value = i.filter((b) => b.checked).map((b) => b.key), (d == null ? void 0 : d.operationType.value) === "fixed" && (a.value = Ke().uuid(15));
|
|
1650
1640
|
});
|
|
1651
|
-
const
|
|
1652
|
-
var
|
|
1653
|
-
const f = ((
|
|
1654
|
-
...
|
|
1655
|
-
},
|
|
1656
|
-
if (
|
|
1641
|
+
const m = pe((i, b, y) => {
|
|
1642
|
+
var L, ie;
|
|
1643
|
+
const f = ((L = C(s).find((k) => k.uuid === i)) == null ? void 0 : L.key) || "", S = ((ie = C(s).find((k) => k.uuid === b)) == null ? void 0 : ie.key) || "", R = {
|
|
1644
|
+
...d == null ? void 0 : d.columnsMap
|
|
1645
|
+
}, $ = [...d.sortKeyColumns.value], B = $.findIndex((k) => k === f), E = $.findIndex((k) => k === S), X = y > B;
|
|
1646
|
+
if (B < 0)
|
|
1657
1647
|
return;
|
|
1658
|
-
const j =
|
|
1659
|
-
|
|
1660
|
-
R[
|
|
1661
|
-
...R[
|
|
1662
|
-
order:
|
|
1648
|
+
const j = $[B];
|
|
1649
|
+
$.splice(B, 1), y === 0 ? $.unshift(j) : $.splice(X ? E : E + 1, 0, j), $.forEach((k, _) => {
|
|
1650
|
+
R[k] = {
|
|
1651
|
+
...R[k] || {},
|
|
1652
|
+
order: _
|
|
1663
1653
|
};
|
|
1664
|
-
}),
|
|
1665
|
-
}),
|
|
1666
|
-
var
|
|
1667
|
-
const
|
|
1668
|
-
...(
|
|
1654
|
+
}), d == null || d.setColumnsMap(R, "drop"), d == null || d.setSortKeyColumns($);
|
|
1655
|
+
}), n = pe((i) => {
|
|
1656
|
+
var $;
|
|
1657
|
+
const b = i.node.key, y = (($ = C(s).find((B) => B.uuid === b)) == null ? void 0 : $.key) || "", S = {
|
|
1658
|
+
...(d == null ? void 0 : d.columnsMap[y]) || {}
|
|
1669
1659
|
};
|
|
1670
|
-
S.show =
|
|
1660
|
+
S.show = i.checked;
|
|
1671
1661
|
const R = {
|
|
1672
|
-
...
|
|
1673
|
-
[
|
|
1662
|
+
...d == null ? void 0 : d.columnsMap,
|
|
1663
|
+
[y]: S
|
|
1674
1664
|
};
|
|
1675
|
-
|
|
1676
|
-
}),
|
|
1677
|
-
const
|
|
1678
|
-
return
|
|
1679
|
-
title:
|
|
1680
|
-
column:
|
|
1681
|
-
}, () => [
|
|
1665
|
+
d == null || d.setColumnsMap(R, "show");
|
|
1666
|
+
}), o = (i) => {
|
|
1667
|
+
const b = C(s).find((y) => y.uuid === i.key);
|
|
1668
|
+
return i.title || At(h, "headerCell", {
|
|
1669
|
+
title: b.title,
|
|
1670
|
+
column: b
|
|
1671
|
+
}, () => [b.title]);
|
|
1682
1672
|
};
|
|
1683
1673
|
return () => {
|
|
1684
|
-
var
|
|
1685
|
-
return t.value ?
|
|
1674
|
+
var i, b;
|
|
1675
|
+
return t.value ? c(Ie, null, [e.showTitle && c("span", {
|
|
1686
1676
|
class: [`${e.className}-list-title`, e.hashId]
|
|
1687
|
-
}, [e.title]),
|
|
1677
|
+
}, [e.title]), c(al, {
|
|
1688
1678
|
key: a.value,
|
|
1689
|
-
draggable: e.draggable && !!((
|
|
1679
|
+
draggable: e.draggable && !!((i = u.value) != null && i.length) && ((b = u.value) == null ? void 0 : b.length) > 1,
|
|
1690
1680
|
checkable: e.checkable,
|
|
1691
1681
|
blockNode: !0,
|
|
1692
1682
|
showLine: !1,
|
|
1693
|
-
checkedKeys:
|
|
1683
|
+
checkedKeys: r.value,
|
|
1694
1684
|
height: 280,
|
|
1695
|
-
onDrop: (
|
|
1696
|
-
const f =
|
|
1685
|
+
onDrop: (y) => {
|
|
1686
|
+
const f = y.node.key, S = y.dragNode.key, {
|
|
1697
1687
|
dropPosition: R,
|
|
1698
|
-
dropToGap:
|
|
1699
|
-
} =
|
|
1700
|
-
|
|
1688
|
+
dropToGap: $
|
|
1689
|
+
} = y, B = R === -1 || !$ ? R + 1 : R;
|
|
1690
|
+
m(S, f, B);
|
|
1701
1691
|
},
|
|
1702
|
-
onCheck: (
|
|
1703
|
-
treeData:
|
|
1692
|
+
onCheck: (y, f) => n(f),
|
|
1693
|
+
treeData: u.value
|
|
1704
1694
|
}, {
|
|
1705
|
-
title: (
|
|
1695
|
+
title: (y) => {
|
|
1706
1696
|
var S;
|
|
1707
1697
|
const f = {
|
|
1708
|
-
...
|
|
1698
|
+
...y,
|
|
1709
1699
|
children: void 0,
|
|
1710
|
-
title:
|
|
1711
|
-
autoScroll: (S =
|
|
1700
|
+
title: o(y),
|
|
1701
|
+
autoScroll: (S = d == null ? void 0 : d.autoScroll) == null ? void 0 : S.value
|
|
1712
1702
|
};
|
|
1713
|
-
return
|
|
1703
|
+
return c(Gl, Q({
|
|
1714
1704
|
hashId: e.hashId,
|
|
1715
1705
|
className: e.className
|
|
1716
1706
|
}, f, {
|
|
@@ -1720,7 +1710,7 @@ const Se = (e) => {
|
|
|
1720
1710
|
})]) : null;
|
|
1721
1711
|
};
|
|
1722
1712
|
}
|
|
1723
|
-
}),
|
|
1713
|
+
}), ql = /* @__PURE__ */ ue({
|
|
1724
1714
|
props: {
|
|
1725
1715
|
hashId: String,
|
|
1726
1716
|
className: String,
|
|
@@ -1730,64 +1720,64 @@ const Se = (e) => {
|
|
|
1730
1720
|
setup(e) {
|
|
1731
1721
|
const {
|
|
1732
1722
|
columns: a
|
|
1733
|
-
} =
|
|
1734
|
-
|
|
1735
|
-
t.value = [],
|
|
1736
|
-
if (
|
|
1723
|
+
} = de(), t = P([]), u = P([]), r = P([]), s = P([]);
|
|
1724
|
+
W(() => a.value, (T) => {
|
|
1725
|
+
t.value = [], u.value = [], r.value = [], T.forEach((m) => {
|
|
1726
|
+
if (m.hideInSetting)
|
|
1737
1727
|
return;
|
|
1738
1728
|
const {
|
|
1739
|
-
fixed:
|
|
1740
|
-
show:
|
|
1741
|
-
uuid:
|
|
1742
|
-
} =
|
|
1743
|
-
if ((
|
|
1744
|
-
|
|
1729
|
+
fixed: n,
|
|
1730
|
+
show: o,
|
|
1731
|
+
uuid: i
|
|
1732
|
+
} = m;
|
|
1733
|
+
if ((o || o === void 0) && i && s.value.push(i), n === "left") {
|
|
1734
|
+
u.value.push(m);
|
|
1745
1735
|
return;
|
|
1746
1736
|
}
|
|
1747
|
-
if (
|
|
1748
|
-
t.value.push(
|
|
1737
|
+
if (n === "right") {
|
|
1738
|
+
t.value.push(m);
|
|
1749
1739
|
return;
|
|
1750
1740
|
}
|
|
1751
|
-
|
|
1741
|
+
r.value.push(m);
|
|
1752
1742
|
});
|
|
1753
1743
|
}, {
|
|
1754
1744
|
immediate: !0
|
|
1755
1745
|
});
|
|
1756
|
-
const h = w(() => t.value && t.value.length > 0),
|
|
1757
|
-
return () =>
|
|
1746
|
+
const h = w(() => t.value && t.value.length > 0), d = w(() => u.value && u.value.length > 0);
|
|
1747
|
+
return () => c("div", {
|
|
1758
1748
|
class: {
|
|
1759
1749
|
[`${e.hashId}`]: !0,
|
|
1760
1750
|
[`${e.className}-list`]: !0,
|
|
1761
|
-
[`${e.className}-list-group`]: h.value ||
|
|
1751
|
+
[`${e.className}-list-group`]: h.value || d.value
|
|
1762
1752
|
}
|
|
1763
|
-
}, [
|
|
1753
|
+
}, [c(Me, {
|
|
1764
1754
|
title: "固定在左侧",
|
|
1765
|
-
list:
|
|
1766
|
-
keys:
|
|
1755
|
+
list: u.value,
|
|
1756
|
+
keys: s.value,
|
|
1767
1757
|
hashId: e.hashId,
|
|
1768
1758
|
draggable: e.draggable,
|
|
1769
1759
|
checkable: e.checkable,
|
|
1770
1760
|
className: e.className
|
|
1771
|
-
}, null),
|
|
1772
|
-
list:
|
|
1773
|
-
keys:
|
|
1761
|
+
}, null), c(Me, {
|
|
1762
|
+
list: r.value,
|
|
1763
|
+
keys: s.value,
|
|
1774
1764
|
hashId: e.hashId,
|
|
1775
1765
|
draggable: e.draggable,
|
|
1776
1766
|
checkable: e.checkable,
|
|
1777
1767
|
title: "不固定",
|
|
1778
|
-
showTitle:
|
|
1768
|
+
showTitle: d.value || h.value,
|
|
1779
1769
|
className: e.className
|
|
1780
|
-
}, null),
|
|
1770
|
+
}, null), c(Me, {
|
|
1781
1771
|
title: "固定在右侧",
|
|
1782
1772
|
list: t.value,
|
|
1783
|
-
keys:
|
|
1773
|
+
keys: s.value,
|
|
1784
1774
|
hashId: e.hashId,
|
|
1785
1775
|
draggable: e.draggable,
|
|
1786
1776
|
checkable: e.checkable,
|
|
1787
1777
|
className: e.className
|
|
1788
1778
|
}, null)]);
|
|
1789
1779
|
}
|
|
1790
|
-
}),
|
|
1780
|
+
}), Ul = /* @__PURE__ */ ue({
|
|
1791
1781
|
props: {
|
|
1792
1782
|
draggable: {
|
|
1793
1783
|
type: Boolean,
|
|
@@ -1801,131 +1791,131 @@ const Se = (e) => {
|
|
|
1801
1791
|
extra: [Function, Object, String, Boolean]
|
|
1802
1792
|
},
|
|
1803
1793
|
setup(e) {
|
|
1804
|
-
const a =
|
|
1794
|
+
const a = Ye({
|
|
1805
1795
|
suffixCls: "table-column-setting",
|
|
1806
1796
|
isPor: !0
|
|
1807
1797
|
}), {
|
|
1808
1798
|
wrapSSR: t,
|
|
1809
|
-
hashId:
|
|
1810
|
-
} = Pe("ColumnSetting", [
|
|
1811
|
-
columns:
|
|
1812
|
-
settingsAction:
|
|
1813
|
-
} =
|
|
1814
|
-
const
|
|
1815
|
-
|
|
1799
|
+
hashId: u
|
|
1800
|
+
} = Pe("ColumnSetting", [_l], a), {
|
|
1801
|
+
columns: r,
|
|
1802
|
+
settingsAction: s
|
|
1803
|
+
} = de(), h = pe((o = !0) => {
|
|
1804
|
+
const i = {}, b = (y) => {
|
|
1805
|
+
y.forEach(({
|
|
1816
1806
|
key: f,
|
|
1817
1807
|
fixed: S,
|
|
1818
1808
|
index: R,
|
|
1819
|
-
children:
|
|
1809
|
+
children: $
|
|
1820
1810
|
}) => {
|
|
1821
|
-
const
|
|
1822
|
-
|
|
1823
|
-
show:
|
|
1811
|
+
const B = it(f, R);
|
|
1812
|
+
B && (i[B] = {
|
|
1813
|
+
show: o,
|
|
1824
1814
|
fixed: S
|
|
1825
|
-
}),
|
|
1815
|
+
}), $ && b($);
|
|
1826
1816
|
});
|
|
1827
1817
|
};
|
|
1828
|
-
|
|
1829
|
-
}),
|
|
1830
|
-
|
|
1831
|
-
}),
|
|
1832
|
-
|
|
1833
|
-
}),
|
|
1818
|
+
b(r.value), s == null || s.setColumnsMap(i, "show");
|
|
1819
|
+
}), d = pe((o) => {
|
|
1820
|
+
o.target.checked ? h() : h(!1);
|
|
1821
|
+
}), T = pe(() => {
|
|
1822
|
+
s == null || s.setColumnsMap(s == null ? void 0 : s.cacheColumnsMap, "fixed");
|
|
1823
|
+
}), m = w(() => (
|
|
1834
1824
|
// @ts-ignore
|
|
1835
|
-
Object.values(
|
|
1836
|
-
)),
|
|
1837
|
-
return () => t(
|
|
1825
|
+
Object.values(s == null ? void 0 : s.columnsMap).filter((o) => !o || o.show === !1)
|
|
1826
|
+
)), n = w(() => C(m).length > 0 && C(m).length !== r.value.length);
|
|
1827
|
+
return () => t(c(tl, {
|
|
1838
1828
|
arrowPointAtCenter: !0,
|
|
1839
|
-
title:
|
|
1840
|
-
class: [`${a}-title`,
|
|
1841
|
-
}, [
|
|
1842
|
-
indeterminate:
|
|
1843
|
-
checked:
|
|
1844
|
-
onChange: (
|
|
1829
|
+
title: c("div", {
|
|
1830
|
+
class: [`${a}-title`, u.value]
|
|
1831
|
+
}, [c(ll, {
|
|
1832
|
+
indeterminate: n.value,
|
|
1833
|
+
checked: C(m).length === 0 && C(m).length !== r.value.length,
|
|
1834
|
+
onChange: (o) => d(o)
|
|
1845
1835
|
}, {
|
|
1846
|
-
default: () => [
|
|
1847
|
-
}), e.checkedReset ?
|
|
1848
|
-
onClick:
|
|
1849
|
-
class: [`${a}-action-rest-button`,
|
|
1850
|
-
}, [
|
|
1836
|
+
default: () => [we("列展示")]
|
|
1837
|
+
}), e.checkedReset ? c("a", {
|
|
1838
|
+
onClick: T,
|
|
1839
|
+
class: [`${a}-action-rest-button`, u.value]
|
|
1840
|
+
}, [we("重置")]) : null, e != null && e.extra ? c(re, {
|
|
1851
1841
|
size: 12,
|
|
1852
1842
|
align: "center"
|
|
1853
1843
|
}, {
|
|
1854
1844
|
default: () => [e.extra]
|
|
1855
1845
|
}) : null]),
|
|
1856
|
-
overlayClassName: `${a}-overlay ${
|
|
1846
|
+
overlayClassName: `${a}-overlay ${u.value}`,
|
|
1857
1847
|
trigger: "click",
|
|
1858
1848
|
placement: "bottomRight",
|
|
1859
|
-
content:
|
|
1860
|
-
hashId:
|
|
1849
|
+
content: c(ql, {
|
|
1850
|
+
hashId: u.value,
|
|
1861
1851
|
checkable: e.checkable ?? !0,
|
|
1862
1852
|
draggable: e.draggable ?? !0,
|
|
1863
1853
|
className: a
|
|
1864
1854
|
}, null)
|
|
1865
1855
|
}, {
|
|
1866
|
-
default: () => [
|
|
1856
|
+
default: () => [c(ae, {
|
|
1867
1857
|
title: "列设置"
|
|
1868
1858
|
}, {
|
|
1869
|
-
default: () => [
|
|
1859
|
+
default: () => [c(dt, null, null)]
|
|
1870
1860
|
})]
|
|
1871
1861
|
}));
|
|
1872
1862
|
}
|
|
1873
|
-
}),
|
|
1863
|
+
}), ht = /* @__PURE__ */ ue({
|
|
1874
1864
|
setup() {
|
|
1875
1865
|
const {
|
|
1876
1866
|
isFullscreen: e
|
|
1877
|
-
} =
|
|
1878
|
-
return () => e.value ?
|
|
1867
|
+
} = st();
|
|
1868
|
+
return () => e.value ? c(ae, {
|
|
1879
1869
|
title: "退出全屏"
|
|
1880
1870
|
}, {
|
|
1881
|
-
default: () => [
|
|
1882
|
-
}) :
|
|
1871
|
+
default: () => [c(gl, null, null)]
|
|
1872
|
+
}) : c(ae, {
|
|
1883
1873
|
title: "全屏"
|
|
1884
1874
|
}, {
|
|
1885
|
-
default: () => [
|
|
1875
|
+
default: () => [c(yl, null, null)]
|
|
1886
1876
|
});
|
|
1887
1877
|
}
|
|
1888
|
-
}),
|
|
1878
|
+
}), Xl = () => {
|
|
1889
1879
|
const {
|
|
1890
1880
|
action: e,
|
|
1891
1881
|
tableSize: a
|
|
1892
|
-
} =
|
|
1893
|
-
return
|
|
1894
|
-
overlay:
|
|
1882
|
+
} = de();
|
|
1883
|
+
return c(nl, {
|
|
1884
|
+
overlay: c(Re, {
|
|
1895
1885
|
selectedKeys: [a.value],
|
|
1896
1886
|
onClick: ({
|
|
1897
1887
|
key: t
|
|
1898
1888
|
}) => {
|
|
1899
|
-
var
|
|
1900
|
-
(
|
|
1889
|
+
var u;
|
|
1890
|
+
(u = e.setTableSize) == null || u.call(e, t);
|
|
1901
1891
|
},
|
|
1902
1892
|
style: {
|
|
1903
1893
|
width: 80
|
|
1904
1894
|
}
|
|
1905
1895
|
}, {
|
|
1906
|
-
default: () => [
|
|
1896
|
+
default: () => [c(Re.Item, {
|
|
1907
1897
|
key: "large"
|
|
1908
1898
|
}, {
|
|
1909
|
-
default: () => [
|
|
1910
|
-
}),
|
|
1899
|
+
default: () => [we("默认")]
|
|
1900
|
+
}), c(Re.Item, {
|
|
1911
1901
|
key: "middle"
|
|
1912
1902
|
}, {
|
|
1913
|
-
default: () => [
|
|
1914
|
-
}),
|
|
1903
|
+
default: () => [we("中等")]
|
|
1904
|
+
}), c(Re.Item, {
|
|
1915
1905
|
key: "small"
|
|
1916
1906
|
}, {
|
|
1917
|
-
default: () => [
|
|
1907
|
+
default: () => [we("紧凑")]
|
|
1918
1908
|
})]
|
|
1919
1909
|
}),
|
|
1920
1910
|
trigger: ["click"]
|
|
1921
1911
|
}, {
|
|
1922
|
-
default: () => [
|
|
1912
|
+
default: () => [c(ae, {
|
|
1923
1913
|
title: "表格密度"
|
|
1924
1914
|
}, {
|
|
1925
|
-
default: () => [
|
|
1915
|
+
default: () => [c(bl, null, null)]
|
|
1926
1916
|
})]
|
|
1927
1917
|
});
|
|
1928
|
-
},
|
|
1918
|
+
}, Jl = (e) => ({
|
|
1929
1919
|
[`${e.componentCls}`]: {
|
|
1930
1920
|
lineHeight: 1,
|
|
1931
1921
|
"&-container": {
|
|
@@ -1967,36 +1957,36 @@ const Se = (e) => {
|
|
|
1967
1957
|
}
|
|
1968
1958
|
}
|
|
1969
1959
|
});
|
|
1970
|
-
function
|
|
1971
|
-
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !
|
|
1960
|
+
function lt(e) {
|
|
1961
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !Te(e);
|
|
1972
1962
|
}
|
|
1973
1963
|
const {
|
|
1974
|
-
useBreakpoint:
|
|
1975
|
-
} =
|
|
1976
|
-
function
|
|
1977
|
-
if (
|
|
1964
|
+
useBreakpoint: Ql
|
|
1965
|
+
} = Le;
|
|
1966
|
+
function Zl(e) {
|
|
1967
|
+
if (Te(e))
|
|
1978
1968
|
return e;
|
|
1979
1969
|
if (e) {
|
|
1980
1970
|
const a = e, {
|
|
1981
1971
|
icon: t,
|
|
1982
|
-
tooltip:
|
|
1983
|
-
onClick:
|
|
1984
|
-
key:
|
|
1972
|
+
tooltip: u,
|
|
1973
|
+
onClick: r,
|
|
1974
|
+
key: s
|
|
1985
1975
|
} = a;
|
|
1986
|
-
return t &&
|
|
1987
|
-
title:
|
|
1976
|
+
return t && u ? c(ae, {
|
|
1977
|
+
title: u
|
|
1988
1978
|
}, {
|
|
1989
|
-
default: () => [
|
|
1990
|
-
key:
|
|
1979
|
+
default: () => [c("span", {
|
|
1980
|
+
key: s,
|
|
1991
1981
|
onClick: () => {
|
|
1992
|
-
|
|
1982
|
+
r && r(s);
|
|
1993
1983
|
}
|
|
1994
1984
|
}, [t])]
|
|
1995
1985
|
}) : t;
|
|
1996
1986
|
}
|
|
1997
1987
|
return null;
|
|
1998
1988
|
}
|
|
1999
|
-
const
|
|
1989
|
+
const vt = /* @__PURE__ */ ue({
|
|
2000
1990
|
props: {
|
|
2001
1991
|
actions: he.toolBarBtn,
|
|
2002
1992
|
settings: [Array],
|
|
@@ -2010,137 +2000,137 @@ const mt = /* @__PURE__ */ ue({
|
|
|
2010
2000
|
const {
|
|
2011
2001
|
wrapSSR: a,
|
|
2012
2002
|
hashId: t
|
|
2013
|
-
} = Pe("ListToolBar", [
|
|
2014
|
-
isMobile:
|
|
2015
|
-
} =
|
|
2016
|
-
var
|
|
2017
|
-
return !!(e.titleTip || e.headerTitle || (
|
|
2003
|
+
} = Pe("ListToolBar", [Jl], e.prefixCls), u = Ql(), {
|
|
2004
|
+
isMobile: r
|
|
2005
|
+
} = de(), s = w(() => {
|
|
2006
|
+
var i;
|
|
2007
|
+
return !!(e.titleTip || e.headerTitle || (i = e.actions) != null && i.length);
|
|
2018
2008
|
}), h = w(() => {
|
|
2019
|
-
var
|
|
2020
|
-
return !!((
|
|
2021
|
-
}),
|
|
2022
|
-
var
|
|
2023
|
-
let
|
|
2024
|
-
return Array.isArray(e.actions) ? ((
|
|
2009
|
+
var i;
|
|
2010
|
+
return !!((i = e.settings) != null && i.length || e.optionsExtra);
|
|
2011
|
+
}), d = w(() => !!(e.titleTip || e.headerTitle)), T = w(() => {
|
|
2012
|
+
var b;
|
|
2013
|
+
let i;
|
|
2014
|
+
return Array.isArray(e.actions) ? ((b = e.actions) == null ? void 0 : b.length) < 1 ? null : c(re, {
|
|
2025
2015
|
align: "center"
|
|
2026
|
-
},
|
|
2016
|
+
}, lt(i = e.actions.map((y, f) => Te(y) ? Yt(y, {
|
|
2027
2017
|
key: f,
|
|
2028
|
-
...
|
|
2029
|
-
}) :
|
|
2018
|
+
...y == null ? void 0 : y.props
|
|
2019
|
+
}) : c("template", {
|
|
2030
2020
|
key: f
|
|
2031
|
-
}, [
|
|
2032
|
-
default: () => [
|
|
2021
|
+
}, [y]))) ? i : {
|
|
2022
|
+
default: () => [i]
|
|
2033
2023
|
}) : e.actions;
|
|
2034
|
-
}),
|
|
2024
|
+
}), m = Be(() => !s.value && h.value ? c("div", {
|
|
2035
2025
|
class: `${e.prefixCls}-left ${t.value}`
|
|
2036
|
-
}, null) :
|
|
2026
|
+
}, null) : d.value ? c(re, {
|
|
2037
2027
|
class: `${e.prefixCls}-left ${t.value}`
|
|
2038
2028
|
}, {
|
|
2039
|
-
default: () => [
|
|
2029
|
+
default: () => [c("div", {
|
|
2040
2030
|
class: `${e.prefixCls}-title ${t.value}`
|
|
2041
|
-
}, [e.headerTitle, e.titleTip &&
|
|
2031
|
+
}, [e.headerTitle, e.titleTip && c(ae, {
|
|
2042
2032
|
title: e.titleTipText
|
|
2043
2033
|
}, {
|
|
2044
|
-
default: () => [
|
|
2045
|
-
})]),
|
|
2034
|
+
default: () => [le(e.titleTip) && e.titleTip ? c(Cl, null, null) : e.titleTip]
|
|
2035
|
+
})]), T.value && c("div", {
|
|
2046
2036
|
class: `${e.prefixCls}-actions ${t.value}`
|
|
2047
|
-
}, [
|
|
2048
|
-
}) :
|
|
2037
|
+
}, [T.value])]
|
|
2038
|
+
}) : c(re, {
|
|
2049
2039
|
class: `${e.prefixCls}-left ${t.value}`
|
|
2050
2040
|
}, {
|
|
2051
|
-
default: () => [
|
|
2041
|
+
default: () => [T.value && c("div", {
|
|
2052
2042
|
class: `${e.prefixCls}-actions`
|
|
2053
|
-
}, [
|
|
2054
|
-
}), [() =>
|
|
2055
|
-
let
|
|
2056
|
-
return h.value ?
|
|
2043
|
+
}, [T.value])]
|
|
2044
|
+
}), [() => s.value, () => h.value, () => d.value, () => e.prefixCls, () => e.headerTitle, () => e.titleTipText, () => e.titleTip]), n = Be(() => {
|
|
2045
|
+
let i;
|
|
2046
|
+
return h.value ? c(re, {
|
|
2057
2047
|
size: 16,
|
|
2058
2048
|
class: `${e.prefixCls}-right ${t.value}`,
|
|
2059
|
-
align:
|
|
2060
|
-
direction:
|
|
2049
|
+
align: u.value.lg ? "center" : "end",
|
|
2050
|
+
direction: u.value.lg ? "horizontal" : "vertical"
|
|
2061
2051
|
}, {
|
|
2062
2052
|
default: () => {
|
|
2063
|
-
var
|
|
2064
|
-
return [e.optionsExtra, (
|
|
2053
|
+
var b;
|
|
2054
|
+
return [e.optionsExtra, (b = e.settings) != null && b.length ? c(re, {
|
|
2065
2055
|
size: 12,
|
|
2066
2056
|
align: "center",
|
|
2067
2057
|
class: `${e.prefixCls}-setting-items`
|
|
2068
|
-
},
|
|
2069
|
-
const S =
|
|
2070
|
-
return
|
|
2058
|
+
}, lt(i = e.settings.map((y, f) => {
|
|
2059
|
+
const S = Zl(y);
|
|
2060
|
+
return c("div", {
|
|
2071
2061
|
key: f,
|
|
2072
2062
|
class: `${e.prefixCls}-setting-item`
|
|
2073
2063
|
}, [S]);
|
|
2074
|
-
})) ?
|
|
2075
|
-
default: () => [
|
|
2064
|
+
})) ? i : {
|
|
2065
|
+
default: () => [i]
|
|
2076
2066
|
}) : null];
|
|
2077
2067
|
}
|
|
2078
2068
|
}) : null;
|
|
2079
|
-
}, [() =>
|
|
2080
|
-
if (!h.value && !
|
|
2081
|
-
const
|
|
2069
|
+
}, [() => u.value, () => h.value, () => e.prefixCls, () => d.value, () => T.value, () => e.settings]), o = Be(() => {
|
|
2070
|
+
if (!h.value && !s.value) return null;
|
|
2071
|
+
const i = {
|
|
2082
2072
|
[`${t.value}`]: !0,
|
|
2083
2073
|
[`${e.prefixCls}-container`]: !0,
|
|
2084
|
-
[`${e.prefixCls}-container-mobile`]:
|
|
2074
|
+
[`${e.prefixCls}-container-mobile`]: r.value
|
|
2085
2075
|
};
|
|
2086
|
-
return
|
|
2087
|
-
class:
|
|
2088
|
-
}, [
|
|
2089
|
-
}, [() =>
|
|
2090
|
-
return () => a(
|
|
2076
|
+
return c("div", {
|
|
2077
|
+
class: i
|
|
2078
|
+
}, [m.value, n.value]);
|
|
2079
|
+
}, [() => r.value, () => s.value, () => h.value, () => m.value, () => e.prefixCls, () => n.value]);
|
|
2080
|
+
return () => a(c("div", {
|
|
2091
2081
|
class: `${e.prefixCls} ${t.value}`
|
|
2092
|
-
}, [
|
|
2082
|
+
}, [o.value]));
|
|
2093
2083
|
}
|
|
2094
2084
|
});
|
|
2095
|
-
|
|
2096
|
-
function
|
|
2085
|
+
vt.inheritAttrs = !1;
|
|
2086
|
+
function ea() {
|
|
2097
2087
|
return {
|
|
2098
2088
|
reload: {
|
|
2099
2089
|
text: "刷新",
|
|
2100
|
-
icon:
|
|
2090
|
+
icon: c(xl, null, null)
|
|
2101
2091
|
},
|
|
2102
2092
|
density: {
|
|
2103
2093
|
text: "表格密度",
|
|
2104
|
-
icon:
|
|
2094
|
+
icon: c(Xl, null, null)
|
|
2105
2095
|
},
|
|
2106
2096
|
setting: {
|
|
2107
2097
|
text: "列设置",
|
|
2108
|
-
icon:
|
|
2098
|
+
icon: c(dt, null, null)
|
|
2109
2099
|
},
|
|
2110
2100
|
fullScreen: {
|
|
2111
2101
|
text: "全屏",
|
|
2112
|
-
icon:
|
|
2102
|
+
icon: c(ht, null, null)
|
|
2113
2103
|
}
|
|
2114
2104
|
};
|
|
2115
2105
|
}
|
|
2116
|
-
function
|
|
2106
|
+
function ta(e, a) {
|
|
2117
2107
|
return Object.keys(e).filter((t) => t).map((t) => {
|
|
2118
|
-
const
|
|
2119
|
-
if (!
|
|
2108
|
+
const u = e[t];
|
|
2109
|
+
if (!u)
|
|
2120
2110
|
return null;
|
|
2121
|
-
let
|
|
2122
|
-
if (typeof
|
|
2111
|
+
let r = u === !0 ? a[t] : () => u == null ? void 0 : u();
|
|
2112
|
+
if (typeof r != "function" && (r = () => {
|
|
2123
2113
|
}), t === "setting")
|
|
2124
|
-
return
|
|
2114
|
+
return c(Ul, Q(e[t], {
|
|
2125
2115
|
key: t
|
|
2126
2116
|
}), null);
|
|
2127
2117
|
if (t === "fullScreen")
|
|
2128
|
-
return
|
|
2118
|
+
return c("span", {
|
|
2129
2119
|
key: t,
|
|
2130
|
-
onClick:
|
|
2131
|
-
}, [
|
|
2132
|
-
const
|
|
2133
|
-
return
|
|
2120
|
+
onClick: r
|
|
2121
|
+
}, [c(ht, null, null)]);
|
|
2122
|
+
const s = ea()[t];
|
|
2123
|
+
return s ? c("span", {
|
|
2134
2124
|
key: t,
|
|
2135
|
-
onClick:
|
|
2136
|
-
}, [
|
|
2137
|
-
title:
|
|
2125
|
+
onClick: r
|
|
2126
|
+
}, [c(ae, {
|
|
2127
|
+
title: s.text
|
|
2138
2128
|
}, {
|
|
2139
|
-
default: () => [
|
|
2129
|
+
default: () => [s.icon]
|
|
2140
2130
|
})]) : null;
|
|
2141
2131
|
}).filter((t) => t);
|
|
2142
2132
|
}
|
|
2143
|
-
const
|
|
2133
|
+
const la = {
|
|
2144
2134
|
options: [Boolean, Object, Array],
|
|
2145
2135
|
titleTip: [Function, Boolean, Object, String],
|
|
2146
2136
|
settingExtra: [Function, Boolean, Object, Array],
|
|
@@ -2148,40 +2138,40 @@ const aa = {
|
|
|
2148
2138
|
titleTipText: [String],
|
|
2149
2139
|
toolBarBtn: [Function, Boolean, Object, Array],
|
|
2150
2140
|
headerTitle: [Function, Boolean, Object, Array, String]
|
|
2151
|
-
},
|
|
2152
|
-
props:
|
|
2141
|
+
}, aa = /* @__PURE__ */ ue({
|
|
2142
|
+
props: la,
|
|
2153
2143
|
inheritAttrs: !1,
|
|
2154
2144
|
setup(e) {
|
|
2155
|
-
const a =
|
|
2145
|
+
const a = Ye({
|
|
2156
2146
|
suffixCls: "table-list-toolbar",
|
|
2157
2147
|
isPor: !0
|
|
2158
2148
|
}), {
|
|
2159
2149
|
action: t
|
|
2160
|
-
} =
|
|
2150
|
+
} = de(), u = Be(() => {
|
|
2161
2151
|
var h;
|
|
2162
|
-
const
|
|
2152
|
+
const r = {
|
|
2163
2153
|
reload: () => t == null ? void 0 : t.reload(),
|
|
2164
2154
|
density: !0,
|
|
2165
2155
|
setting: !0,
|
|
2166
2156
|
fullScreen: () => t == null ? void 0 : t.toggle()
|
|
2167
2157
|
};
|
|
2168
2158
|
if (e.options === !1 || ((h = Object.keys(e.options)) == null ? void 0 : h.length) === 0) return [];
|
|
2169
|
-
const
|
|
2170
|
-
...
|
|
2159
|
+
const s = {
|
|
2160
|
+
...r,
|
|
2171
2161
|
...e.options
|
|
2172
2162
|
};
|
|
2173
|
-
return
|
|
2174
|
-
...
|
|
2163
|
+
return s.setting !== !1 && e.settingExtra && (s.setting = {}, s.setting.extra = e.settingExtra), ta(s, {
|
|
2164
|
+
...r
|
|
2175
2165
|
});
|
|
2176
2166
|
}, [() => t, () => e.options]);
|
|
2177
2167
|
return () => {
|
|
2178
|
-
const
|
|
2179
|
-
return
|
|
2168
|
+
const r = e.toolBarBtn || [];
|
|
2169
|
+
return c(vt, {
|
|
2180
2170
|
prefixCls: a,
|
|
2181
2171
|
optionsExtra: e.optionsExtra,
|
|
2182
2172
|
headerTitle: e.headerTitle,
|
|
2183
|
-
actions:
|
|
2184
|
-
settings:
|
|
2173
|
+
actions: r,
|
|
2174
|
+
settings: C(u),
|
|
2185
2175
|
titleTip: e.titleTip,
|
|
2186
2176
|
titleTipText: e.titleTipText
|
|
2187
2177
|
}, null);
|
|
@@ -2200,7 +2190,7 @@ const aa = {
|
|
|
2200
2190
|
backgroundColor: "transparent",
|
|
2201
2191
|
borderRadius: 2
|
|
2202
2192
|
}
|
|
2203
|
-
},
|
|
2193
|
+
}, na = (e) => ({
|
|
2204
2194
|
[e.componentCls]: {
|
|
2205
2195
|
"&-a": {
|
|
2206
2196
|
cursor: "pointer",
|
|
@@ -2382,9 +2372,9 @@ const aa = {
|
|
|
2382
2372
|
[`${e.antCls}-table-content`]: Ne
|
|
2383
2373
|
}
|
|
2384
2374
|
}
|
|
2385
|
-
}),
|
|
2375
|
+
}), ua = ct.PRESENTED_IMAGE_SIMPLE, {
|
|
2386
2376
|
useBreakpoint: ia
|
|
2387
|
-
} =
|
|
2377
|
+
} = Le, oa = {
|
|
2388
2378
|
reload: !0,
|
|
2389
2379
|
density: !0,
|
|
2390
2380
|
setting: !0,
|
|
@@ -2398,186 +2388,187 @@ const aa = {
|
|
|
2398
2388
|
setup(e, {
|
|
2399
2389
|
emit: a,
|
|
2400
2390
|
slots: t,
|
|
2401
|
-
attrs:
|
|
2402
|
-
expose:
|
|
2391
|
+
attrs: u,
|
|
2392
|
+
expose: r
|
|
2403
2393
|
}) {
|
|
2404
|
-
const
|
|
2394
|
+
const s = Ye({
|
|
2405
2395
|
suffixCls: "table",
|
|
2406
2396
|
isPor: !0
|
|
2407
2397
|
}), {
|
|
2408
2398
|
wrapSSR: h,
|
|
2409
|
-
hashId:
|
|
2410
|
-
} = Pe("ProBaseTable", [
|
|
2411
|
-
width:
|
|
2412
|
-
} = Jt(),
|
|
2413
|
-
|
|
2399
|
+
hashId: d
|
|
2400
|
+
} = Pe("ProBaseTable", [na], s), T = ia(), {
|
|
2401
|
+
width: m
|
|
2402
|
+
} = Jt(), n = sl(), o = P(), i = P(), b = P(e.waitRequest);
|
|
2403
|
+
me(() => b.value = e.waitRequest);
|
|
2414
2404
|
const {
|
|
2415
|
-
toggle:
|
|
2405
|
+
toggle: y,
|
|
2416
2406
|
isFullscreen: f
|
|
2417
|
-
} =
|
|
2407
|
+
} = st(o), S = w(() => ({
|
|
2418
2408
|
...e
|
|
2419
|
-
})), R = w(() => !
|
|
2420
|
-
var
|
|
2421
|
-
return e.virtualScroll &&
|
|
2422
|
-
}),
|
|
2423
|
-
const
|
|
2424
|
-
|
|
2425
|
-
key:
|
|
2426
|
-
align:
|
|
2409
|
+
})), R = w(() => !T.value.xl), $ = w(() => {
|
|
2410
|
+
var g, p;
|
|
2411
|
+
return e.virtualScroll && Sl(!((g = e.scroll) != null && g.y), "参数scroll的Y值不能为空!"), !!((p = e.scroll) != null && p.y && e.virtualScroll);
|
|
2412
|
+
}), B = w(() => {
|
|
2413
|
+
const g = (e.columns || []).filter((p) => p.key || p.dataIndex).map((p) => ({
|
|
2414
|
+
...p,
|
|
2415
|
+
key: p.key || p.dataIndex,
|
|
2416
|
+
align: p.align || e.align,
|
|
2427
2417
|
uuid: Ke().uuid(15)
|
|
2428
2418
|
}));
|
|
2429
|
-
return qt(
|
|
2419
|
+
return qt(g, {
|
|
2430
2420
|
align: e.align || "left",
|
|
2431
2421
|
showIndex: e.showIndex || !1
|
|
2432
2422
|
});
|
|
2433
2423
|
}), {
|
|
2434
|
-
|
|
2435
|
-
|
|
2424
|
+
loadingComputed: E,
|
|
2425
|
+
loading: X,
|
|
2426
|
+
setLoading: j
|
|
2436
2427
|
} = Fl({
|
|
2437
2428
|
emit: a,
|
|
2438
|
-
loading:
|
|
2429
|
+
loading: te(e, "loading")
|
|
2439
2430
|
}), {
|
|
2440
|
-
sizeRef:
|
|
2441
|
-
setTableSize:
|
|
2431
|
+
sizeRef: L,
|
|
2432
|
+
setTableSize: ie
|
|
2442
2433
|
} = Rl({
|
|
2443
2434
|
emit: a,
|
|
2444
|
-
size:
|
|
2435
|
+
size: te(e, "size")
|
|
2445
2436
|
}), {
|
|
2446
|
-
getPaginationInfo:
|
|
2447
|
-
setPagination:
|
|
2448
|
-
} =
|
|
2437
|
+
getPaginationInfo: k,
|
|
2438
|
+
setPagination: _
|
|
2439
|
+
} = Bl({
|
|
2449
2440
|
slots: t,
|
|
2450
2441
|
props: S,
|
|
2451
|
-
pagination:
|
|
2452
|
-
}),
|
|
2453
|
-
getScrollRef:
|
|
2454
|
-
breakpoint:
|
|
2442
|
+
pagination: te(e, "pagination")
|
|
2443
|
+
}), l = zl(e), {
|
|
2444
|
+
getScrollRef: x,
|
|
2445
|
+
breakpoint: I
|
|
2455
2446
|
} = Kl({
|
|
2456
|
-
...
|
|
2457
|
-
innerWidth:
|
|
2458
|
-
columns:
|
|
2459
|
-
screens:
|
|
2460
|
-
}),
|
|
2461
|
-
getProColumns:
|
|
2462
|
-
cacheProColumns:
|
|
2463
|
-
setColumns:
|
|
2464
|
-
changeColumns:
|
|
2465
|
-
resizeColumnWidth:
|
|
2447
|
+
...l,
|
|
2448
|
+
innerWidth: m,
|
|
2449
|
+
columns: B,
|
|
2450
|
+
screens: T
|
|
2451
|
+
}), F = Nl(e), {
|
|
2452
|
+
getProColumns: D,
|
|
2453
|
+
cacheProColumns: v,
|
|
2454
|
+
setColumns: M,
|
|
2455
|
+
changeColumns: Y,
|
|
2456
|
+
resizeColumnWidth: K
|
|
2466
2457
|
} = jl({
|
|
2467
|
-
...
|
|
2468
|
-
breakpoint:
|
|
2469
|
-
scroll:
|
|
2470
|
-
columns:
|
|
2458
|
+
...F,
|
|
2459
|
+
breakpoint: I,
|
|
2460
|
+
scroll: x,
|
|
2461
|
+
columns: B
|
|
2471
2462
|
}), {
|
|
2472
|
-
columnsMap:
|
|
2473
|
-
operationType:
|
|
2474
|
-
setColumnsMap:
|
|
2475
|
-
sortKeyColumns:
|
|
2476
|
-
cacheColumnsMap:
|
|
2477
|
-
setSortKeyColumns:
|
|
2463
|
+
columnsMap: ge,
|
|
2464
|
+
operationType: ke,
|
|
2465
|
+
setColumnsMap: $e,
|
|
2466
|
+
sortKeyColumns: oe,
|
|
2467
|
+
cacheColumnsMap: Fe,
|
|
2468
|
+
setSortKeyColumns: ye
|
|
2478
2469
|
} = Ml({
|
|
2479
|
-
columns:
|
|
2480
|
-
columnsState:
|
|
2481
|
-
changeColumns:
|
|
2470
|
+
columns: v,
|
|
2471
|
+
columnsState: te(e, "columnsState"),
|
|
2472
|
+
changeColumns: Y
|
|
2482
2473
|
}), {
|
|
2483
|
-
formDataRef:
|
|
2484
|
-
formParamsRef:
|
|
2485
|
-
defaultParamsRef:
|
|
2486
|
-
setFormParams:
|
|
2487
|
-
} =
|
|
2488
|
-
search:
|
|
2489
|
-
searchMap:
|
|
2490
|
-
params:
|
|
2491
|
-
columns:
|
|
2492
|
-
setPagination:
|
|
2474
|
+
formDataRef: V,
|
|
2475
|
+
formParamsRef: ee,
|
|
2476
|
+
defaultParamsRef: z,
|
|
2477
|
+
setFormParams: se
|
|
2478
|
+
} = El({
|
|
2479
|
+
search: te(e, "search"),
|
|
2480
|
+
searchMap: te(e, "searchMap"),
|
|
2481
|
+
params: te(e, "params"),
|
|
2482
|
+
columns: B,
|
|
2483
|
+
setPagination: _
|
|
2493
2484
|
}), {
|
|
2494
|
-
selectedKey:
|
|
2495
|
-
selectedItem:
|
|
2485
|
+
selectedKey: G,
|
|
2486
|
+
selectedItem: mt,
|
|
2496
2487
|
changeRowKey: gt,
|
|
2497
2488
|
selectRowKey: yt,
|
|
2498
2489
|
selectAllRowKey: bt,
|
|
2499
2490
|
syncSelectedRows: Ct,
|
|
2500
2491
|
removeRowKeys: xt
|
|
2501
|
-
} =
|
|
2502
|
-
reload:
|
|
2503
|
-
reSetDataList:
|
|
2504
|
-
changeDataValue:
|
|
2505
|
-
isTreeDataRef:
|
|
2492
|
+
} = Il(te(e, "rowKey"), te(e, "rowSelection")), St = kl(e), {
|
|
2493
|
+
reload: Oe,
|
|
2494
|
+
reSetDataList: wt,
|
|
2495
|
+
changeDataValue: pt,
|
|
2496
|
+
isTreeDataRef: Ve,
|
|
2506
2497
|
dataSource: be,
|
|
2507
|
-
handleTableChange:
|
|
2508
|
-
} =
|
|
2509
|
-
...
|
|
2510
|
-
waitRequest:
|
|
2498
|
+
handleTableChange: He
|
|
2499
|
+
} = Ol({
|
|
2500
|
+
...St,
|
|
2501
|
+
waitRequest: b
|
|
2511
2502
|
}, {
|
|
2512
|
-
|
|
2513
|
-
getPaginationInfo:
|
|
2514
|
-
setPagination:
|
|
2503
|
+
loading: E,
|
|
2504
|
+
getPaginationInfo: k,
|
|
2505
|
+
setPagination: _,
|
|
2515
2506
|
removeRowKeys: xt,
|
|
2516
2507
|
syncSelectedRows: Ct,
|
|
2517
|
-
setLoading:
|
|
2518
|
-
setColumns:
|
|
2519
|
-
columns:
|
|
2520
|
-
formParamsRef:
|
|
2508
|
+
setLoading: j,
|
|
2509
|
+
setColumns: M,
|
|
2510
|
+
columns: D,
|
|
2511
|
+
formParamsRef: ee,
|
|
2521
2512
|
onBeforeSearchSubmit: e.onBeforeSearchSubmit,
|
|
2522
2513
|
hasCustomRender: w(() => ve(e.customRender || (t == null ? void 0 : t.customRender)))
|
|
2523
2514
|
}, a), Ce = w(() => e.options ? {
|
|
2524
|
-
...
|
|
2525
|
-
...
|
|
2526
|
-
} : !1),
|
|
2527
|
-
var
|
|
2528
|
-
const
|
|
2529
|
-
return !
|
|
2530
|
-
...(
|
|
2515
|
+
...oa,
|
|
2516
|
+
...ne(e.options) ? e.options : {}
|
|
2517
|
+
} : !1), We = w(() => {
|
|
2518
|
+
var p, O;
|
|
2519
|
+
const g = ne(e.loading) ? xe(e.loading, "spinning") : {};
|
|
2520
|
+
return !g.indicator && ((p = n == null ? void 0 : n.indicator) != null && p.value) && (g.indicator = (O = n == null ? void 0 : n.indicator) == null ? void 0 : O.value), xe({
|
|
2521
|
+
...(xe(u), ["class", "style", "id"]),
|
|
2531
2522
|
...e,
|
|
2532
|
-
virtualScroll:
|
|
2533
|
-
size:
|
|
2534
|
-
scroll:
|
|
2523
|
+
virtualScroll: $.value,
|
|
2524
|
+
size: C(L),
|
|
2525
|
+
scroll: C(x),
|
|
2535
2526
|
loading: {
|
|
2536
|
-
spinning: e.showLoading ? ve(
|
|
2537
|
-
...
|
|
2527
|
+
spinning: e.showLoading ? ve(X.value) : !1,
|
|
2528
|
+
...g
|
|
2538
2529
|
},
|
|
2539
|
-
columns:
|
|
2540
|
-
pagination:
|
|
2530
|
+
columns: De(C(D).filter((A) => A.show || A.show === void 0)),
|
|
2531
|
+
pagination: De(C(k)),
|
|
2541
2532
|
dataSource: be.value
|
|
2542
2533
|
}, ["class", "onChange", "onExpand", "onExpandedRowsChange"]);
|
|
2543
|
-
}),
|
|
2534
|
+
}), _e = w(() => {
|
|
2544
2535
|
var A;
|
|
2545
|
-
let
|
|
2546
|
-
const
|
|
2547
|
-
if (
|
|
2548
|
-
const J =
|
|
2549
|
-
!J && !N && !
|
|
2536
|
+
let g;
|
|
2537
|
+
const p = C(S).direction === "rtl" ? "bottomLeft" : "right", O = (A = C(k)) == null ? void 0 : A.position;
|
|
2538
|
+
if (O !== null && Array.isArray(O)) {
|
|
2539
|
+
const J = O.find((H) => H.includes("top")), N = O.find((H) => H.includes("bottom")), q = O.every((H) => `${H}` == "none");
|
|
2540
|
+
!J && !N && !q && (g = p), J && (g = J.toLowerCase().replace("top", "")), N && (g = N.toLowerCase().replace("bottom", ""));
|
|
2550
2541
|
} else
|
|
2551
|
-
|
|
2552
|
-
return
|
|
2553
|
-
}),
|
|
2554
|
-
var
|
|
2555
|
-
ne(e.search) && ((
|
|
2556
|
-
...
|
|
2542
|
+
g = p;
|
|
2543
|
+
return g;
|
|
2544
|
+
}), Ge = async (g) => {
|
|
2545
|
+
var p;
|
|
2546
|
+
ne(e.search) && ((p = e.search) != null && p.showSearch) ? (se({
|
|
2547
|
+
...g,
|
|
2557
2548
|
...e.params || {}
|
|
2558
|
-
}), await
|
|
2559
|
-
}, Tt = async (
|
|
2560
|
-
|
|
2561
|
-
},
|
|
2562
|
-
|
|
2563
|
-
}, $t = (
|
|
2564
|
-
var
|
|
2565
|
-
|
|
2566
|
-
current:
|
|
2567
|
-
pageSize:
|
|
2568
|
-
}),
|
|
2569
|
-
current:
|
|
2570
|
-
pageSize:
|
|
2571
|
-
total:
|
|
2549
|
+
}), await Oe()) : se(g);
|
|
2550
|
+
}, Tt = async (g, p) => {
|
|
2551
|
+
p ? (a("reset", g), e.request && await Ge(g)) : e.request ? (a("submit", g), await Ge(g)) : a("submit", g);
|
|
2552
|
+
}, qe = (g, p, O, A) => {
|
|
2553
|
+
_(at(g, ["current", "pageSize"])), He(g, p, O, A);
|
|
2554
|
+
}, $t = (g, p) => {
|
|
2555
|
+
var O;
|
|
2556
|
+
_({
|
|
2557
|
+
current: g,
|
|
2558
|
+
pageSize: p
|
|
2559
|
+
}), He({
|
|
2560
|
+
current: g,
|
|
2561
|
+
pageSize: p,
|
|
2562
|
+
total: k.value && ((O = k.value) == null ? void 0 : O.total) || 0
|
|
2572
2563
|
}, {}, {});
|
|
2573
|
-
}, Ft = (
|
|
2574
|
-
a("expandedRowsChange",
|
|
2575
|
-
}, Rt = (
|
|
2576
|
-
a("expand",
|
|
2577
|
-
},
|
|
2578
|
-
const A =
|
|
2579
|
-
return
|
|
2580
|
-
class: `${
|
|
2564
|
+
}, Ft = (g) => {
|
|
2565
|
+
a("expandedRowsChange", g);
|
|
2566
|
+
}, Rt = (g, p) => {
|
|
2567
|
+
a("expand", g, p);
|
|
2568
|
+
}, Bt = (g, p) => K(g, p), It = (g, p, O) => {
|
|
2569
|
+
const A = O.align === "center" ? "top" : O.align === "left" || !O.align ? "topLeft" : "topRight";
|
|
2570
|
+
return p && O.copyable ? c(ol.Paragraph, {
|
|
2571
|
+
class: `${s}-copyable`,
|
|
2581
2572
|
style: {
|
|
2582
2573
|
margin: "0",
|
|
2583
2574
|
width: "100%",
|
|
@@ -2585,45 +2576,45 @@ const aa = {
|
|
|
2585
2576
|
},
|
|
2586
2577
|
copyable: !0
|
|
2587
2578
|
}, {
|
|
2588
|
-
default: () => [
|
|
2589
|
-
title:
|
|
2579
|
+
default: () => [c(ae, {
|
|
2580
|
+
title: g,
|
|
2590
2581
|
placement: A
|
|
2591
2582
|
}, {
|
|
2592
|
-
default: () => [
|
|
2593
|
-
class: `${
|
|
2594
|
-
}, [
|
|
2583
|
+
default: () => [c("div", {
|
|
2584
|
+
class: `${s}-ellipsis`
|
|
2585
|
+
}, [g])]
|
|
2595
2586
|
})]
|
|
2596
|
-
}) :
|
|
2597
|
-
title:
|
|
2587
|
+
}) : p && !O.copyable ? c(ae, {
|
|
2588
|
+
title: g,
|
|
2598
2589
|
placement: A
|
|
2599
2590
|
}, {
|
|
2600
|
-
default: () => [
|
|
2601
|
-
class: `${
|
|
2602
|
-
}, [
|
|
2603
|
-
}) :
|
|
2591
|
+
default: () => [Ve.value ? g : c("div", {
|
|
2592
|
+
class: `${s}-ellipsis`
|
|
2593
|
+
}, [g])]
|
|
2594
|
+
}) : g;
|
|
2604
2595
|
}, Pt = () => {
|
|
2605
2596
|
var A, J, N;
|
|
2606
|
-
const
|
|
2607
|
-
if (
|
|
2597
|
+
const g = nt(t, e, "customRender"), p = fe(t, e, "emptyText"), O = p !== !1 && ((A = n == null ? void 0 : n.emptyText) == null ? void 0 : A.value) !== !1;
|
|
2598
|
+
if (g) {
|
|
2608
2599
|
if (!((J = be.value) != null && J.length))
|
|
2609
|
-
return
|
|
2610
|
-
image:
|
|
2600
|
+
return O && (p || ((N = n == null ? void 0 : n.emptyText) == null ? void 0 : N.value) || c(ct, {
|
|
2601
|
+
image: ua
|
|
2611
2602
|
}, null));
|
|
2612
|
-
const
|
|
2613
|
-
return
|
|
2603
|
+
const q = Z(C(be));
|
|
2604
|
+
return g == null ? void 0 : g($l(q, k.value), q);
|
|
2614
2605
|
}
|
|
2615
|
-
return
|
|
2616
|
-
},
|
|
2606
|
+
return c(Ie, null, null);
|
|
2607
|
+
}, kt = (g) => {
|
|
2617
2608
|
var J, N;
|
|
2618
|
-
const
|
|
2619
|
-
return
|
|
2620
|
-
headerTitle:
|
|
2621
|
-
titleTip:
|
|
2609
|
+
const p = fe(t, e, "headerTitle"), O = fe(t, e, "titleTip"), A = fe(t, e, "toolBarBtn");
|
|
2610
|
+
return c(aa, {
|
|
2611
|
+
headerTitle: p,
|
|
2612
|
+
titleTip: O,
|
|
2622
2613
|
titleTipText: e.titleTipText,
|
|
2623
|
-
options:
|
|
2614
|
+
options: le(Ce.value) ? Ce.value : {
|
|
2624
2615
|
...Ce.value,
|
|
2625
|
-
setting:
|
|
2626
|
-
density:
|
|
2616
|
+
setting: g ? !1 : (J = Ce.value) == null ? void 0 : J.setting,
|
|
2617
|
+
density: g ? !1 : (N = Ce.value) == null ? void 0 : N.density
|
|
2627
2618
|
},
|
|
2628
2619
|
settingExtra: fe(t, e, "settingExtra"),
|
|
2629
2620
|
optionsExtra: fe(t, e, "optionsExtra"),
|
|
@@ -2631,136 +2622,137 @@ const aa = {
|
|
|
2631
2622
|
}, null);
|
|
2632
2623
|
};
|
|
2633
2624
|
return Al({
|
|
2634
|
-
tableSize:
|
|
2635
|
-
columns:
|
|
2636
|
-
cacheColumns:
|
|
2625
|
+
tableSize: L,
|
|
2626
|
+
columns: D,
|
|
2627
|
+
cacheColumns: B,
|
|
2637
2628
|
isMobile: R,
|
|
2638
2629
|
action: {
|
|
2639
|
-
setTableSize:
|
|
2640
|
-
reload: (
|
|
2641
|
-
toggle:
|
|
2630
|
+
setTableSize: ie,
|
|
2631
|
+
reload: (g) => Oe(g),
|
|
2632
|
+
toggle: y
|
|
2642
2633
|
},
|
|
2643
2634
|
settingsAction: {
|
|
2644
|
-
autoScroll:
|
|
2645
|
-
columnsMap:
|
|
2646
|
-
operationType:
|
|
2647
|
-
setColumnsMap:
|
|
2648
|
-
sortKeyColumns:
|
|
2649
|
-
cacheColumnsMap:
|
|
2650
|
-
setSortKeyColumns:
|
|
2635
|
+
autoScroll: te(e, "autoScroll"),
|
|
2636
|
+
columnsMap: ge,
|
|
2637
|
+
operationType: ke,
|
|
2638
|
+
setColumnsMap: $e,
|
|
2639
|
+
sortKeyColumns: oe,
|
|
2640
|
+
cacheColumnsMap: Fe,
|
|
2641
|
+
setSortKeyColumns: ye
|
|
2651
2642
|
},
|
|
2652
|
-
setPagination:
|
|
2653
|
-
changeColumns:
|
|
2643
|
+
setPagination: _,
|
|
2644
|
+
changeColumns: Y,
|
|
2654
2645
|
slots: t
|
|
2655
|
-
}),
|
|
2656
|
-
loading: D,
|
|
2657
|
-
dataSource: be,
|
|
2646
|
+
}), r({
|
|
2658
2647
|
formRef: () => ({
|
|
2659
|
-
getFormState: () =>
|
|
2648
|
+
getFormState: () => C(ee),
|
|
2660
2649
|
getFormInnerState: () => {
|
|
2661
|
-
var
|
|
2662
|
-
return ((
|
|
2650
|
+
var g;
|
|
2651
|
+
return ((g = i.value) == null ? void 0 : g.getFormState()) || {};
|
|
2663
2652
|
},
|
|
2664
|
-
restFormState: (
|
|
2665
|
-
var
|
|
2666
|
-
|
|
2653
|
+
restFormState: (g) => {
|
|
2654
|
+
var p;
|
|
2655
|
+
b.value = !0, g && (g == null || g()), (p = i.value) == null || p.resetForm(!1), b.value = !1;
|
|
2667
2656
|
}
|
|
2668
2657
|
}),
|
|
2669
2658
|
actionRef: () => ({
|
|
2670
|
-
|
|
2671
|
-
|
|
2672
|
-
|
|
2673
|
-
|
|
2674
|
-
|
|
2675
|
-
|
|
2676
|
-
|
|
2659
|
+
loading: X,
|
|
2660
|
+
dataSource: be,
|
|
2661
|
+
pageParams: k.value,
|
|
2662
|
+
selectedKey: G.value,
|
|
2663
|
+
selectedItem: mt.value,
|
|
2664
|
+
reload: Oe,
|
|
2665
|
+
getLoadingStatus: () => C(E),
|
|
2666
|
+
reloadAndReset: async (g) => {
|
|
2667
|
+
var p, O;
|
|
2668
|
+
b.value = !0, _({
|
|
2677
2669
|
current: 1,
|
|
2678
2670
|
pageSize: 10
|
|
2679
|
-
}),
|
|
2671
|
+
}), g != null && g.callBack && (g != null && g.wait ? await ((p = g == null ? void 0 : g.callBack) == null ? void 0 : p.call(g)) : (O = g == null ? void 0 : g.callBack) == null || O.call(g)), b.value = !1;
|
|
2680
2672
|
},
|
|
2681
|
-
reSetDataList:
|
|
2682
|
-
setPageAndReload:
|
|
2683
|
-
setPagination:
|
|
2684
|
-
setData:
|
|
2685
|
-
setLoading:
|
|
2673
|
+
reSetDataList: wt,
|
|
2674
|
+
setPageAndReload: qe,
|
|
2675
|
+
setPagination: _,
|
|
2676
|
+
setData: pt,
|
|
2677
|
+
setLoading: j
|
|
2686
2678
|
})
|
|
2687
2679
|
}), () => {
|
|
2688
2680
|
var A, J;
|
|
2689
|
-
const
|
|
2690
|
-
return h(
|
|
2691
|
-
ref:
|
|
2681
|
+
const g = ve(e.customRender || t.customRender), p = fe(t, e, "emptyText"), O = p !== !1 && ((A = n == null ? void 0 : n.emptyText) == null ? void 0 : A.value) !== !1;
|
|
2682
|
+
return h(c("div", {
|
|
2683
|
+
ref: o,
|
|
2692
2684
|
class: Ut([{
|
|
2693
|
-
[`${
|
|
2694
|
-
[`${
|
|
2695
|
-
[`${
|
|
2696
|
-
[`${
|
|
2697
|
-
[`${
|
|
2698
|
-
[`${
|
|
2685
|
+
[`${d.value}`]: !0,
|
|
2686
|
+
[`${s}`]: !0,
|
|
2687
|
+
[`${u.class}`]: u.class,
|
|
2688
|
+
[`${s}-no-scroll`]: !Object.keys(C(x) || {}).length,
|
|
2689
|
+
[`${s}-table-tree`]: Ve.value,
|
|
2690
|
+
[`${s}-full-screen`]: f.value
|
|
2699
2691
|
}]),
|
|
2700
|
-
style:
|
|
2701
|
-
}, [
|
|
2702
|
-
class: [`${
|
|
2703
|
-
}, [(
|
|
2704
|
-
ref:
|
|
2692
|
+
style: u.style
|
|
2693
|
+
}, [c("div", {
|
|
2694
|
+
class: [`${s}-content`, d.value]
|
|
2695
|
+
}, [(V.value.length > 0 || ve(t.search)) && c(ft, {
|
|
2696
|
+
ref: i,
|
|
2705
2697
|
search: e.search,
|
|
2706
2698
|
modal: e.modalScroll,
|
|
2707
|
-
searchMap:
|
|
2708
|
-
prefixCls:
|
|
2709
|
-
loading: !!
|
|
2699
|
+
searchMap: V.value,
|
|
2700
|
+
prefixCls: s,
|
|
2701
|
+
loading: !!C(E),
|
|
2710
2702
|
onSearch: Tt,
|
|
2711
|
-
defaultParams:
|
|
2703
|
+
defaultParams: z
|
|
2712
2704
|
}, {
|
|
2713
2705
|
default: t.search ? () => {
|
|
2714
2706
|
var N;
|
|
2715
2707
|
return (N = t.search) == null ? void 0 : N.call(t);
|
|
2716
2708
|
} : null
|
|
2717
|
-
}),
|
|
2709
|
+
}), !$.value && kt(g), g ? c(Ae, C(We).loading, {
|
|
2718
2710
|
default: () => {
|
|
2719
2711
|
var N;
|
|
2720
|
-
return [
|
|
2721
|
-
class: `${
|
|
2722
|
-
}, [Pt(), e.pagination !== !1 && ((N = be.value) == null ? void 0 : N.length) > 0 &&
|
|
2712
|
+
return [c("div", {
|
|
2713
|
+
class: `${s}-wrapper ${d.value}`
|
|
2714
|
+
}, [Pt(), e.pagination !== !1 && ((N = be.value) == null ? void 0 : N.length) > 0 && c(ul, Q({
|
|
2723
2715
|
class: {
|
|
2724
|
-
[`${
|
|
2725
|
-
[`${
|
|
2716
|
+
[`${s}-pagination ${d.value}`]: !0,
|
|
2717
|
+
[`${s}-pagination-${_e.value} ${d.value}`]: !!_e.value
|
|
2726
2718
|
}
|
|
2727
|
-
},
|
|
2719
|
+
}, De(C(k)), {
|
|
2728
2720
|
onChange: $t
|
|
2729
2721
|
}), null)])];
|
|
2730
2722
|
}
|
|
2731
|
-
}) :
|
|
2723
|
+
}) : c(il, Q(We.value, {
|
|
2732
2724
|
style: e.tableStyle || void 0,
|
|
2733
2725
|
class: e.tableClassName,
|
|
2734
2726
|
rowKey: (N) => N[e.rowKey || "sortIndex"],
|
|
2735
2727
|
transformCellText: (N) => {
|
|
2736
|
-
var
|
|
2728
|
+
var Je, Qe;
|
|
2737
2729
|
const {
|
|
2738
|
-
text:
|
|
2730
|
+
text: q,
|
|
2739
2731
|
column: H
|
|
2740
|
-
} = N,
|
|
2741
|
-
if (
|
|
2732
|
+
} = N, Ue = ze(q) ? q == null ? void 0 : q[0] : q;
|
|
2733
|
+
if (Te(Ue)) return q;
|
|
2742
2734
|
const {
|
|
2743
|
-
value:
|
|
2744
|
-
success:
|
|
2745
|
-
} = Xt(
|
|
2746
|
-
return H != null && H.ellipsis ?
|
|
2735
|
+
value: Ot,
|
|
2736
|
+
success: Dt
|
|
2737
|
+
} = Xt(Ue, (H == null ? void 0 : H.columnEmptyText) || (e == null ? void 0 : e.columnEmptyText) || ""), Xe = Tl(Ot, ((Qe = (Je = e.columns) == null ? void 0 : Je.find((Et) => Et.key === H.key)) == null ? void 0 : Qe.valueType) || H.valueType, s, d.value);
|
|
2738
|
+
return H != null && H.ellipsis ? It(Xe, Dt, H) : Xe;
|
|
2747
2739
|
},
|
|
2748
2740
|
rowSelection: e.rowSelection ? {
|
|
2749
|
-
...
|
|
2750
|
-
selectedRowKeys:
|
|
2741
|
+
...xe(e.rowSelection, ["onSelect", "onSelectAll", "onChange", "selectedRowKeys"]),
|
|
2742
|
+
selectedRowKeys: G.value,
|
|
2751
2743
|
onSelect: yt,
|
|
2752
2744
|
onSelectAll: bt,
|
|
2753
2745
|
onChange: gt
|
|
2754
2746
|
} : void 0,
|
|
2755
|
-
onChange:
|
|
2747
|
+
onChange: qe,
|
|
2756
2748
|
onExpandedRowsChange: Ft,
|
|
2757
2749
|
onExpand: Rt,
|
|
2758
|
-
onResizeColumn: (N,
|
|
2750
|
+
onResizeColumn: (N, q) => Bt(N, q)
|
|
2759
2751
|
}), {
|
|
2760
2752
|
...t,
|
|
2761
|
-
emptyText:
|
|
2753
|
+
emptyText: O && (p || (J = n == null ? void 0 : n.emptyText) != null && J.value) ? () => {
|
|
2762
2754
|
var N;
|
|
2763
|
-
return
|
|
2755
|
+
return p || ((N = n == null ? void 0 : n.emptyText) == null ? void 0 : N.value);
|
|
2764
2756
|
} : null
|
|
2765
2757
|
})])]));
|
|
2766
2758
|
};
|
|
@@ -2771,5 +2763,5 @@ export {
|
|
|
2771
2763
|
je as GProTable,
|
|
2772
2764
|
je as default,
|
|
2773
2765
|
he as proTableProps,
|
|
2774
|
-
|
|
2766
|
+
ba as useTable
|
|
2775
2767
|
};
|