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