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