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