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