@gx-design-vue/pro-table 0.2.0-beta.103 → 0.2.0-beta.105
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/pro-table.js +433 -431
- package/dist/pro-table.umd.cjs +1 -1
- package/package.json +1 -1
package/dist/pro-table.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { isObject as Z, cloneDeep as re, isArray as oe, isBoolean as ne, classNames as pe, filterEmpty as Rt, getPrefixCls as it, getRandomNumber as nt, genColumnKey as Ft, isDeepEqualReact as Ge, compareArray as al, isNumber as _e, runFunction as nl, convertValueBoolean as Oe, getSortIndex as ul, isFunction as Ke, handleCurrentPage as il, deepMerge as sl, getSlot as It, arrayRepeat as ol, isString as kt, handleShowIndex as rl, hanndleEmptyField as cl, getTextWidth as dl, getSlotVNode as ke } from "@gx-design-vue/pro-utils";
|
|
2
|
-
import { reactive as Te, isReactive as fl, watch as _, computed as w, ref as j, toRaw as Be, watchEffect as Le, defineComponent as
|
|
2
|
+
import { reactive as Te, isReactive as fl, watch as _, computed as w, ref as j, toRaw as Be, watchEffect as Le, defineComponent as me, createVNode as c, Fragment as qe, nextTick as Ot, isVNode as le, mergeProps as Q, h as Pt, cloneVNode as st, unref as C, createTextVNode as ze, renderSlot as hl, onActivated as vl, getCurrentInstance as ml, onUnmounted as gl, onDeactivated as yl, onMounted as bl, toRef as fe } from "vue";
|
|
3
3
|
import { tableProps as Cl } from "ant-design-vue/es/table/Table";
|
|
4
4
|
import { omit as Xe, pick as St } from "lodash-es";
|
|
5
5
|
import "ant-design-vue/es/_util/props-util";
|
|
@@ -8,89 +8,89 @@ import { UpOutlined as Sl, DownOutlined as wl, SettingOutlined as jt, VerticalAl
|
|
|
8
8
|
import { useProAppContext as Nt } from "@gx-design-vue/pro-app";
|
|
9
9
|
import { useContext as Pl, useProStyle as Ue, unit as wt } from "@gx-design-vue/pro-provider";
|
|
10
10
|
import { useFullscreen as Et, useWindowSize as jl } from "@vueuse/core";
|
|
11
|
-
import { Grid as ot, Space as we, Button as pt, Input as Tt, TimePicker as Nl, DatePicker as Dt, TreeSelect as El, Spin as ut, Select as Dl, Popover as Ml, Checkbox as Al, Tooltip as
|
|
11
|
+
import { Grid as ot, Space as we, Button as pt, Input as Tt, TimePicker as Nl, DatePicker as Dt, TreeSelect as El, Spin as ut, Select as Dl, Popover as Ml, Checkbox as Al, Tooltip as ve, Tree as Kl, Dropdown as zl, Menu as He, Pagination as Yl, Table as Ll, message as Wl, Empty as Vl } from "ant-design-vue";
|
|
12
12
|
import U from "dayjs";
|
|
13
13
|
import { useMemo as Qe, tryOnUnmounted as Hl } from "@gx-design-vue/pro-hooks";
|
|
14
14
|
function Za(e, a) {
|
|
15
|
-
var x, S,
|
|
15
|
+
var x, S, f, b;
|
|
16
16
|
function l() {
|
|
17
17
|
return a != null && a.state && Z(a == null ? void 0 : a.state) ? re(Be(a == null ? void 0 : a.state)) : {};
|
|
18
18
|
}
|
|
19
19
|
const u = Te({
|
|
20
20
|
params: ((x = a == null ? void 0 : a.state) == null ? void 0 : x.params) || {},
|
|
21
21
|
// @ts-ignore
|
|
22
|
-
request: a != null && a.request ? async (...
|
|
22
|
+
request: a != null && a.request ? async (...s) => {
|
|
23
23
|
var n;
|
|
24
|
-
return await ((n = a == null ? void 0 : a.request) == null ? void 0 : n.call(a, ...
|
|
24
|
+
return await ((n = a == null ? void 0 : a.request) == null ? void 0 : n.call(a, ...s));
|
|
25
25
|
} : void 0
|
|
26
26
|
});
|
|
27
27
|
a != null && a.state && (fl(a.state) ? _(() => a == null ? void 0 : a.state, () => {
|
|
28
28
|
Object.assign(u, l());
|
|
29
29
|
}, { deep: !0, immediate: !0 }) : Object.assign(u, l()));
|
|
30
30
|
const o = w(() => {
|
|
31
|
-
var
|
|
32
|
-
return (n = (
|
|
33
|
-
}),
|
|
34
|
-
var
|
|
35
|
-
return (n = (
|
|
31
|
+
var s, n;
|
|
32
|
+
return (n = (s = e == null ? void 0 : e.value) == null ? void 0 : s.actionRef) == null ? void 0 : n.call(s);
|
|
33
|
+
}), i = w(() => {
|
|
34
|
+
var s, n;
|
|
35
|
+
return (n = (s = e == null ? void 0 : e.value) == null ? void 0 : s.formRef) == null ? void 0 : n.call(s);
|
|
36
36
|
}), d = w(() => {
|
|
37
|
-
var
|
|
37
|
+
var s, n, r;
|
|
38
38
|
return {
|
|
39
|
-
...((
|
|
40
|
-
...((r = (n =
|
|
39
|
+
...((s = o.value) == null ? void 0 : s.pageState) || {},
|
|
40
|
+
...((r = (n = i.value) == null ? void 0 : n.getFormState) == null ? void 0 : r.call(n)) || {}
|
|
41
41
|
};
|
|
42
|
-
}),
|
|
42
|
+
}), m = j(!!((f = (S = o.value) == null ? void 0 : S.loading) != null && f.value));
|
|
43
43
|
return _(() => {
|
|
44
|
-
var
|
|
45
|
-
return (n = (
|
|
46
|
-
}, (
|
|
47
|
-
|
|
48
|
-
}), _(
|
|
44
|
+
var s, n;
|
|
45
|
+
return (n = (s = o.value) == null ? void 0 : s.loading) == null ? void 0 : n.value;
|
|
46
|
+
}, (s) => {
|
|
47
|
+
m.value = !!s;
|
|
48
|
+
}), _(m, (s) => {
|
|
49
49
|
var n, r;
|
|
50
|
-
(r = (n = o.value) == null ? void 0 : n.setLoading) == null || r.call(n, !!
|
|
50
|
+
(r = (n = o.value) == null ? void 0 : n.setLoading) == null || r.call(n, !!s);
|
|
51
51
|
}), {
|
|
52
|
-
formRef:
|
|
52
|
+
formRef: i,
|
|
53
53
|
actionRef: o,
|
|
54
54
|
tableState: u,
|
|
55
55
|
requestParams: d,
|
|
56
|
-
loading:
|
|
56
|
+
loading: m,
|
|
57
57
|
dataSource: w(() => {
|
|
58
|
-
var
|
|
59
|
-
return ((n = (
|
|
58
|
+
var s, n;
|
|
59
|
+
return ((n = (s = o == null ? void 0 : o.value) == null ? void 0 : s.dataSource) == null ? void 0 : n.value) || [];
|
|
60
60
|
}),
|
|
61
61
|
selectedKeys: w(() => {
|
|
62
|
-
var
|
|
63
|
-
return ((n = (
|
|
62
|
+
var s, n;
|
|
63
|
+
return ((n = (s = o == null ? void 0 : o.value) == null ? void 0 : s.selectedKeys) == null ? void 0 : n.value) || [];
|
|
64
64
|
}),
|
|
65
65
|
selectedItems: w(() => {
|
|
66
|
-
var
|
|
67
|
-
return ((n = (
|
|
66
|
+
var s, n;
|
|
67
|
+
return ((n = (s = o == null ? void 0 : o.value) == null ? void 0 : s.selectedItems) == null ? void 0 : n.value) || [];
|
|
68
68
|
}),
|
|
69
69
|
rowsSelection: (b = o == null ? void 0 : o.value) == null ? void 0 : b.rowsSelection,
|
|
70
|
-
mutate: (
|
|
70
|
+
mutate: (s) => {
|
|
71
71
|
var n, r;
|
|
72
|
-
return (r = (n = o.value) == null ? void 0 : n.reSetDataList) == null ? void 0 : r.call(n,
|
|
72
|
+
return (r = (n = o.value) == null ? void 0 : n.reSetDataList) == null ? void 0 : r.call(n, s);
|
|
73
73
|
},
|
|
74
|
-
reloadAndReset: (
|
|
74
|
+
reloadAndReset: (s) => {
|
|
75
75
|
var n, r;
|
|
76
|
-
return (r = (n = o.value) == null ? void 0 : n.reloadAndReset) == null ? void 0 : r.call(n,
|
|
76
|
+
return (r = (n = o.value) == null ? void 0 : n.reloadAndReset) == null ? void 0 : r.call(n, s);
|
|
77
77
|
},
|
|
78
|
-
setPageAndReload: (
|
|
78
|
+
setPageAndReload: (s, n, r, y) => {
|
|
79
79
|
var p, k;
|
|
80
|
-
return (k = (p = o.value) == null ? void 0 : p.setPageAndReload) == null ? void 0 : k.call(p,
|
|
80
|
+
return (k = (p = o.value) == null ? void 0 : p.setPageAndReload) == null ? void 0 : k.call(p, s, n, r, y);
|
|
81
81
|
},
|
|
82
|
-
setPagination: (
|
|
82
|
+
setPagination: (s) => {
|
|
83
83
|
var n, r;
|
|
84
|
-
return (r = (n = o.value) == null ? void 0 : n.setPagination) == null ? void 0 : r.call(n,
|
|
84
|
+
return (r = (n = o.value) == null ? void 0 : n.setPagination) == null ? void 0 : r.call(n, s);
|
|
85
85
|
},
|
|
86
|
-
setLoading: (
|
|
87
|
-
setDataValue: (
|
|
86
|
+
setLoading: (s) => m.value = s,
|
|
87
|
+
setDataValue: (s) => {
|
|
88
88
|
var n, r;
|
|
89
|
-
return (r = (n = o.value) == null ? void 0 : n.setDataValue) == null ? void 0 : r.call(n,
|
|
89
|
+
return (r = (n = o.value) == null ? void 0 : n.setDataValue) == null ? void 0 : r.call(n, s);
|
|
90
90
|
},
|
|
91
|
-
reload: (
|
|
91
|
+
reload: (s) => {
|
|
92
92
|
var n, r;
|
|
93
|
-
return (r = (n = o.value) == null ? void 0 : n.reload) == null ? void 0 : r.call(n,
|
|
93
|
+
return (r = (n = o.value) == null ? void 0 : n.reload) == null ? void 0 : r.call(n, s);
|
|
94
94
|
}
|
|
95
95
|
};
|
|
96
96
|
}
|
|
@@ -402,10 +402,10 @@ function Ae(e, a) {
|
|
|
402
402
|
const $t = (e, a, l = "string") => {
|
|
403
403
|
if (oe(e)) {
|
|
404
404
|
const [u, o] = e;
|
|
405
|
-
let
|
|
406
|
-
if (Array.isArray(a) ? (
|
|
407
|
-
const
|
|
408
|
-
return [
|
|
405
|
+
let i, d;
|
|
406
|
+
if (Array.isArray(a) ? (i = a[0], d = a[1]) : typeof a == "object" && a.type === "mask" ? (i = a.format, d = a.format) : (i = a, d = a), l === "string") {
|
|
407
|
+
const m = u ? Se(u, i) : "", x = o ? Se(o, d) : "";
|
|
408
|
+
return [m, x];
|
|
409
409
|
}
|
|
410
410
|
return [U(u), U(o)];
|
|
411
411
|
}
|
|
@@ -482,17 +482,17 @@ function ql(e, a) {
|
|
|
482
482
|
Object.keys(e).forEach((d) => {
|
|
483
483
|
o(d, e[d]);
|
|
484
484
|
});
|
|
485
|
-
const
|
|
486
|
-
|
|
487
|
-
e[
|
|
488
|
-
e[
|
|
485
|
+
const i = a.find((d) => d.valueType === "dateRange");
|
|
486
|
+
i && o(i.name || "", e[i.rangeStartName || "start"] ? [
|
|
487
|
+
e[i.rangeStartName || "start"],
|
|
488
|
+
e[i.rangeEndName || "end"]
|
|
489
489
|
] : []);
|
|
490
490
|
}
|
|
491
491
|
Le(() => {
|
|
492
492
|
u();
|
|
493
493
|
});
|
|
494
|
-
function o(
|
|
495
|
-
l[
|
|
494
|
+
function o(i, d) {
|
|
495
|
+
l[i] = d;
|
|
496
496
|
}
|
|
497
497
|
return {
|
|
498
498
|
formState: l,
|
|
@@ -533,7 +533,7 @@ function la(e) {
|
|
|
533
533
|
l.order === void 0 && (a += 1, l.order = a);
|
|
534
534
|
}), e.sort((l, u) => l.order - u.order), e;
|
|
535
535
|
}
|
|
536
|
-
const At = /* @__PURE__ */
|
|
536
|
+
const At = /* @__PURE__ */ me({
|
|
537
537
|
name: "ProTableForm",
|
|
538
538
|
props: {
|
|
539
539
|
modal: he.modalScroll,
|
|
@@ -554,17 +554,17 @@ const At = /* @__PURE__ */ ve({
|
|
|
554
554
|
const {
|
|
555
555
|
wrapSSR: u,
|
|
556
556
|
hashId: o
|
|
557
|
-
} = Ue("ProTableForm", [_l], e.prefixCls),
|
|
558
|
-
manualSearch:
|
|
557
|
+
} = Ue("ProTableForm", [_l], e.prefixCls), i = Nt(), d = Xl(), {
|
|
558
|
+
manualSearch: m,
|
|
559
559
|
searchConfig: x,
|
|
560
560
|
searchActions: S
|
|
561
561
|
} = ge(), {
|
|
562
|
-
formState:
|
|
562
|
+
formState: f,
|
|
563
563
|
resetFormState: b,
|
|
564
|
-
changeFormState:
|
|
564
|
+
changeFormState: s
|
|
565
565
|
} = ql(e.defaultParams || {}, e.searchMap || []), n = j(!1), r = w(() => {
|
|
566
566
|
var t, g;
|
|
567
|
-
return ne((t = S.value) == null ? void 0 : t.reset) ? (g = S.value) == null ? void 0 : g.reset :
|
|
567
|
+
return ne((t = S.value) == null ? void 0 : t.reset) ? (g = S.value) == null ? void 0 : g.reset : m.value;
|
|
568
568
|
}), y = w(() => {
|
|
569
569
|
var t;
|
|
570
570
|
return k((t = x.value) == null ? void 0 : t.span);
|
|
@@ -598,45 +598,45 @@ const At = /* @__PURE__ */ ve({
|
|
|
598
598
|
...R,
|
|
599
599
|
marginRight: "2%"
|
|
600
600
|
}, G = () => {
|
|
601
|
-
const t = re(
|
|
602
|
-
return g && (t[g.name] =
|
|
601
|
+
const t = re(f), g = e.searchMap.find((P) => P.valueType === "text") || "", R = e.searchMap.find((P) => P.valueType === "dateRange") || "", $ = e.searchMap.find((P) => P.valueType === "treeSelect");
|
|
602
|
+
return g && (t[g.name] = f[g.name] || g.initialValue || ""), R && (t[R.rangeStartName || "start"] = t[R.name] ? t[R.name][0] : "", t[R.rangeEndName || "end"] = t[R.name] ? t[R.name][1] : "", delete t[R.name]), $ && ($ != null && $.name && oe(f[$ == null ? void 0 : $.name]) && (t[$.name] = f[$.name].length ? f[$.name].map((P) => P[$.valueKey === "text" ? "label" : "value"]).join() : ""), $ != null && $.name && oe(t[$ == null ? void 0 : $.name]) && (t[$.name] = t[$.name].length ? t[$.name].map((P) => P[$.valueKey === "text" ? "label" : "value"]) : "")), t;
|
|
603
603
|
}, W = (t = !1, g) => {
|
|
604
604
|
Ot(() => {
|
|
605
605
|
var R;
|
|
606
|
-
(
|
|
606
|
+
(m.value || t) && ((R = e.onSearch) == null || R.call(e, G(), t ? g ? "reset" : "submit" : void 0));
|
|
607
607
|
});
|
|
608
608
|
}, Y = (t, g) => {
|
|
609
609
|
var R, $;
|
|
610
610
|
switch (g.valueType) {
|
|
611
611
|
case "text":
|
|
612
|
-
|
|
612
|
+
s(g.name || "", t || "");
|
|
613
613
|
break;
|
|
614
614
|
case "select":
|
|
615
|
-
|
|
615
|
+
s(g.name || "", t ?? void 0);
|
|
616
616
|
break;
|
|
617
617
|
case "treeSelect":
|
|
618
|
-
|
|
618
|
+
s(g.name || "", t ?? ((R = g.field) != null && R.treeCheckable || ($ = g.field) != null && $.multiple ? [] : null));
|
|
619
619
|
break;
|
|
620
620
|
case "date":
|
|
621
|
-
|
|
621
|
+
s(g.name || "", t ? Se(t, Ae(g.valueFormat, g.showTime)) : null);
|
|
622
622
|
break;
|
|
623
623
|
case "dateWeek":
|
|
624
|
-
|
|
624
|
+
s(g.name || "", t ? Se(t, "YYYY-wo") : null);
|
|
625
625
|
break;
|
|
626
626
|
case "dateMonth":
|
|
627
|
-
|
|
627
|
+
s(g.name || "", t ? Se(t, "YYYY-MM") : null);
|
|
628
628
|
break;
|
|
629
629
|
case "dateQuarter":
|
|
630
|
-
|
|
630
|
+
s(g.name || "", t ? Se(t, "YYYY-QQ") : null);
|
|
631
631
|
break;
|
|
632
632
|
case "dateYear":
|
|
633
|
-
|
|
633
|
+
s(g.name || "", t ? Se(t, "YYYY") : null);
|
|
634
634
|
break;
|
|
635
635
|
case "dateRange":
|
|
636
|
-
|
|
636
|
+
s(g.name || "", t && oe(t) && t.length === 2 ? $t(t, Ae(g.valueFormat, g.showTime)) : null);
|
|
637
637
|
break;
|
|
638
638
|
case "time":
|
|
639
|
-
|
|
639
|
+
s(g.name || "", t ? Se(t, g.valueFormat || "HH:mm:ss") : null);
|
|
640
640
|
break;
|
|
641
641
|
}
|
|
642
642
|
g.valueType === "treeSelect" || g.valueType, W();
|
|
@@ -649,14 +649,14 @@ const At = /* @__PURE__ */ ve({
|
|
|
649
649
|
});
|
|
650
650
|
const A = () => {
|
|
651
651
|
var g;
|
|
652
|
-
const t = (g =
|
|
652
|
+
const t = (g = i == null ? void 0 : i.emptyText) == null ? void 0 : g.value;
|
|
653
653
|
if (t) {
|
|
654
654
|
const R = le(t), $ = R ? Pt(t) : Rt(t || []);
|
|
655
655
|
return c("div", {
|
|
656
656
|
class: pe(`${e.prefixCls}-search-empty-text`, o.value)
|
|
657
657
|
}, [R ? $ : oe($) ? $.map((P) => st(P)) : void 0]);
|
|
658
658
|
}
|
|
659
|
-
}, K = () => (
|
|
659
|
+
}, K = () => (m.value || r.value) && c(we, null, {
|
|
660
660
|
default: () => [r.value && c(pt, {
|
|
661
661
|
onClick: () => ue()
|
|
662
662
|
}, {
|
|
@@ -664,7 +664,7 @@ const At = /* @__PURE__ */ ve({
|
|
|
664
664
|
var t;
|
|
665
665
|
return [((t = S.value) == null ? void 0 : t.resetText) || "重置"];
|
|
666
666
|
}
|
|
667
|
-
}),
|
|
667
|
+
}), m.value && c(pt, {
|
|
668
668
|
loading: e.loading,
|
|
669
669
|
type: "primary",
|
|
670
670
|
onClick: () => W(!0)
|
|
@@ -694,18 +694,18 @@ const At = /* @__PURE__ */ ve({
|
|
|
694
694
|
})]), Re = (t) => {
|
|
695
695
|
var $, P, q, I;
|
|
696
696
|
let g;
|
|
697
|
-
const R =
|
|
697
|
+
const R = m.value ? Tt : Tt.Search;
|
|
698
698
|
switch (t.valueType) {
|
|
699
699
|
case "text":
|
|
700
700
|
g = c(R, Q({
|
|
701
701
|
style: {
|
|
702
702
|
width: "100%"
|
|
703
703
|
},
|
|
704
|
-
value:
|
|
704
|
+
value: f[t.name],
|
|
705
705
|
placeholder: t.placeholder || "请输入",
|
|
706
706
|
allowClear: t.allowClear || t.allowClear === !1 ? t.allowClear : !0,
|
|
707
|
-
onChange: (
|
|
708
|
-
onSearch: (
|
|
707
|
+
onChange: (h) => Y(h.target.value, t),
|
|
708
|
+
onSearch: (h) => W()
|
|
709
709
|
}, t.field || {}), null);
|
|
710
710
|
break;
|
|
711
711
|
case "select":
|
|
@@ -713,20 +713,20 @@ const At = /* @__PURE__ */ ve({
|
|
|
713
713
|
style: {
|
|
714
714
|
width: "100%"
|
|
715
715
|
},
|
|
716
|
-
value: t.loading ? void 0 :
|
|
716
|
+
value: t.loading ? void 0 : f[t.name],
|
|
717
717
|
optionFilterProp: "label",
|
|
718
718
|
placeholder: t.placeholder || "请选择",
|
|
719
719
|
showSearch: t.showSearch,
|
|
720
720
|
allowClear: t.allowClear ?? !0,
|
|
721
|
-
getPopupContainer: (
|
|
721
|
+
getPopupContainer: (h) => h && h.parentNode ? h.parentNode : h,
|
|
722
722
|
notFoundContent: t.loading === void 0 ? void 0 : t.loading ? c(ut, {
|
|
723
723
|
size: "small",
|
|
724
|
-
indicator: ($ =
|
|
724
|
+
indicator: ($ = i == null ? void 0 : i.indicator) == null ? void 0 : $.value
|
|
725
725
|
}, null) : A(),
|
|
726
|
-
onChange: (
|
|
727
|
-
options: t.loading ? [] : (P = t == null ? void 0 : t.valueEnum) == null ? void 0 : P.map((
|
|
728
|
-
label:
|
|
729
|
-
value:
|
|
726
|
+
onChange: (h) => Y(h, t),
|
|
727
|
+
options: t.loading ? [] : (P = t == null ? void 0 : t.valueEnum) == null ? void 0 : P.map((h) => ({
|
|
728
|
+
label: h.text,
|
|
729
|
+
value: h.value
|
|
730
730
|
}))
|
|
731
731
|
}, t.field || {}), null);
|
|
732
732
|
break;
|
|
@@ -735,16 +735,16 @@ const At = /* @__PURE__ */ ve({
|
|
|
735
735
|
style: {
|
|
736
736
|
width: "100%"
|
|
737
737
|
},
|
|
738
|
-
value:
|
|
738
|
+
value: f[t.name],
|
|
739
739
|
placeholder: t.placeholder || "请选择",
|
|
740
740
|
allowClear: t.allowClear ?? !0,
|
|
741
741
|
treeData: t.loading ? [] : t.valueEnum,
|
|
742
|
-
getPopupContainer: (
|
|
742
|
+
getPopupContainer: (h) => h && h.parentNode ? h.parentNode : h,
|
|
743
743
|
notFoundContent: t.loading === void 0 ? void 0 : t.loading ? c(ut, {
|
|
744
744
|
size: "small",
|
|
745
|
-
indicator: (q =
|
|
745
|
+
indicator: (q = i == null ? void 0 : i.indicator) == null ? void 0 : q.value
|
|
746
746
|
}, null) : A(),
|
|
747
|
-
onChange: (
|
|
747
|
+
onChange: (h) => Y(h, t)
|
|
748
748
|
}, t.field || {}), null);
|
|
749
749
|
break;
|
|
750
750
|
case "date":
|
|
@@ -752,14 +752,14 @@ const At = /* @__PURE__ */ ve({
|
|
|
752
752
|
style: {
|
|
753
753
|
width: "100%"
|
|
754
754
|
},
|
|
755
|
-
value:
|
|
756
|
-
getPopupContainer: (
|
|
755
|
+
value: f[t.name] ? U(f[t.name]) : void 0,
|
|
756
|
+
getPopupContainer: (h) => h && h.parentNode ? h.parentNode : h,
|
|
757
757
|
placeholder: t.placeholder || "请选择",
|
|
758
758
|
allowClear: t.allowClear ?? !0,
|
|
759
759
|
format: Ae(t.valueFormat, t.showTime),
|
|
760
760
|
showTime: t.showTime,
|
|
761
761
|
showToday: t.showToday || !0,
|
|
762
|
-
onChange: (
|
|
762
|
+
onChange: (h) => Y(h, t)
|
|
763
763
|
}, t.field || {}), null);
|
|
764
764
|
break;
|
|
765
765
|
case "dateWeek":
|
|
@@ -767,11 +767,11 @@ const At = /* @__PURE__ */ ve({
|
|
|
767
767
|
style: {
|
|
768
768
|
width: "100%"
|
|
769
769
|
},
|
|
770
|
-
value:
|
|
771
|
-
getPopupContainer: (
|
|
770
|
+
value: f[t.name] ? U(f[t.name], t.valueFormat || "YYYY-wo") : void 0,
|
|
771
|
+
getPopupContainer: (h) => h && h.parentNode ? h.parentNode : h,
|
|
772
772
|
allowClear: t.allowClear ?? !0,
|
|
773
773
|
placeholder: t.placeholder || "请选择",
|
|
774
|
-
onChange: (
|
|
774
|
+
onChange: (h) => Y(h, t)
|
|
775
775
|
}, t.field || {}), null);
|
|
776
776
|
break;
|
|
777
777
|
case "dateMonth":
|
|
@@ -779,11 +779,11 @@ const At = /* @__PURE__ */ ve({
|
|
|
779
779
|
style: {
|
|
780
780
|
width: "100%"
|
|
781
781
|
},
|
|
782
|
-
value:
|
|
783
|
-
getPopupContainer: (
|
|
782
|
+
value: f[t.name] ? U(f[t.name], t.valueFormat || "YYYY-MM") : void 0,
|
|
783
|
+
getPopupContainer: (h) => h && h.parentNode ? h.parentNode : h,
|
|
784
784
|
allowClear: t.allowClear ?? !0,
|
|
785
785
|
placeholder: t.placeholder || "请选择",
|
|
786
|
-
onChange: (
|
|
786
|
+
onChange: (h) => Y(h, t)
|
|
787
787
|
}, t.field || {}), null);
|
|
788
788
|
break;
|
|
789
789
|
case "dateQuarter":
|
|
@@ -791,11 +791,11 @@ const At = /* @__PURE__ */ ve({
|
|
|
791
791
|
style: {
|
|
792
792
|
width: "100%"
|
|
793
793
|
},
|
|
794
|
-
value:
|
|
795
|
-
getPopupContainer: (
|
|
794
|
+
value: f[t.name] ? U(f[t.name], t.valueFormat || "YYYY-QQ") : void 0,
|
|
795
|
+
getPopupContainer: (h) => h && h.parentNode ? h.parentNode : h,
|
|
796
796
|
allowClear: t.allowClear ?? !0,
|
|
797
797
|
placeholder: t.placeholder || "请选择",
|
|
798
|
-
onChange: (
|
|
798
|
+
onChange: (h) => Y(h, t)
|
|
799
799
|
}, t.field || {}), null);
|
|
800
800
|
break;
|
|
801
801
|
case "dateYear":
|
|
@@ -803,11 +803,11 @@ const At = /* @__PURE__ */ ve({
|
|
|
803
803
|
style: {
|
|
804
804
|
width: "100%"
|
|
805
805
|
},
|
|
806
|
-
value:
|
|
807
|
-
getPopupContainer: (
|
|
806
|
+
value: f[t.name] ? U(f[t.name], t.valueFormat || "YYYY") : void 0,
|
|
807
|
+
getPopupContainer: (h) => h && h.parentNode ? h.parentNode : h,
|
|
808
808
|
allowClear: t.allowClear ?? !0,
|
|
809
809
|
placeholder: t.placeholder || "请选择",
|
|
810
|
-
onChange: (
|
|
810
|
+
onChange: (h) => Y(h, t)
|
|
811
811
|
}, t.field || {}), null);
|
|
812
812
|
break;
|
|
813
813
|
case "dateRange":
|
|
@@ -815,12 +815,12 @@ const At = /* @__PURE__ */ ve({
|
|
|
815
815
|
style: {
|
|
816
816
|
width: "100%"
|
|
817
817
|
},
|
|
818
|
-
value:
|
|
819
|
-
getPopupContainer: (
|
|
818
|
+
value: f[t.name] && oe(f[t.name]) && ((I = f[t.name]) == null ? void 0 : I.length) === 2 ? $t(f[t.name], Ae(t.valueFormat, t.showTime), "dayjs") : void 0,
|
|
819
|
+
getPopupContainer: (h) => h && h.parentNode ? h.parentNode : h,
|
|
820
820
|
placeholder: t.placeholder || ["开始日期", "结束日期"],
|
|
821
821
|
format: Ae(t.valueFormat, t.showTime),
|
|
822
822
|
showTime: t.showTime,
|
|
823
|
-
onChange: (
|
|
823
|
+
onChange: (h) => Y(h, t)
|
|
824
824
|
}, t.field || {}), null);
|
|
825
825
|
break;
|
|
826
826
|
case "time":
|
|
@@ -828,13 +828,13 @@ const At = /* @__PURE__ */ ve({
|
|
|
828
828
|
style: {
|
|
829
829
|
width: "100%"
|
|
830
830
|
},
|
|
831
|
-
value:
|
|
832
|
-
getPopupContainer: (
|
|
831
|
+
value: f[t.name] ? U(f[t.name], t.valueFormat || "HH:mm:ss") : void 0,
|
|
832
|
+
getPopupContainer: (h) => h && h.parentNode ? h.parentNode : h,
|
|
833
833
|
placeholder: t.placeholder || "请选择",
|
|
834
834
|
allowClear: t.allowClear || t.allowClear === !1 ? t.allowClear : !0,
|
|
835
835
|
use12Hours: t.use12Hours,
|
|
836
836
|
format: t.valueFormat || "HH:mm:ss",
|
|
837
|
-
onChange: (
|
|
837
|
+
onChange: (h) => Y(h, t)
|
|
838
838
|
}, t.field || {}), null);
|
|
839
839
|
break;
|
|
840
840
|
}
|
|
@@ -843,8 +843,8 @@ const At = /* @__PURE__ */ ve({
|
|
|
843
843
|
formItemStyle: t = {},
|
|
844
844
|
item: g
|
|
845
845
|
}) => {
|
|
846
|
-
var q, I,
|
|
847
|
-
const R = le(g) ? (q = g.props) == null ? void 0 : q.label : g.label, $ = (le(g) ? (I = g.props) == null ? void 0 : I.labelWidth : g.labelWidth) || ((
|
|
846
|
+
var q, I, h, L, V, X, de, J;
|
|
847
|
+
const R = le(g) ? (q = g.props) == null ? void 0 : q.label : g.label, $ = (le(g) ? (I = g.props) == null ? void 0 : I.labelWidth : g.labelWidth) || ((h = p.value) == null ? void 0 : h.width), P = (le(g) ? (L = g.props) == null ? void 0 : L.labelAlign : g.labelAlign) || ((V = p.value) == null ? void 0 : V.align);
|
|
848
848
|
return c("div", {
|
|
849
849
|
class: `${e.prefixCls}-search-item`,
|
|
850
850
|
style: {
|
|
@@ -873,9 +873,9 @@ const At = /* @__PURE__ */ ve({
|
|
|
873
873
|
width: `${(100 - (y.value - 1) * 2) / y.value}%`
|
|
874
874
|
};
|
|
875
875
|
return g.map((q, I) => {
|
|
876
|
-
const
|
|
876
|
+
const h = M(I, y.value, R);
|
|
877
877
|
return g.length < y.value || n.value ? c(qe, null, [ee({
|
|
878
|
-
formItemStyle:
|
|
878
|
+
formItemStyle: h,
|
|
879
879
|
item: q
|
|
880
880
|
}), I === g.length - 1 && ce({
|
|
881
881
|
formItemStyle: {
|
|
@@ -885,10 +885,10 @@ const At = /* @__PURE__ */ ve({
|
|
|
885
885
|
advanced: n.value,
|
|
886
886
|
showAdvanced: n.value
|
|
887
887
|
})]) : c(qe, null, [I < y.value - 1 && ee({
|
|
888
|
-
formItemStyle:
|
|
888
|
+
formItemStyle: h,
|
|
889
889
|
item: q
|
|
890
890
|
}), I === y.value - 1 && (y.value - 1 === 0 || g.length === y.value) && ee({
|
|
891
|
-
formItemStyle:
|
|
891
|
+
formItemStyle: h,
|
|
892
892
|
item: q
|
|
893
893
|
}), I === y.value - 1 && g.length >= y.value && ce({
|
|
894
894
|
formItemStyle: {
|
|
@@ -1007,33 +1007,33 @@ const Ye = (e) => {
|
|
|
1007
1007
|
slots: o
|
|
1008
1008
|
}) => {
|
|
1009
1009
|
const {
|
|
1010
|
-
cacheColumns:
|
|
1010
|
+
cacheColumns: i,
|
|
1011
1011
|
settingsAction: d
|
|
1012
1012
|
} = ge();
|
|
1013
|
-
return a ? c(
|
|
1013
|
+
return a ? c(ve, {
|
|
1014
1014
|
title: e
|
|
1015
1015
|
}, {
|
|
1016
1016
|
default: () => {
|
|
1017
|
-
var
|
|
1017
|
+
var m;
|
|
1018
1018
|
return [c("span", {
|
|
1019
1019
|
onClick: (x) => {
|
|
1020
1020
|
var n, r, y;
|
|
1021
1021
|
x.stopPropagation(), x.preventDefault();
|
|
1022
|
-
const S = ((r = (n = C(
|
|
1023
|
-
if (typeof
|
|
1024
|
-
const
|
|
1022
|
+
const S = ((r = (n = C(i)) == null ? void 0 : n.find((p) => p.uuid === l)) == null ? void 0 : r.key) || "", f = (d == null ? void 0 : d.columnsMap[S]) || {};
|
|
1023
|
+
if (typeof f.disable == "boolean" ? f.disable : (y = f.disable) == null ? void 0 : y.icon) return;
|
|
1024
|
+
const s = {
|
|
1025
1025
|
...d == null ? void 0 : d.columnsMap,
|
|
1026
1026
|
[S]: {
|
|
1027
|
-
...
|
|
1027
|
+
...f,
|
|
1028
1028
|
fixed: u
|
|
1029
1029
|
}
|
|
1030
1030
|
};
|
|
1031
|
-
d == null || d.setColumnsMap(
|
|
1031
|
+
d == null || d.setColumnsMap(s, "fixed");
|
|
1032
1032
|
}
|
|
1033
|
-
}, [(
|
|
1033
|
+
}, [(m = o.default) == null ? void 0 : m.call(o)])];
|
|
1034
1034
|
}
|
|
1035
1035
|
}) : null;
|
|
1036
|
-
}, na = /* @__PURE__ */
|
|
1036
|
+
}, na = /* @__PURE__ */ me({
|
|
1037
1037
|
props: {
|
|
1038
1038
|
treeKey: String,
|
|
1039
1039
|
hashId: String,
|
|
@@ -1046,8 +1046,8 @@ const Ye = (e) => {
|
|
|
1046
1046
|
const {
|
|
1047
1047
|
cacheColumns: a
|
|
1048
1048
|
} = ge(), l = w(() => {
|
|
1049
|
-
var o,
|
|
1050
|
-
return ((
|
|
1049
|
+
var o, i;
|
|
1050
|
+
return ((i = (o = C(a)) == null ? void 0 : o.find((d) => d.uuid === e.treeKey)) == null ? void 0 : i.key) || "";
|
|
1051
1051
|
}), u = w(() => l.value === "action" && e.autoScroll);
|
|
1052
1052
|
return () => {
|
|
1053
1053
|
const o = c("span", {
|
|
@@ -1082,7 +1082,7 @@ const Ye = (e) => {
|
|
|
1082
1082
|
}, [e.title]), o]);
|
|
1083
1083
|
};
|
|
1084
1084
|
}
|
|
1085
|
-
}), tt = /* @__PURE__ */
|
|
1085
|
+
}), tt = /* @__PURE__ */ me({
|
|
1086
1086
|
props: {
|
|
1087
1087
|
list: Array,
|
|
1088
1088
|
keys: Array,
|
|
@@ -1098,17 +1098,17 @@ const Ye = (e) => {
|
|
|
1098
1098
|
},
|
|
1099
1099
|
setup(e) {
|
|
1100
1100
|
const a = j(nt().uuid(15)), l = w(() => e.list && e.list.length > 0), u = j([]), o = j([]), {
|
|
1101
|
-
cacheColumns:
|
|
1101
|
+
cacheColumns: i,
|
|
1102
1102
|
slots: d,
|
|
1103
|
-
settingsAction:
|
|
1104
|
-
} = ge(), x = (
|
|
1103
|
+
settingsAction: m
|
|
1104
|
+
} = ge(), x = (s, n) => s.map(({
|
|
1105
1105
|
key: r,
|
|
1106
1106
|
children: y,
|
|
1107
1107
|
uuid: p,
|
|
1108
1108
|
...k
|
|
1109
1109
|
}) => {
|
|
1110
1110
|
var W;
|
|
1111
|
-
const F = (
|
|
1111
|
+
const F = (m == null ? void 0 : m.columnsMap[r || "null"]) || {
|
|
1112
1112
|
show: !0
|
|
1113
1113
|
};
|
|
1114
1114
|
let M = !1;
|
|
@@ -1125,14 +1125,14 @@ const Ye = (e) => {
|
|
|
1125
1125
|
return y && (G.children = x(y, F)), G;
|
|
1126
1126
|
});
|
|
1127
1127
|
Le(() => {
|
|
1128
|
-
const
|
|
1129
|
-
u.value =
|
|
1128
|
+
const s = x(e.list || []);
|
|
1129
|
+
u.value = s, o.value = s.filter((n) => n.checked).map((n) => n.key), (m == null ? void 0 : m.operationType.value) === "fixed" && (a.value = nt().uuid(15));
|
|
1130
1130
|
});
|
|
1131
|
-
const S = Ye((
|
|
1131
|
+
const S = Ye((s, n, r) => {
|
|
1132
1132
|
var ue, A;
|
|
1133
|
-
const y = ((ue = C(
|
|
1134
|
-
...
|
|
1135
|
-
}, F = [...
|
|
1133
|
+
const y = ((ue = C(i).find((K) => K.uuid === s)) == null ? void 0 : ue.key) || "", p = ((A = C(i).find((K) => K.uuid === n)) == null ? void 0 : A.key) || "", k = {
|
|
1134
|
+
...m == null ? void 0 : m.columnsMap
|
|
1135
|
+
}, F = [...m.sortKeyColumns.value], M = F.findIndex((K) => K === y), G = F.findIndex((K) => K === p), W = r > M;
|
|
1136
1136
|
if (M < 0)
|
|
1137
1137
|
return;
|
|
1138
1138
|
const Y = F[M];
|
|
@@ -1141,32 +1141,32 @@ const Ye = (e) => {
|
|
|
1141
1141
|
...k[K] || {},
|
|
1142
1142
|
order: ce
|
|
1143
1143
|
};
|
|
1144
|
-
}),
|
|
1145
|
-
}),
|
|
1144
|
+
}), m == null || m.setColumnsMap(k, "drop"), m == null || m.setSortKeyColumns(F);
|
|
1145
|
+
}), f = Ye((s) => {
|
|
1146
1146
|
var F;
|
|
1147
|
-
const n =
|
|
1148
|
-
...(
|
|
1147
|
+
const n = s.node.key, r = ((F = C(i).find((M) => M.uuid === n)) == null ? void 0 : F.key) || "", p = {
|
|
1148
|
+
...(m == null ? void 0 : m.columnsMap[r]) || {}
|
|
1149
1149
|
};
|
|
1150
|
-
p.show =
|
|
1150
|
+
p.show = s.checked;
|
|
1151
1151
|
const k = {
|
|
1152
|
-
...
|
|
1152
|
+
...m == null ? void 0 : m.columnsMap,
|
|
1153
1153
|
[r]: p
|
|
1154
1154
|
};
|
|
1155
|
-
|
|
1156
|
-
}), b = (
|
|
1157
|
-
const n = C(
|
|
1158
|
-
return
|
|
1155
|
+
m == null || m.setColumnsMap(k, "show");
|
|
1156
|
+
}), b = (s) => {
|
|
1157
|
+
const n = C(i).find((r) => r.uuid === s.key);
|
|
1158
|
+
return s.title || hl(d, "headerCell", {
|
|
1159
1159
|
title: n.title,
|
|
1160
1160
|
column: n
|
|
1161
1161
|
}, () => [n.title]);
|
|
1162
1162
|
};
|
|
1163
1163
|
return () => {
|
|
1164
|
-
var
|
|
1164
|
+
var s, n;
|
|
1165
1165
|
return l.value ? c(qe, null, [e.showTitle && c("span", {
|
|
1166
1166
|
class: [`${e.className}-list-title`, e.hashId]
|
|
1167
1167
|
}, [e.title]), c(Kl, {
|
|
1168
1168
|
key: a.value,
|
|
1169
|
-
draggable: e.draggable && !!((
|
|
1169
|
+
draggable: e.draggable && !!((s = u.value) != null && s.length) && ((n = u.value) == null ? void 0 : n.length) > 1,
|
|
1170
1170
|
checkable: e.checkable,
|
|
1171
1171
|
blockNode: !0,
|
|
1172
1172
|
showLine: !1,
|
|
@@ -1179,7 +1179,7 @@ const Ye = (e) => {
|
|
|
1179
1179
|
} = r, M = k === -1 || !F ? k + 1 : k;
|
|
1180
1180
|
S(p, y, M);
|
|
1181
1181
|
},
|
|
1182
|
-
onCheck: (r, y) =>
|
|
1182
|
+
onCheck: (r, y) => f(y),
|
|
1183
1183
|
treeData: u.value
|
|
1184
1184
|
}, {
|
|
1185
1185
|
title: (r) => {
|
|
@@ -1188,7 +1188,7 @@ const Ye = (e) => {
|
|
|
1188
1188
|
...r,
|
|
1189
1189
|
children: void 0,
|
|
1190
1190
|
title: b(r),
|
|
1191
|
-
autoScroll: (p =
|
|
1191
|
+
autoScroll: (p = m == null ? void 0 : m.autoScroll) == null ? void 0 : p.value
|
|
1192
1192
|
};
|
|
1193
1193
|
return c(na, Q({
|
|
1194
1194
|
hashId: e.hashId,
|
|
@@ -1200,7 +1200,7 @@ const Ye = (e) => {
|
|
|
1200
1200
|
})]) : null;
|
|
1201
1201
|
};
|
|
1202
1202
|
}
|
|
1203
|
-
}), ua = /* @__PURE__ */
|
|
1203
|
+
}), ua = /* @__PURE__ */ me({
|
|
1204
1204
|
props: {
|
|
1205
1205
|
hashId: String,
|
|
1206
1206
|
className: String,
|
|
@@ -1210,21 +1210,21 @@ const Ye = (e) => {
|
|
|
1210
1210
|
setup(e) {
|
|
1211
1211
|
const {
|
|
1212
1212
|
columns: a
|
|
1213
|
-
} = ge(), l = j([]), u = j([]), o = j([]),
|
|
1213
|
+
} = ge(), l = j([]), u = j([]), o = j([]), i = j([]);
|
|
1214
1214
|
_(() => a.value, (x) => {
|
|
1215
1215
|
l.value = [], u.value = [], o.value = [], x.forEach((S) => {
|
|
1216
1216
|
if (S.hideInSetting)
|
|
1217
1217
|
return;
|
|
1218
1218
|
const {
|
|
1219
|
-
fixed:
|
|
1219
|
+
fixed: f,
|
|
1220
1220
|
show: b,
|
|
1221
|
-
uuid:
|
|
1221
|
+
uuid: s
|
|
1222
1222
|
} = S;
|
|
1223
|
-
if ((b || b === void 0) &&
|
|
1223
|
+
if ((b || b === void 0) && s && i.value.push(s), f === "left") {
|
|
1224
1224
|
u.value.push(S);
|
|
1225
1225
|
return;
|
|
1226
1226
|
}
|
|
1227
|
-
if (
|
|
1227
|
+
if (f === "right") {
|
|
1228
1228
|
l.value.push(S);
|
|
1229
1229
|
return;
|
|
1230
1230
|
}
|
|
@@ -1233,41 +1233,41 @@ const Ye = (e) => {
|
|
|
1233
1233
|
}, {
|
|
1234
1234
|
immediate: !0
|
|
1235
1235
|
});
|
|
1236
|
-
const d = w(() => l.value && l.value.length > 0),
|
|
1236
|
+
const d = w(() => l.value && l.value.length > 0), m = w(() => u.value && u.value.length > 0);
|
|
1237
1237
|
return () => c("div", {
|
|
1238
1238
|
class: {
|
|
1239
1239
|
[`${e.hashId}`]: !0,
|
|
1240
1240
|
[`${e.className}-list`]: !0,
|
|
1241
|
-
[`${e.className}-list-group`]: d.value ||
|
|
1241
|
+
[`${e.className}-list-group`]: d.value || m.value
|
|
1242
1242
|
}
|
|
1243
1243
|
}, [c(tt, {
|
|
1244
1244
|
title: "固定在左侧",
|
|
1245
1245
|
list: u.value,
|
|
1246
|
-
keys:
|
|
1246
|
+
keys: i.value,
|
|
1247
1247
|
hashId: e.hashId,
|
|
1248
1248
|
draggable: e.draggable,
|
|
1249
1249
|
checkable: e.checkable,
|
|
1250
1250
|
className: e.className
|
|
1251
1251
|
}, null), c(tt, {
|
|
1252
1252
|
list: o.value,
|
|
1253
|
-
keys:
|
|
1253
|
+
keys: i.value,
|
|
1254
1254
|
hashId: e.hashId,
|
|
1255
1255
|
draggable: e.draggable,
|
|
1256
1256
|
checkable: e.checkable,
|
|
1257
1257
|
title: "不固定",
|
|
1258
|
-
showTitle:
|
|
1258
|
+
showTitle: m.value || d.value,
|
|
1259
1259
|
className: e.className
|
|
1260
1260
|
}, null), c(tt, {
|
|
1261
1261
|
title: "固定在右侧",
|
|
1262
1262
|
list: l.value,
|
|
1263
|
-
keys:
|
|
1263
|
+
keys: i.value,
|
|
1264
1264
|
hashId: e.hashId,
|
|
1265
1265
|
draggable: e.draggable,
|
|
1266
1266
|
checkable: e.checkable,
|
|
1267
1267
|
className: e.className
|
|
1268
1268
|
}, null)]);
|
|
1269
1269
|
}
|
|
1270
|
-
}), ia = /* @__PURE__ */
|
|
1270
|
+
}), ia = /* @__PURE__ */ me({
|
|
1271
1271
|
props: {
|
|
1272
1272
|
draggable: {
|
|
1273
1273
|
type: Boolean,
|
|
@@ -1289,9 +1289,9 @@ const Ye = (e) => {
|
|
|
1289
1289
|
hashId: u
|
|
1290
1290
|
} = Ue("ColumnSetting", [aa], a), {
|
|
1291
1291
|
columns: o,
|
|
1292
|
-
settingsAction:
|
|
1292
|
+
settingsAction: i
|
|
1293
1293
|
} = ge(), d = Ye((b = !0) => {
|
|
1294
|
-
const
|
|
1294
|
+
const s = {}, n = (r) => {
|
|
1295
1295
|
r.forEach(({
|
|
1296
1296
|
key: y,
|
|
1297
1297
|
fixed: p,
|
|
@@ -1299,29 +1299,29 @@ const Ye = (e) => {
|
|
|
1299
1299
|
children: F
|
|
1300
1300
|
}) => {
|
|
1301
1301
|
const M = Ft(y, k);
|
|
1302
|
-
M && (
|
|
1302
|
+
M && (s[M] = {
|
|
1303
1303
|
show: b,
|
|
1304
1304
|
fixed: p
|
|
1305
1305
|
}), F && n(F);
|
|
1306
1306
|
});
|
|
1307
1307
|
};
|
|
1308
|
-
n(o.value),
|
|
1309
|
-
}),
|
|
1308
|
+
n(o.value), i == null || i.setColumnsMap(s, "show");
|
|
1309
|
+
}), m = Ye((b) => {
|
|
1310
1310
|
b.target.checked ? d() : d(!1);
|
|
1311
1311
|
}), x = Ye(() => {
|
|
1312
|
-
|
|
1312
|
+
i == null || i.setColumnsMap(i == null ? void 0 : i.cacheColumnsMap, "fixed");
|
|
1313
1313
|
}), S = w(() => (
|
|
1314
1314
|
// @ts-ignore
|
|
1315
|
-
Object.values(
|
|
1316
|
-
)),
|
|
1315
|
+
Object.values(i == null ? void 0 : i.columnsMap).filter((b) => !b || b.show === !1)
|
|
1316
|
+
)), f = w(() => C(S).length > 0 && C(S).length !== o.value.length);
|
|
1317
1317
|
return () => l(c(Ml, {
|
|
1318
1318
|
arrowPointAtCenter: !0,
|
|
1319
1319
|
title: c("div", {
|
|
1320
1320
|
class: [`${a}-title`, u.value]
|
|
1321
1321
|
}, [c(Al, {
|
|
1322
|
-
indeterminate:
|
|
1322
|
+
indeterminate: f.value,
|
|
1323
1323
|
checked: C(S).length === 0 && C(S).length !== o.value.length,
|
|
1324
|
-
onChange: (b) =>
|
|
1324
|
+
onChange: (b) => m(b)
|
|
1325
1325
|
}, {
|
|
1326
1326
|
default: () => [ze("列展示")]
|
|
1327
1327
|
}), e.checkedReset ? c("a", {
|
|
@@ -1343,7 +1343,7 @@ const Ye = (e) => {
|
|
|
1343
1343
|
className: a
|
|
1344
1344
|
}, null)
|
|
1345
1345
|
}, {
|
|
1346
|
-
default: () => [c(
|
|
1346
|
+
default: () => [c(ve, {
|
|
1347
1347
|
title: "列设置"
|
|
1348
1348
|
}, {
|
|
1349
1349
|
default: () => [c(jt, null, null)]
|
|
@@ -1406,22 +1406,22 @@ function ra(e) {
|
|
|
1406
1406
|
icon: l,
|
|
1407
1407
|
tooltip: u,
|
|
1408
1408
|
onClick: o,
|
|
1409
|
-
key:
|
|
1409
|
+
key: i
|
|
1410
1410
|
} = a;
|
|
1411
|
-
return l && u ? c(
|
|
1411
|
+
return l && u ? c(ve, {
|
|
1412
1412
|
title: u
|
|
1413
1413
|
}, {
|
|
1414
1414
|
default: () => [c("span", {
|
|
1415
|
-
key:
|
|
1415
|
+
key: i,
|
|
1416
1416
|
onClick: () => {
|
|
1417
|
-
o && o(
|
|
1417
|
+
o && o(i);
|
|
1418
1418
|
}
|
|
1419
1419
|
}, [l])]
|
|
1420
1420
|
}) : l;
|
|
1421
1421
|
}
|
|
1422
1422
|
return null;
|
|
1423
1423
|
}
|
|
1424
|
-
const Kt = /* @__PURE__ */
|
|
1424
|
+
const Kt = /* @__PURE__ */ me({
|
|
1425
1425
|
props: {
|
|
1426
1426
|
actions: he.toolBarBtn,
|
|
1427
1427
|
settings: [Array],
|
|
@@ -1437,33 +1437,33 @@ const Kt = /* @__PURE__ */ ve({
|
|
|
1437
1437
|
hashId: l
|
|
1438
1438
|
} = Ue("ListToolBar", [sa], e.prefixCls), u = oa(), {
|
|
1439
1439
|
isMobile: o
|
|
1440
|
-
} = ge(),
|
|
1441
|
-
var
|
|
1442
|
-
return !!(e.titleTip || e.headerTitle || (
|
|
1440
|
+
} = ge(), i = w(() => {
|
|
1441
|
+
var s;
|
|
1442
|
+
return !!(e.titleTip || e.headerTitle || (s = e.actions) != null && s.length);
|
|
1443
1443
|
}), d = w(() => {
|
|
1444
|
-
var
|
|
1445
|
-
return !!((
|
|
1446
|
-
}),
|
|
1444
|
+
var s;
|
|
1445
|
+
return !!((s = e.settings) != null && s.length || e.optionsExtra);
|
|
1446
|
+
}), m = w(() => !!(e.titleTip || e.headerTitle)), x = w(() => {
|
|
1447
1447
|
var n;
|
|
1448
|
-
let
|
|
1448
|
+
let s;
|
|
1449
1449
|
return Array.isArray(e.actions) ? ((n = e.actions) == null ? void 0 : n.length) < 1 ? null : c(we, {
|
|
1450
1450
|
align: "center"
|
|
1451
|
-
}, Bt(
|
|
1451
|
+
}, Bt(s = e.actions.map((r, y) => le(r) ? st(r, {
|
|
1452
1452
|
key: y,
|
|
1453
1453
|
...r == null ? void 0 : r.props
|
|
1454
1454
|
}) : c("template", {
|
|
1455
1455
|
key: y
|
|
1456
|
-
}, [r]))) ?
|
|
1457
|
-
default: () => [
|
|
1456
|
+
}, [r]))) ? s : {
|
|
1457
|
+
default: () => [s]
|
|
1458
1458
|
}) : e.actions;
|
|
1459
|
-
}), S = Qe(() => !
|
|
1459
|
+
}), S = Qe(() => !i.value && d.value ? c("div", {
|
|
1460
1460
|
class: `${e.prefixCls}-left ${l.value}`
|
|
1461
|
-
}, null) :
|
|
1461
|
+
}, null) : m.value ? c(we, {
|
|
1462
1462
|
class: `${e.prefixCls}-left ${l.value}`
|
|
1463
1463
|
}, {
|
|
1464
1464
|
default: () => [c("div", {
|
|
1465
1465
|
class: `${e.prefixCls}-title ${l.value}`
|
|
1466
|
-
}, [e.headerTitle, e.titleTip && c(
|
|
1466
|
+
}, [e.headerTitle, e.titleTip && c(ve, {
|
|
1467
1467
|
title: e.titleTipText
|
|
1468
1468
|
}, {
|
|
1469
1469
|
default: () => [ne(e.titleTip) && e.titleTip ? c(Bl, null, null) : e.titleTip]
|
|
@@ -1476,8 +1476,8 @@ const Kt = /* @__PURE__ */ ve({
|
|
|
1476
1476
|
default: () => [x.value && c("div", {
|
|
1477
1477
|
class: `${e.prefixCls}-actions`
|
|
1478
1478
|
}, [x.value])]
|
|
1479
|
-
}), [() =>
|
|
1480
|
-
let
|
|
1479
|
+
}), [() => i.value, () => d.value, () => m.value, () => e.prefixCls, () => e.headerTitle, () => e.titleTipText, () => e.titleTip]), f = Qe(() => {
|
|
1480
|
+
let s;
|
|
1481
1481
|
return d.value ? c(we, {
|
|
1482
1482
|
size: 16,
|
|
1483
1483
|
class: `${e.prefixCls}-right ${l.value}`,
|
|
@@ -1490,28 +1490,28 @@ const Kt = /* @__PURE__ */ ve({
|
|
|
1490
1490
|
size: 12,
|
|
1491
1491
|
align: "center",
|
|
1492
1492
|
class: `${e.prefixCls}-setting-items`
|
|
1493
|
-
}, Bt(
|
|
1493
|
+
}, Bt(s = e.settings.map((r, y) => {
|
|
1494
1494
|
const p = ra(r);
|
|
1495
1495
|
return c("div", {
|
|
1496
1496
|
key: y,
|
|
1497
1497
|
class: `${e.prefixCls}-setting-item`
|
|
1498
1498
|
}, [p]);
|
|
1499
|
-
})) ?
|
|
1500
|
-
default: () => [
|
|
1499
|
+
})) ? s : {
|
|
1500
|
+
default: () => [s]
|
|
1501
1501
|
}) : null];
|
|
1502
1502
|
}
|
|
1503
1503
|
}) : null;
|
|
1504
|
-
}, [() => u.value, () => d.value, () => e.prefixCls, () =>
|
|
1505
|
-
if (!d.value && !
|
|
1506
|
-
const
|
|
1504
|
+
}, [() => u.value, () => d.value, () => e.prefixCls, () => m.value, () => x.value, () => e.settings]), b = Qe(() => {
|
|
1505
|
+
if (!d.value && !i.value) return null;
|
|
1506
|
+
const s = {
|
|
1507
1507
|
[`${l.value}`]: !0,
|
|
1508
1508
|
[`${e.prefixCls}-container`]: !0,
|
|
1509
1509
|
[`${e.prefixCls}-container-mobile`]: o.value
|
|
1510
1510
|
};
|
|
1511
1511
|
return c("div", {
|
|
1512
|
-
class:
|
|
1513
|
-
}, [S.value,
|
|
1514
|
-
}, [() => o.value, () =>
|
|
1512
|
+
class: s
|
|
1513
|
+
}, [S.value, f.value]);
|
|
1514
|
+
}, [() => o.value, () => i.value, () => d.value, () => S.value, () => e.prefixCls, () => f.value]);
|
|
1515
1515
|
return () => a(c("div", {
|
|
1516
1516
|
class: `${e.prefixCls} ${l.value}`
|
|
1517
1517
|
}, [b.value]));
|
|
@@ -1552,22 +1552,22 @@ const ca = () => {
|
|
|
1552
1552
|
}),
|
|
1553
1553
|
trigger: ["click"]
|
|
1554
1554
|
}, {
|
|
1555
|
-
default: () => [c(
|
|
1555
|
+
default: () => [c(ve, {
|
|
1556
1556
|
title: "表格密度"
|
|
1557
1557
|
}, {
|
|
1558
1558
|
default: () => [c(Rl, null, null)]
|
|
1559
1559
|
})]
|
|
1560
1560
|
});
|
|
1561
|
-
}, zt = /* @__PURE__ */
|
|
1561
|
+
}, zt = /* @__PURE__ */ me({
|
|
1562
1562
|
setup() {
|
|
1563
1563
|
const {
|
|
1564
1564
|
isFullscreen: e
|
|
1565
1565
|
} = Et();
|
|
1566
|
-
return () => e.value ? c(
|
|
1566
|
+
return () => e.value ? c(ve, {
|
|
1567
1567
|
title: "退出全屏"
|
|
1568
1568
|
}, {
|
|
1569
1569
|
default: () => [c(Fl, null, null)]
|
|
1570
|
-
}) : c(
|
|
1570
|
+
}) : c(ve, {
|
|
1571
1571
|
title: "全屏"
|
|
1572
1572
|
}, {
|
|
1573
1573
|
default: () => [c(Il, null, null)]
|
|
@@ -1610,14 +1610,14 @@ function fa(e, a) {
|
|
|
1610
1610
|
key: l,
|
|
1611
1611
|
onClick: o
|
|
1612
1612
|
}, [c(zt, null, null)]);
|
|
1613
|
-
const
|
|
1614
|
-
return
|
|
1613
|
+
const i = da()[l];
|
|
1614
|
+
return i ? c("span", {
|
|
1615
1615
|
key: l,
|
|
1616
1616
|
onClick: o
|
|
1617
|
-
}, [c(
|
|
1618
|
-
title:
|
|
1617
|
+
}, [c(ve, {
|
|
1618
|
+
title: i.text
|
|
1619
1619
|
}, {
|
|
1620
|
-
default: () => [
|
|
1620
|
+
default: () => [i.icon]
|
|
1621
1621
|
})]) : null;
|
|
1622
1622
|
}).filter((l) => l);
|
|
1623
1623
|
}
|
|
@@ -1629,7 +1629,7 @@ const ha = {
|
|
|
1629
1629
|
titleTipText: [String],
|
|
1630
1630
|
toolBarBtn: [Function, Boolean, Object, Array],
|
|
1631
1631
|
headerTitle: [Function, Boolean, Object, Array, String]
|
|
1632
|
-
},
|
|
1632
|
+
}, va = /* @__PURE__ */ me({
|
|
1633
1633
|
props: ha,
|
|
1634
1634
|
inheritAttrs: !1,
|
|
1635
1635
|
setup(e) {
|
|
@@ -1647,11 +1647,11 @@ const ha = {
|
|
|
1647
1647
|
fullScreen: () => l == null ? void 0 : l.toggle()
|
|
1648
1648
|
};
|
|
1649
1649
|
if (e.options === !1 || ((d = Object.keys(e.options)) == null ? void 0 : d.length) === 0) return [];
|
|
1650
|
-
const
|
|
1650
|
+
const i = {
|
|
1651
1651
|
...o,
|
|
1652
1652
|
...e.options
|
|
1653
1653
|
};
|
|
1654
|
-
return
|
|
1654
|
+
return i.setting !== !1 && e.settingExtra && (i.setting = {}, i.setting.extra = e.settingExtra), fa(i, {
|
|
1655
1655
|
...o
|
|
1656
1656
|
});
|
|
1657
1657
|
}, [() => l, () => e.options]);
|
|
@@ -1669,42 +1669,42 @@ const ha = {
|
|
|
1669
1669
|
};
|
|
1670
1670
|
}
|
|
1671
1671
|
});
|
|
1672
|
-
function
|
|
1673
|
-
return
|
|
1672
|
+
function ma(e) {
|
|
1673
|
+
return ml();
|
|
1674
1674
|
}
|
|
1675
1675
|
function ga(e, a = !0, l) {
|
|
1676
|
-
|
|
1676
|
+
ma() ? vl(e, l) : a ? e() : Ot(e);
|
|
1677
1677
|
}
|
|
1678
1678
|
function ya({ columns: e, columnsState: a, changeColumns: l }) {
|
|
1679
|
-
const u = j(void 0), o = Te({}),
|
|
1679
|
+
const u = j(void 0), o = Te({}), i = Te({}), d = Te({}), m = j([]);
|
|
1680
1680
|
_(() => e.value, () => {
|
|
1681
1681
|
var b;
|
|
1682
|
-
(b = C(e)) == null || b.forEach(({ show:
|
|
1682
|
+
(b = C(e)) == null || b.forEach(({ show: s, key: n, fixed: r }, y) => {
|
|
1683
1683
|
const p = Ft(n, y);
|
|
1684
|
-
p && (d[p] = { show:
|
|
1684
|
+
p && (d[p] = { show: s === void 0 ? !0 : s, fixed: r });
|
|
1685
1685
|
});
|
|
1686
|
-
const
|
|
1687
|
-
S(
|
|
1686
|
+
const f = C(e).map((s) => s.key);
|
|
1687
|
+
S(f);
|
|
1688
1688
|
}, { deep: !0, immediate: !0 }), Le(() => {
|
|
1689
1689
|
var b;
|
|
1690
|
-
const
|
|
1690
|
+
const f = {
|
|
1691
1691
|
...(b = C(a)) == null ? void 0 : b.value,
|
|
1692
1692
|
...C(d)
|
|
1693
1693
|
};
|
|
1694
|
-
Object.assign(o,
|
|
1694
|
+
Object.assign(o, f), Object.assign(i, f);
|
|
1695
1695
|
});
|
|
1696
|
-
function x(
|
|
1697
|
-
u.value = b, Object.assign(o,
|
|
1696
|
+
function x(f, b) {
|
|
1697
|
+
u.value = b, Object.assign(o, f), l == null || l(o, b === "fixed");
|
|
1698
1698
|
}
|
|
1699
|
-
function S(
|
|
1700
|
-
|
|
1699
|
+
function S(f) {
|
|
1700
|
+
m.value = f;
|
|
1701
1701
|
}
|
|
1702
1702
|
return {
|
|
1703
1703
|
columnsMap: o,
|
|
1704
1704
|
operationType: u,
|
|
1705
1705
|
setColumnsMap: x,
|
|
1706
|
-
sortKeyColumns:
|
|
1707
|
-
cacheColumnsMap:
|
|
1706
|
+
sortKeyColumns: m,
|
|
1707
|
+
cacheColumnsMap: i,
|
|
1708
1708
|
setSortKeyColumns: S
|
|
1709
1709
|
};
|
|
1710
1710
|
}
|
|
@@ -1716,8 +1716,8 @@ function ba(e) {
|
|
|
1716
1716
|
autoScroll: u
|
|
1717
1717
|
};
|
|
1718
1718
|
}
|
|
1719
|
-
function Ca({ scroll: e, columns: a, breakpoint: l, draggabled: u, autoScroll: o, neverScroll:
|
|
1720
|
-
const d = j([]),
|
|
1719
|
+
function Ca({ scroll: e, columns: a, breakpoint: l, draggabled: u, autoScroll: o, neverScroll: i }) {
|
|
1720
|
+
const d = j([]), m = j([]);
|
|
1721
1721
|
_([
|
|
1722
1722
|
() => e.value,
|
|
1723
1723
|
() => a.value,
|
|
@@ -1725,10 +1725,10 @@ function Ca({ scroll: e, columns: a, breakpoint: l, draggabled: u, autoScroll: o
|
|
|
1725
1725
|
() => u.value,
|
|
1726
1726
|
() => l.value,
|
|
1727
1727
|
() => o.value,
|
|
1728
|
-
() =>
|
|
1728
|
+
() => i.value
|
|
1729
1729
|
], () => {
|
|
1730
|
-
const r =
|
|
1731
|
-
Ge(r, Be(d.value)) || (d.value = re(r)), Ge(r, Be(
|
|
1730
|
+
const r = f(Be(a.value));
|
|
1731
|
+
Ge(r, Be(d.value)) || (d.value = re(r)), Ge(r, Be(m.value)) || (m.value = re(r));
|
|
1732
1732
|
}, {
|
|
1733
1733
|
deep: !0,
|
|
1734
1734
|
immediate: !0
|
|
@@ -1744,10 +1744,10 @@ function Ca({ scroll: e, columns: a, breakpoint: l, draggabled: u, autoScroll: o
|
|
|
1744
1744
|
function S(r) {
|
|
1745
1745
|
return r.sort((y, p) => al(y, p, "order", 0));
|
|
1746
1746
|
}
|
|
1747
|
-
function
|
|
1747
|
+
function f(r) {
|
|
1748
1748
|
return re(r).map((y, p) => {
|
|
1749
1749
|
var k;
|
|
1750
|
-
if (y.dataIndex === "action" || p === r.length - 1 ? y.resizable = !1 : y.resizable = ne(y.resizable) ? y.resizable : !!(_e(y.width) && C(u)), !y.width || C(
|
|
1750
|
+
if (y.dataIndex === "action" || p === r.length - 1 ? y.resizable = !1 : y.resizable = ne(y.resizable) ? y.resizable : !!(_e(y.width) && C(u)), !y.width || C(i))
|
|
1751
1751
|
return y;
|
|
1752
1752
|
if (y.dataIndex === "action" && C(o))
|
|
1753
1753
|
if ((k = C(e)) != null && k.x || !C(l))
|
|
@@ -1762,15 +1762,15 @@ function Ca({ scroll: e, columns: a, breakpoint: l, draggabled: u, autoScroll: o
|
|
|
1762
1762
|
function b(r, y) {
|
|
1763
1763
|
d.value = d.value.map((p) => (p.uuid === y.uuid && (p.width = r), p));
|
|
1764
1764
|
}
|
|
1765
|
-
function
|
|
1765
|
+
function s(r) {
|
|
1766
1766
|
if (r.length <= 0) {
|
|
1767
1767
|
d.value = [];
|
|
1768
1768
|
return;
|
|
1769
1769
|
}
|
|
1770
|
-
Ge(
|
|
1770
|
+
Ge(f(r), Be(d.value)) || (d.value = f(r));
|
|
1771
1771
|
}
|
|
1772
1772
|
function n(r) {
|
|
1773
|
-
|
|
1773
|
+
s(re(Be(a.value)).map((y) => {
|
|
1774
1774
|
var k, F, M;
|
|
1775
1775
|
const p = y.key ? {
|
|
1776
1776
|
show: (k = r[y.key]) == null ? void 0 : k.show,
|
|
@@ -1783,27 +1783,27 @@ function Ca({ scroll: e, columns: a, breakpoint: l, draggabled: u, autoScroll: o
|
|
|
1783
1783
|
return {
|
|
1784
1784
|
breakpoint: l,
|
|
1785
1785
|
proColumns: x,
|
|
1786
|
-
cacheProColumns:
|
|
1787
|
-
setColumns:
|
|
1786
|
+
cacheProColumns: m,
|
|
1787
|
+
setColumns: s,
|
|
1788
1788
|
changeColumns: n,
|
|
1789
1789
|
resizeColumnWidth: b
|
|
1790
1790
|
};
|
|
1791
1791
|
}
|
|
1792
1792
|
function xa(e, a) {
|
|
1793
1793
|
const l = w(() => a || 0), u = j(), o = j(e);
|
|
1794
|
-
function
|
|
1794
|
+
function i() {
|
|
1795
1795
|
u.value && clearTimeout(u.value);
|
|
1796
1796
|
}
|
|
1797
|
-
async function d(...
|
|
1798
|
-
return l.value === 0 || l.value === void 0 ? o.value(...
|
|
1797
|
+
async function d(...m) {
|
|
1798
|
+
return l.value === 0 || l.value === void 0 ? o.value(...m) : (i(), new Promise(async (x) => {
|
|
1799
1799
|
var S;
|
|
1800
|
-
(S =
|
|
1801
|
-
x(await o.value(...
|
|
1800
|
+
(S = m[0]) != null && S.immediate ? x(await o.value(...m)) : u.value = setTimeout(async () => {
|
|
1801
|
+
x(await o.value(...m));
|
|
1802
1802
|
}, l.value);
|
|
1803
1803
|
}));
|
|
1804
1804
|
}
|
|
1805
|
-
return Hl(
|
|
1806
|
-
cancel:
|
|
1805
|
+
return Hl(i), {
|
|
1806
|
+
cancel: i,
|
|
1807
1807
|
run: d
|
|
1808
1808
|
};
|
|
1809
1809
|
}
|
|
@@ -1818,27 +1818,27 @@ function Sa(e) {
|
|
|
1818
1818
|
dataSource: o
|
|
1819
1819
|
};
|
|
1820
1820
|
}
|
|
1821
|
-
function wa({ rowKey: e, polling: a, request: l, postData: u, dataSource: o, waitRequest:
|
|
1821
|
+
function wa({ rowKey: e, polling: a, request: l, postData: u, dataSource: o, waitRequest: i, debounceTime: d }, { search: m, columns: x, loading: S, setLoading: f, setColumns: b, removeRowKeys: s, syncSelectedRows: n, formParamsRef: r, setPagination: y, paginationInfo: p, onBeforeSearchSubmit: k, hasCustomRender: F }, M) {
|
|
1822
1822
|
const G = j(), W = j(!0), Y = j(!1), ue = j(!1), A = j([]), K = j(), ce = w(() => {
|
|
1823
1823
|
var I;
|
|
1824
|
-
return Z(
|
|
1824
|
+
return Z(m.value) ? ((I = m.value) == null ? void 0 : I.type) === "button" : !!m.value;
|
|
1825
1825
|
}), Re = async (I = {}) => {
|
|
1826
1826
|
var J;
|
|
1827
|
-
const { pagination:
|
|
1828
|
-
if (!l || !Ke(l) || C(
|
|
1827
|
+
const { pagination: h, filters: L = {}, sorter: V = {}, removeKeys: X = [], isPolling: de = !1 } = I;
|
|
1828
|
+
if (!l || !Ke(l) || C(i) && S.value || Y.value)
|
|
1829
1829
|
return o.value || [];
|
|
1830
|
-
if (Y.value = !0, !de || C(
|
|
1830
|
+
if (Y.value = !0, !de || C(i) || W.value ? f(!0) : R(!0), C(i)) {
|
|
1831
1831
|
W.value = !1, Y.value = !1;
|
|
1832
1832
|
return;
|
|
1833
1833
|
}
|
|
1834
|
-
|
|
1834
|
+
h && y(h);
|
|
1835
1835
|
try {
|
|
1836
1836
|
let ye = {};
|
|
1837
|
-
if (ne(
|
|
1837
|
+
if (ne(h) && !h || ne(p))
|
|
1838
1838
|
ye = {};
|
|
1839
1839
|
else {
|
|
1840
1840
|
const { current: z = 1, pageSize: Ce = 10, total: te } = C(p) || {};
|
|
1841
|
-
ye.pageNum = il({ current: z, pageSize: Ce, total: te }, X.length), X.length &&
|
|
1841
|
+
ye.pageNum = il({ current: z, pageSize: Ce, total: te }, X.length), X.length && s(X), ye.pageSize = Ce;
|
|
1842
1842
|
}
|
|
1843
1843
|
const We = Z(V) ? [V] : V;
|
|
1844
1844
|
We.forEach((z) => {
|
|
@@ -1864,15 +1864,15 @@ function wa({ rowKey: e, polling: a, request: l, postData: u, dataSource: o, wai
|
|
|
1864
1864
|
} catch (ye) {
|
|
1865
1865
|
A.value === void 0 && P([]), M("requestError", ye);
|
|
1866
1866
|
} finally {
|
|
1867
|
-
W.value = !1,
|
|
1867
|
+
W.value = !1, f(!1);
|
|
1868
1868
|
}
|
|
1869
1869
|
return [];
|
|
1870
1870
|
}, ee = xa(async (I) => {
|
|
1871
1871
|
K.value && clearTimeout(K.value);
|
|
1872
|
-
const
|
|
1872
|
+
const h = await Re(I), L = nl(a.value, h);
|
|
1873
1873
|
return L && !G.value && (K.value = setTimeout(() => {
|
|
1874
1874
|
ee.run({ ...I, isPolling: L });
|
|
1875
|
-
}, Math.max(L, 2e3))),
|
|
1875
|
+
}, Math.max(L, 2e3))), h;
|
|
1876
1876
|
}, d.value || 10);
|
|
1877
1877
|
gl(() => {
|
|
1878
1878
|
G.value = !0, clearTimeout(K.value);
|
|
@@ -1880,7 +1880,7 @@ function wa({ rowKey: e, polling: a, request: l, postData: u, dataSource: o, wai
|
|
|
1880
1880
|
G.value = !0, clearTimeout(K.value);
|
|
1881
1881
|
}), _(() => a.value, () => {
|
|
1882
1882
|
a.value ? ee.run({ isPolling: !0 }) : clearTimeout(K.value);
|
|
1883
|
-
}, { immediate: !0 }), _([() =>
|
|
1883
|
+
}, { immediate: !0 }), _([() => i.value, () => o.value], () => {
|
|
1884
1884
|
Fe();
|
|
1885
1885
|
}, { deep: !0, immediate: !0 }), _([() => r], () => {
|
|
1886
1886
|
ce.value || Fe();
|
|
@@ -1889,25 +1889,25 @@ function wa({ rowKey: e, polling: a, request: l, postData: u, dataSource: o, wai
|
|
|
1889
1889
|
immediate: !0
|
|
1890
1890
|
});
|
|
1891
1891
|
function Fe() {
|
|
1892
|
-
Oe(l) ? (!W.value || !a.value) && ee.run({ isPolling: !1 }) :
|
|
1892
|
+
Oe(l) ? (!W.value || !a.value) && ee.run({ isPolling: !1 }) : P(o.value || []);
|
|
1893
1893
|
}
|
|
1894
1894
|
const t = w(() => {
|
|
1895
1895
|
if (F.value)
|
|
1896
1896
|
return C(A);
|
|
1897
|
-
const I = x.value.filter((
|
|
1897
|
+
const I = x.value.filter((h) => h.show || h.show === void 0);
|
|
1898
1898
|
return !C(A) || !I || I.length === 0 ? [] : C(A);
|
|
1899
1899
|
}), g = w(() => C(A).some((I) => oe(I.children) && I.children.length > 0));
|
|
1900
1900
|
function R(I) {
|
|
1901
1901
|
ue.value = I;
|
|
1902
1902
|
}
|
|
1903
|
-
function $(I,
|
|
1904
|
-
ee.run({ pagination: I, filters:
|
|
1903
|
+
function $(I, h, L, V) {
|
|
1904
|
+
ee.run({ pagination: I, filters: h, sorter: L, extra: V, isPolling: !1 }), M("change", I, h, L, V);
|
|
1905
1905
|
}
|
|
1906
1906
|
function P(I) {
|
|
1907
1907
|
var L;
|
|
1908
|
-
const
|
|
1909
|
-
if (!Ge(
|
|
1910
|
-
const V =
|
|
1908
|
+
const h = ul(re(I), C(p.value));
|
|
1909
|
+
if (!Ge(h, A.value) && (A.value = h, !l || !Ke(l))) {
|
|
1910
|
+
const V = h.length || 0;
|
|
1911
1911
|
V !== ((L = C(p)) == null ? void 0 : L.total) && y({
|
|
1912
1912
|
total: V
|
|
1913
1913
|
});
|
|
@@ -1917,20 +1917,20 @@ function wa({ rowKey: e, polling: a, request: l, postData: u, dataSource: o, wai
|
|
|
1917
1917
|
dataSource: t,
|
|
1918
1918
|
isTreeDataRef: g,
|
|
1919
1919
|
reSetDataList: P,
|
|
1920
|
-
changeDataValue: ({ key: I, params:
|
|
1921
|
-
const X = I ?? e.value, de =
|
|
1920
|
+
changeDataValue: ({ key: I, params: h, value: L, type: V = "update" }) => {
|
|
1921
|
+
const X = I ?? e.value, de = h[X] ?? L;
|
|
1922
1922
|
switch (V) {
|
|
1923
1923
|
case "update":
|
|
1924
|
-
X && de && (A.value = A.value.map((J) => de === J[X] ? sl(J,
|
|
1924
|
+
X && de && (A.value = A.value.map((J) => de === J[X] ? sl(J, h, {
|
|
1925
1925
|
omitNil: !1,
|
|
1926
1926
|
omitEmpty: !1
|
|
1927
1927
|
}) : J));
|
|
1928
1928
|
break;
|
|
1929
1929
|
case "push":
|
|
1930
|
-
A.value.push(
|
|
1930
|
+
A.value.push(h);
|
|
1931
1931
|
break;
|
|
1932
1932
|
case "unshift":
|
|
1933
|
-
A.value.unshift(
|
|
1933
|
+
A.value.unshift(h);
|
|
1934
1934
|
break;
|
|
1935
1935
|
case "delete":
|
|
1936
1936
|
X && (A.value = A.value.filter((J) => L !== J[X]));
|
|
@@ -1944,8 +1944,8 @@ function wa({ rowKey: e, polling: a, request: l, postData: u, dataSource: o, wai
|
|
|
1944
1944
|
};
|
|
1945
1945
|
}
|
|
1946
1946
|
function pa({ emit: e, loading: a }) {
|
|
1947
|
-
var
|
|
1948
|
-
const l = j(ne(a.value) ? a.value : Z(a.value) ? (
|
|
1947
|
+
var i;
|
|
1948
|
+
const l = j(ne(a.value) ? a.value : Z(a.value) ? (i = a.value) == null ? void 0 : i.spinning : !1);
|
|
1949
1949
|
_(() => a.value, (d) => {
|
|
1950
1950
|
l.value = ne(d) ? d : Z(d) ? d == null ? void 0 : d.spinning : l.value;
|
|
1951
1951
|
});
|
|
@@ -1967,15 +1967,15 @@ function Ta({
|
|
|
1967
1967
|
o.value = !1;
|
|
1968
1968
|
return;
|
|
1969
1969
|
}
|
|
1970
|
-
const d = It(e, C(a), "pageItemRender"),
|
|
1970
|
+
const d = It(e, C(a), "pageItemRender"), m = Ke(d) ? {
|
|
1971
1971
|
itemRender: ({
|
|
1972
|
-
page:
|
|
1972
|
+
page: f,
|
|
1973
1973
|
type: b,
|
|
1974
|
-
originalElement:
|
|
1974
|
+
originalElement: s
|
|
1975
1975
|
}) => d ? d({
|
|
1976
|
-
page:
|
|
1976
|
+
page: f,
|
|
1977
1977
|
type: b,
|
|
1978
|
-
originalElement:
|
|
1978
|
+
originalElement: s
|
|
1979
1979
|
}) : null
|
|
1980
1980
|
} : null, x = {
|
|
1981
1981
|
current: 1,
|
|
@@ -1985,9 +1985,9 @@ function Ta({
|
|
|
1985
1985
|
showSizeChanger: !0,
|
|
1986
1986
|
pageSizeOptions: ["10", "20", "50", "100"],
|
|
1987
1987
|
...l.value || {},
|
|
1988
|
-
...
|
|
1988
|
+
...m || {}
|
|
1989
1989
|
};
|
|
1990
|
-
(S = l.value) != null && S.showTotal || (x.showTotal = (
|
|
1990
|
+
(S = l.value) != null && S.showTotal || (x.showTotal = (f) => `共${f < x.pageSize ? 1 : Math.ceil(f / (x.pageSize || 10))}页 ${f}条记录`), o.value = x, Object.assign(u, {
|
|
1991
1991
|
pageNum: x.current,
|
|
1992
1992
|
pageSize: x.pageSize
|
|
1993
1993
|
});
|
|
@@ -1995,18 +1995,18 @@ function Ta({
|
|
|
1995
1995
|
deep: 1,
|
|
1996
1996
|
immediate: !0
|
|
1997
1997
|
});
|
|
1998
|
-
function
|
|
1998
|
+
function i(d) {
|
|
1999
1999
|
if (Z(o.value) && Z(d)) {
|
|
2000
|
-
const
|
|
2000
|
+
const m = {};
|
|
2001
2001
|
Object.keys(d).forEach((x) => {
|
|
2002
|
-
Object.prototype.hasOwnProperty.call(d, x) && o.value[x] === d[x] || (
|
|
2003
|
-
}), Object.keys(
|
|
2002
|
+
Object.prototype.hasOwnProperty.call(d, x) && o.value[x] === d[x] || (m[x] = d[x]);
|
|
2003
|
+
}), Object.keys(m).length > 0 && (Object.assign(o.value, m), $a(m) && Object.assign(u, m));
|
|
2004
2004
|
}
|
|
2005
2005
|
}
|
|
2006
2006
|
return {
|
|
2007
2007
|
paginationInfo: o,
|
|
2008
2008
|
requestPagination: u,
|
|
2009
|
-
setPagination:
|
|
2009
|
+
setPagination: i
|
|
2010
2010
|
};
|
|
2011
2011
|
}
|
|
2012
2012
|
function $a(e) {
|
|
@@ -2018,41 +2018,43 @@ function $a(e) {
|
|
|
2018
2018
|
function Ba(e, a) {
|
|
2019
2019
|
const l = j([]), u = j([]);
|
|
2020
2020
|
_(() => {
|
|
2021
|
-
var
|
|
2022
|
-
return (
|
|
2023
|
-
}, (
|
|
2024
|
-
l.value = ol([...
|
|
2021
|
+
var f;
|
|
2022
|
+
return (f = a.value) == null ? void 0 : f.selectedRowKeys;
|
|
2023
|
+
}, (f) => {
|
|
2024
|
+
l.value = ol([...f || []]);
|
|
2025
2025
|
}, {
|
|
2026
2026
|
deep: !0,
|
|
2027
2027
|
immediate: !0
|
|
2028
2028
|
});
|
|
2029
|
-
const o = (
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2029
|
+
const o = (f, b) => {
|
|
2030
|
+
var n;
|
|
2031
|
+
const s = (n = a.value) == null ? void 0 : n.type;
|
|
2032
|
+
e.value && (b ? f != null && f[e.value] && s === "checkbox" ? (l.value.push(f[e.value]), u.value.push(f)) : (l.value = [f[e.value]], u.value = [f]) : (l.value = l.value.filter((r) => r !== f[e.value]), u.value = u.value.filter((r) => r[e.value] !== f[e.value])));
|
|
2033
|
+
}, i = () => {
|
|
2034
|
+
var f, b;
|
|
2035
|
+
a.value && ((b = (f = a.value) == null ? void 0 : f.onChange) == null || b.call(f, l.value, u.value));
|
|
2034
2036
|
};
|
|
2035
2037
|
return {
|
|
2036
2038
|
selectedKeys: l,
|
|
2037
2039
|
selectedItems: u,
|
|
2038
2040
|
selectRowKey: o,
|
|
2039
|
-
selectAllRowKey: (
|
|
2040
|
-
e.value && (
|
|
2041
|
+
selectAllRowKey: (f, b, s) => {
|
|
2042
|
+
e.value && (f ? b.map((n) => (l.value.every((r) => r !== (n == null ? void 0 : n[e.value])) && n != null && n[e.value] && (l.value.push(n[e.value]), u.value.push(n)), n)) : s.map((n) => (l.value.includes(n == null ? void 0 : n[e.value]) && (l.value = l.value.filter((r) => r !== n[e.value]), u.value = u.value.filter((r) => r[e.value] !== n[e.value])), n)));
|
|
2041
2043
|
},
|
|
2042
|
-
removeRowKeys: (
|
|
2043
|
-
l.value = l.value.filter((b) => !
|
|
2044
|
+
removeRowKeys: (f) => {
|
|
2045
|
+
l.value = l.value.filter((b) => !f.includes(b)), u.value = u.value.filter((b) => !f.includes(b == null ? void 0 : b[e.value || ""])), i();
|
|
2044
2046
|
},
|
|
2045
|
-
changeRowKey:
|
|
2046
|
-
syncSelectedRows: (
|
|
2047
|
+
changeRowKey: i,
|
|
2048
|
+
syncSelectedRows: (f) => {
|
|
2047
2049
|
if (e.value && l.value.length !== u.value.length) {
|
|
2048
|
-
const b = u.value.map((n) => n[e.value]),
|
|
2049
|
-
|
|
2050
|
-
|
|
2050
|
+
const b = u.value.map((n) => n[e.value]), s = l.value.filter((n) => !b.includes(n));
|
|
2051
|
+
f.forEach((n) => {
|
|
2052
|
+
s.includes(n[e.value]) && u.value.push(re(n));
|
|
2051
2053
|
});
|
|
2052
2054
|
}
|
|
2053
2055
|
},
|
|
2054
2056
|
clearAllRowKeys: () => {
|
|
2055
|
-
l.value = [], u.value = [],
|
|
2057
|
+
l.value = [], u.value = [], i();
|
|
2056
2058
|
}
|
|
2057
2059
|
};
|
|
2058
2060
|
}
|
|
@@ -2060,78 +2062,78 @@ function Ra(e) {
|
|
|
2060
2062
|
const a = {};
|
|
2061
2063
|
return e.forEach((l) => {
|
|
2062
2064
|
let u = l.initialValue;
|
|
2063
|
-
const o = ["select"],
|
|
2064
|
-
!u && o.includes(l.valueType) ? u = void 0 : !u &&
|
|
2065
|
+
const o = ["select"], i = ["date", "time", "dateRange"];
|
|
2066
|
+
!u && o.includes(l.valueType) ? u = void 0 : !u && i.includes(l.valueType) ? u = null : u || (u = ""), l.name === "dateRange" ? (a[l.rangeStartName || "start"] = u ? u[0] : null, a[l.rangeEndName || "end"] = u ? u[1] : null) : l.name && (a[l.name] = u);
|
|
2065
2067
|
}), a;
|
|
2066
2068
|
}
|
|
2067
2069
|
function Fa({ searchMap: e, params: a, columns: l, setPagination: u }) {
|
|
2068
|
-
const o = Te({}),
|
|
2069
|
-
var b,
|
|
2070
|
-
const
|
|
2071
|
-
if ((S === "all" || S === "searchMap") && ((b = e.value) == null || b.forEach((n) =>
|
|
2070
|
+
const o = Te({}), i = Te({}), d = j([]), m = (S) => {
|
|
2071
|
+
var b, s;
|
|
2072
|
+
const f = [];
|
|
2073
|
+
if ((S === "all" || S === "searchMap") && ((b = e.value) == null || b.forEach((n) => f.push(n)), f.forEach((n) => {
|
|
2072
2074
|
d.value.some((r) => r.name === n.name) ? d.value = d.value.map((r) => r.name === n.name ? {
|
|
2073
2075
|
...r,
|
|
2074
2076
|
...n
|
|
2075
2077
|
} : r) : d.value.push(n);
|
|
2076
|
-
})), (S === "all" || S === "columns") && ((
|
|
2077
|
-
n.searchConfig &&
|
|
2078
|
-
}),
|
|
2078
|
+
})), (S === "all" || S === "columns") && ((s = l.value) != null && s.length) && (l.value && l.value.forEach((n) => {
|
|
2079
|
+
n.searchConfig && f.push(n.searchConfig);
|
|
2080
|
+
}), f.forEach((n) => {
|
|
2079
2081
|
d.value.some((r) => r.name === n.name) ? d.value = d.value.map((r) => r.name === n.name ? {
|
|
2080
2082
|
...r,
|
|
2081
2083
|
...n
|
|
2082
2084
|
} : r) : d.value.push(n);
|
|
2083
2085
|
})), S === "all" || S === "searchMap" || S === "columns") {
|
|
2084
2086
|
u({ current: 1 });
|
|
2085
|
-
const n = Ra(
|
|
2086
|
-
Object.assign(
|
|
2087
|
+
const n = Ra(f);
|
|
2088
|
+
Object.assign(i, { ...n });
|
|
2087
2089
|
for (const r in n)
|
|
2088
2090
|
o[r] || (o[r] = n[r]);
|
|
2089
2091
|
}
|
|
2090
2092
|
(S === "all" || S === "params") && (u({ current: 1 }), Object.assign(o, a.value));
|
|
2091
2093
|
};
|
|
2092
2094
|
bl(() => {
|
|
2093
|
-
|
|
2095
|
+
m("all");
|
|
2094
2096
|
}), _(() => a.value, () => {
|
|
2095
|
-
|
|
2097
|
+
m("params");
|
|
2096
2098
|
}, { deep: !0 }), _(() => e.value, () => {
|
|
2097
|
-
|
|
2099
|
+
m("searchMap");
|
|
2098
2100
|
}, { deep: !0 }), _(() => l.value, () => {
|
|
2099
|
-
|
|
2101
|
+
m("columns");
|
|
2100
2102
|
}, { deep: !0 });
|
|
2101
2103
|
function x(S) {
|
|
2102
2104
|
u({ current: 1 }), Object.assign(o, S);
|
|
2103
2105
|
}
|
|
2104
|
-
return { formDataRef: d, formParamsRef: o, defaultParamsRef:
|
|
2106
|
+
return { formDataRef: d, formParamsRef: o, defaultParamsRef: i, setFormParams: x };
|
|
2105
2107
|
}
|
|
2106
2108
|
function Ia(e) {
|
|
2107
|
-
const a = w(() => e.scroll), l = w(() => e.autoScroll), u = w(() => e.modalScroll), o = w(() => e.neverScroll),
|
|
2109
|
+
const a = w(() => e.scroll), l = w(() => e.autoScroll), u = w(() => e.modalScroll), o = w(() => e.neverScroll), i = w(() => e.rowSelection), d = w(() => e.scrollBreakpoint);
|
|
2108
2110
|
return {
|
|
2109
2111
|
scroll: a,
|
|
2110
2112
|
neverScroll: o,
|
|
2111
|
-
rowSelection:
|
|
2113
|
+
rowSelection: i,
|
|
2112
2114
|
autoScroll: l,
|
|
2113
2115
|
modalScroll: u,
|
|
2114
2116
|
scrollBreakpoint: d
|
|
2115
2117
|
};
|
|
2116
2118
|
}
|
|
2117
|
-
function ka({ scroll: e, columns: a, autoScroll: l, modalScroll: u, neverScroll: o, rowSelection:
|
|
2119
|
+
function ka({ scroll: e, columns: a, autoScroll: l, modalScroll: u, neverScroll: o, rowSelection: i, screens: d, innerWidth: m, scrollBreakpoint: x }) {
|
|
2118
2120
|
const S = w(() => {
|
|
2119
|
-
var
|
|
2120
|
-
return C(x) ? _e(C(x)) ?
|
|
2121
|
-
}),
|
|
2122
|
-
let
|
|
2123
|
-
const n = C(
|
|
2121
|
+
var s, n, r;
|
|
2122
|
+
return C(x) ? _e(C(x)) ? m.value > C(x) : kt(C(x)) ? (s = d.value) == null ? void 0 : s[C(x)] : (n = d.value) == null ? void 0 : n.xl : (r = d.value) == null ? void 0 : r.xl;
|
|
2123
|
+
}), f = w(() => {
|
|
2124
|
+
let s = 0;
|
|
2125
|
+
const n = C(i) ? 60 : 0, r = 150, y = re(C(a));
|
|
2124
2126
|
y.forEach((F) => {
|
|
2125
|
-
|
|
2127
|
+
s += Number.parseInt(String(F.width)) || 0;
|
|
2126
2128
|
});
|
|
2127
2129
|
const k = y.filter((F) => !Reflect.has(F, "width")).length;
|
|
2128
|
-
return k !== 0 && (
|
|
2130
|
+
return k !== 0 && (s += k * r), n && (s += n), s;
|
|
2129
2131
|
});
|
|
2130
2132
|
return { proScroll: w(() => {
|
|
2131
|
-
var
|
|
2133
|
+
var s, n;
|
|
2132
2134
|
return C(o) ? {} : C(e) && Object.keys(C(e)).length ? C(e) : C(u) ? {
|
|
2133
|
-
y: ((
|
|
2134
|
-
} : C(l) ? S.value ? {} : ne(S.value) ? { x: C(
|
|
2135
|
+
y: ((s = C(e)) == null ? void 0 : s.y) || ((n = d.value) != null && n.xl ? 400 : 235)
|
|
2136
|
+
} : C(l) ? S.value ? {} : ne(S.value) ? { x: C(f) } : {} : {};
|
|
2135
2137
|
}), breakpoint: S };
|
|
2136
2138
|
}
|
|
2137
2139
|
function Oa({ size: e, emit: a }) {
|
|
@@ -2365,8 +2367,8 @@ function Na(e, a, l, u) {
|
|
|
2365
2367
|
if (!a) return e;
|
|
2366
2368
|
let o = e;
|
|
2367
2369
|
if (Z(a)) {
|
|
2368
|
-
const
|
|
2369
|
-
return c(
|
|
2370
|
+
const i = a.node === "a" ? "span" : a.node;
|
|
2371
|
+
return c(i, Q((a == null ? void 0 : a.attr) || {}, {
|
|
2370
2372
|
class: [a.class, a.node === "a" ? `${l}-a` : ""],
|
|
2371
2373
|
onClick: a.click
|
|
2372
2374
|
}), ja(e) ? e : {
|
|
@@ -2396,7 +2398,7 @@ function Na(e, a, l, u) {
|
|
|
2396
2398
|
}
|
|
2397
2399
|
function Ea(e, a) {
|
|
2398
2400
|
const l = a && a.current || 1, u = a && a.pageSize || 10;
|
|
2399
|
-
return e.filter((o,
|
|
2401
|
+
return e.filter((o, i) => i < l * u && i >= u * (l - 1));
|
|
2400
2402
|
}
|
|
2401
2403
|
function Da(e) {
|
|
2402
2404
|
const a = document.createElement("textarea");
|
|
@@ -2412,7 +2414,7 @@ const {
|
|
|
2412
2414
|
density: !0,
|
|
2413
2415
|
setting: !0,
|
|
2414
2416
|
fullScreen: !0
|
|
2415
|
-
}, at = /* @__PURE__ */
|
|
2417
|
+
}, at = /* @__PURE__ */ me({
|
|
2416
2418
|
name: "GProTable",
|
|
2417
2419
|
inheritAttrs: !1,
|
|
2418
2420
|
props: he,
|
|
@@ -2424,42 +2426,42 @@ const {
|
|
|
2424
2426
|
attrs: u,
|
|
2425
2427
|
expose: o
|
|
2426
2428
|
}) {
|
|
2427
|
-
const
|
|
2429
|
+
const i = it({
|
|
2428
2430
|
suffixCls: "table",
|
|
2429
2431
|
isPor: !0
|
|
2430
2432
|
}), {
|
|
2431
2433
|
wrapSSR: d,
|
|
2432
|
-
hashId:
|
|
2433
|
-
} = Ue("ProBaseTable", [Pa],
|
|
2434
|
+
hashId: m
|
|
2435
|
+
} = Ue("ProBaseTable", [Pa], i), x = Aa(), {
|
|
2434
2436
|
width: S
|
|
2435
|
-
} = jl(),
|
|
2437
|
+
} = jl(), f = j(!1), b = Nt(), s = j(), n = j(), r = j(e.waitRequest);
|
|
2436
2438
|
Le(() => r.value = e.waitRequest);
|
|
2437
2439
|
const {
|
|
2438
2440
|
toggle: y,
|
|
2439
2441
|
isFullscreen: p
|
|
2440
|
-
} = Et(
|
|
2442
|
+
} = Et(s), k = w(() => ({
|
|
2441
2443
|
...e
|
|
2442
2444
|
})), F = w(() => !x.value.xl), M = w(() => {
|
|
2443
|
-
var
|
|
2444
|
-
return e.virtualScroll && xl(!((
|
|
2445
|
+
var v, T;
|
|
2446
|
+
return e.virtualScroll && xl(!((v = e.scroll) != null && v.y), "参数scroll的Y值不能为空!"), !!((T = e.scroll) != null && T.y && e.virtualScroll);
|
|
2445
2447
|
}), G = w(() => e.search === !1 ? !1 : Z(e.search) ? e.search : {
|
|
2446
2448
|
type: "auto",
|
|
2447
2449
|
resetText: "重置",
|
|
2448
2450
|
searchText: "查询"
|
|
2449
2451
|
}), W = w(() => G.value === !1 ? {} : G.value), Y = w(() => {
|
|
2450
|
-
var
|
|
2451
|
-
return ((
|
|
2452
|
+
var v;
|
|
2453
|
+
return ((v = W.value) == null ? void 0 : v.type) === "button";
|
|
2452
2454
|
}), ue = w(() => {
|
|
2453
|
-
var
|
|
2454
|
-
return (
|
|
2455
|
+
var v;
|
|
2456
|
+
return (v = W.value) == null ? void 0 : v.actions;
|
|
2455
2457
|
}), A = w(() => {
|
|
2456
|
-
const
|
|
2458
|
+
const v = (e.columns || []).filter((T) => T.key || T.dataIndex).map((T) => ({
|
|
2457
2459
|
...T,
|
|
2458
2460
|
key: T.key || T.dataIndex,
|
|
2459
2461
|
align: T.align || e.align,
|
|
2460
2462
|
uuid: nt().uuid(15)
|
|
2461
2463
|
}));
|
|
2462
|
-
return rl(
|
|
2464
|
+
return rl(v, {
|
|
2463
2465
|
align: e.align || "left",
|
|
2464
2466
|
showIndex: e.showIndex || !1
|
|
2465
2467
|
});
|
|
@@ -2493,7 +2495,7 @@ const {
|
|
|
2493
2495
|
columns: A,
|
|
2494
2496
|
screens: x
|
|
2495
2497
|
}), I = ba(e), {
|
|
2496
|
-
proColumns:
|
|
2498
|
+
proColumns: h,
|
|
2497
2499
|
cacheProColumns: L,
|
|
2498
2500
|
setColumns: V,
|
|
2499
2501
|
changeColumns: X,
|
|
@@ -2539,7 +2541,7 @@ const {
|
|
|
2539
2541
|
changeDataValue: Gt,
|
|
2540
2542
|
isTreeDataRef: Qt,
|
|
2541
2543
|
dataSource: Ne,
|
|
2542
|
-
handleTableChange:
|
|
2544
|
+
handleTableChange: vt
|
|
2543
2545
|
} = wa({
|
|
2544
2546
|
...Vt,
|
|
2545
2547
|
waitRequest: r
|
|
@@ -2552,7 +2554,7 @@ const {
|
|
|
2552
2554
|
setLoading: Re,
|
|
2553
2555
|
setColumns: V,
|
|
2554
2556
|
search: G,
|
|
2555
|
-
columns:
|
|
2557
|
+
columns: h,
|
|
2556
2558
|
formParamsRef: Ce,
|
|
2557
2559
|
onBeforeSearchSubmit: e.onBeforeSearchSubmit,
|
|
2558
2560
|
hasCustomRender: w(() => Oe(e.customRender || (l == null ? void 0 : l.customRender)))
|
|
@@ -2565,62 +2567,62 @@ const {
|
|
|
2565
2567
|
dataSource: C(Ne),
|
|
2566
2568
|
pagination: C(t),
|
|
2567
2569
|
virtualScroll: M.value,
|
|
2568
|
-
columns: C(
|
|
2569
|
-
})),
|
|
2570
|
+
columns: C(h).filter((v) => v.show || v.show === void 0)
|
|
2571
|
+
})), mt = w(() => {
|
|
2570
2572
|
var T, B;
|
|
2571
|
-
const
|
|
2572
|
-
return !
|
|
2573
|
+
const v = Z(e.loading) ? Xe(e.loading, "spinning") : {};
|
|
2574
|
+
return !v.indicator && ((T = b == null ? void 0 : b.indicator) != null && T.value) && (v.indicator = (B = b == null ? void 0 : b.indicator) == null ? void 0 : B.value), {
|
|
2573
2575
|
spinning: e.showLoading ? Oe(ce.value) : !1,
|
|
2574
|
-
...
|
|
2576
|
+
...v
|
|
2575
2577
|
};
|
|
2576
2578
|
}), gt = w(() => {
|
|
2577
2579
|
var N;
|
|
2578
|
-
let
|
|
2580
|
+
let v;
|
|
2579
2581
|
const T = C(k).direction === "rtl" ? "bottomLeft" : "right", B = (N = C(t)) == null ? void 0 : N.position;
|
|
2580
2582
|
if (B !== null && Array.isArray(B)) {
|
|
2581
2583
|
const O = B.find((D) => D.includes("top")), H = B.find((D) => D.includes("bottom")), ie = B.every((D) => `${D}` == "none");
|
|
2582
|
-
!O && !H && !ie && (
|
|
2584
|
+
!O && !H && !ie && (v = T), O && (v = O.toLowerCase().replace("top", "")), H && (v = H.toLowerCase().replace("bottom", ""));
|
|
2583
2585
|
} else
|
|
2584
|
-
|
|
2585
|
-
return
|
|
2586
|
+
v = T;
|
|
2587
|
+
return v;
|
|
2586
2588
|
});
|
|
2587
2589
|
ga(() => {
|
|
2588
|
-
|
|
2590
|
+
f.value && e.keepAliveReload ? je() : f.value = !0;
|
|
2589
2591
|
});
|
|
2590
|
-
const yt = async (
|
|
2592
|
+
const yt = async (v, T) => {
|
|
2591
2593
|
var B;
|
|
2592
|
-
Y.value ? (B = ue.value) != null && B.reload && T ? (Je(
|
|
2594
|
+
Y.value ? (B = ue.value) != null && B.reload && T ? (Je(v), await je()) : Je(v) : (Je({
|
|
2593
2595
|
...e.params || {},
|
|
2594
|
-
...
|
|
2596
|
+
...v
|
|
2595
2597
|
}), await je());
|
|
2596
|
-
}, qt = async (
|
|
2597
|
-
T === "reset" ? (a("reset",
|
|
2598
|
-
}, bt = (
|
|
2599
|
-
R(St(
|
|
2600
|
-
}, Xt = (
|
|
2598
|
+
}, qt = async (v, T) => {
|
|
2599
|
+
T === "reset" ? (a("reset", v), e.request && await yt(v, T)) : e.request ? (a("submit", v), await yt(v, T)) : a("submit", v);
|
|
2600
|
+
}, bt = (v, T, B, N) => {
|
|
2601
|
+
R(St(v, ["current", "pageSize"])), vt(v, T, B, N);
|
|
2602
|
+
}, Xt = (v, T) => {
|
|
2601
2603
|
var B;
|
|
2602
2604
|
R({
|
|
2603
|
-
current:
|
|
2605
|
+
current: v,
|
|
2604
2606
|
pageSize: T
|
|
2605
|
-
}),
|
|
2606
|
-
current:
|
|
2607
|
+
}), vt({
|
|
2608
|
+
current: v,
|
|
2607
2609
|
pageSize: T,
|
|
2608
2610
|
total: t.value && ((B = t.value) == null ? void 0 : B.total) || 0
|
|
2609
2611
|
}, {}, {});
|
|
2610
|
-
}, Ut = (
|
|
2611
|
-
a("expandedRowsChange",
|
|
2612
|
-
}, Jt = (
|
|
2613
|
-
a("expand",
|
|
2614
|
-
}, Zt = (
|
|
2612
|
+
}, Ut = (v) => {
|
|
2613
|
+
a("expandedRowsChange", v);
|
|
2614
|
+
}, Jt = (v, T) => {
|
|
2615
|
+
a("expand", v, T);
|
|
2616
|
+
}, Zt = (v, T) => de(v, T), el = (v, T, B) => {
|
|
2615
2617
|
var O, H, ie;
|
|
2616
|
-
let N =
|
|
2618
|
+
let N = v;
|
|
2617
2619
|
if (T) {
|
|
2618
|
-
const D = oe(
|
|
2620
|
+
const D = oe(v) ? typeof ((O = v == null ? void 0 : v[0]) == null ? void 0 : O.children) == "string" ? (H = v == null ? void 0 : v[0]) == null ? void 0 : H.children : "" : v.toString(), E = B.tooltip === !1 ? {} : B.tooltip, xe = B.tooltip === !1 ? 1 : _e(E == null ? void 0 : E.hiddenLine) && (E == null ? void 0 : E.hiddenLine) > 0 ? E == null ? void 0 : E.hiddenLine : 1, se = B.tooltip === !1 ? 0 : _e(E == null ? void 0 : E.width) ? E == null ? void 0 : E.width : 0, Ie = B.tooltip !== !1 && kt(D) && se > 0 ? dl(D, {
|
|
2619
2621
|
cssObject: E == null ? void 0 : E.targetStyle
|
|
2620
|
-
}) : 0, Ve = document.querySelector(`.${
|
|
2621
|
-
class: `${
|
|
2622
|
-
}, [
|
|
2623
|
-
title:
|
|
2622
|
+
}) : 0, Ve = document.querySelector(`.${i} .ant-table-tbody`), $e = c("div", {
|
|
2623
|
+
class: `${i}-ellipsis-text`
|
|
2624
|
+
}, [v]), De = () => B.tooltip === !1 || Z(B.tooltip) && Ie < se && se > 0 ? $e : c(ve, Q({
|
|
2625
|
+
title: v,
|
|
2624
2626
|
getPopupContainer: (Me) => {
|
|
2625
2627
|
var xt;
|
|
2626
2628
|
return Ve ?? ((xt = Me == null ? void 0 : Me.parentNode) == null ? void 0 : xt.parentNode);
|
|
@@ -2631,21 +2633,21 @@ const {
|
|
|
2631
2633
|
default: () => [$e]
|
|
2632
2634
|
});
|
|
2633
2635
|
if (N = c("div", {
|
|
2634
|
-
class: `${
|
|
2636
|
+
class: `${i}-ellipsis ${(E == null ? void 0 : E.class) ?? ""}`,
|
|
2635
2637
|
style: {
|
|
2636
2638
|
"-webkit-line-clamp": xe
|
|
2637
2639
|
}
|
|
2638
2640
|
}, [De()]), B.copyable) {
|
|
2639
2641
|
const Me = typeof B.copyText == "function" ? (ie = B.copyText) == null ? void 0 : ie.call(B, B) : B.copyText || D;
|
|
2640
2642
|
N = c("div", {
|
|
2641
|
-
class: `${
|
|
2643
|
+
class: `${i}-copyable`
|
|
2642
2644
|
}, [c("div", {
|
|
2643
|
-
class: `${
|
|
2645
|
+
class: `${i}-ellipsis ${(E == null ? void 0 : E.class) ?? ""}`,
|
|
2644
2646
|
style: {
|
|
2645
2647
|
"-webkit-line-clamp": xe
|
|
2646
2648
|
}
|
|
2647
2649
|
}, [De()]), c(Ol, {
|
|
2648
|
-
class: `${
|
|
2650
|
+
class: `${i}-copyable-icon`,
|
|
2649
2651
|
onClick: () => {
|
|
2650
2652
|
Da(Me), Wl.success("复制成功");
|
|
2651
2653
|
}
|
|
@@ -2656,11 +2658,11 @@ const {
|
|
|
2656
2658
|
};
|
|
2657
2659
|
function Ct() {
|
|
2658
2660
|
var B, N, O, H, ie;
|
|
2659
|
-
const
|
|
2660
|
-
if (
|
|
2661
|
-
const D = ((N = e.emptyTextProps) == null ? void 0 : N.extraProps) || {}, E =
|
|
2661
|
+
const v = ke(l, e, "emptyText");
|
|
2662
|
+
if (v !== !1 && ((B = b == null ? void 0 : b.emptyText) == null ? void 0 : B.value) !== !1) {
|
|
2663
|
+
const D = ((N = e.emptyTextProps) == null ? void 0 : N.extraProps) || {}, E = v || ((O = b == null ? void 0 : b.emptyText) == null ? void 0 : O.value), xe = le(E), se = xe ? Pt(E, D) : Rt(E || []);
|
|
2662
2664
|
return c("div", {
|
|
2663
|
-
class: pe(`${
|
|
2665
|
+
class: pe(`${i}-empty-text`, m.value, (H = e.emptyTextProps) == null ? void 0 : H.class),
|
|
2664
2666
|
style: (ie = e.emptyTextProps) == null ? void 0 : ie.style
|
|
2665
2667
|
}, [xe ? se : oe(se) ? se.map((Ie) => st(Ie, D)) : c(Vl, null, null)]);
|
|
2666
2668
|
}
|
|
@@ -2668,11 +2670,11 @@ const {
|
|
|
2668
2670
|
}
|
|
2669
2671
|
const tl = () => {
|
|
2670
2672
|
var T;
|
|
2671
|
-
const
|
|
2672
|
-
if (
|
|
2673
|
+
const v = It(l, e, "customRender");
|
|
2674
|
+
if (v) {
|
|
2673
2675
|
if ((T = Ne.value) != null && T.length) {
|
|
2674
2676
|
const B = re(C(Ne));
|
|
2675
|
-
return
|
|
2677
|
+
return v == null ? void 0 : v({
|
|
2676
2678
|
dataSource: B,
|
|
2677
2679
|
currentData: Ea(B, t.value)
|
|
2678
2680
|
});
|
|
@@ -2680,17 +2682,17 @@ const {
|
|
|
2680
2682
|
return Ct();
|
|
2681
2683
|
}
|
|
2682
2684
|
return c(qe, null, null);
|
|
2683
|
-
}, ll = (
|
|
2685
|
+
}, ll = (v) => {
|
|
2684
2686
|
var O, H;
|
|
2685
2687
|
const T = ke(l, e, "headerTitle"), B = ke(l, e, "titleTip"), N = ke(l, e, "toolBarBtn");
|
|
2686
|
-
return c(
|
|
2688
|
+
return c(va, {
|
|
2687
2689
|
headerTitle: T,
|
|
2688
2690
|
titleTip: B,
|
|
2689
2691
|
titleTipText: e.titleTipText,
|
|
2690
2692
|
options: ne(Ee.value) ? Ee.value : {
|
|
2691
2693
|
...Ee.value,
|
|
2692
|
-
setting:
|
|
2693
|
-
density:
|
|
2694
|
+
setting: v ? !1 : (O = Ee.value) == null ? void 0 : O.setting,
|
|
2695
|
+
density: v ? !1 : (H = Ee.value) == null ? void 0 : H.density
|
|
2694
2696
|
},
|
|
2695
2697
|
settingExtra: ke(l, e, "settingExtra"),
|
|
2696
2698
|
optionsExtra: ke(l, e, "optionsExtra"),
|
|
@@ -2699,7 +2701,7 @@ const {
|
|
|
2699
2701
|
};
|
|
2700
2702
|
return Ql({
|
|
2701
2703
|
tableSize: ee,
|
|
2702
|
-
columns:
|
|
2704
|
+
columns: h,
|
|
2703
2705
|
cacheColumns: A,
|
|
2704
2706
|
isMobile: F,
|
|
2705
2707
|
searchConfig: W,
|
|
@@ -2707,7 +2709,7 @@ const {
|
|
|
2707
2709
|
searchActions: ue,
|
|
2708
2710
|
action: {
|
|
2709
2711
|
setTableSize: Fe,
|
|
2710
|
-
reload: (
|
|
2712
|
+
reload: (v) => je(v),
|
|
2711
2713
|
toggle: y
|
|
2712
2714
|
},
|
|
2713
2715
|
settingsAction: {
|
|
@@ -2726,12 +2728,12 @@ const {
|
|
|
2726
2728
|
formRef: () => ({
|
|
2727
2729
|
getFormState: () => C(Ce),
|
|
2728
2730
|
getFormInnerState: () => {
|
|
2729
|
-
var
|
|
2730
|
-
return ((
|
|
2731
|
+
var v;
|
|
2732
|
+
return ((v = n.value) == null ? void 0 : v.getFormState()) || {};
|
|
2731
2733
|
},
|
|
2732
|
-
restFormState: (
|
|
2734
|
+
restFormState: (v) => {
|
|
2733
2735
|
var T;
|
|
2734
|
-
r.value = !0,
|
|
2736
|
+
r.value = !0, v && (v == null || v()), (T = n.value) == null || T.resetForm(!1), r.value = !1;
|
|
2735
2737
|
}
|
|
2736
2738
|
}),
|
|
2737
2739
|
actionRef: () => ({
|
|
@@ -2750,12 +2752,12 @@ const {
|
|
|
2750
2752
|
},
|
|
2751
2753
|
reload: je,
|
|
2752
2754
|
getLoadingStatus: () => C(K),
|
|
2753
|
-
reloadAndReset: async (
|
|
2755
|
+
reloadAndReset: async (v) => {
|
|
2754
2756
|
var T, B, N;
|
|
2755
2757
|
r.value = !0, R({
|
|
2756
2758
|
current: 1,
|
|
2757
2759
|
pageSize: (g == null ? void 0 : g.pageSize) || 10
|
|
2758
|
-
}),
|
|
2760
|
+
}), v != null && v.callBack && (v != null && v.wait ? await ((T = v == null ? void 0 : v.callBack) == null ? void 0 : T.call(v)) : (B = v == null ? void 0 : v.callBack) == null || B.call(v)), (N = n.value) == null || N.resetForm(!1), r.value = !1;
|
|
2759
2761
|
},
|
|
2760
2762
|
reSetDataList: Ht,
|
|
2761
2763
|
setPageAndReload: bt,
|
|
@@ -2765,27 +2767,27 @@ const {
|
|
|
2765
2767
|
})
|
|
2766
2768
|
}), () => {
|
|
2767
2769
|
var T, B;
|
|
2768
|
-
const
|
|
2770
|
+
const v = Oe(e.customRender || l.customRender);
|
|
2769
2771
|
return d(c("div", {
|
|
2770
|
-
ref:
|
|
2772
|
+
ref: s,
|
|
2771
2773
|
class: pe([{
|
|
2772
|
-
[`${
|
|
2773
|
-
[`${
|
|
2774
|
+
[`${m.value}`]: !0,
|
|
2775
|
+
[`${i}`]: !0,
|
|
2774
2776
|
[`${u.class}`]: u.class,
|
|
2775
|
-
[`${
|
|
2776
|
-
[`${
|
|
2777
|
-
[`${
|
|
2778
|
-
[`${
|
|
2777
|
+
[`${i}-beautify-scroll`]: ne(e.useDefaultScrollStyle) ? !e.useDefaultScrollStyle : !0,
|
|
2778
|
+
[`${i}-no-scroll`]: !Object.keys(C(P) || {}).length,
|
|
2779
|
+
[`${i}-table-tree`]: Qt.value,
|
|
2780
|
+
[`${i}-full-screen`]: p.value
|
|
2779
2781
|
}]),
|
|
2780
2782
|
style: u.style
|
|
2781
2783
|
}, [c("div", {
|
|
2782
|
-
class: [`${
|
|
2784
|
+
class: [`${i}-content`, m.value]
|
|
2783
2785
|
}, [(z.value.length > 0 || Oe(l.search)) && e.search !== !1 && c(At, {
|
|
2784
2786
|
ref: n,
|
|
2785
2787
|
modal: e.modalScroll,
|
|
2786
2788
|
cardBordered: e.cardBordered,
|
|
2787
2789
|
searchMap: z.value,
|
|
2788
|
-
prefixCls:
|
|
2790
|
+
prefixCls: i,
|
|
2789
2791
|
loading: !!C(K),
|
|
2790
2792
|
onSearch: qt,
|
|
2791
2793
|
defaultParams: te
|
|
@@ -2795,19 +2797,19 @@ const {
|
|
|
2795
2797
|
return (N = l.search) == null ? void 0 : N.call(l);
|
|
2796
2798
|
} : null
|
|
2797
2799
|
}), c("div", {
|
|
2798
|
-
class: pe(
|
|
2799
|
-
}, [ll(
|
|
2800
|
+
class: pe(m.value, `${i}-card`, e.cardBordered && `${i}-card-border`)
|
|
2801
|
+
}, [ll(v), v ? c(ut, mt.value, {
|
|
2800
2802
|
default: () => {
|
|
2801
2803
|
var N, O, H;
|
|
2802
2804
|
return [c("div", {
|
|
2803
|
-
class: `${
|
|
2805
|
+
class: `${i}-wrapper ${m.value}`
|
|
2804
2806
|
}, [c("div", {
|
|
2805
|
-
class: pe(`${
|
|
2807
|
+
class: pe(`${i}-list`, m.value, (N = e.tableProps) == null ? void 0 : N.class),
|
|
2806
2808
|
style: (O = e.tableProps) == null ? void 0 : O.style
|
|
2807
2809
|
}, [tl()]), e.pagination !== !1 && ((H = Ne.value) == null ? void 0 : H.length) > 0 && c(Yl, Q({
|
|
2808
2810
|
class: {
|
|
2809
|
-
[`${
|
|
2810
|
-
[`${
|
|
2811
|
+
[`${i}-pagination ${m.value}`]: !0,
|
|
2812
|
+
[`${i}-pagination-${gt.value} ${m.value}`]: !!gt.value
|
|
2811
2813
|
}
|
|
2812
2814
|
}, Be(C(t)), {
|
|
2813
2815
|
onChange: Xt
|
|
@@ -2816,7 +2818,7 @@ const {
|
|
|
2816
2818
|
}) : c(Ll, Q(St(e, Object.keys(Mt)), _t.value, {
|
|
2817
2819
|
style: (T = e.tableProps) == null ? void 0 : T.style,
|
|
2818
2820
|
class: (B = e.tableProps) == null ? void 0 : B.class,
|
|
2819
|
-
loading:
|
|
2821
|
+
loading: mt.value,
|
|
2820
2822
|
rowKey: (N) => N[e.rowKey],
|
|
2821
2823
|
transformCellText: (N) => {
|
|
2822
2824
|
var E, xe, se, Ie, Ve;
|
|
@@ -2831,7 +2833,7 @@ const {
|
|
|
2831
2833
|
if (D.length === 0 || D.length === 1 && !le(D[0])) {
|
|
2832
2834
|
D = D == null ? void 0 : D[0];
|
|
2833
2835
|
const $e = cl(D, (O == null ? void 0 : O.columnEmptyText) || (e == null ? void 0 : e.columnEmptyText) || "");
|
|
2834
|
-
ie = $e.success, D = Na($e.value, (O == null ? void 0 : O.valueType) || ((se = (xe = e.columns) == null ? void 0 : xe.find((De) => (De.key || De.dataIndex) === H)) == null ? void 0 : se.valueType),
|
|
2836
|
+
ie = $e.success, D = Na($e.value, (O == null ? void 0 : O.valueType) || ((se = (xe = e.columns) == null ? void 0 : xe.find((De) => (De.key || De.dataIndex) === H)) == null ? void 0 : se.valueType), i, m.value);
|
|
2835
2837
|
} else ((Ie = D[0]) == null ? void 0 : Ie.type) === "template" && (D = (Ve = D[0]) == null ? void 0 : Ve.children);
|
|
2836
2838
|
return O != null && O.ellipsis ? el(D, ie, O) : D;
|
|
2837
2839
|
},
|