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