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