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