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