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