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