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