@gx-design-vue/pro-table 0.2.0-beta.109 → 0.2.0-beta.110
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 +1 -2
- package/dist/hooks/useTable.d.ts +4 -4
- package/dist/pro-table.js +873 -855
- package/dist/pro-table.umd.cjs +1 -1
- package/package.json +1 -1
package/dist/pro-table.js
CHANGED
|
@@ -1,101 +1,119 @@
|
|
|
1
|
-
import { isObject as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { deepMerge as kt, isObject as U, cloneDeep as ue, isArray as re, isBoolean as ie, classNames as pe, filterEmpty as jt, getPrefixCls as rt, getRandomNumber as st, genColumnKey as Dt, isDeepEqualReact as Qe, compareArray as dl, isNumber as Ue, runFunction as fl, convertValueBoolean as ke, getSortIndex as hl, isFunction as ze, handleCurrentPage as vl, getSlot as Nt, arrayRepeat as ml, isString as Et, handleShowIndex as gl, handleEmptyField as yl, getSlotVNode as Pe, getTextWidth as bl } from "@gx-design-vue/pro-utils";
|
|
2
|
+
import { toReactive as Cl, useFullscreen as Mt, useWindowSize as xl } from "@vueuse/core";
|
|
3
|
+
import { ref as j, isRef as tt, watch as V, isReactive as pl, computed as w, toRaw as Be, reactive as Fe, watchEffect as He, defineComponent as me, createVNode as c, Fragment as Ye, isVNode as ee, mergeProps as q, h as At, cloneVNode as ct, unref as C, createTextVNode as Le, renderSlot as Sl, onActivated as wl, nextTick as Tl, getCurrentInstance as $l, onUnmounted as Rl, onDeactivated as Bl, onMounted as Fl, toRef as fe } from "vue";
|
|
4
|
+
import { tableProps as Il } from "ant-design-vue/es/table/Table";
|
|
5
|
+
import { omit as Je, pick as Rt } from "lodash-es";
|
|
5
6
|
import "ant-design-vue/es/_util/props-util";
|
|
6
7
|
import { warning as _e } from "ant-design-vue/es/vc-util/warning";
|
|
7
|
-
import { UpOutlined as
|
|
8
|
-
import { useProAppContext as
|
|
9
|
-
import { useContext as
|
|
10
|
-
import {
|
|
11
|
-
import { Grid as cl, DatePicker as zl, Space as xe, Input as Rl, TimePicker as Yt, TreeSelect as Lt, Spin as sl, Select as Wt, Button as Fl, Popover as Ht, Checkbox as Vt, Tooltip as ve, Tree as qt, Dropdown as Gt, Menu as Ge, theme as Qt, Pagination as _t, Table as Xt, message as Ut, Empty as Jt } from "ant-design-vue";
|
|
8
|
+
import { UpOutlined as Ol, DownOutlined as Pl, SettingOutlined as Kt, VerticalAlignTopOutlined as kl, VerticalAlignMiddleOutlined as jl, VerticalAlignBottomOutlined as Dl, InfoCircleOutlined as Nl, ColumnHeightOutlined as El, FullscreenExitOutlined as Ml, FullscreenOutlined as Al, ReloadOutlined as Kl, CopyOutlined as zl } from "@ant-design/icons-vue";
|
|
9
|
+
import { useProAppContext as zt } from "@gx-design-vue/pro-app";
|
|
10
|
+
import { useContext as Yl, getProSolidColor as Yt, useProStyle as Ze, unit as Bt, useProConfigContext as Ll } from "@gx-design-vue/pro-provider";
|
|
11
|
+
import { Grid as dt, DatePicker as Lt, Space as xe, Input as Ft, TimePicker as Wl, TreeSelect as Hl, Spin as ot, Select as Vl, Button as It, Popover as ql, Checkbox as Gl, Tooltip as ve, Tree as Ql, Dropdown as _l, Menu as Ge, theme as Xl, Pagination as Ul, Table as Jl, message as Zl, Empty as ea } from "ant-design-vue";
|
|
12
12
|
import X from "dayjs";
|
|
13
|
-
import { useMemo as Xe, tryOnUnmounted as
|
|
14
|
-
function
|
|
15
|
-
var
|
|
16
|
-
function
|
|
17
|
-
|
|
13
|
+
import { useMemo as Xe, tryOnUnmounted as ta } from "@gx-design-vue/pro-hooks";
|
|
14
|
+
function dn(e, n) {
|
|
15
|
+
var x, f, p;
|
|
16
|
+
function l() {
|
|
17
|
+
var s, a;
|
|
18
|
+
if (n != null && n.state) {
|
|
19
|
+
if (tt(n.state) && U(n.state.value))
|
|
20
|
+
return ue({
|
|
21
|
+
...n.state.value,
|
|
22
|
+
params: ((s = n.state.value) == null ? void 0 : s.params) || {}
|
|
23
|
+
});
|
|
24
|
+
if (U(n.state) && !tt(n.state))
|
|
25
|
+
return ue({
|
|
26
|
+
...Be(n.state),
|
|
27
|
+
params: ((a = n.state) == null ? void 0 : a.params) || {}
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
return {};
|
|
18
31
|
}
|
|
19
|
-
const u =
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
request: a != null && a.request ? async (...s) => {
|
|
23
|
-
var n;
|
|
24
|
-
return await ((n = a == null ? void 0 : a.request) == null ? void 0 : n.call(a, ...s));
|
|
25
|
-
} : void 0
|
|
32
|
+
const u = j({
|
|
33
|
+
...l(),
|
|
34
|
+
request: n == null ? void 0 : n.request
|
|
26
35
|
});
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}, { deep: !0
|
|
36
|
+
n != null && n.state && (tt(n.state) ? V(() => n.state.value, () => {
|
|
37
|
+
b();
|
|
38
|
+
}, { deep: !0 }) : pl(n.state) && V(() => n == null ? void 0 : n.state, () => {
|
|
39
|
+
b();
|
|
40
|
+
}, { deep: !0 }));
|
|
30
41
|
const o = w(() => {
|
|
31
|
-
var s,
|
|
32
|
-
return (
|
|
42
|
+
var s, a;
|
|
43
|
+
return (a = (s = e == null ? void 0 : e.value) == null ? void 0 : s.actionRef) == null ? void 0 : a.call(s);
|
|
33
44
|
}), i = w(() => {
|
|
34
|
-
var s,
|
|
35
|
-
return (
|
|
45
|
+
var s, a;
|
|
46
|
+
return (a = (s = e == null ? void 0 : e.value) == null ? void 0 : s.formRef) == null ? void 0 : a.call(s);
|
|
36
47
|
}), d = w(() => {
|
|
37
|
-
var s,
|
|
48
|
+
var s, a, r;
|
|
38
49
|
return {
|
|
39
50
|
...((s = o.value) == null ? void 0 : s.pageState) || {},
|
|
40
|
-
...((r = (
|
|
51
|
+
...((r = (a = i.value) == null ? void 0 : a.getFormState) == null ? void 0 : r.call(a)) || {}
|
|
41
52
|
};
|
|
42
|
-
}), v =
|
|
43
|
-
|
|
44
|
-
var s,
|
|
45
|
-
return (
|
|
53
|
+
}), v = j(!!((f = (x = o.value) == null ? void 0 : x.loading) != null && f.value));
|
|
54
|
+
V(() => {
|
|
55
|
+
var s, a;
|
|
56
|
+
return (a = (s = o.value) == null ? void 0 : s.loading) == null ? void 0 : a.value;
|
|
46
57
|
}, (s) => {
|
|
47
58
|
v.value = !!s;
|
|
48
|
-
}),
|
|
49
|
-
var
|
|
50
|
-
(r = (
|
|
51
|
-
})
|
|
59
|
+
}), V(v, (s) => {
|
|
60
|
+
var a, r;
|
|
61
|
+
(r = (a = o.value) == null ? void 0 : a.setLoading) == null || r.call(a, !!s);
|
|
62
|
+
});
|
|
63
|
+
function b() {
|
|
64
|
+
u.value = kt(u.value, l(), {
|
|
65
|
+
omitNil: !0,
|
|
66
|
+
omitEmpty: !0
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
return {
|
|
52
70
|
formRef: i,
|
|
53
71
|
actionRef: o,
|
|
54
|
-
tableState: u,
|
|
55
|
-
|
|
72
|
+
tableState: Cl(u),
|
|
73
|
+
requestSearch: d,
|
|
56
74
|
loading: v,
|
|
57
75
|
dataSource: w(() => {
|
|
58
|
-
var s,
|
|
59
|
-
return ((
|
|
76
|
+
var s, a;
|
|
77
|
+
return ((a = (s = o == null ? void 0 : o.value) == null ? void 0 : s.dataSource) == null ? void 0 : a.value) || [];
|
|
60
78
|
}),
|
|
61
79
|
selectedKeys: w(() => {
|
|
62
|
-
var s,
|
|
63
|
-
return ((
|
|
80
|
+
var s, a;
|
|
81
|
+
return ((a = (s = o == null ? void 0 : o.value) == null ? void 0 : s.selectedKeys) == null ? void 0 : a.value) || [];
|
|
64
82
|
}),
|
|
65
83
|
selectedItems: w(() => {
|
|
66
|
-
var s,
|
|
67
|
-
return ((
|
|
84
|
+
var s, a;
|
|
85
|
+
return ((a = (s = o == null ? void 0 : o.value) == null ? void 0 : s.selectedItems) == null ? void 0 : a.value) || [];
|
|
68
86
|
}),
|
|
69
|
-
rowsSelection: (
|
|
87
|
+
rowsSelection: (p = o == null ? void 0 : o.value) == null ? void 0 : p.rowsSelection,
|
|
70
88
|
mutate: (s) => {
|
|
71
|
-
var
|
|
72
|
-
return (r = (
|
|
89
|
+
var a, r;
|
|
90
|
+
return (r = (a = o.value) == null ? void 0 : a.reSetDataList) == null ? void 0 : r.call(a, s);
|
|
73
91
|
},
|
|
74
92
|
reloadAndReset: (s) => {
|
|
75
|
-
var
|
|
76
|
-
return (r = (
|
|
93
|
+
var a, r;
|
|
94
|
+
return (r = (a = o.value) == null ? void 0 : a.reloadAndReset) == null ? void 0 : r.call(a, s);
|
|
77
95
|
},
|
|
78
|
-
setPageAndReload: (s,
|
|
79
|
-
var
|
|
80
|
-
return (P = (
|
|
96
|
+
setPageAndReload: (s, a, r, y) => {
|
|
97
|
+
var S, P;
|
|
98
|
+
return (P = (S = o.value) == null ? void 0 : S.setPageAndReload) == null ? void 0 : P.call(S, s, a, r, y);
|
|
81
99
|
},
|
|
82
100
|
setPagination: (s) => {
|
|
83
|
-
var
|
|
84
|
-
return (r = (
|
|
101
|
+
var a, r;
|
|
102
|
+
return (r = (a = o.value) == null ? void 0 : a.setPagination) == null ? void 0 : r.call(a, s);
|
|
85
103
|
},
|
|
86
104
|
setLoading: (s) => v.value = s,
|
|
87
105
|
setDataValue: (s) => {
|
|
88
|
-
var
|
|
89
|
-
return (r = (
|
|
106
|
+
var a, r;
|
|
107
|
+
return (r = (a = o.value) == null ? void 0 : a.setDataValue) == null ? void 0 : r.call(a, s);
|
|
90
108
|
},
|
|
91
109
|
reload: (s) => {
|
|
92
|
-
var
|
|
93
|
-
return (r = (
|
|
110
|
+
var a, r;
|
|
111
|
+
return (r = (a = o.value) == null ? void 0 : a.reload) == null ? void 0 : r.call(a, s);
|
|
94
112
|
}
|
|
95
113
|
};
|
|
96
114
|
}
|
|
97
|
-
const
|
|
98
|
-
...Je(
|
|
115
|
+
const la = ["rowKey", "rowSelection", "columns", "pagination", "size", "bordered", "loading"], Wt = {
|
|
116
|
+
...Je(Il(), la),
|
|
99
117
|
transformCellText: Function,
|
|
100
118
|
/**
|
|
101
119
|
* @Author gx12358
|
|
@@ -116,7 +134,7 @@ const ea = ["rowKey", "rowSelection", "columns", "pagination", "size", "bordered
|
|
|
116
134
|
default: void 0
|
|
117
135
|
}
|
|
118
136
|
}, he = {
|
|
119
|
-
...
|
|
137
|
+
...Wt,
|
|
120
138
|
rowSelection: {
|
|
121
139
|
type: Object,
|
|
122
140
|
default: void 0
|
|
@@ -392,24 +410,24 @@ const ea = ["rowKey", "rowSelection", "columns", "pagination", "size", "bordered
|
|
|
392
410
|
onRequestError: Function,
|
|
393
411
|
onBeforeSearchSubmit: Function,
|
|
394
412
|
onColumnsStateChange: Function
|
|
395
|
-
}, { provideContext:
|
|
396
|
-
function Ce(e,
|
|
397
|
-
return typeof
|
|
413
|
+
}, { provideContext: aa, useInjectContext: ge } = Yl("pro-table");
|
|
414
|
+
function Ce(e, n) {
|
|
415
|
+
return typeof n == "function" ? n(X(e)) : X(e).format(n);
|
|
398
416
|
}
|
|
399
|
-
function Ke(e,
|
|
400
|
-
return
|
|
417
|
+
function Ke(e, n) {
|
|
418
|
+
return n ? "YYYY-MM-DD HH:mm:ss" : e ?? "YYYY-MM-DD";
|
|
401
419
|
}
|
|
402
|
-
const
|
|
403
|
-
if (
|
|
420
|
+
const Ot = (e, n, l = "string") => {
|
|
421
|
+
if (re(e)) {
|
|
404
422
|
const [u, o] = e;
|
|
405
423
|
let i, d;
|
|
406
|
-
if (Array.isArray(
|
|
424
|
+
if (Array.isArray(n) ? (i = n[0], d = n[1]) : typeof n == "object" && n.type === "mask" ? (i = n.format, d = n.format) : (i = n, d = n), l === "string") {
|
|
407
425
|
const v = u ? Ce(u, i) : "", b = o ? Ce(o, d) : "";
|
|
408
426
|
return [v, b];
|
|
409
427
|
}
|
|
410
428
|
return [X(u), X(o)];
|
|
411
429
|
}
|
|
412
|
-
},
|
|
430
|
+
}, na = (e) => ({
|
|
413
431
|
[`${e.componentCls}-search`]: {
|
|
414
432
|
position: "relative",
|
|
415
433
|
display: "flex",
|
|
@@ -422,7 +440,7 @@ const Il = (e, a, t = "string") => {
|
|
|
422
440
|
border: `${e.lineWidth}px ${e.lineType} ${e.colorSplit}`,
|
|
423
441
|
borderRadius: e.borderRadiusLG,
|
|
424
442
|
marginBottom: e.marginLG,
|
|
425
|
-
backgroundColor:
|
|
443
|
+
backgroundColor: Yt(e, e.colorBgContainer)
|
|
426
444
|
},
|
|
427
445
|
"&-collapse-buttons": {
|
|
428
446
|
display: "flex",
|
|
@@ -470,13 +488,13 @@ const Il = (e, a, t = "string") => {
|
|
|
470
488
|
alignItems: "center"
|
|
471
489
|
}
|
|
472
490
|
});
|
|
473
|
-
function
|
|
474
|
-
const
|
|
491
|
+
function ua(e, n) {
|
|
492
|
+
const l = Fe({});
|
|
475
493
|
function u() {
|
|
476
494
|
Object.keys(e).forEach((d) => {
|
|
477
495
|
o(d, e[d]);
|
|
478
496
|
});
|
|
479
|
-
const i =
|
|
497
|
+
const i = n.find((d) => d.valueType === "dateRange");
|
|
480
498
|
i && o(i.name || "", e[i.rangeStartName || "start"] ? [
|
|
481
499
|
e[i.rangeStartName || "start"],
|
|
482
500
|
e[i.rangeEndName || "end"]
|
|
@@ -486,23 +504,23 @@ function aa(e, a) {
|
|
|
486
504
|
u();
|
|
487
505
|
});
|
|
488
506
|
function o(i, d) {
|
|
489
|
-
|
|
507
|
+
l[i] = d;
|
|
490
508
|
}
|
|
491
509
|
return {
|
|
492
|
-
formState:
|
|
510
|
+
formState: l,
|
|
493
511
|
resetFormState: u,
|
|
494
512
|
changeFormState: o
|
|
495
513
|
};
|
|
496
514
|
}
|
|
497
515
|
const {
|
|
498
|
-
useBreakpoint:
|
|
499
|
-
} =
|
|
500
|
-
MonthPicker:
|
|
501
|
-
RangePicker:
|
|
502
|
-
YearPicker:
|
|
503
|
-
WeekPicker:
|
|
504
|
-
QuarterPicker:
|
|
505
|
-
} =
|
|
516
|
+
useBreakpoint: ia
|
|
517
|
+
} = dt, {
|
|
518
|
+
MonthPicker: sa,
|
|
519
|
+
RangePicker: oa,
|
|
520
|
+
YearPicker: ra,
|
|
521
|
+
WeekPicker: ca,
|
|
522
|
+
QuarterPicker: da
|
|
523
|
+
} = Lt, lt = [{
|
|
506
524
|
value: "xxl",
|
|
507
525
|
span: 4
|
|
508
526
|
}, {
|
|
@@ -521,13 +539,13 @@ const {
|
|
|
521
539
|
value: "xs",
|
|
522
540
|
span: 1
|
|
523
541
|
}];
|
|
524
|
-
function
|
|
525
|
-
let
|
|
526
|
-
return e.forEach((
|
|
527
|
-
|
|
528
|
-
}), e.sort((
|
|
542
|
+
function fa(e) {
|
|
543
|
+
let n = e.reduce((l, u) => u.order !== void 0 ? Math.max(l, u.order) : l, 0);
|
|
544
|
+
return e.forEach((l) => {
|
|
545
|
+
l.order === void 0 && (n += 1, l.order = n);
|
|
546
|
+
}), e.sort((l, u) => l.order - u.order), e;
|
|
529
547
|
}
|
|
530
|
-
const
|
|
548
|
+
const Ht = /* @__PURE__ */ me({
|
|
531
549
|
name: "ProTableForm",
|
|
532
550
|
props: {
|
|
533
551
|
modal: he.modalScroll,
|
|
@@ -542,348 +560,348 @@ const Ll = /* @__PURE__ */ me({
|
|
|
542
560
|
onSearch: Function
|
|
543
561
|
},
|
|
544
562
|
setup(e, {
|
|
545
|
-
slots:
|
|
546
|
-
expose:
|
|
563
|
+
slots: n,
|
|
564
|
+
expose: l
|
|
547
565
|
}) {
|
|
548
|
-
var
|
|
566
|
+
var Te, Ie;
|
|
549
567
|
const {
|
|
550
568
|
wrapSSR: u,
|
|
551
569
|
hashId: o
|
|
552
|
-
} = Ze("ProTableForm", [
|
|
570
|
+
} = Ze("ProTableForm", [na], e.prefixCls), i = zt(), d = ia(), {
|
|
553
571
|
manualSearch: v,
|
|
554
572
|
searchConfig: b,
|
|
555
573
|
searchActions: x
|
|
556
574
|
} = ge(), {
|
|
557
575
|
formState: f,
|
|
558
|
-
resetFormState:
|
|
576
|
+
resetFormState: p,
|
|
559
577
|
changeFormState: s
|
|
560
|
-
} =
|
|
561
|
-
var
|
|
562
|
-
return
|
|
578
|
+
} = ua(e.defaultParams || {}, e.searchMap || []), a = j(((Te = b.value) == null ? void 0 : Te.collapsed) ?? ((Ie = b.value) == null ? void 0 : Ie.defaultCollapsed)), r = w(() => {
|
|
579
|
+
var t, g;
|
|
580
|
+
return ie((t = x.value) == null ? void 0 : t.reset) ? (g = x.value) == null ? void 0 : g.reset : v.value;
|
|
563
581
|
}), y = w(() => {
|
|
564
|
-
var
|
|
565
|
-
return P((
|
|
566
|
-
}),
|
|
567
|
-
var
|
|
568
|
-
return (
|
|
582
|
+
var t;
|
|
583
|
+
return P((t = b.value) == null ? void 0 : t.span);
|
|
584
|
+
}), S = w(() => {
|
|
585
|
+
var t;
|
|
586
|
+
return (t = b.value) == null ? void 0 : t.label;
|
|
569
587
|
});
|
|
570
|
-
|
|
571
|
-
var
|
|
572
|
-
return (
|
|
573
|
-
}, (
|
|
574
|
-
|
|
588
|
+
V(() => {
|
|
589
|
+
var t;
|
|
590
|
+
return (t = b.value) == null ? void 0 : t.collapsed;
|
|
591
|
+
}, (t) => {
|
|
592
|
+
a.value = t;
|
|
575
593
|
});
|
|
576
|
-
function P(
|
|
594
|
+
function P(t) {
|
|
577
595
|
let g = 4;
|
|
578
|
-
for (let F = 0; F <
|
|
579
|
-
const I =
|
|
596
|
+
for (let F = 0; F < lt.length; F += 1) {
|
|
597
|
+
const I = lt[F].value;
|
|
580
598
|
if (d.value[I]) {
|
|
581
|
-
g = (
|
|
599
|
+
g = (t == null ? void 0 : t[I]) || (e.modal ? 3 : lt[F].span);
|
|
582
600
|
break;
|
|
583
601
|
}
|
|
584
602
|
}
|
|
585
603
|
return g;
|
|
586
604
|
}
|
|
587
|
-
const O = (
|
|
588
|
-
|
|
589
|
-
}, M = (
|
|
605
|
+
const O = (t) => {
|
|
606
|
+
a.value = t;
|
|
607
|
+
}, M = (t, g, F) => (t + 1) % g === 0 ? {
|
|
590
608
|
...F,
|
|
591
609
|
marginRight: 0
|
|
592
610
|
} : {
|
|
593
611
|
...F,
|
|
594
612
|
marginRight: "2%"
|
|
595
613
|
}, G = () => {
|
|
596
|
-
const
|
|
597
|
-
return g && (
|
|
598
|
-
}, W = (
|
|
614
|
+
const t = ue(f), g = e.searchMap.find((T) => T.valueType === "text") || "", F = e.searchMap.find((T) => T.valueType === "dateRange") || "", I = e.searchMap.find((T) => T.valueType === "treeSelect");
|
|
615
|
+
return g && (t[g.name] = f[g.name] || g.initialValue || ""), F && (t[F.rangeStartName || "start"] = t[F.name] ? t[F.name][0] : "", t[F.rangeEndName || "end"] = t[F.name] ? t[F.name][1] : "", delete t[F.name]), I && (I != null && I.name && re(f[I == null ? void 0 : I.name]) && (t[I.name] = f[I.name].length ? f[I.name].map((T) => T[I.valueKey === "text" ? "label" : "value"]).join() : ""), I != null && I.name && re(t[I == null ? void 0 : I.name]) && (t[I.name] = t[I.name].length ? t[I.name].map((T) => T[I.valueKey === "text" ? "label" : "value"]) : "")), t;
|
|
616
|
+
}, W = (t = !1, g) => {
|
|
599
617
|
var F;
|
|
600
|
-
(!v.value ||
|
|
601
|
-
}, K = (
|
|
618
|
+
(!v.value || t) && ((F = e.onSearch) == null || F.call(e, G(), t ? g ? "reset" : "submit" : void 0));
|
|
619
|
+
}, K = (t, g) => {
|
|
602
620
|
var F, I;
|
|
603
621
|
switch (g.valueType) {
|
|
604
622
|
case "text":
|
|
605
|
-
s(g.name || "",
|
|
623
|
+
s(g.name || "", t || "");
|
|
606
624
|
break;
|
|
607
625
|
case "select":
|
|
608
|
-
s(g.name || "",
|
|
626
|
+
s(g.name || "", t ?? void 0);
|
|
609
627
|
break;
|
|
610
628
|
case "treeSelect":
|
|
611
|
-
s(g.name || "",
|
|
629
|
+
s(g.name || "", t ?? ((F = g.field) != null && F.treeCheckable || (I = g.field) != null && I.multiple ? [] : null));
|
|
612
630
|
break;
|
|
613
631
|
case "date":
|
|
614
|
-
s(g.name || "",
|
|
632
|
+
s(g.name || "", t ? Ce(t, Ke(g.valueFormat, g.showTime)) : null);
|
|
615
633
|
break;
|
|
616
634
|
case "dateWeek":
|
|
617
|
-
s(g.name || "",
|
|
635
|
+
s(g.name || "", t ? Ce(t, "YYYY-wo") : null);
|
|
618
636
|
break;
|
|
619
637
|
case "dateMonth":
|
|
620
|
-
s(g.name || "",
|
|
638
|
+
s(g.name || "", t ? Ce(t, "YYYY-MM") : null);
|
|
621
639
|
break;
|
|
622
640
|
case "dateQuarter":
|
|
623
|
-
s(g.name || "",
|
|
641
|
+
s(g.name || "", t ? Ce(t, "YYYY-QQ") : null);
|
|
624
642
|
break;
|
|
625
643
|
case "dateYear":
|
|
626
|
-
s(g.name || "",
|
|
644
|
+
s(g.name || "", t ? Ce(t, "YYYY") : null);
|
|
627
645
|
break;
|
|
628
646
|
case "dateRange":
|
|
629
|
-
s(g.name || "",
|
|
647
|
+
s(g.name || "", t && re(t) && t.length === 2 ? Ot(t, Ke(g.valueFormat, g.showTime)) : null);
|
|
630
648
|
break;
|
|
631
649
|
case "time":
|
|
632
|
-
s(g.name || "",
|
|
650
|
+
s(g.name || "", t ? Ce(t, g.valueFormat || "HH:mm:ss") : null);
|
|
633
651
|
break;
|
|
634
652
|
}
|
|
635
653
|
g.valueType === "treeSelect" || g.valueType, W();
|
|
636
|
-
},
|
|
637
|
-
|
|
654
|
+
}, te = (t = !0) => {
|
|
655
|
+
p(), W(!0, t);
|
|
638
656
|
};
|
|
639
|
-
|
|
657
|
+
l({
|
|
640
658
|
getFormState: () => G(),
|
|
641
|
-
resetForm:
|
|
659
|
+
resetForm: te
|
|
642
660
|
});
|
|
643
661
|
const z = () => {
|
|
644
662
|
var g;
|
|
645
|
-
const
|
|
646
|
-
if (
|
|
647
|
-
const F = ee(
|
|
663
|
+
const t = (g = i == null ? void 0 : i.emptyText) == null ? void 0 : g.value;
|
|
664
|
+
if (t) {
|
|
665
|
+
const F = ee(t), I = F ? At(t) : jt(t || []);
|
|
648
666
|
return c("div", {
|
|
649
|
-
class:
|
|
650
|
-
}, [F ? I :
|
|
667
|
+
class: pe(`${e.prefixCls}-search-empty-text`, o.value)
|
|
668
|
+
}, [F ? I : re(I) ? I.map((T) => ct(T)) : void 0]);
|
|
651
669
|
}
|
|
652
670
|
}, Y = () => (v.value || r.value) && c(xe, null, {
|
|
653
|
-
default: () => [r.value && c(
|
|
654
|
-
onClick: () =>
|
|
671
|
+
default: () => [r.value && c(It, {
|
|
672
|
+
onClick: () => te()
|
|
655
673
|
}, {
|
|
656
674
|
default: () => {
|
|
657
|
-
var
|
|
658
|
-
return [((
|
|
675
|
+
var t;
|
|
676
|
+
return [((t = x.value) == null ? void 0 : t.resetText) || "重置"];
|
|
659
677
|
}
|
|
660
|
-
}), v.value && c(
|
|
678
|
+
}), v.value && c(It, {
|
|
661
679
|
loading: e.loading,
|
|
662
680
|
type: "primary",
|
|
663
681
|
onClick: () => W(!0)
|
|
664
682
|
}, {
|
|
665
683
|
default: () => {
|
|
666
|
-
var
|
|
667
|
-
return [((
|
|
684
|
+
var t;
|
|
685
|
+
return [((t = x.value) == null ? void 0 : t.searchText) || "查询"];
|
|
668
686
|
}
|
|
669
687
|
})]
|
|
670
|
-
}),
|
|
671
|
-
formItemStyle:
|
|
688
|
+
}), le = ({
|
|
689
|
+
formItemStyle: t,
|
|
672
690
|
collapsed: g,
|
|
673
691
|
collapseRender: F = !0
|
|
674
692
|
}) => c("div", {
|
|
675
|
-
style:
|
|
693
|
+
style: t,
|
|
676
694
|
class: `${e.prefixCls}-search-collapse-buttons ${o.value}`
|
|
677
695
|
}, [c(xe, {
|
|
678
696
|
size: 16
|
|
679
697
|
}, {
|
|
680
698
|
default: () => {
|
|
681
|
-
var I, T,
|
|
682
|
-
return [Y(), ((I = b.value) == null ? void 0 : I.collapseRender) !== !1 && F && c(Ye, null, [typeof ((T = b.value) == null ? void 0 : T.collapseRender) == "function" ? (
|
|
699
|
+
var I, T, B;
|
|
700
|
+
return [Y(), ((I = b.value) == null ? void 0 : I.collapseRender) !== !1 && F && c(Ye, null, [typeof ((T = b.value) == null ? void 0 : T.collapseRender) == "function" ? (B = b.value) == null ? void 0 : B.collapseRender(g) : c("span", {
|
|
683
701
|
class: `${e.prefixCls}-a ${o.value}`,
|
|
684
702
|
onClick: () => O(!g)
|
|
685
|
-
}, [g ? "收起" : "展开", g ? c(
|
|
703
|
+
}, [g ? "收起" : "展开", g ? c(Ol, null, null) : c(Pl, null, null)])])];
|
|
686
704
|
}
|
|
687
|
-
})]),
|
|
688
|
-
var I, T,
|
|
705
|
+
})]), Se = (t) => {
|
|
706
|
+
var I, T, B, D;
|
|
689
707
|
let g;
|
|
690
|
-
const F = v.value ?
|
|
691
|
-
switch (
|
|
708
|
+
const F = v.value ? Ft : Ft.Search;
|
|
709
|
+
switch (t.valueType) {
|
|
692
710
|
case "text":
|
|
693
|
-
g = c(F,
|
|
711
|
+
g = c(F, q({
|
|
694
712
|
style: {
|
|
695
713
|
width: "100%"
|
|
696
714
|
},
|
|
697
|
-
value: f[
|
|
698
|
-
placeholder:
|
|
699
|
-
allowClear:
|
|
700
|
-
onChange: (m) => K(m.target.value,
|
|
715
|
+
value: f[t.name],
|
|
716
|
+
placeholder: t.placeholder || "请输入",
|
|
717
|
+
allowClear: t.allowClear || t.allowClear === !1 ? t.allowClear : !0,
|
|
718
|
+
onChange: (m) => K(m.target.value, t),
|
|
701
719
|
onSearch: (m) => W()
|
|
702
|
-
},
|
|
720
|
+
}, t.field || {}), null);
|
|
703
721
|
break;
|
|
704
722
|
case "select":
|
|
705
|
-
g = c(
|
|
723
|
+
g = c(Vl, q({
|
|
706
724
|
style: {
|
|
707
725
|
width: "100%"
|
|
708
726
|
},
|
|
709
|
-
value:
|
|
727
|
+
value: t.loading ? void 0 : f[t.name],
|
|
710
728
|
optionFilterProp: "label",
|
|
711
|
-
placeholder:
|
|
712
|
-
showSearch:
|
|
713
|
-
allowClear:
|
|
729
|
+
placeholder: t.placeholder || "请选择",
|
|
730
|
+
showSearch: t.showSearch,
|
|
731
|
+
allowClear: t.allowClear ?? !0,
|
|
714
732
|
getPopupContainer: (m) => m && m.parentNode ? m.parentNode : m,
|
|
715
|
-
notFoundContent:
|
|
733
|
+
notFoundContent: t.loading === void 0 ? void 0 : t.loading ? c(ot, {
|
|
716
734
|
size: "small",
|
|
717
735
|
indicator: (I = i == null ? void 0 : i.indicator) == null ? void 0 : I.value
|
|
718
736
|
}, null) : z(),
|
|
719
|
-
onChange: (m) => K(m,
|
|
720
|
-
options:
|
|
737
|
+
onChange: (m) => K(m, t),
|
|
738
|
+
options: t.loading ? [] : (T = t == null ? void 0 : t.valueEnum) == null ? void 0 : T.map((m) => ({
|
|
721
739
|
label: m.text,
|
|
722
740
|
value: m.value
|
|
723
741
|
}))
|
|
724
|
-
},
|
|
742
|
+
}, t.field || {}), null);
|
|
725
743
|
break;
|
|
726
744
|
case "treeSelect":
|
|
727
|
-
g = c(
|
|
745
|
+
g = c(Hl, q({
|
|
728
746
|
style: {
|
|
729
747
|
width: "100%"
|
|
730
748
|
},
|
|
731
|
-
value: f[
|
|
732
|
-
placeholder:
|
|
733
|
-
allowClear:
|
|
734
|
-
treeData:
|
|
749
|
+
value: f[t.name],
|
|
750
|
+
placeholder: t.placeholder || "请选择",
|
|
751
|
+
allowClear: t.allowClear ?? !0,
|
|
752
|
+
treeData: t.loading ? [] : t.valueEnum,
|
|
735
753
|
getPopupContainer: (m) => m && m.parentNode ? m.parentNode : m,
|
|
736
|
-
notFoundContent:
|
|
754
|
+
notFoundContent: t.loading === void 0 ? void 0 : t.loading ? c(ot, {
|
|
737
755
|
size: "small",
|
|
738
|
-
indicator: (
|
|
756
|
+
indicator: (B = i == null ? void 0 : i.indicator) == null ? void 0 : B.value
|
|
739
757
|
}, null) : z(),
|
|
740
|
-
onChange: (m) => K(m,
|
|
741
|
-
},
|
|
758
|
+
onChange: (m) => K(m, t)
|
|
759
|
+
}, t.field || {}), null);
|
|
742
760
|
break;
|
|
743
761
|
case "date":
|
|
744
|
-
g = c(
|
|
762
|
+
g = c(Lt, q({
|
|
745
763
|
style: {
|
|
746
764
|
width: "100%"
|
|
747
765
|
},
|
|
748
|
-
value: f[
|
|
766
|
+
value: f[t.name] ? X(f[t.name]) : void 0,
|
|
749
767
|
getPopupContainer: (m) => m && m.parentNode ? m.parentNode : m,
|
|
750
|
-
placeholder:
|
|
751
|
-
allowClear:
|
|
752
|
-
format: Ke(
|
|
753
|
-
showTime:
|
|
754
|
-
showToday:
|
|
755
|
-
onChange: (m) => K(m,
|
|
756
|
-
},
|
|
768
|
+
placeholder: t.placeholder || "请选择",
|
|
769
|
+
allowClear: t.allowClear ?? !0,
|
|
770
|
+
format: Ke(t.valueFormat, t.showTime),
|
|
771
|
+
showTime: t.showTime,
|
|
772
|
+
showToday: t.showToday || !0,
|
|
773
|
+
onChange: (m) => K(m, t)
|
|
774
|
+
}, t.field || {}), null);
|
|
757
775
|
break;
|
|
758
776
|
case "dateWeek":
|
|
759
|
-
g = c(
|
|
777
|
+
g = c(ca, q({
|
|
760
778
|
style: {
|
|
761
779
|
width: "100%"
|
|
762
780
|
},
|
|
763
|
-
value: f[
|
|
781
|
+
value: f[t.name] ? X(f[t.name], t.valueFormat || "YYYY-wo") : void 0,
|
|
764
782
|
getPopupContainer: (m) => m && m.parentNode ? m.parentNode : m,
|
|
765
|
-
allowClear:
|
|
766
|
-
placeholder:
|
|
767
|
-
onChange: (m) => K(m,
|
|
768
|
-
},
|
|
783
|
+
allowClear: t.allowClear ?? !0,
|
|
784
|
+
placeholder: t.placeholder || "请选择",
|
|
785
|
+
onChange: (m) => K(m, t)
|
|
786
|
+
}, t.field || {}), null);
|
|
769
787
|
break;
|
|
770
788
|
case "dateMonth":
|
|
771
|
-
g = c(
|
|
789
|
+
g = c(sa, q({
|
|
772
790
|
style: {
|
|
773
791
|
width: "100%"
|
|
774
792
|
},
|
|
775
|
-
value: f[
|
|
793
|
+
value: f[t.name] ? X(f[t.name], t.valueFormat || "YYYY-MM") : void 0,
|
|
776
794
|
getPopupContainer: (m) => m && m.parentNode ? m.parentNode : m,
|
|
777
|
-
allowClear:
|
|
778
|
-
placeholder:
|
|
779
|
-
onChange: (m) => K(m,
|
|
780
|
-
},
|
|
795
|
+
allowClear: t.allowClear ?? !0,
|
|
796
|
+
placeholder: t.placeholder || "请选择",
|
|
797
|
+
onChange: (m) => K(m, t)
|
|
798
|
+
}, t.field || {}), null);
|
|
781
799
|
break;
|
|
782
800
|
case "dateQuarter":
|
|
783
|
-
g = c(
|
|
801
|
+
g = c(da, q({
|
|
784
802
|
style: {
|
|
785
803
|
width: "100%"
|
|
786
804
|
},
|
|
787
|
-
value: f[
|
|
805
|
+
value: f[t.name] ? X(f[t.name], t.valueFormat || "YYYY-QQ") : void 0,
|
|
788
806
|
getPopupContainer: (m) => m && m.parentNode ? m.parentNode : m,
|
|
789
|
-
allowClear:
|
|
790
|
-
placeholder:
|
|
791
|
-
onChange: (m) => K(m,
|
|
792
|
-
},
|
|
807
|
+
allowClear: t.allowClear ?? !0,
|
|
808
|
+
placeholder: t.placeholder || "请选择",
|
|
809
|
+
onChange: (m) => K(m, t)
|
|
810
|
+
}, t.field || {}), null);
|
|
793
811
|
break;
|
|
794
812
|
case "dateYear":
|
|
795
|
-
g = c(
|
|
813
|
+
g = c(ra, q({
|
|
796
814
|
style: {
|
|
797
815
|
width: "100%"
|
|
798
816
|
},
|
|
799
|
-
value: f[
|
|
817
|
+
value: f[t.name] ? X(f[t.name], t.valueFormat || "YYYY") : void 0,
|
|
800
818
|
getPopupContainer: (m) => m && m.parentNode ? m.parentNode : m,
|
|
801
|
-
allowClear:
|
|
802
|
-
placeholder:
|
|
803
|
-
onChange: (m) => K(m,
|
|
804
|
-
},
|
|
819
|
+
allowClear: t.allowClear ?? !0,
|
|
820
|
+
placeholder: t.placeholder || "请选择",
|
|
821
|
+
onChange: (m) => K(m, t)
|
|
822
|
+
}, t.field || {}), null);
|
|
805
823
|
break;
|
|
806
824
|
case "dateRange":
|
|
807
|
-
g = c(
|
|
825
|
+
g = c(oa, q({
|
|
808
826
|
style: {
|
|
809
827
|
width: "100%"
|
|
810
828
|
},
|
|
811
|
-
value: f[
|
|
829
|
+
value: f[t.name] && re(f[t.name]) && ((D = f[t.name]) == null ? void 0 : D.length) === 2 ? Ot(f[t.name], Ke(t.valueFormat, t.showTime), "dayjs") : void 0,
|
|
812
830
|
getPopupContainer: (m) => m && m.parentNode ? m.parentNode : m,
|
|
813
|
-
placeholder:
|
|
814
|
-
format: Ke(
|
|
815
|
-
showTime:
|
|
816
|
-
onChange: (m) => K(m,
|
|
817
|
-
},
|
|
831
|
+
placeholder: t.placeholder || ["开始日期", "结束日期"],
|
|
832
|
+
format: Ke(t.valueFormat, t.showTime),
|
|
833
|
+
showTime: t.showTime,
|
|
834
|
+
onChange: (m) => K(m, t)
|
|
835
|
+
}, t.field || {}), null);
|
|
818
836
|
break;
|
|
819
837
|
case "time":
|
|
820
|
-
g = c(
|
|
838
|
+
g = c(Wl, q({
|
|
821
839
|
style: {
|
|
822
840
|
width: "100%"
|
|
823
841
|
},
|
|
824
|
-
value: f[
|
|
842
|
+
value: f[t.name] ? X(f[t.name], t.valueFormat || "HH:mm:ss") : void 0,
|
|
825
843
|
getPopupContainer: (m) => m && m.parentNode ? m.parentNode : m,
|
|
826
|
-
placeholder:
|
|
827
|
-
allowClear:
|
|
828
|
-
use12Hours:
|
|
829
|
-
format:
|
|
830
|
-
onChange: (m) => K(m,
|
|
831
|
-
},
|
|
844
|
+
placeholder: t.placeholder || "请选择",
|
|
845
|
+
allowClear: t.allowClear || t.allowClear === !1 ? t.allowClear : !0,
|
|
846
|
+
use12Hours: t.use12Hours,
|
|
847
|
+
format: t.valueFormat || "HH:mm:ss",
|
|
848
|
+
onChange: (m) => K(m, t)
|
|
849
|
+
}, t.field || {}), null);
|
|
832
850
|
break;
|
|
833
851
|
}
|
|
834
852
|
return g;
|
|
835
853
|
}, Z = ({
|
|
836
|
-
formItemStyle:
|
|
854
|
+
formItemStyle: t = {},
|
|
837
855
|
item: g
|
|
838
856
|
}) => {
|
|
839
|
-
var
|
|
840
|
-
const F = ee(g) ? (
|
|
857
|
+
var B, D, m, Q, ce, _, ae, $e;
|
|
858
|
+
const F = ee(g) ? (B = g.props) == null ? void 0 : B.label : g.label, I = (ee(g) ? (D = g.props) == null ? void 0 : D.labelWidth : g.labelWidth) || ((m = S.value) == null ? void 0 : m.width), T = (ee(g) ? (Q = g.props) == null ? void 0 : Q.labelAlign : g.labelAlign) || ((ce = S.value) == null ? void 0 : ce.align);
|
|
841
859
|
return c("div", {
|
|
842
860
|
class: `${e.prefixCls}-search-item`,
|
|
843
861
|
style: {
|
|
844
|
-
...
|
|
845
|
-
gap: (_ =
|
|
862
|
+
...t,
|
|
863
|
+
gap: (_ = S.value) != null && _.gap ? Bt((ae = S.value) == null ? void 0 : ae.gap) : void 0
|
|
846
864
|
}
|
|
847
865
|
}, [F && c("div", {
|
|
848
|
-
class:
|
|
866
|
+
class: pe(`${e.prefixCls}-search-item-label`, (($e = S.value) == null ? void 0 : $e.colon) === !1 && `${e.prefixCls}-search-item-label-no-colon`, T && `${e.prefixCls}-search-item-label-${T}`),
|
|
849
867
|
style: {
|
|
850
|
-
width: I ?
|
|
868
|
+
width: I ? Bt(I) : void 0
|
|
851
869
|
}
|
|
852
870
|
}, [F]), c("div", {
|
|
853
|
-
class:
|
|
854
|
-
}, [ee(g) ? g :
|
|
855
|
-
},
|
|
871
|
+
class: pe(`${e.prefixCls}-search-item-children`)
|
|
872
|
+
}, [ee(g) ? g : Se(g)])]);
|
|
873
|
+
}, we = () => {
|
|
856
874
|
var I, T;
|
|
857
|
-
let
|
|
858
|
-
|
|
859
|
-
const g =
|
|
860
|
-
var
|
|
875
|
+
let t = ((I = n.default) == null ? void 0 : I.call(n)) || [];
|
|
876
|
+
t.length === 1 && t[0].type === "template" && (t = ((T = t[0]) == null ? void 0 : T.children) || []);
|
|
877
|
+
const g = fa([...e.searchMap, ...t.map((B) => {
|
|
878
|
+
var D;
|
|
861
879
|
return {
|
|
862
|
-
...
|
|
863
|
-
order: ((
|
|
880
|
+
...B,
|
|
881
|
+
order: ((D = B.props) == null ? void 0 : D.order) || void 0
|
|
864
882
|
};
|
|
865
883
|
})]), F = {
|
|
866
884
|
width: `${(100 - (y.value - 1) * 2) / y.value}%`
|
|
867
885
|
};
|
|
868
|
-
return g.map((
|
|
869
|
-
const m = M(
|
|
870
|
-
return g.length < y.value ||
|
|
886
|
+
return g.map((B, D) => {
|
|
887
|
+
const m = M(D, y.value, F);
|
|
888
|
+
return g.length < y.value || a.value ? c(Ye, null, [Z({
|
|
871
889
|
formItemStyle: m,
|
|
872
|
-
item:
|
|
873
|
-
}),
|
|
890
|
+
item: B
|
|
891
|
+
}), D === g.length - 1 && le({
|
|
874
892
|
formItemStyle: {
|
|
875
893
|
flex: 1,
|
|
876
894
|
justifyContent: "flex-end"
|
|
877
895
|
},
|
|
878
|
-
collapsed:
|
|
879
|
-
collapseRender: !!
|
|
880
|
-
})]) : c(Ye, null, [
|
|
896
|
+
collapsed: a.value,
|
|
897
|
+
collapseRender: !!a.value
|
|
898
|
+
})]) : c(Ye, null, [D < y.value - 1 && Z({
|
|
881
899
|
formItemStyle: m,
|
|
882
|
-
item:
|
|
883
|
-
}),
|
|
900
|
+
item: B
|
|
901
|
+
}), D === y.value - 1 && (y.value - 1 === 0 || g.length === y.value) && Z({
|
|
884
902
|
formItemStyle: m,
|
|
885
|
-
item:
|
|
886
|
-
}),
|
|
903
|
+
item: B
|
|
904
|
+
}), D === y.value - 1 && g.length >= y.value && le({
|
|
887
905
|
formItemStyle: {
|
|
888
906
|
flex: 1,
|
|
889
907
|
justifyContent: "flex-end"
|
|
@@ -895,21 +913,21 @@ const Ll = /* @__PURE__ */ me({
|
|
|
895
913
|
};
|
|
896
914
|
return () => {
|
|
897
915
|
var g;
|
|
898
|
-
const
|
|
916
|
+
const t = e.cardBordered && `${e.prefixCls}-search-border`;
|
|
899
917
|
return u(c("div", {
|
|
900
|
-
class:
|
|
901
|
-
}, [
|
|
918
|
+
class: pe(o.value, `${e.prefixCls}-search`, t, o.value, (g = b.value) == null ? void 0 : g.className)
|
|
919
|
+
}, [we()]));
|
|
902
920
|
};
|
|
903
921
|
}
|
|
904
922
|
});
|
|
905
|
-
|
|
923
|
+
Ht.inheritAttrs = !1;
|
|
906
924
|
const We = (e) => {
|
|
907
|
-
const
|
|
908
|
-
return
|
|
925
|
+
const n = j(null);
|
|
926
|
+
return n.value = e, (...l) => {
|
|
909
927
|
var u;
|
|
910
|
-
return (u =
|
|
928
|
+
return (u = n.value) == null ? void 0 : u.call(n, ...l);
|
|
911
929
|
};
|
|
912
|
-
},
|
|
930
|
+
}, ha = (e) => ({
|
|
913
931
|
[`${e.componentCls}`]: {
|
|
914
932
|
width: "auto",
|
|
915
933
|
"&-title": {
|
|
@@ -991,10 +1009,10 @@ const We = (e) => {
|
|
|
991
1009
|
}
|
|
992
1010
|
}
|
|
993
1011
|
}
|
|
994
|
-
}),
|
|
1012
|
+
}), at = ({
|
|
995
1013
|
title: e,
|
|
996
|
-
show:
|
|
997
|
-
treeKey:
|
|
1014
|
+
show: n,
|
|
1015
|
+
treeKey: l,
|
|
998
1016
|
fixed: u
|
|
999
1017
|
}, {
|
|
1000
1018
|
slots: o
|
|
@@ -1003,16 +1021,16 @@ const We = (e) => {
|
|
|
1003
1021
|
cacheColumns: i,
|
|
1004
1022
|
settingsAction: d
|
|
1005
1023
|
} = ge();
|
|
1006
|
-
return
|
|
1024
|
+
return n ? c(ve, {
|
|
1007
1025
|
title: e
|
|
1008
1026
|
}, {
|
|
1009
1027
|
default: () => {
|
|
1010
1028
|
var v;
|
|
1011
1029
|
return [c("span", {
|
|
1012
1030
|
onClick: (b) => {
|
|
1013
|
-
var
|
|
1031
|
+
var a, r, y;
|
|
1014
1032
|
b.stopPropagation(), b.preventDefault();
|
|
1015
|
-
const x = ((r = (
|
|
1033
|
+
const x = ((r = (a = C(i)) == null ? void 0 : a.find((S) => S.uuid === l)) == null ? void 0 : r.key) || "", f = (d == null ? void 0 : d.columnsMap[x]) || {};
|
|
1016
1034
|
if (typeof f.disable == "boolean" ? f.disable : (y = f.disable) == null ? void 0 : y.icon) return;
|
|
1017
1035
|
const s = {
|
|
1018
1036
|
...d == null ? void 0 : d.columnsMap,
|
|
@@ -1026,7 +1044,7 @@ const We = (e) => {
|
|
|
1026
1044
|
}, [(v = o.default) == null ? void 0 : v.call(o)])];
|
|
1027
1045
|
}
|
|
1028
1046
|
}) : null;
|
|
1029
|
-
},
|
|
1047
|
+
}, va = /* @__PURE__ */ me({
|
|
1030
1048
|
props: {
|
|
1031
1049
|
treeKey: String,
|
|
1032
1050
|
hashId: String,
|
|
@@ -1037,35 +1055,35 @@ const We = (e) => {
|
|
|
1037
1055
|
},
|
|
1038
1056
|
setup(e) {
|
|
1039
1057
|
const {
|
|
1040
|
-
cacheColumns:
|
|
1041
|
-
} = ge(),
|
|
1058
|
+
cacheColumns: n
|
|
1059
|
+
} = ge(), l = w(() => {
|
|
1042
1060
|
var o, i;
|
|
1043
|
-
return ((i = (o = C(
|
|
1044
|
-
}), u = w(() =>
|
|
1061
|
+
return ((i = (o = C(n)) == null ? void 0 : o.find((d) => d.uuid === e.treeKey)) == null ? void 0 : i.key) || "";
|
|
1062
|
+
}), u = w(() => l.value === "action" && e.autoScroll);
|
|
1045
1063
|
return () => {
|
|
1046
1064
|
const o = c("span", {
|
|
1047
1065
|
class: [`${e.className}-list-item-option`, e.hashId]
|
|
1048
|
-
}, [c(
|
|
1066
|
+
}, [c(at, {
|
|
1049
1067
|
treeKey: e.treeKey || "",
|
|
1050
1068
|
fixed: "left",
|
|
1051
1069
|
title: "固定在列首",
|
|
1052
1070
|
show: e.fixed !== "left" && !u.value
|
|
1053
1071
|
}, {
|
|
1054
|
-
default: () => [c(
|
|
1055
|
-
}), c(
|
|
1072
|
+
default: () => [c(kl, null, null)]
|
|
1073
|
+
}), c(at, {
|
|
1056
1074
|
treeKey: e.treeKey || "",
|
|
1057
1075
|
fixed: void 0,
|
|
1058
1076
|
title: "不固定",
|
|
1059
1077
|
show: !!e.fixed && !u.value
|
|
1060
1078
|
}, {
|
|
1061
|
-
default: () => [c(
|
|
1062
|
-
}), c(
|
|
1079
|
+
default: () => [c(jl, null, null)]
|
|
1080
|
+
}), c(at, {
|
|
1063
1081
|
treeKey: e.treeKey || "",
|
|
1064
1082
|
fixed: "right",
|
|
1065
1083
|
title: "固定在列尾",
|
|
1066
1084
|
show: e.fixed !== "right"
|
|
1067
1085
|
}, {
|
|
1068
|
-
default: () => [c(
|
|
1086
|
+
default: () => [c(Dl, null, null)]
|
|
1069
1087
|
})]);
|
|
1070
1088
|
return c("span", {
|
|
1071
1089
|
class: [`${e.className}-list-item`, e.hashId],
|
|
@@ -1075,7 +1093,7 @@ const We = (e) => {
|
|
|
1075
1093
|
}, [e.title]), o]);
|
|
1076
1094
|
};
|
|
1077
1095
|
}
|
|
1078
|
-
}),
|
|
1096
|
+
}), nt = /* @__PURE__ */ me({
|
|
1079
1097
|
props: {
|
|
1080
1098
|
list: Array,
|
|
1081
1099
|
keys: Array,
|
|
@@ -1090,14 +1108,14 @@ const We = (e) => {
|
|
|
1090
1108
|
}
|
|
1091
1109
|
},
|
|
1092
1110
|
setup(e) {
|
|
1093
|
-
const
|
|
1111
|
+
const n = j(st().uuid(15)), l = w(() => e.list && e.list.length > 0), u = j([]), o = j([]), {
|
|
1094
1112
|
cacheColumns: i,
|
|
1095
1113
|
slots: d,
|
|
1096
1114
|
settingsAction: v
|
|
1097
|
-
} = ge(), b = (s,
|
|
1115
|
+
} = ge(), b = (s, a) => s.map(({
|
|
1098
1116
|
key: r,
|
|
1099
1117
|
children: y,
|
|
1100
|
-
uuid:
|
|
1118
|
+
uuid: S,
|
|
1101
1119
|
...P
|
|
1102
1120
|
}) => {
|
|
1103
1121
|
var W;
|
|
@@ -1105,9 +1123,9 @@ const We = (e) => {
|
|
|
1105
1123
|
show: !0
|
|
1106
1124
|
};
|
|
1107
1125
|
let M = !1;
|
|
1108
|
-
O.show !== !1 && (
|
|
1126
|
+
O.show !== !1 && (a == null ? void 0 : a.show) !== !1 && !y && (M = !0);
|
|
1109
1127
|
const G = {
|
|
1110
|
-
key:
|
|
1128
|
+
key: S || "",
|
|
1111
1129
|
...Je(P, ["dataIndex"]),
|
|
1112
1130
|
checked: M,
|
|
1113
1131
|
selectable: !1,
|
|
@@ -1119,71 +1137,71 @@ const We = (e) => {
|
|
|
1119
1137
|
});
|
|
1120
1138
|
He(() => {
|
|
1121
1139
|
const s = b(e.list || []);
|
|
1122
|
-
u.value = s, o.value = s.filter((
|
|
1140
|
+
u.value = s, o.value = s.filter((a) => a.checked).map((a) => a.key), (v == null ? void 0 : v.operationType.value) === "fixed" && (n.value = st().uuid(15));
|
|
1123
1141
|
});
|
|
1124
|
-
const x = We((s,
|
|
1125
|
-
var
|
|
1126
|
-
const y = ((
|
|
1142
|
+
const x = We((s, a, r) => {
|
|
1143
|
+
var te, z;
|
|
1144
|
+
const y = ((te = C(i).find((Y) => Y.uuid === s)) == null ? void 0 : te.key) || "", S = ((z = C(i).find((Y) => Y.uuid === a)) == null ? void 0 : z.key) || "", P = {
|
|
1127
1145
|
...v == null ? void 0 : v.columnsMap
|
|
1128
|
-
}, O = [...v.sortKeyColumns.value], M = O.findIndex((Y) => Y === y), G = O.findIndex((Y) => Y ===
|
|
1146
|
+
}, O = [...v.sortKeyColumns.value], M = O.findIndex((Y) => Y === y), G = O.findIndex((Y) => Y === S), W = r > M;
|
|
1129
1147
|
if (M < 0)
|
|
1130
1148
|
return;
|
|
1131
1149
|
const K = O[M];
|
|
1132
|
-
O.splice(M, 1), r === 0 ? O.unshift(K) : O.splice(W ? G : G + 1, 0, K), O.forEach((Y,
|
|
1150
|
+
O.splice(M, 1), r === 0 ? O.unshift(K) : O.splice(W ? G : G + 1, 0, K), O.forEach((Y, le) => {
|
|
1133
1151
|
P[Y] = {
|
|
1134
1152
|
...P[Y] || {},
|
|
1135
|
-
order:
|
|
1153
|
+
order: le
|
|
1136
1154
|
};
|
|
1137
1155
|
}), v == null || v.setColumnsMap(P, "drop"), v == null || v.setSortKeyColumns(O);
|
|
1138
1156
|
}), f = We((s) => {
|
|
1139
1157
|
var O;
|
|
1140
|
-
const
|
|
1158
|
+
const a = s.node.key, r = ((O = C(i).find((M) => M.uuid === a)) == null ? void 0 : O.key) || "", S = {
|
|
1141
1159
|
...(v == null ? void 0 : v.columnsMap[r]) || {}
|
|
1142
1160
|
};
|
|
1143
|
-
|
|
1161
|
+
S.show = s.checked;
|
|
1144
1162
|
const P = {
|
|
1145
1163
|
...v == null ? void 0 : v.columnsMap,
|
|
1146
|
-
[r]:
|
|
1164
|
+
[r]: S
|
|
1147
1165
|
};
|
|
1148
1166
|
v == null || v.setColumnsMap(P, "show");
|
|
1149
|
-
}),
|
|
1150
|
-
const
|
|
1151
|
-
return s.title ||
|
|
1152
|
-
title:
|
|
1153
|
-
column:
|
|
1154
|
-
}, () => [
|
|
1167
|
+
}), p = (s) => {
|
|
1168
|
+
const a = C(i).find((r) => r.uuid === s.key);
|
|
1169
|
+
return s.title || Sl(d, "headerCell", {
|
|
1170
|
+
title: a.title,
|
|
1171
|
+
column: a
|
|
1172
|
+
}, () => [a.title]);
|
|
1155
1173
|
};
|
|
1156
1174
|
return () => {
|
|
1157
|
-
var s,
|
|
1158
|
-
return
|
|
1175
|
+
var s, a;
|
|
1176
|
+
return l.value ? c(Ye, null, [e.showTitle && c("span", {
|
|
1159
1177
|
class: [`${e.className}-list-title`, e.hashId]
|
|
1160
|
-
}, [e.title]), c(
|
|
1161
|
-
key:
|
|
1162
|
-
draggable: e.draggable && !!((s = u.value) != null && s.length) && ((
|
|
1178
|
+
}, [e.title]), c(Ql, {
|
|
1179
|
+
key: n.value,
|
|
1180
|
+
draggable: e.draggable && !!((s = u.value) != null && s.length) && ((a = u.value) == null ? void 0 : a.length) > 1,
|
|
1163
1181
|
checkable: e.checkable,
|
|
1164
1182
|
blockNode: !0,
|
|
1165
1183
|
showLine: !1,
|
|
1166
1184
|
checkedKeys: o.value,
|
|
1167
1185
|
height: 280,
|
|
1168
1186
|
onDrop: (r) => {
|
|
1169
|
-
const y = r.node.key,
|
|
1187
|
+
const y = r.node.key, S = r.dragNode.key, {
|
|
1170
1188
|
dropPosition: P,
|
|
1171
1189
|
dropToGap: O
|
|
1172
1190
|
} = r, M = P === -1 || !O ? P + 1 : P;
|
|
1173
|
-
x(
|
|
1191
|
+
x(S, y, M);
|
|
1174
1192
|
},
|
|
1175
1193
|
onCheck: (r, y) => f(y),
|
|
1176
1194
|
treeData: u.value
|
|
1177
1195
|
}, {
|
|
1178
1196
|
title: (r) => {
|
|
1179
|
-
var
|
|
1197
|
+
var S;
|
|
1180
1198
|
const y = {
|
|
1181
1199
|
...r,
|
|
1182
1200
|
children: void 0,
|
|
1183
|
-
title:
|
|
1184
|
-
autoScroll: (
|
|
1201
|
+
title: p(r),
|
|
1202
|
+
autoScroll: (S = v == null ? void 0 : v.autoScroll) == null ? void 0 : S.value
|
|
1185
1203
|
};
|
|
1186
|
-
return c(
|
|
1204
|
+
return c(va, q({
|
|
1187
1205
|
hashId: e.hashId,
|
|
1188
1206
|
className: e.className
|
|
1189
1207
|
}, y, {
|
|
@@ -1193,7 +1211,7 @@ const We = (e) => {
|
|
|
1193
1211
|
})]) : null;
|
|
1194
1212
|
};
|
|
1195
1213
|
}
|
|
1196
|
-
}),
|
|
1214
|
+
}), ma = /* @__PURE__ */ me({
|
|
1197
1215
|
props: {
|
|
1198
1216
|
hashId: String,
|
|
1199
1217
|
className: String,
|
|
@@ -1202,23 +1220,23 @@ const We = (e) => {
|
|
|
1202
1220
|
},
|
|
1203
1221
|
setup(e) {
|
|
1204
1222
|
const {
|
|
1205
|
-
columns:
|
|
1206
|
-
} = ge(),
|
|
1207
|
-
|
|
1208
|
-
|
|
1223
|
+
columns: n
|
|
1224
|
+
} = ge(), l = j([]), u = j([]), o = j([]), i = j([]);
|
|
1225
|
+
V(() => n.value, (b) => {
|
|
1226
|
+
l.value = [], u.value = [], o.value = [], b.forEach((x) => {
|
|
1209
1227
|
if (x.hideInSetting)
|
|
1210
1228
|
return;
|
|
1211
1229
|
const {
|
|
1212
1230
|
fixed: f,
|
|
1213
|
-
show:
|
|
1231
|
+
show: p,
|
|
1214
1232
|
uuid: s
|
|
1215
1233
|
} = x;
|
|
1216
|
-
if ((
|
|
1234
|
+
if ((p || p === void 0) && s && i.value.push(s), f === "left") {
|
|
1217
1235
|
u.value.push(x);
|
|
1218
1236
|
return;
|
|
1219
1237
|
}
|
|
1220
1238
|
if (f === "right") {
|
|
1221
|
-
|
|
1239
|
+
l.value.push(x);
|
|
1222
1240
|
return;
|
|
1223
1241
|
}
|
|
1224
1242
|
o.value.push(x);
|
|
@@ -1226,14 +1244,14 @@ const We = (e) => {
|
|
|
1226
1244
|
}, {
|
|
1227
1245
|
immediate: !0
|
|
1228
1246
|
});
|
|
1229
|
-
const d = w(() =>
|
|
1247
|
+
const d = w(() => l.value && l.value.length > 0), v = w(() => u.value && u.value.length > 0);
|
|
1230
1248
|
return () => c("div", {
|
|
1231
1249
|
class: {
|
|
1232
1250
|
[`${e.hashId}`]: !0,
|
|
1233
1251
|
[`${e.className}-list`]: !0,
|
|
1234
1252
|
[`${e.className}-list-group`]: d.value || v.value
|
|
1235
1253
|
}
|
|
1236
|
-
}, [c(
|
|
1254
|
+
}, [c(nt, {
|
|
1237
1255
|
title: "固定在左侧",
|
|
1238
1256
|
list: u.value,
|
|
1239
1257
|
keys: i.value,
|
|
@@ -1241,7 +1259,7 @@ const We = (e) => {
|
|
|
1241
1259
|
draggable: e.draggable,
|
|
1242
1260
|
checkable: e.checkable,
|
|
1243
1261
|
className: e.className
|
|
1244
|
-
}, null), c(
|
|
1262
|
+
}, null), c(nt, {
|
|
1245
1263
|
list: o.value,
|
|
1246
1264
|
keys: i.value,
|
|
1247
1265
|
hashId: e.hashId,
|
|
@@ -1250,9 +1268,9 @@ const We = (e) => {
|
|
|
1250
1268
|
title: "不固定",
|
|
1251
1269
|
showTitle: v.value || d.value,
|
|
1252
1270
|
className: e.className
|
|
1253
|
-
}, null), c(
|
|
1271
|
+
}, null), c(nt, {
|
|
1254
1272
|
title: "固定在右侧",
|
|
1255
|
-
list:
|
|
1273
|
+
list: l.value,
|
|
1256
1274
|
keys: i.value,
|
|
1257
1275
|
hashId: e.hashId,
|
|
1258
1276
|
draggable: e.draggable,
|
|
@@ -1260,7 +1278,7 @@ const We = (e) => {
|
|
|
1260
1278
|
className: e.className
|
|
1261
1279
|
}, null)]);
|
|
1262
1280
|
}
|
|
1263
|
-
}),
|
|
1281
|
+
}), ga = /* @__PURE__ */ me({
|
|
1264
1282
|
props: {
|
|
1265
1283
|
draggable: {
|
|
1266
1284
|
type: Boolean,
|
|
@@ -1274,76 +1292,76 @@ const We = (e) => {
|
|
|
1274
1292
|
extra: [Function, Object, String, Boolean]
|
|
1275
1293
|
},
|
|
1276
1294
|
setup(e) {
|
|
1277
|
-
const
|
|
1295
|
+
const n = rt({
|
|
1278
1296
|
suffixCls: "table-column-setting",
|
|
1279
1297
|
isPor: !0
|
|
1280
1298
|
}), {
|
|
1281
|
-
wrapSSR:
|
|
1299
|
+
wrapSSR: l,
|
|
1282
1300
|
hashId: u
|
|
1283
|
-
} = Ze("ColumnSetting", [
|
|
1301
|
+
} = Ze("ColumnSetting", [ha], n), {
|
|
1284
1302
|
columns: o,
|
|
1285
1303
|
settingsAction: i
|
|
1286
|
-
} = ge(), d = We((
|
|
1287
|
-
const s = {},
|
|
1304
|
+
} = ge(), d = We((p = !0) => {
|
|
1305
|
+
const s = {}, a = (r) => {
|
|
1288
1306
|
r.forEach(({
|
|
1289
1307
|
key: y,
|
|
1290
|
-
fixed:
|
|
1308
|
+
fixed: S,
|
|
1291
1309
|
index: P,
|
|
1292
1310
|
children: O
|
|
1293
1311
|
}) => {
|
|
1294
|
-
const M =
|
|
1312
|
+
const M = Dt(y, P);
|
|
1295
1313
|
M && (s[M] = {
|
|
1296
|
-
show:
|
|
1297
|
-
fixed:
|
|
1298
|
-
}), O &&
|
|
1314
|
+
show: p,
|
|
1315
|
+
fixed: S
|
|
1316
|
+
}), O && a(O);
|
|
1299
1317
|
});
|
|
1300
1318
|
};
|
|
1301
|
-
|
|
1302
|
-
}), v = We((
|
|
1303
|
-
|
|
1319
|
+
a(o.value), i == null || i.setColumnsMap(s, "show");
|
|
1320
|
+
}), v = We((p) => {
|
|
1321
|
+
p.target.checked ? d() : d(!1);
|
|
1304
1322
|
}), b = We(() => {
|
|
1305
1323
|
i == null || i.setColumnsMap(i == null ? void 0 : i.cacheColumnsMap, "fixed");
|
|
1306
1324
|
}), x = w(() => (
|
|
1307
1325
|
// @ts-ignore
|
|
1308
|
-
Object.values(i == null ? void 0 : i.columnsMap).filter((
|
|
1326
|
+
Object.values(i == null ? void 0 : i.columnsMap).filter((p) => !p || p.show === !1)
|
|
1309
1327
|
)), f = w(() => C(x).length > 0 && C(x).length !== o.value.length);
|
|
1310
|
-
return () =>
|
|
1328
|
+
return () => l(c(ql, {
|
|
1311
1329
|
arrowPointAtCenter: !0,
|
|
1312
1330
|
title: c("div", {
|
|
1313
|
-
class: [`${
|
|
1314
|
-
}, [c(
|
|
1331
|
+
class: [`${n}-title`, u.value]
|
|
1332
|
+
}, [c(Gl, {
|
|
1315
1333
|
indeterminate: f.value,
|
|
1316
1334
|
checked: C(x).length === 0 && C(x).length !== o.value.length,
|
|
1317
|
-
onChange: (
|
|
1335
|
+
onChange: (p) => v(p)
|
|
1318
1336
|
}, {
|
|
1319
1337
|
default: () => [Le("列展示")]
|
|
1320
1338
|
}), e.checkedReset ? c("a", {
|
|
1321
1339
|
onClick: b,
|
|
1322
|
-
class: [`${
|
|
1340
|
+
class: [`${n}-action-rest-button`, u.value]
|
|
1323
1341
|
}, [Le("重置")]) : null, e != null && e.extra ? c(xe, {
|
|
1324
1342
|
size: 12,
|
|
1325
1343
|
align: "center"
|
|
1326
1344
|
}, {
|
|
1327
1345
|
default: () => [e.extra]
|
|
1328
1346
|
}) : null]),
|
|
1329
|
-
overlayClassName: `${
|
|
1347
|
+
overlayClassName: `${n}-overlay ${u.value}`,
|
|
1330
1348
|
trigger: "click",
|
|
1331
1349
|
placement: "bottomRight",
|
|
1332
|
-
content: c(
|
|
1350
|
+
content: c(ma, {
|
|
1333
1351
|
hashId: u.value,
|
|
1334
1352
|
checkable: e.checkable ?? !0,
|
|
1335
1353
|
draggable: e.draggable ?? !0,
|
|
1336
|
-
className:
|
|
1354
|
+
className: n
|
|
1337
1355
|
}, null)
|
|
1338
1356
|
}, {
|
|
1339
1357
|
default: () => [c(ve, {
|
|
1340
1358
|
title: "列设置"
|
|
1341
1359
|
}, {
|
|
1342
|
-
default: () => [c(
|
|
1360
|
+
default: () => [c(Kt, null, null)]
|
|
1343
1361
|
})]
|
|
1344
1362
|
}));
|
|
1345
1363
|
}
|
|
1346
|
-
}),
|
|
1364
|
+
}), ya = (e) => ({
|
|
1347
1365
|
[`${e.componentCls}`]: {
|
|
1348
1366
|
lineHeight: 1,
|
|
1349
1367
|
"&-container": {
|
|
@@ -1385,23 +1403,23 @@ const We = (e) => {
|
|
|
1385
1403
|
}
|
|
1386
1404
|
}
|
|
1387
1405
|
});
|
|
1388
|
-
function
|
|
1406
|
+
function Pt(e) {
|
|
1389
1407
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !ee(e);
|
|
1390
1408
|
}
|
|
1391
1409
|
const {
|
|
1392
|
-
useBreakpoint:
|
|
1393
|
-
} =
|
|
1394
|
-
function
|
|
1410
|
+
useBreakpoint: ba
|
|
1411
|
+
} = dt;
|
|
1412
|
+
function Ca(e) {
|
|
1395
1413
|
if (ee(e))
|
|
1396
1414
|
return e;
|
|
1397
1415
|
if (e) {
|
|
1398
|
-
const
|
|
1399
|
-
icon:
|
|
1416
|
+
const n = e, {
|
|
1417
|
+
icon: l,
|
|
1400
1418
|
tooltip: u,
|
|
1401
1419
|
onClick: o,
|
|
1402
1420
|
key: i
|
|
1403
|
-
} =
|
|
1404
|
-
return
|
|
1421
|
+
} = n;
|
|
1422
|
+
return l && u ? c(ve, {
|
|
1405
1423
|
title: u
|
|
1406
1424
|
}, {
|
|
1407
1425
|
default: () => [c("span", {
|
|
@@ -1409,12 +1427,12 @@ function ya(e) {
|
|
|
1409
1427
|
onClick: () => {
|
|
1410
1428
|
o && o(i);
|
|
1411
1429
|
}
|
|
1412
|
-
}, [
|
|
1413
|
-
}) :
|
|
1430
|
+
}, [l])]
|
|
1431
|
+
}) : l;
|
|
1414
1432
|
}
|
|
1415
1433
|
return null;
|
|
1416
1434
|
}
|
|
1417
|
-
const
|
|
1435
|
+
const Vt = /* @__PURE__ */ me({
|
|
1418
1436
|
props: {
|
|
1419
1437
|
actions: he.toolBarBtn,
|
|
1420
1438
|
settings: [Array],
|
|
@@ -1426,9 +1444,9 @@ const Wl = /* @__PURE__ */ me({
|
|
|
1426
1444
|
},
|
|
1427
1445
|
setup(e) {
|
|
1428
1446
|
const {
|
|
1429
|
-
wrapSSR:
|
|
1430
|
-
hashId:
|
|
1431
|
-
} = Ze("ListToolBar", [
|
|
1447
|
+
wrapSSR: n,
|
|
1448
|
+
hashId: l
|
|
1449
|
+
} = Ze("ListToolBar", [ya], e.prefixCls), u = ba(), {
|
|
1432
1450
|
isMobile: o
|
|
1433
1451
|
} = ge(), i = w(() => {
|
|
1434
1452
|
var s;
|
|
@@ -1437,11 +1455,11 @@ const Wl = /* @__PURE__ */ me({
|
|
|
1437
1455
|
var s;
|
|
1438
1456
|
return !!((s = e.settings) != null && s.length || e.optionsExtra);
|
|
1439
1457
|
}), v = w(() => !!(e.titleTip || e.headerTitle)), b = w(() => {
|
|
1440
|
-
var
|
|
1458
|
+
var a;
|
|
1441
1459
|
let s;
|
|
1442
|
-
return Array.isArray(e.actions) ? ((
|
|
1460
|
+
return Array.isArray(e.actions) ? ((a = e.actions) == null ? void 0 : a.length) < 1 ? null : c(xe, {
|
|
1443
1461
|
align: "center"
|
|
1444
|
-
},
|
|
1462
|
+
}, Pt(s = e.actions.map((r, y) => ee(r) ? ct(r, {
|
|
1445
1463
|
key: y,
|
|
1446
1464
|
...r == null ? void 0 : r.props
|
|
1447
1465
|
}) : c("template", {
|
|
@@ -1450,21 +1468,21 @@ const Wl = /* @__PURE__ */ me({
|
|
|
1450
1468
|
default: () => [s]
|
|
1451
1469
|
}) : e.actions;
|
|
1452
1470
|
}), x = Xe(() => !i.value && d.value ? c("div", {
|
|
1453
|
-
class: `${e.prefixCls}-left ${
|
|
1471
|
+
class: `${e.prefixCls}-left ${l.value}`
|
|
1454
1472
|
}, null) : v.value ? c(xe, {
|
|
1455
|
-
class: `${e.prefixCls}-left ${
|
|
1473
|
+
class: `${e.prefixCls}-left ${l.value}`
|
|
1456
1474
|
}, {
|
|
1457
1475
|
default: () => [c("div", {
|
|
1458
|
-
class: `${e.prefixCls}-title ${
|
|
1476
|
+
class: `${e.prefixCls}-title ${l.value}`
|
|
1459
1477
|
}, [e.headerTitle, e.titleTip && c(ve, {
|
|
1460
1478
|
title: e.titleTipText
|
|
1461
1479
|
}, {
|
|
1462
|
-
default: () => [
|
|
1480
|
+
default: () => [ie(e.titleTip) && e.titleTip ? c(Nl, null, null) : e.titleTip]
|
|
1463
1481
|
})]), b.value && c("div", {
|
|
1464
|
-
class: `${e.prefixCls}-actions ${
|
|
1482
|
+
class: `${e.prefixCls}-actions ${l.value}`
|
|
1465
1483
|
}, [b.value])]
|
|
1466
1484
|
}) : c(xe, {
|
|
1467
|
-
class: `${e.prefixCls}-left ${
|
|
1485
|
+
class: `${e.prefixCls}-left ${l.value}`
|
|
1468
1486
|
}, {
|
|
1469
1487
|
default: () => [b.value && c("div", {
|
|
1470
1488
|
class: `${e.prefixCls}-actions`
|
|
@@ -1473,31 +1491,31 @@ const Wl = /* @__PURE__ */ me({
|
|
|
1473
1491
|
let s;
|
|
1474
1492
|
return d.value ? c(xe, {
|
|
1475
1493
|
size: 16,
|
|
1476
|
-
class: `${e.prefixCls}-right ${
|
|
1494
|
+
class: `${e.prefixCls}-right ${l.value}`,
|
|
1477
1495
|
align: u.value.lg ? "center" : "end",
|
|
1478
1496
|
direction: u.value.lg ? "horizontal" : "vertical"
|
|
1479
1497
|
}, {
|
|
1480
1498
|
default: () => {
|
|
1481
|
-
var
|
|
1482
|
-
return [e.optionsExtra, (
|
|
1499
|
+
var a;
|
|
1500
|
+
return [e.optionsExtra, (a = e.settings) != null && a.length ? c(xe, {
|
|
1483
1501
|
size: 12,
|
|
1484
1502
|
align: "center",
|
|
1485
1503
|
class: `${e.prefixCls}-setting-items`
|
|
1486
|
-
},
|
|
1487
|
-
const
|
|
1504
|
+
}, Pt(s = e.settings.map((r, y) => {
|
|
1505
|
+
const S = Ca(r);
|
|
1488
1506
|
return c("div", {
|
|
1489
1507
|
key: y,
|
|
1490
1508
|
class: `${e.prefixCls}-setting-item`
|
|
1491
|
-
}, [
|
|
1509
|
+
}, [S]);
|
|
1492
1510
|
})) ? s : {
|
|
1493
1511
|
default: () => [s]
|
|
1494
1512
|
}) : null];
|
|
1495
1513
|
}
|
|
1496
1514
|
}) : null;
|
|
1497
|
-
}, [() => u.value, () => d.value, () => e.prefixCls, () => v.value, () => b.value, () => e.settings]),
|
|
1515
|
+
}, [() => u.value, () => d.value, () => e.prefixCls, () => v.value, () => b.value, () => e.settings]), p = Xe(() => {
|
|
1498
1516
|
if (!d.value && !i.value) return null;
|
|
1499
1517
|
const s = {
|
|
1500
|
-
[`${
|
|
1518
|
+
[`${l.value}`]: !0,
|
|
1501
1519
|
[`${e.prefixCls}-container`]: !0,
|
|
1502
1520
|
[`${e.prefixCls}-container-mobile`]: o.value
|
|
1503
1521
|
};
|
|
@@ -1505,25 +1523,25 @@ const Wl = /* @__PURE__ */ me({
|
|
|
1505
1523
|
class: s
|
|
1506
1524
|
}, [x.value, f.value]);
|
|
1507
1525
|
}, [() => o.value, () => i.value, () => d.value, () => x.value, () => e.prefixCls, () => f.value]);
|
|
1508
|
-
return () =>
|
|
1509
|
-
class: `${e.prefixCls} ${
|
|
1510
|
-
}, [
|
|
1526
|
+
return () => n(c("div", {
|
|
1527
|
+
class: `${e.prefixCls} ${l.value}`
|
|
1528
|
+
}, [p.value]));
|
|
1511
1529
|
}
|
|
1512
1530
|
});
|
|
1513
|
-
|
|
1514
|
-
const
|
|
1531
|
+
Vt.inheritAttrs = !1;
|
|
1532
|
+
const xa = () => {
|
|
1515
1533
|
const {
|
|
1516
1534
|
action: e,
|
|
1517
|
-
tableSize:
|
|
1535
|
+
tableSize: n
|
|
1518
1536
|
} = ge();
|
|
1519
|
-
return c(
|
|
1537
|
+
return c(_l, {
|
|
1520
1538
|
overlay: c(Ge, {
|
|
1521
|
-
selectedKeys: [
|
|
1539
|
+
selectedKeys: [n.value],
|
|
1522
1540
|
onClick: ({
|
|
1523
|
-
key:
|
|
1541
|
+
key: l
|
|
1524
1542
|
}) => {
|
|
1525
1543
|
var u;
|
|
1526
|
-
(u = e.setTableSize) == null || u.call(e,
|
|
1544
|
+
(u = e.setTableSize) == null || u.call(e, l);
|
|
1527
1545
|
},
|
|
1528
1546
|
style: {
|
|
1529
1547
|
width: 80
|
|
@@ -1548,73 +1566,73 @@ const ba = () => {
|
|
|
1548
1566
|
default: () => [c(ve, {
|
|
1549
1567
|
title: "表格密度"
|
|
1550
1568
|
}, {
|
|
1551
|
-
default: () => [c(
|
|
1569
|
+
default: () => [c(El, null, null)]
|
|
1552
1570
|
})]
|
|
1553
1571
|
});
|
|
1554
|
-
},
|
|
1572
|
+
}, qt = /* @__PURE__ */ me({
|
|
1555
1573
|
setup() {
|
|
1556
1574
|
const {
|
|
1557
1575
|
isFullscreen: e
|
|
1558
|
-
} =
|
|
1576
|
+
} = Mt();
|
|
1559
1577
|
return () => e.value ? c(ve, {
|
|
1560
1578
|
title: "退出全屏"
|
|
1561
1579
|
}, {
|
|
1562
|
-
default: () => [c(
|
|
1580
|
+
default: () => [c(Ml, null, null)]
|
|
1563
1581
|
}) : c(ve, {
|
|
1564
1582
|
title: "全屏"
|
|
1565
1583
|
}, {
|
|
1566
|
-
default: () => [c(
|
|
1584
|
+
default: () => [c(Al, null, null)]
|
|
1567
1585
|
});
|
|
1568
1586
|
}
|
|
1569
1587
|
});
|
|
1570
|
-
function
|
|
1588
|
+
function pa() {
|
|
1571
1589
|
return {
|
|
1572
1590
|
reload: {
|
|
1573
1591
|
text: "刷新",
|
|
1574
|
-
icon: c(
|
|
1592
|
+
icon: c(Kl, null, null)
|
|
1575
1593
|
},
|
|
1576
1594
|
density: {
|
|
1577
1595
|
text: "表格密度",
|
|
1578
|
-
icon: c(
|
|
1596
|
+
icon: c(xa, null, null)
|
|
1579
1597
|
},
|
|
1580
1598
|
setting: {
|
|
1581
1599
|
text: "列设置",
|
|
1582
|
-
icon: c(
|
|
1600
|
+
icon: c(Kt, null, null)
|
|
1583
1601
|
},
|
|
1584
1602
|
fullScreen: {
|
|
1585
1603
|
text: "全屏",
|
|
1586
|
-
icon: c(
|
|
1604
|
+
icon: c(qt, null, null)
|
|
1587
1605
|
}
|
|
1588
1606
|
};
|
|
1589
1607
|
}
|
|
1590
|
-
function
|
|
1591
|
-
return Object.keys(e).filter((
|
|
1592
|
-
const u = e[
|
|
1608
|
+
function Sa(e, n) {
|
|
1609
|
+
return Object.keys(e).filter((l) => l).map((l) => {
|
|
1610
|
+
const u = e[l];
|
|
1593
1611
|
if (!u)
|
|
1594
1612
|
return null;
|
|
1595
|
-
let o = u === !0 ?
|
|
1613
|
+
let o = u === !0 ? n[l] : () => u == null ? void 0 : u();
|
|
1596
1614
|
if (typeof o != "function" && (o = () => {
|
|
1597
|
-
}),
|
|
1598
|
-
return c(
|
|
1599
|
-
key:
|
|
1615
|
+
}), l === "setting")
|
|
1616
|
+
return c(ga, q(e[l], {
|
|
1617
|
+
key: l
|
|
1600
1618
|
}), null);
|
|
1601
|
-
if (
|
|
1619
|
+
if (l === "fullScreen")
|
|
1602
1620
|
return c("span", {
|
|
1603
|
-
key:
|
|
1621
|
+
key: l,
|
|
1604
1622
|
onClick: o
|
|
1605
|
-
}, [c(
|
|
1606
|
-
const i =
|
|
1623
|
+
}, [c(qt, null, null)]);
|
|
1624
|
+
const i = pa()[l];
|
|
1607
1625
|
return i ? c("span", {
|
|
1608
|
-
key:
|
|
1626
|
+
key: l,
|
|
1609
1627
|
onClick: o
|
|
1610
1628
|
}, [c(ve, {
|
|
1611
1629
|
title: i.text
|
|
1612
1630
|
}, {
|
|
1613
1631
|
default: () => [i.icon]
|
|
1614
1632
|
})]) : null;
|
|
1615
|
-
}).filter((
|
|
1633
|
+
}).filter((l) => l);
|
|
1616
1634
|
}
|
|
1617
|
-
const
|
|
1635
|
+
const wa = {
|
|
1618
1636
|
options: [Boolean, Object, Array],
|
|
1619
1637
|
titleTip: [Function, Boolean, Object, String],
|
|
1620
1638
|
settingExtra: [Function, Boolean, Object, Array],
|
|
@@ -1622,36 +1640,36 @@ const Sa = {
|
|
|
1622
1640
|
titleTipText: [String],
|
|
1623
1641
|
toolBarBtn: [Function, Boolean, Object, Array],
|
|
1624
1642
|
headerTitle: [Function, Boolean, Object, Array, String]
|
|
1625
|
-
},
|
|
1626
|
-
props:
|
|
1643
|
+
}, Ta = /* @__PURE__ */ me({
|
|
1644
|
+
props: wa,
|
|
1627
1645
|
inheritAttrs: !1,
|
|
1628
1646
|
setup(e) {
|
|
1629
|
-
const
|
|
1647
|
+
const n = rt({
|
|
1630
1648
|
suffixCls: "table-list-toolbar",
|
|
1631
1649
|
isPor: !0
|
|
1632
1650
|
}), {
|
|
1633
|
-
action:
|
|
1651
|
+
action: l
|
|
1634
1652
|
} = ge(), u = Xe(() => {
|
|
1635
1653
|
var d;
|
|
1636
1654
|
const o = {
|
|
1637
|
-
reload: () =>
|
|
1655
|
+
reload: () => l == null ? void 0 : l.reload(),
|
|
1638
1656
|
density: !0,
|
|
1639
1657
|
setting: !0,
|
|
1640
|
-
fullScreen: () =>
|
|
1658
|
+
fullScreen: () => l == null ? void 0 : l.toggle()
|
|
1641
1659
|
};
|
|
1642
1660
|
if (e.options === !1 || ((d = Object.keys(e.options)) == null ? void 0 : d.length) === 0) return [];
|
|
1643
1661
|
const i = {
|
|
1644
1662
|
...o,
|
|
1645
1663
|
...e.options
|
|
1646
1664
|
};
|
|
1647
|
-
return i.setting !== !1 && e.settingExtra && (i.setting = {}, i.setting.extra = e.settingExtra),
|
|
1665
|
+
return i.setting !== !1 && e.settingExtra && (i.setting = {}, i.setting.extra = e.settingExtra), Sa(i, {
|
|
1648
1666
|
...o
|
|
1649
1667
|
});
|
|
1650
|
-
}, [() =>
|
|
1668
|
+
}, [() => l, () => e.options]);
|
|
1651
1669
|
return () => {
|
|
1652
1670
|
const o = e.toolBarBtn || [];
|
|
1653
|
-
return c(
|
|
1654
|
-
prefixCls:
|
|
1671
|
+
return c(Vt, {
|
|
1672
|
+
prefixCls: n,
|
|
1655
1673
|
optionsExtra: e.optionsExtra,
|
|
1656
1674
|
headerTitle: e.headerTitle,
|
|
1657
1675
|
actions: o,
|
|
@@ -1662,113 +1680,113 @@ const Sa = {
|
|
|
1662
1680
|
};
|
|
1663
1681
|
}
|
|
1664
1682
|
});
|
|
1665
|
-
function
|
|
1666
|
-
return
|
|
1683
|
+
function $a(e) {
|
|
1684
|
+
return $l();
|
|
1667
1685
|
}
|
|
1668
|
-
function
|
|
1669
|
-
|
|
1686
|
+
function Ra(e, n = !0, l) {
|
|
1687
|
+
$a() ? wl(e, l) : n ? e() : Tl(e);
|
|
1670
1688
|
}
|
|
1671
|
-
function
|
|
1672
|
-
const
|
|
1689
|
+
function Ba(e) {
|
|
1690
|
+
const n = w(() => e.draggabled), l = w(() => e.neverScroll), u = w(() => e.autoScroll);
|
|
1673
1691
|
return {
|
|
1674
|
-
draggabled:
|
|
1675
|
-
neverScroll:
|
|
1692
|
+
draggabled: n,
|
|
1693
|
+
neverScroll: l,
|
|
1676
1694
|
autoScroll: u
|
|
1677
1695
|
};
|
|
1678
1696
|
}
|
|
1679
|
-
function
|
|
1680
|
-
const d =
|
|
1681
|
-
|
|
1697
|
+
function Fa({ scroll: e, columns: n, breakpoint: l, draggabled: u, autoScroll: o, neverScroll: i }) {
|
|
1698
|
+
const d = j([]), v = j([]);
|
|
1699
|
+
V([
|
|
1682
1700
|
() => e.value,
|
|
1683
|
-
() =>
|
|
1684
|
-
() =>
|
|
1701
|
+
() => n.value,
|
|
1702
|
+
() => l.value,
|
|
1685
1703
|
() => u.value,
|
|
1686
|
-
() =>
|
|
1704
|
+
() => l.value,
|
|
1687
1705
|
() => o.value,
|
|
1688
1706
|
() => i.value
|
|
1689
1707
|
], () => {
|
|
1690
|
-
const r = f(
|
|
1691
|
-
Qe(r,
|
|
1708
|
+
const r = f(Be(n.value));
|
|
1709
|
+
Qe(r, Be(d.value)) || (d.value = ue(r)), Qe(r, Be(v.value)) || (v.value = ue(r));
|
|
1692
1710
|
}, {
|
|
1693
1711
|
deep: !0,
|
|
1694
1712
|
immediate: !0
|
|
1695
1713
|
});
|
|
1696
1714
|
const b = w(() => {
|
|
1697
|
-
const r = x(C(d).filter((P) => P.fixed === "left")), y = x(C(d).filter((P) => P.fixed !== "left" && P.fixed !== "right")),
|
|
1715
|
+
const r = x(C(d).filter((P) => P.fixed === "left")), y = x(C(d).filter((P) => P.fixed !== "left" && P.fixed !== "right")), S = x(C(d).filter((P) => P.fixed === "right"));
|
|
1698
1716
|
return [
|
|
1699
1717
|
...r,
|
|
1700
1718
|
...y,
|
|
1701
|
-
...
|
|
1719
|
+
...S
|
|
1702
1720
|
];
|
|
1703
1721
|
});
|
|
1704
1722
|
function x(r) {
|
|
1705
|
-
return r.sort((y,
|
|
1723
|
+
return r.sort((y, S) => dl(y, S, "order", 0));
|
|
1706
1724
|
}
|
|
1707
1725
|
function f(r) {
|
|
1708
|
-
return
|
|
1726
|
+
return ue(r).map((y, S) => {
|
|
1709
1727
|
var P;
|
|
1710
|
-
if (y.dataIndex === "action" ||
|
|
1728
|
+
if (y.dataIndex === "action" || S === r.length - 1 ? y.resizable = !1 : y.resizable = ie(y.resizable) ? y.resizable : !!(Ue(y.width) && C(u)), !y.width || C(i))
|
|
1711
1729
|
return y;
|
|
1712
1730
|
if (y.dataIndex === "action" && C(o))
|
|
1713
|
-
if ((P = C(e)) != null && P.x || !C(
|
|
1731
|
+
if ((P = C(e)) != null && P.x || !C(l))
|
|
1714
1732
|
y.width = y.width || 100, y.fixed = "right";
|
|
1715
1733
|
else {
|
|
1716
|
-
const O = C(
|
|
1734
|
+
const O = C(n).find((M) => M.dataIndex === y.dataIndex);
|
|
1717
1735
|
y.width = (O == null ? void 0 : O.width) || "", y.fixed = O == null ? void 0 : O.fixed;
|
|
1718
1736
|
}
|
|
1719
1737
|
return y;
|
|
1720
1738
|
});
|
|
1721
1739
|
}
|
|
1722
|
-
function
|
|
1723
|
-
d.value = d.value.map((
|
|
1740
|
+
function p(r, y) {
|
|
1741
|
+
d.value = d.value.map((S) => (S.uuid === y.uuid && (S.width = r), S));
|
|
1724
1742
|
}
|
|
1725
1743
|
function s(r) {
|
|
1726
1744
|
if (r.length <= 0) {
|
|
1727
1745
|
d.value = [];
|
|
1728
1746
|
return;
|
|
1729
1747
|
}
|
|
1730
|
-
Qe(f(r),
|
|
1748
|
+
Qe(f(r), Be(d.value)) || (d.value = f(r));
|
|
1731
1749
|
}
|
|
1732
|
-
function
|
|
1733
|
-
s(
|
|
1750
|
+
function a(r) {
|
|
1751
|
+
s(ue(Be(n.value)).map((y) => {
|
|
1734
1752
|
var P, O, M;
|
|
1735
|
-
const
|
|
1753
|
+
const S = y.key ? {
|
|
1736
1754
|
show: (P = r[y.key]) == null ? void 0 : P.show,
|
|
1737
1755
|
fixed: (O = r[y.key]) == null ? void 0 : O.fixed,
|
|
1738
1756
|
order: (M = r[y.key]) == null ? void 0 : M.order
|
|
1739
1757
|
} : {};
|
|
1740
|
-
return { ...y, ...
|
|
1758
|
+
return { ...y, ...S };
|
|
1741
1759
|
}));
|
|
1742
1760
|
}
|
|
1743
1761
|
return {
|
|
1744
|
-
breakpoint:
|
|
1762
|
+
breakpoint: l,
|
|
1745
1763
|
proColumns: b,
|
|
1746
1764
|
cacheProColumns: v,
|
|
1747
1765
|
setColumns: s,
|
|
1748
|
-
changeColumns:
|
|
1749
|
-
resizeColumnWidth:
|
|
1766
|
+
changeColumns: a,
|
|
1767
|
+
resizeColumnWidth: p
|
|
1750
1768
|
};
|
|
1751
1769
|
}
|
|
1752
|
-
function
|
|
1753
|
-
const u =
|
|
1754
|
-
|
|
1755
|
-
var
|
|
1756
|
-
(
|
|
1757
|
-
const
|
|
1758
|
-
|
|
1770
|
+
function Ia({ columns: e, columnsState: n, changeColumns: l }) {
|
|
1771
|
+
const u = j(void 0), o = Fe({}), i = Fe({}), d = Fe({}), v = j([]);
|
|
1772
|
+
V(() => e.value, () => {
|
|
1773
|
+
var p;
|
|
1774
|
+
(p = C(e)) == null || p.forEach(({ show: s, key: a, fixed: r }, y) => {
|
|
1775
|
+
const S = Dt(a, y);
|
|
1776
|
+
S && (d[S] = { show: s === void 0 ? !0 : s, fixed: r });
|
|
1759
1777
|
});
|
|
1760
1778
|
const f = C(e).map((s) => s.key);
|
|
1761
1779
|
x(f);
|
|
1762
1780
|
}, { deep: !0, immediate: !0 }), He(() => {
|
|
1763
|
-
var
|
|
1781
|
+
var p;
|
|
1764
1782
|
const f = {
|
|
1765
|
-
...(
|
|
1783
|
+
...(p = C(n)) == null ? void 0 : p.value,
|
|
1766
1784
|
...C(d)
|
|
1767
1785
|
};
|
|
1768
1786
|
Object.assign(o, f), Object.assign(i, f);
|
|
1769
1787
|
});
|
|
1770
|
-
function b(f,
|
|
1771
|
-
u.value =
|
|
1788
|
+
function b(f, p) {
|
|
1789
|
+
u.value = p, Object.assign(o, f), l == null || l(o, p === "fixed");
|
|
1772
1790
|
}
|
|
1773
1791
|
function x(f) {
|
|
1774
1792
|
v.value = f;
|
|
@@ -1782,74 +1800,74 @@ function Ra({ columns: e, columnsState: a, changeColumns: t }) {
|
|
|
1782
1800
|
setSortKeyColumns: x
|
|
1783
1801
|
};
|
|
1784
1802
|
}
|
|
1785
|
-
function
|
|
1786
|
-
const
|
|
1803
|
+
function Oa(e, n) {
|
|
1804
|
+
const l = w(() => n), u = j(), o = j(e);
|
|
1787
1805
|
function i() {
|
|
1788
1806
|
u.value && clearTimeout(u.value);
|
|
1789
1807
|
}
|
|
1790
1808
|
async function d(...v) {
|
|
1791
|
-
return
|
|
1809
|
+
return l.value === 0 || l.value === void 0 ? o.value(...v) : (i(), new Promise(async (b) => {
|
|
1792
1810
|
var x;
|
|
1793
1811
|
(x = v[0]) != null && x.immediate ? b(await o.value(...v)) : u.value = setTimeout(async () => {
|
|
1794
1812
|
b(await o.value(...v));
|
|
1795
|
-
},
|
|
1813
|
+
}, l.value);
|
|
1796
1814
|
}));
|
|
1797
1815
|
}
|
|
1798
|
-
return
|
|
1816
|
+
return ta(i), {
|
|
1799
1817
|
cancel: i,
|
|
1800
1818
|
run: d
|
|
1801
1819
|
};
|
|
1802
1820
|
}
|
|
1803
|
-
function
|
|
1804
|
-
const
|
|
1821
|
+
function Pa(e) {
|
|
1822
|
+
const n = w(() => e.rowKey), l = w(() => e.polling), u = w(() => e.debounceTime), o = w(() => e.dataSource);
|
|
1805
1823
|
return {
|
|
1806
|
-
rowKey:
|
|
1807
|
-
polling:
|
|
1824
|
+
rowKey: n,
|
|
1825
|
+
polling: l,
|
|
1808
1826
|
request: e.request,
|
|
1809
1827
|
postData: e.postData,
|
|
1810
1828
|
debounceTime: u,
|
|
1811
1829
|
dataSource: o
|
|
1812
1830
|
};
|
|
1813
1831
|
}
|
|
1814
|
-
function
|
|
1815
|
-
const G =
|
|
1832
|
+
function ka({ rowKey: e, polling: n, request: l, postData: u, dataSource: o, waitRequest: i, debounceTime: d }, { search: v, columns: b, loading: x, setLoading: f, setColumns: p, removeRowKeys: s, syncSelectedRows: a, formParamsRef: r, setPagination: y, paginationInfo: S, onBeforeSearchSubmit: P, hasCustomRender: O }, M) {
|
|
1833
|
+
const G = j(), W = j(!0), K = j(!1), te = j(!1), z = j([]), Y = j(), le = w(() => {
|
|
1816
1834
|
var T;
|
|
1817
|
-
return
|
|
1818
|
-
}),
|
|
1835
|
+
return U(v.value) ? (T = v.value) == null ? void 0 : T.manualRequest : !1;
|
|
1836
|
+
}), Se = async (T = {}) => {
|
|
1819
1837
|
var _;
|
|
1820
|
-
const { pagination:
|
|
1821
|
-
if (!
|
|
1838
|
+
const { pagination: B, filters: D = {}, sorter: m = {}, removeKeys: Q = [], isPolling: ce = !1 } = T;
|
|
1839
|
+
if (!l || !ze(l) || C(i) && x.value || K.value)
|
|
1822
1840
|
return o.value || [];
|
|
1823
|
-
if (K.value = !0, !ce || C(i) || W.value ? f(!0) :
|
|
1841
|
+
if (K.value = !0, !ce || C(i) || W.value ? f(!0) : t(!0), C(i)) {
|
|
1824
1842
|
W.value = !1, K.value = !1;
|
|
1825
1843
|
return;
|
|
1826
1844
|
}
|
|
1827
|
-
|
|
1845
|
+
B && y(B);
|
|
1828
1846
|
try {
|
|
1829
1847
|
let ae = {};
|
|
1830
|
-
if (
|
|
1848
|
+
if (ie(B) && !B || ie(S))
|
|
1831
1849
|
ae = {};
|
|
1832
1850
|
else {
|
|
1833
|
-
const { current: L = 1, pageSize: Re = 10, total:
|
|
1834
|
-
ae.pageNum =
|
|
1851
|
+
const { current: L = 1, pageSize: Re = 10, total: J } = C(S) || {};
|
|
1852
|
+
ae.pageNum = vl({ current: L, pageSize: Re, total: J }, Q.length), Q.length && s(Q), ae.pageSize = Re;
|
|
1835
1853
|
}
|
|
1836
|
-
const
|
|
1837
|
-
|
|
1854
|
+
const $e = U(m) ? [m] : m;
|
|
1855
|
+
$e.forEach((L) => {
|
|
1838
1856
|
const Re = (L == null ? void 0 : L.columnKey) || (L == null ? void 0 : L.field);
|
|
1839
|
-
L && (L != null && L.order) ?
|
|
1857
|
+
L && (L != null && L.order) ? p(C(b).map((J) => (J.dataIndex === Re ? J.sortOrder = L == null ? void 0 : L.order : J.sortOrder = null, J))) : L && p(C(b).map((J) => (J.dataIndex === Re && (J.sortOrder = null), J)));
|
|
1840
1858
|
});
|
|
1841
1859
|
let je = {
|
|
1842
1860
|
...ae || {},
|
|
1843
1861
|
...T.params,
|
|
1844
1862
|
...r
|
|
1845
1863
|
};
|
|
1846
|
-
P && ze(P) && (je = await P(je, m,
|
|
1864
|
+
P && ze(P) && (je = await P(je, m, D));
|
|
1847
1865
|
let ne = [];
|
|
1848
|
-
const ye = await (
|
|
1866
|
+
const ye = await (l == null ? void 0 : l(je, $e, D));
|
|
1849
1867
|
if (K.value = !1, ye && (ye != null && ye.success)) {
|
|
1850
|
-
ne = ye.data || [], u && ze(u) && (ne = await (u == null ? void 0 : u(ne))),
|
|
1868
|
+
ne = ye.data || [], u && ze(u) && (ne = await (u == null ? void 0 : u(ne))), a(ne);
|
|
1851
1869
|
const L = ye.total || (ne == null ? void 0 : ne.length) || 0;
|
|
1852
|
-
return L !== ((_ = C(
|
|
1870
|
+
return L !== ((_ = C(S)) == null ? void 0 : _.total) && y({
|
|
1853
1871
|
total: L || 0
|
|
1854
1872
|
}), F(ne), ne;
|
|
1855
1873
|
} else
|
|
@@ -1860,114 +1878,114 @@ function Oa({ rowKey: e, polling: a, request: t, postData: u, dataSource: o, wai
|
|
|
1860
1878
|
W.value = !1, f(!1);
|
|
1861
1879
|
}
|
|
1862
1880
|
return [];
|
|
1863
|
-
}, Z =
|
|
1881
|
+
}, Z = Oa(async (T) => {
|
|
1864
1882
|
Y.value && clearTimeout(Y.value);
|
|
1865
|
-
const
|
|
1866
|
-
return
|
|
1867
|
-
Z.run({ ...T, isPolling:
|
|
1868
|
-
}, Math.max(
|
|
1883
|
+
const B = await Se(T), D = fl(n.value, B);
|
|
1884
|
+
return D && !G.value && (Y.value = setTimeout(() => {
|
|
1885
|
+
Z.run({ ...T, isPolling: D });
|
|
1886
|
+
}, Math.max(D, 2e3))), B;
|
|
1869
1887
|
}, d.value || 10);
|
|
1870
|
-
|
|
1888
|
+
Rl(() => {
|
|
1871
1889
|
G.value = !0, clearTimeout(Y.value);
|
|
1872
|
-
}),
|
|
1890
|
+
}), Bl(() => {
|
|
1873
1891
|
G.value = !0, clearTimeout(Y.value);
|
|
1874
|
-
}),
|
|
1875
|
-
|
|
1876
|
-
}, { immediate: !0 }),
|
|
1877
|
-
|
|
1878
|
-
}, { deep: !0, immediate: !0 }),
|
|
1879
|
-
|
|
1892
|
+
}), V(() => n.value, () => {
|
|
1893
|
+
n.value ? Z.run({ isPolling: !0 }) : clearTimeout(Y.value);
|
|
1894
|
+
}, { immediate: !0 }), V([() => i.value, () => o.value], () => {
|
|
1895
|
+
we();
|
|
1896
|
+
}, { deep: !0, immediate: !0 }), V([() => r], () => {
|
|
1897
|
+
le.value || we();
|
|
1880
1898
|
}, {
|
|
1881
1899
|
deep: !0,
|
|
1882
1900
|
immediate: !0
|
|
1883
1901
|
});
|
|
1884
|
-
function
|
|
1885
|
-
ke(
|
|
1902
|
+
function we() {
|
|
1903
|
+
ke(l) ? (!W.value || !n.value) && Z.run({ isPolling: !1 }) : F(o.value || []);
|
|
1886
1904
|
}
|
|
1887
|
-
const
|
|
1905
|
+
const Te = w(() => {
|
|
1888
1906
|
if (O.value)
|
|
1889
1907
|
return C(z);
|
|
1890
|
-
const T = b.value.filter((
|
|
1908
|
+
const T = b.value.filter((B) => B.show || B.show === void 0);
|
|
1891
1909
|
return !C(z) || !T || T.length === 0 ? [] : C(z);
|
|
1892
|
-
}), Ie = w(() => C(z).some((T) =>
|
|
1893
|
-
function
|
|
1894
|
-
|
|
1910
|
+
}), Ie = w(() => C(z).some((T) => re(T.children) && T.children.length > 0));
|
|
1911
|
+
function t(T) {
|
|
1912
|
+
te.value = T;
|
|
1895
1913
|
}
|
|
1896
|
-
function g(T,
|
|
1897
|
-
Z.run({ pagination: T, filters:
|
|
1914
|
+
function g(T, B, D, m) {
|
|
1915
|
+
Z.run({ pagination: T, filters: B, sorter: D, extra: m, isPolling: !1 }), M("change", T, B, D, m);
|
|
1898
1916
|
}
|
|
1899
1917
|
function F(T) {
|
|
1900
|
-
var
|
|
1901
|
-
const
|
|
1902
|
-
if (!Qe(
|
|
1903
|
-
const m =
|
|
1904
|
-
m !== ((
|
|
1918
|
+
var D;
|
|
1919
|
+
const B = hl(ue(T), C(S.value));
|
|
1920
|
+
if (!Qe(B, z.value) && (z.value = B, !l || !ze(l))) {
|
|
1921
|
+
const m = B.length || 0;
|
|
1922
|
+
m !== ((D = C(S)) == null ? void 0 : D.total) && y({
|
|
1905
1923
|
total: m
|
|
1906
1924
|
});
|
|
1907
1925
|
}
|
|
1908
1926
|
}
|
|
1909
1927
|
return {
|
|
1910
|
-
dataSource:
|
|
1928
|
+
dataSource: Te,
|
|
1911
1929
|
isTreeDataRef: Ie,
|
|
1912
1930
|
reSetDataList: F,
|
|
1913
|
-
changeDataValue: ({ key: T, params:
|
|
1914
|
-
const Q = T ?? e.value, ce = (
|
|
1931
|
+
changeDataValue: ({ key: T, params: B, value: D, type: m = "update" }) => {
|
|
1932
|
+
const Q = T ?? e.value, ce = (B == null ? void 0 : B[Q]) ?? D;
|
|
1915
1933
|
switch (m) {
|
|
1916
1934
|
case "update":
|
|
1917
|
-
Q && ce &&
|
|
1935
|
+
Q && ce && B && (z.value = z.value.map((_) => ce === _[Q] ? kt(_, B, {
|
|
1918
1936
|
omitNil: !1,
|
|
1919
1937
|
omitEmpty: !1
|
|
1920
|
-
}) : _)), _e(!!
|
|
1938
|
+
}) : _)), _e(!!B, "params is required");
|
|
1921
1939
|
break;
|
|
1922
1940
|
case "push":
|
|
1923
|
-
|
|
1941
|
+
B && z.value.push(B), _e(!!B, "params is required");
|
|
1924
1942
|
break;
|
|
1925
1943
|
case "unshift":
|
|
1926
|
-
|
|
1944
|
+
B && z.value.unshift(B), _e(!!B, "params is required");
|
|
1927
1945
|
break;
|
|
1928
1946
|
case "delete":
|
|
1929
|
-
Q && (z.value = z.value.filter((_) =>
|
|
1947
|
+
Q && (z.value = z.value.filter((_) => D !== _[Q]));
|
|
1930
1948
|
break;
|
|
1931
1949
|
}
|
|
1932
1950
|
},
|
|
1933
1951
|
handleTableChange: g,
|
|
1934
1952
|
reload: async (T) => {
|
|
1935
|
-
ke(
|
|
1953
|
+
ke(l) ? await Z.run({ ...T, isPolling: !1 }) : M("reload");
|
|
1936
1954
|
}
|
|
1937
1955
|
};
|
|
1938
1956
|
}
|
|
1939
|
-
function
|
|
1957
|
+
function ja({ emit: e, loading: n }) {
|
|
1940
1958
|
var i;
|
|
1941
|
-
const
|
|
1942
|
-
|
|
1943
|
-
|
|
1959
|
+
const l = j(ie(n.value) ? n.value : U(n.value) ? (i = n.value) == null ? void 0 : i.spinning : !1);
|
|
1960
|
+
V(() => n.value, (d) => {
|
|
1961
|
+
l.value = ie(d) ? d : U(d) ? d == null ? void 0 : d.spinning : l.value;
|
|
1944
1962
|
});
|
|
1945
|
-
const u = w(() =>
|
|
1963
|
+
const u = w(() => l.value);
|
|
1946
1964
|
function o(d) {
|
|
1947
|
-
|
|
1965
|
+
l.value = d, e("loadingChange", !0);
|
|
1948
1966
|
}
|
|
1949
|
-
return { loadingComputed: u, loading:
|
|
1967
|
+
return { loadingComputed: u, loading: l, setLoading: o };
|
|
1950
1968
|
}
|
|
1951
|
-
function
|
|
1969
|
+
function Da({
|
|
1952
1970
|
slots: e,
|
|
1953
|
-
props:
|
|
1954
|
-
pagination:
|
|
1971
|
+
props: n,
|
|
1972
|
+
pagination: l
|
|
1955
1973
|
}) {
|
|
1956
|
-
const u =
|
|
1957
|
-
|
|
1974
|
+
const u = Fe({}), o = j();
|
|
1975
|
+
V(() => l.value, () => {
|
|
1958
1976
|
var x;
|
|
1959
|
-
if (
|
|
1977
|
+
if (ie(l.value) && !l.value) {
|
|
1960
1978
|
o.value = !1;
|
|
1961
1979
|
return;
|
|
1962
1980
|
}
|
|
1963
|
-
const d =
|
|
1981
|
+
const d = Nt(e, C(n), "pageItemRender"), v = ze(d) ? {
|
|
1964
1982
|
itemRender: ({
|
|
1965
1983
|
page: f,
|
|
1966
|
-
type:
|
|
1984
|
+
type: p,
|
|
1967
1985
|
originalElement: s
|
|
1968
1986
|
}) => d ? d({
|
|
1969
1987
|
page: f,
|
|
1970
|
-
type:
|
|
1988
|
+
type: p,
|
|
1971
1989
|
originalElement: s
|
|
1972
1990
|
}) : null
|
|
1973
1991
|
} : null, b = {
|
|
@@ -1977,10 +1995,10 @@ function ka({
|
|
|
1977
1995
|
showQuickJumper: !0,
|
|
1978
1996
|
showSizeChanger: !0,
|
|
1979
1997
|
pageSizeOptions: ["10", "20", "50", "100"],
|
|
1980
|
-
...
|
|
1998
|
+
...l.value || {},
|
|
1981
1999
|
...v || {}
|
|
1982
2000
|
};
|
|
1983
|
-
(x =
|
|
2001
|
+
(x = l.value) != null && x.showTotal || (b.showTotal = (f) => `共${f < b.pageSize ? 1 : Math.ceil(f / (b.pageSize || 10))}页 ${f}条记录`), o.value = b, Object.assign(u, {
|
|
1984
2002
|
pageNum: b.current,
|
|
1985
2003
|
pageSize: b.pageSize
|
|
1986
2004
|
});
|
|
@@ -1989,11 +2007,11 @@ function ka({
|
|
|
1989
2007
|
immediate: !0
|
|
1990
2008
|
});
|
|
1991
2009
|
function i(d) {
|
|
1992
|
-
if (
|
|
2010
|
+
if (U(o.value) && U(d)) {
|
|
1993
2011
|
const v = {};
|
|
1994
2012
|
Object.keys(d).forEach((b) => {
|
|
1995
2013
|
Object.prototype.hasOwnProperty.call(d, b) && o.value[b] === d[b] || (v[b] = d[b]);
|
|
1996
|
-
}), Object.keys(v).length > 0 && (Object.assign(o.value, v),
|
|
2014
|
+
}), Object.keys(v).length > 0 && (Object.assign(o.value, v), Na(v) && Object.assign(u, v));
|
|
1997
2015
|
}
|
|
1998
2016
|
}
|
|
1999
2017
|
return {
|
|
@@ -2002,95 +2020,95 @@ function ka({
|
|
|
2002
2020
|
setPagination: i
|
|
2003
2021
|
};
|
|
2004
2022
|
}
|
|
2005
|
-
function
|
|
2023
|
+
function Na(e) {
|
|
2006
2024
|
if (typeof e != "object" || e === null)
|
|
2007
2025
|
return !1;
|
|
2008
|
-
const
|
|
2009
|
-
return
|
|
2026
|
+
const n = Object.keys(e);
|
|
2027
|
+
return n.length === 2 && n.includes("pageNum") && n.includes("pageSize");
|
|
2010
2028
|
}
|
|
2011
|
-
function
|
|
2012
|
-
const
|
|
2013
|
-
|
|
2029
|
+
function Ea(e, n) {
|
|
2030
|
+
const l = j([]), u = j([]);
|
|
2031
|
+
V(() => {
|
|
2014
2032
|
var f;
|
|
2015
|
-
return (f =
|
|
2033
|
+
return (f = n.value) == null ? void 0 : f.selectedRowKeys;
|
|
2016
2034
|
}, (f) => {
|
|
2017
|
-
|
|
2035
|
+
l.value = ml([...f || []]);
|
|
2018
2036
|
}, {
|
|
2019
2037
|
deep: !0,
|
|
2020
2038
|
immediate: !0
|
|
2021
2039
|
});
|
|
2022
|
-
const o = (f,
|
|
2023
|
-
var
|
|
2024
|
-
const s = (
|
|
2025
|
-
e.value && (
|
|
2040
|
+
const o = (f, p) => {
|
|
2041
|
+
var a;
|
|
2042
|
+
const s = (a = n.value) == null ? void 0 : a.type;
|
|
2043
|
+
e.value && (p ? 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])));
|
|
2026
2044
|
}, i = () => {
|
|
2027
|
-
var f,
|
|
2028
|
-
|
|
2045
|
+
var f, p;
|
|
2046
|
+
n.value && ((p = (f = n.value) == null ? void 0 : f.onChange) == null || p.call(f, l.value, u.value));
|
|
2029
2047
|
};
|
|
2030
2048
|
return {
|
|
2031
|
-
selectedKeys:
|
|
2049
|
+
selectedKeys: l,
|
|
2032
2050
|
selectedItems: u,
|
|
2033
2051
|
selectRowKey: o,
|
|
2034
|
-
selectAllRowKey: (f,
|
|
2035
|
-
e.value && (f ?
|
|
2052
|
+
selectAllRowKey: (f, p, s) => {
|
|
2053
|
+
e.value && (f ? p.map((a) => (l.value.every((r) => r !== (a == null ? void 0 : a[e.value])) && a != null && a[e.value] && (l.value.push(a[e.value]), u.value.push(a)), a)) : s.map((a) => (l.value.includes(a == null ? void 0 : a[e.value]) && (l.value = l.value.filter((r) => r !== a[e.value]), u.value = u.value.filter((r) => r[e.value] !== a[e.value])), a)));
|
|
2036
2054
|
},
|
|
2037
2055
|
removeRowKeys: (f) => {
|
|
2038
|
-
|
|
2056
|
+
l.value = l.value.filter((p) => !f.includes(p)), u.value = u.value.filter((p) => !f.includes(p == null ? void 0 : p[e.value || ""])), i();
|
|
2039
2057
|
},
|
|
2040
2058
|
changeRowKey: i,
|
|
2041
2059
|
syncSelectedRows: (f) => {
|
|
2042
|
-
if (e.value &&
|
|
2043
|
-
const
|
|
2044
|
-
f.forEach((
|
|
2045
|
-
s.includes(
|
|
2060
|
+
if (e.value && l.value.length !== u.value.length) {
|
|
2061
|
+
const p = u.value.map((a) => a[e.value]), s = l.value.filter((a) => !p.includes(a));
|
|
2062
|
+
f.forEach((a) => {
|
|
2063
|
+
s.includes(a[e.value]) && u.value.push(ue(a));
|
|
2046
2064
|
});
|
|
2047
2065
|
}
|
|
2048
2066
|
},
|
|
2049
2067
|
clearAllRowKeys: () => {
|
|
2050
|
-
|
|
2068
|
+
l.value = [], u.value = [], i();
|
|
2051
2069
|
}
|
|
2052
2070
|
};
|
|
2053
2071
|
}
|
|
2054
|
-
function
|
|
2055
|
-
const
|
|
2056
|
-
return e.forEach((
|
|
2057
|
-
let u =
|
|
2072
|
+
function Ma(e) {
|
|
2073
|
+
const n = {};
|
|
2074
|
+
return e.forEach((l) => {
|
|
2075
|
+
let u = l.initialValue;
|
|
2058
2076
|
const o = ["select"], i = ["date", "time", "dateRange"];
|
|
2059
|
-
!u && o.includes(
|
|
2060
|
-
}),
|
|
2077
|
+
!u && o.includes(l.valueType) ? u = void 0 : !u && i.includes(l.valueType) ? u = null : u || (u = ""), l.name === "dateRange" ? (n[l.rangeStartName || "start"] = u ? u[0] : null, n[l.rangeEndName || "end"] = u ? u[1] : null) : l.name && (n[l.name] = u);
|
|
2078
|
+
}), n;
|
|
2061
2079
|
}
|
|
2062
|
-
function
|
|
2063
|
-
const o =
|
|
2064
|
-
var
|
|
2080
|
+
function Aa({ searchMap: e, params: n, columns: l, setPagination: u }) {
|
|
2081
|
+
const o = Fe({}), i = Fe({}), d = j([]), v = (x) => {
|
|
2082
|
+
var p, s;
|
|
2065
2083
|
const f = [];
|
|
2066
|
-
if ((x === "all" || x === "searchMap") && ((
|
|
2067
|
-
d.value.some((r) => r.name ===
|
|
2084
|
+
if ((x === "all" || x === "searchMap") && ((p = e.value) == null || p.forEach((a) => f.push(a)), f.forEach((a) => {
|
|
2085
|
+
d.value.some((r) => r.name === a.name) ? d.value = d.value.map((r) => r.name === a.name ? {
|
|
2068
2086
|
...r,
|
|
2069
|
-
...
|
|
2070
|
-
} : r) : d.value.push(
|
|
2071
|
-
})), (x === "all" || x === "columns") && ((s =
|
|
2072
|
-
|
|
2073
|
-
}), f.forEach((
|
|
2074
|
-
d.value.some((r) => r.name ===
|
|
2087
|
+
...a
|
|
2088
|
+
} : r) : d.value.push(a);
|
|
2089
|
+
})), (x === "all" || x === "columns") && ((s = l.value) != null && s.length) && (l.value && l.value.forEach((a) => {
|
|
2090
|
+
a.searchConfig && f.push(a.searchConfig);
|
|
2091
|
+
}), f.forEach((a) => {
|
|
2092
|
+
d.value.some((r) => r.name === a.name) ? d.value = d.value.map((r) => r.name === a.name ? {
|
|
2075
2093
|
...r,
|
|
2076
|
-
...
|
|
2077
|
-
} : r) : d.value.push(
|
|
2094
|
+
...a
|
|
2095
|
+
} : r) : d.value.push(a);
|
|
2078
2096
|
})), x === "all" || x === "searchMap" || x === "columns") {
|
|
2079
2097
|
u({ current: 1 });
|
|
2080
|
-
const
|
|
2081
|
-
Object.assign(i, { ...
|
|
2082
|
-
for (const r in
|
|
2083
|
-
o[r] || (o[r] =
|
|
2098
|
+
const a = Ma(f);
|
|
2099
|
+
Object.assign(i, { ...a });
|
|
2100
|
+
for (const r in a)
|
|
2101
|
+
o[r] || (o[r] = a[r]);
|
|
2084
2102
|
}
|
|
2085
|
-
(x === "all" || x === "params") && (u({ current: 1 }), Object.assign(o,
|
|
2103
|
+
(x === "all" || x === "params") && (u({ current: 1 }), Object.assign(o, n.value));
|
|
2086
2104
|
};
|
|
2087
|
-
|
|
2105
|
+
Fl(() => {
|
|
2088
2106
|
v("all");
|
|
2089
|
-
}),
|
|
2107
|
+
}), V(() => n.value, () => {
|
|
2090
2108
|
v("params");
|
|
2091
|
-
}, { deep: !0 }),
|
|
2109
|
+
}, { deep: !0 }), V(() => e.value, () => {
|
|
2092
2110
|
v("searchMap");
|
|
2093
|
-
}, { deep: !0 }),
|
|
2111
|
+
}, { deep: !0 }), V(() => l.value, () => {
|
|
2094
2112
|
v("columns");
|
|
2095
2113
|
}, { deep: !0 });
|
|
2096
2114
|
function b(x) {
|
|
@@ -2098,48 +2116,48 @@ function Ea({ searchMap: e, params: a, columns: t, setPagination: u }) {
|
|
|
2098
2116
|
}
|
|
2099
2117
|
return { formDataRef: d, formParamsRef: o, defaultParamsRef: i, setFormParams: b };
|
|
2100
2118
|
}
|
|
2101
|
-
function
|
|
2102
|
-
const
|
|
2119
|
+
function Ka(e) {
|
|
2120
|
+
const n = w(() => e.scroll), l = w(() => e.autoScroll), u = w(() => e.modalScroll), o = w(() => e.neverScroll), i = w(() => e.rowSelection), d = w(() => e.scrollBreakpoint);
|
|
2103
2121
|
return {
|
|
2104
|
-
scroll:
|
|
2122
|
+
scroll: n,
|
|
2105
2123
|
neverScroll: o,
|
|
2106
2124
|
rowSelection: i,
|
|
2107
|
-
autoScroll:
|
|
2125
|
+
autoScroll: l,
|
|
2108
2126
|
modalScroll: u,
|
|
2109
2127
|
scrollBreakpoint: d
|
|
2110
2128
|
};
|
|
2111
2129
|
}
|
|
2112
|
-
function
|
|
2130
|
+
function za({ scroll: e, columns: n, autoScroll: l, modalScroll: u, neverScroll: o, rowSelection: i, screens: d, innerWidth: v, scrollBreakpoint: b }) {
|
|
2113
2131
|
const x = w(() => {
|
|
2114
|
-
var s,
|
|
2115
|
-
return C(b) ? Ue(C(b)) ? v.value > C(b) :
|
|
2132
|
+
var s, a, r;
|
|
2133
|
+
return C(b) ? Ue(C(b)) ? v.value > C(b) : Et(C(b)) ? (s = d.value) == null ? void 0 : s[C(b)] : (a = d.value) == null ? void 0 : a.xl : (r = d.value) == null ? void 0 : r.xl;
|
|
2116
2134
|
}), f = w(() => {
|
|
2117
2135
|
let s = 0;
|
|
2118
|
-
const
|
|
2136
|
+
const a = C(i) ? 60 : 0, r = 150, y = ue(C(n));
|
|
2119
2137
|
y.forEach((O) => {
|
|
2120
2138
|
s += Number.parseInt(String(O.width)) || 0;
|
|
2121
2139
|
});
|
|
2122
2140
|
const P = y.filter((O) => !Reflect.has(O, "width")).length;
|
|
2123
|
-
return P !== 0 && (s += P * r),
|
|
2141
|
+
return P !== 0 && (s += P * r), a && (s += a), s;
|
|
2124
2142
|
});
|
|
2125
2143
|
return { proScroll: w(() => {
|
|
2126
|
-
var s,
|
|
2144
|
+
var s, a;
|
|
2127
2145
|
return C(o) ? {} : C(e) && Object.keys(C(e)).length ? C(e) : C(u) ? {
|
|
2128
|
-
y: ((s = C(e)) == null ? void 0 : s.y) || ((
|
|
2129
|
-
} : C(
|
|
2146
|
+
y: ((s = C(e)) == null ? void 0 : s.y) || ((a = d.value) != null && a.xl ? 400 : 235)
|
|
2147
|
+
} : C(l) ? x.value ? {} : ie(x.value) ? { x: C(f) } : {} : {};
|
|
2130
2148
|
}), breakpoint: x };
|
|
2131
2149
|
}
|
|
2132
|
-
function
|
|
2133
|
-
const
|
|
2150
|
+
function Ya({ size: e, emit: n }) {
|
|
2151
|
+
const l = j("middle");
|
|
2134
2152
|
He(() => {
|
|
2135
|
-
|
|
2153
|
+
l.value = e.value;
|
|
2136
2154
|
});
|
|
2137
2155
|
function u(o) {
|
|
2138
|
-
|
|
2156
|
+
l.value = o, n("sizeChange", o);
|
|
2139
2157
|
}
|
|
2140
|
-
return { sizeRef:
|
|
2158
|
+
return { sizeRef: l, setTableSize: u };
|
|
2141
2159
|
}
|
|
2142
|
-
const
|
|
2160
|
+
const ut = {
|
|
2143
2161
|
"&::-webkit-scrollbar": {
|
|
2144
2162
|
width: 4,
|
|
2145
2163
|
height: 4
|
|
@@ -2152,8 +2170,8 @@ const nl = {
|
|
|
2152
2170
|
backgroundColor: "transparent",
|
|
2153
2171
|
borderRadius: 2
|
|
2154
2172
|
}
|
|
2155
|
-
},
|
|
2156
|
-
const
|
|
2173
|
+
}, La = (e) => {
|
|
2174
|
+
const n = `${e.antCls}-table`;
|
|
2157
2175
|
return {
|
|
2158
2176
|
[e.componentCls]: {
|
|
2159
2177
|
"&-a": {
|
|
@@ -2163,8 +2181,8 @@ const nl = {
|
|
|
2163
2181
|
color: e.colorPrimaryHover
|
|
2164
2182
|
}
|
|
2165
2183
|
},
|
|
2166
|
-
[`${
|
|
2167
|
-
[`${
|
|
2184
|
+
[`${n}`]: {
|
|
2185
|
+
[`${n}-cell-ellipsis`]: {
|
|
2168
2186
|
overflow: "unset",
|
|
2169
2187
|
whiteSpace: "unset"
|
|
2170
2188
|
}
|
|
@@ -2247,7 +2265,7 @@ const nl = {
|
|
|
2247
2265
|
paddingBlock: e.paddingMD,
|
|
2248
2266
|
border: `${e.lineWidth}px ${e.lineType} ${e.colorSplit}`,
|
|
2249
2267
|
borderRadius: e.borderRadiusLG,
|
|
2250
|
-
backgroundColor:
|
|
2268
|
+
backgroundColor: Yt(e, e.colorBgContainer),
|
|
2251
2269
|
[`${e.antCls}-table-wrapper ${e.antCls}-table-pagination${e.antCls}-pagination`]: {
|
|
2252
2270
|
marginBottom: 0
|
|
2253
2271
|
}
|
|
@@ -2347,34 +2365,34 @@ const nl = {
|
|
|
2347
2365
|
}
|
|
2348
2366
|
},
|
|
2349
2367
|
[`&${e.componentCls}-beautify-scroll`]: {
|
|
2350
|
-
[`${e.antCls}-table-content`]:
|
|
2351
|
-
[`${e.antCls}-table-body`]:
|
|
2368
|
+
[`${e.antCls}-table-content`]: ut,
|
|
2369
|
+
[`${e.antCls}-table-body`]: ut,
|
|
2352
2370
|
[`${e.antCls}-table-empty`]: {
|
|
2353
|
-
[`${e.antCls}-table-content`]:
|
|
2371
|
+
[`${e.antCls}-table-content`]: ut
|
|
2354
2372
|
}
|
|
2355
2373
|
}
|
|
2356
2374
|
}
|
|
2357
2375
|
};
|
|
2358
2376
|
};
|
|
2359
|
-
function
|
|
2377
|
+
function Wa(e) {
|
|
2360
2378
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !ee(e);
|
|
2361
2379
|
}
|
|
2362
|
-
function
|
|
2363
|
-
if (!
|
|
2380
|
+
function Ha(e, n, l, u) {
|
|
2381
|
+
if (!n) return e;
|
|
2364
2382
|
let o = e;
|
|
2365
|
-
if (
|
|
2366
|
-
const i =
|
|
2367
|
-
return c(i,
|
|
2368
|
-
class: [
|
|
2369
|
-
onClick:
|
|
2370
|
-
}),
|
|
2383
|
+
if (U(n)) {
|
|
2384
|
+
const i = n.node === "a" ? "span" : n.node;
|
|
2385
|
+
return c(i, q((n == null ? void 0 : n.attr) || {}, {
|
|
2386
|
+
class: [n.class, n.node === "a" ? `${l}-a` : ""],
|
|
2387
|
+
onClick: n.click
|
|
2388
|
+
}), Wa(e) ? e : {
|
|
2371
2389
|
default: () => [e]
|
|
2372
2390
|
});
|
|
2373
2391
|
}
|
|
2374
|
-
switch (
|
|
2392
|
+
switch (n) {
|
|
2375
2393
|
case "link":
|
|
2376
2394
|
o = c("span", {
|
|
2377
|
-
class: [`${
|
|
2395
|
+
class: [`${l}-a`, u]
|
|
2378
2396
|
}, [e]);
|
|
2379
2397
|
break;
|
|
2380
2398
|
case "time":
|
|
@@ -2392,245 +2410,245 @@ function La(e, a, t, u) {
|
|
|
2392
2410
|
}
|
|
2393
2411
|
return o;
|
|
2394
2412
|
}
|
|
2395
|
-
function
|
|
2396
|
-
const
|
|
2397
|
-
return e.filter((o, i) => i <
|
|
2413
|
+
function Va(e, n) {
|
|
2414
|
+
const l = n && n.current || 1, u = n && n.pageSize || 10;
|
|
2415
|
+
return e.filter((o, i) => i < l * u && i >= u * (l - 1));
|
|
2398
2416
|
}
|
|
2399
|
-
function
|
|
2400
|
-
const
|
|
2401
|
-
|
|
2417
|
+
function qa(e) {
|
|
2418
|
+
const n = document.createElement("textarea");
|
|
2419
|
+
n.style.position = "absolute", n.style.opacity = "0", n.value = e, document.body.appendChild(n), n.select(), document.execCommand("copy"), document.body.removeChild(n);
|
|
2402
2420
|
}
|
|
2403
|
-
function
|
|
2421
|
+
function Ga(e) {
|
|
2404
2422
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !ee(e);
|
|
2405
2423
|
}
|
|
2406
2424
|
const {
|
|
2407
|
-
useBreakpoint:
|
|
2408
|
-
} =
|
|
2425
|
+
useBreakpoint: Qa
|
|
2426
|
+
} = dt, _a = {
|
|
2409
2427
|
reload: !0,
|
|
2410
2428
|
density: !0,
|
|
2411
2429
|
setting: !0,
|
|
2412
2430
|
fullScreen: !0
|
|
2413
|
-
},
|
|
2431
|
+
}, Xa = Xl.useToken, it = /* @__PURE__ */ me({
|
|
2414
2432
|
name: "GProTable",
|
|
2415
2433
|
inheritAttrs: !1,
|
|
2416
2434
|
props: he,
|
|
2417
|
-
emits: ["reset", "reload", "submit", "sizeChange", "expandedRowsChange", "expand", "change", "requestError", "
|
|
2435
|
+
emits: ["reset", "reload", "submit", "sizeChange", "expandedRowsChange", "expand", "change", "requestError", "columnsStateChange", "loadingChange"],
|
|
2418
2436
|
slots: Object,
|
|
2419
2437
|
setup(e, {
|
|
2420
|
-
emit:
|
|
2421
|
-
slots:
|
|
2438
|
+
emit: n,
|
|
2439
|
+
slots: l,
|
|
2422
2440
|
attrs: u,
|
|
2423
2441
|
expose: o
|
|
2424
2442
|
}) {
|
|
2425
|
-
const i =
|
|
2443
|
+
const i = rt({
|
|
2426
2444
|
suffixCls: "table",
|
|
2427
2445
|
isPor: !0
|
|
2428
2446
|
}), {
|
|
2429
2447
|
wrapSSR: d,
|
|
2430
2448
|
hashId: v
|
|
2431
|
-
} = Ze("ProBaseTable", [
|
|
2449
|
+
} = Ze("ProBaseTable", [La], i), {
|
|
2432
2450
|
token: b
|
|
2433
|
-
} =
|
|
2434
|
-
width:
|
|
2435
|
-
} =
|
|
2436
|
-
He(() =>
|
|
2451
|
+
} = Xa(), x = Ll(), f = Qa(), {
|
|
2452
|
+
width: p
|
|
2453
|
+
} = xl(), s = j(!1), a = zt(), r = j(), y = j(), S = j(e.waitRequest);
|
|
2454
|
+
He(() => S.value = e.waitRequest);
|
|
2437
2455
|
const {
|
|
2438
2456
|
toggle: P,
|
|
2439
2457
|
isFullscreen: O
|
|
2440
|
-
} =
|
|
2458
|
+
} = Mt(r), M = w(() => ({
|
|
2441
2459
|
...e
|
|
2442
2460
|
})), G = w(() => !f.value.xl), W = w(() => {
|
|
2443
2461
|
var h, $;
|
|
2444
2462
|
return e.virtualScroll && _e(!((h = e.scroll) != null && h.y), "参数scroll的Y值不能为空!"), !!(($ = e.scroll) != null && $.y && e.virtualScroll);
|
|
2445
|
-
}), K = w(() => e.search === !1 ? !1 :
|
|
2463
|
+
}), K = w(() => e.search === !1 ? !1 : U(e.search) ? e.search : {
|
|
2446
2464
|
type: "auto",
|
|
2447
2465
|
resetText: "重置",
|
|
2448
2466
|
searchText: "查询"
|
|
2449
|
-
}),
|
|
2467
|
+
}), te = w(() => K.value === !1 ? {} : K.value), z = w(() => {
|
|
2450
2468
|
var h;
|
|
2451
|
-
return ((h =
|
|
2469
|
+
return ((h = te.value) == null ? void 0 : h.manualRequest) ?? !1;
|
|
2452
2470
|
}), Y = w(() => {
|
|
2453
2471
|
var h;
|
|
2454
|
-
return (h =
|
|
2455
|
-
}),
|
|
2472
|
+
return (h = te.value) == null ? void 0 : h.actions;
|
|
2473
|
+
}), le = w(() => {
|
|
2456
2474
|
const h = (e.columns || []).filter(($) => $.key || $.dataIndex).map(($) => {
|
|
2457
|
-
const
|
|
2458
|
-
return $.key =
|
|
2475
|
+
const R = $.key || $.dataIndex;
|
|
2476
|
+
return $.key = R, $.dataIndex = R, $.align = $.align || e.align, $.uuid = $.uuid || st().uuid(15), $;
|
|
2459
2477
|
});
|
|
2460
|
-
return
|
|
2478
|
+
return gl(h, {
|
|
2461
2479
|
align: e.align ?? "left",
|
|
2462
2480
|
showIndex: e.showIndex ?? !1
|
|
2463
2481
|
});
|
|
2464
2482
|
}), {
|
|
2465
|
-
loadingComputed:
|
|
2483
|
+
loadingComputed: Se,
|
|
2466
2484
|
loading: Z,
|
|
2467
|
-
setLoading:
|
|
2468
|
-
} =
|
|
2469
|
-
emit:
|
|
2485
|
+
setLoading: we
|
|
2486
|
+
} = ja({
|
|
2487
|
+
emit: n,
|
|
2470
2488
|
loading: fe(e, "loading")
|
|
2471
2489
|
}), {
|
|
2472
|
-
sizeRef:
|
|
2490
|
+
sizeRef: Te,
|
|
2473
2491
|
setTableSize: Ie
|
|
2474
|
-
} =
|
|
2475
|
-
emit:
|
|
2492
|
+
} = Ya({
|
|
2493
|
+
emit: n,
|
|
2476
2494
|
size: fe(e, "size")
|
|
2477
2495
|
}), {
|
|
2478
|
-
paginationInfo:
|
|
2496
|
+
paginationInfo: t,
|
|
2479
2497
|
requestPagination: g,
|
|
2480
2498
|
setPagination: F
|
|
2481
|
-
} =
|
|
2482
|
-
slots:
|
|
2499
|
+
} = Da({
|
|
2500
|
+
slots: l,
|
|
2483
2501
|
props: M,
|
|
2484
2502
|
pagination: fe(e, "pagination")
|
|
2485
|
-
}), I =
|
|
2503
|
+
}), I = Ka(e), {
|
|
2486
2504
|
proScroll: T,
|
|
2487
|
-
breakpoint:
|
|
2488
|
-
} =
|
|
2505
|
+
breakpoint: B
|
|
2506
|
+
} = za({
|
|
2489
2507
|
...I,
|
|
2490
|
-
innerWidth:
|
|
2491
|
-
columns:
|
|
2508
|
+
innerWidth: p,
|
|
2509
|
+
columns: le,
|
|
2492
2510
|
screens: f
|
|
2493
|
-
}),
|
|
2511
|
+
}), D = Ba(e), {
|
|
2494
2512
|
proColumns: m,
|
|
2495
2513
|
cacheProColumns: Q,
|
|
2496
2514
|
setColumns: ce,
|
|
2497
2515
|
changeColumns: _,
|
|
2498
2516
|
resizeColumnWidth: ae
|
|
2499
|
-
} =
|
|
2500
|
-
...
|
|
2501
|
-
breakpoint:
|
|
2517
|
+
} = Fa({
|
|
2518
|
+
...D,
|
|
2519
|
+
breakpoint: B,
|
|
2502
2520
|
scroll: T,
|
|
2503
|
-
columns:
|
|
2521
|
+
columns: le
|
|
2504
2522
|
}), {
|
|
2505
|
-
columnsMap:
|
|
2523
|
+
columnsMap: $e,
|
|
2506
2524
|
operationType: je,
|
|
2507
2525
|
setColumnsMap: ne,
|
|
2508
2526
|
sortKeyColumns: ye,
|
|
2509
2527
|
cacheColumnsMap: L,
|
|
2510
2528
|
setSortKeyColumns: Re
|
|
2511
|
-
} =
|
|
2529
|
+
} = Ia({
|
|
2512
2530
|
columns: Q,
|
|
2513
2531
|
columnsState: fe(e, "columnsState"),
|
|
2514
2532
|
changeColumns: _
|
|
2515
2533
|
}), {
|
|
2516
|
-
formDataRef:
|
|
2517
|
-
formParamsRef:
|
|
2518
|
-
defaultParamsRef:
|
|
2519
|
-
setFormParams:
|
|
2520
|
-
} =
|
|
2534
|
+
formDataRef: J,
|
|
2535
|
+
formParamsRef: ft,
|
|
2536
|
+
defaultParamsRef: Gt,
|
|
2537
|
+
setFormParams: et
|
|
2538
|
+
} = Aa({
|
|
2521
2539
|
searchMap: fe(e, "searchMap"),
|
|
2522
2540
|
params: fe(e, "params"),
|
|
2523
|
-
columns:
|
|
2541
|
+
columns: le,
|
|
2524
2542
|
setPagination: F
|
|
2525
2543
|
}), {
|
|
2526
|
-
selectedKeys:
|
|
2527
|
-
selectedItems:
|
|
2528
|
-
changeRowKey:
|
|
2529
|
-
selectRowKey:
|
|
2530
|
-
selectAllRowKey:
|
|
2531
|
-
syncSelectedRows:
|
|
2532
|
-
removeRowKeys:
|
|
2533
|
-
clearAllRowKeys:
|
|
2534
|
-
} =
|
|
2544
|
+
selectedKeys: ht,
|
|
2545
|
+
selectedItems: Qt,
|
|
2546
|
+
changeRowKey: _t,
|
|
2547
|
+
selectRowKey: vt,
|
|
2548
|
+
selectAllRowKey: mt,
|
|
2549
|
+
syncSelectedRows: gt,
|
|
2550
|
+
removeRowKeys: yt,
|
|
2551
|
+
clearAllRowKeys: Xt
|
|
2552
|
+
} = Ea(fe(e, "rowKey"), fe(e, "rowSelection")), Ut = Pa(e), {
|
|
2535
2553
|
reload: De,
|
|
2536
|
-
reSetDataList:
|
|
2537
|
-
changeDataValue:
|
|
2538
|
-
isTreeDataRef:
|
|
2554
|
+
reSetDataList: Jt,
|
|
2555
|
+
changeDataValue: Zt,
|
|
2556
|
+
isTreeDataRef: el,
|
|
2539
2557
|
dataSource: Ne,
|
|
2540
|
-
handleTableChange:
|
|
2541
|
-
} =
|
|
2542
|
-
...
|
|
2543
|
-
waitRequest:
|
|
2558
|
+
handleTableChange: bt
|
|
2559
|
+
} = ka({
|
|
2560
|
+
...Ut,
|
|
2561
|
+
waitRequest: S
|
|
2544
2562
|
}, {
|
|
2545
|
-
loading:
|
|
2546
|
-
paginationInfo:
|
|
2563
|
+
loading: Se,
|
|
2564
|
+
paginationInfo: t,
|
|
2547
2565
|
setPagination: F,
|
|
2548
|
-
removeRowKeys:
|
|
2549
|
-
syncSelectedRows:
|
|
2550
|
-
setLoading:
|
|
2566
|
+
removeRowKeys: yt,
|
|
2567
|
+
syncSelectedRows: gt,
|
|
2568
|
+
setLoading: we,
|
|
2551
2569
|
setColumns: ce,
|
|
2552
2570
|
search: K,
|
|
2553
2571
|
columns: m,
|
|
2554
|
-
formParamsRef:
|
|
2572
|
+
formParamsRef: ft,
|
|
2555
2573
|
onBeforeSearchSubmit: e.onBeforeSearchSubmit,
|
|
2556
|
-
hasCustomRender: w(() => ke(e.customRender || (
|
|
2557
|
-
},
|
|
2558
|
-
...
|
|
2559
|
-
...
|
|
2560
|
-
} : !1),
|
|
2561
|
-
size: C(
|
|
2574
|
+
hasCustomRender: w(() => ke(e.customRender || (l == null ? void 0 : l.customRender)))
|
|
2575
|
+
}, n), Ee = w(() => e.options ? {
|
|
2576
|
+
..._a,
|
|
2577
|
+
...U(e.options) ? e.options : {}
|
|
2578
|
+
} : !1), tl = w(() => ({
|
|
2579
|
+
size: C(Te),
|
|
2562
2580
|
scroll: C(T),
|
|
2563
2581
|
dataSource: C(Ne),
|
|
2564
|
-
pagination: C(
|
|
2582
|
+
pagination: C(t),
|
|
2565
2583
|
virtualScroll: W.value,
|
|
2566
2584
|
columns: C(m).filter((h) => h.show || h.show === void 0)
|
|
2567
|
-
})),
|
|
2568
|
-
var $,
|
|
2569
|
-
const h =
|
|
2570
|
-
return !h.indicator && (($ =
|
|
2585
|
+
})), Ct = w(() => {
|
|
2586
|
+
var $, R;
|
|
2587
|
+
const h = U(e.loading) ? Je(e.loading, "spinning") : {};
|
|
2588
|
+
return !h.indicator && (($ = a == null ? void 0 : a.indicator) != null && $.value) && (h.indicator = (R = a == null ? void 0 : a.indicator) == null ? void 0 : R.value), {
|
|
2571
2589
|
spinning: e.showLoading ? ke(Z.value) : !1,
|
|
2572
2590
|
...h
|
|
2573
2591
|
};
|
|
2574
|
-
}),
|
|
2592
|
+
}), xt = w(() => {
|
|
2575
2593
|
var N;
|
|
2576
2594
|
let h;
|
|
2577
|
-
const $ = C(M).direction === "rtl" ? "bottomLeft" : "right",
|
|
2578
|
-
if (
|
|
2579
|
-
const k =
|
|
2580
|
-
!k && !H && !
|
|
2595
|
+
const $ = C(M).direction === "rtl" ? "bottomLeft" : "right", R = (N = C(t)) == null ? void 0 : N.position;
|
|
2596
|
+
if (R !== null && Array.isArray(R)) {
|
|
2597
|
+
const k = R.find((A) => A.includes("top")), H = R.find((A) => A.includes("bottom")), se = R.every((A) => `${A}` == "none");
|
|
2598
|
+
!k && !H && !se && (h = $), k && (h = k.toLowerCase().replace("top", "")), H && (h = H.toLowerCase().replace("bottom", ""));
|
|
2581
2599
|
} else
|
|
2582
2600
|
h = $;
|
|
2583
2601
|
return h;
|
|
2584
2602
|
});
|
|
2585
|
-
|
|
2603
|
+
Ra(() => {
|
|
2586
2604
|
s.value && e.keepAliveReload ? De() : s.value = !0;
|
|
2587
2605
|
});
|
|
2588
|
-
const
|
|
2589
|
-
var
|
|
2590
|
-
z.value ? (
|
|
2606
|
+
const pt = async (h, $) => {
|
|
2607
|
+
var R;
|
|
2608
|
+
z.value ? (R = Y.value) != null && R.reload && $ ? (et(h), await De()) : et(h) : (et({
|
|
2591
2609
|
...e.params || {},
|
|
2592
2610
|
...h
|
|
2593
2611
|
}), await De());
|
|
2594
|
-
},
|
|
2595
|
-
$ === "reset" ? (
|
|
2596
|
-
},
|
|
2597
|
-
F(
|
|
2598
|
-
},
|
|
2599
|
-
var
|
|
2612
|
+
}, ll = async (h, $) => {
|
|
2613
|
+
$ === "reset" ? (n("reset", h), e.request && await pt(h, $)) : e.request ? (n("submit", h), await pt(h, $)) : n("submit", h);
|
|
2614
|
+
}, St = (h, $, R, N) => {
|
|
2615
|
+
F(Rt(h, ["current", "pageSize"])), bt(h, $, R, N);
|
|
2616
|
+
}, al = (h, $) => {
|
|
2617
|
+
var R;
|
|
2600
2618
|
F({
|
|
2601
2619
|
current: h,
|
|
2602
2620
|
pageSize: $
|
|
2603
|
-
}),
|
|
2621
|
+
}), bt({
|
|
2604
2622
|
current: h,
|
|
2605
2623
|
pageSize: $,
|
|
2606
|
-
total:
|
|
2624
|
+
total: t.value && ((R = t.value) == null ? void 0 : R.total) || 0
|
|
2607
2625
|
}, {}, {});
|
|
2608
|
-
},
|
|
2609
|
-
|
|
2610
|
-
},
|
|
2611
|
-
|
|
2612
|
-
},
|
|
2613
|
-
var k, H,
|
|
2626
|
+
}, nl = (h) => {
|
|
2627
|
+
n("expandedRowsChange", h);
|
|
2628
|
+
}, ul = (h, $) => {
|
|
2629
|
+
n("expand", h, $);
|
|
2630
|
+
}, il = (h, $) => ae(h, $), sl = (h, $, R) => {
|
|
2631
|
+
var k, H, se, A, de, be;
|
|
2614
2632
|
let N = h;
|
|
2615
2633
|
if ($) {
|
|
2616
|
-
const
|
|
2634
|
+
const oe = re(h) ? typeof ((k = h == null ? void 0 : h[0]) == null ? void 0 : k.children) == "string" ? (H = h == null ? void 0 : h[0]) == null ? void 0 : H.children : "" : h.toString(), E = R.tooltip === !1 ? {} : R.tooltip, Me = R.tooltip === !1 ? 1 : Ue(E == null ? void 0 : E.hiddenLine) && (E == null ? void 0 : E.hiddenLine) > 0 ? E == null ? void 0 : E.hiddenLine : 1, Oe = R.tooltip === !1 ? 0 : Ue(E == null ? void 0 : E.width) ? E == null ? void 0 : E.width : 0, Ve = R.tooltip !== !1 && Et(oe) && Oe > 0 ? bl(oe, {
|
|
2617
2635
|
cssObject: {
|
|
2618
2636
|
fontSize: "14px",
|
|
2619
2637
|
lineHeight: "22px",
|
|
2620
|
-
fontFamily: ((A = (
|
|
2638
|
+
fontFamily: ((A = (se = x == null ? void 0 : x.token) == null ? void 0 : se.value) == null ? void 0 : A.fontFamily) || ((de = b == null ? void 0 : b.value) == null ? void 0 : de.fontFamily),
|
|
2621
2639
|
...(E == null ? void 0 : E.targetStyle) || {}
|
|
2622
2640
|
}
|
|
2623
|
-
}) : 0,
|
|
2641
|
+
}) : 0, cl = document.querySelector(`.${i} .ant-table-tbody`), qe = c("div", {
|
|
2624
2642
|
class: `${i}-ellipsis-text`
|
|
2625
|
-
}, [h]),
|
|
2643
|
+
}, [h]), Tt = () => R.tooltip === !1 || U(R.tooltip) && Ve < Oe && Oe > 0 ? qe : c(ve, q({
|
|
2626
2644
|
title: h,
|
|
2627
2645
|
getPopupContainer: (Ae) => {
|
|
2628
|
-
var
|
|
2629
|
-
return
|
|
2646
|
+
var $t;
|
|
2647
|
+
return cl ?? (($t = Ae == null ? void 0 : Ae.parentNode) == null ? void 0 : $t.parentNode);
|
|
2630
2648
|
}
|
|
2631
|
-
},
|
|
2649
|
+
}, U(R.tooltip) ? R.tooltip : {}, {
|
|
2632
2650
|
destroyTooltipOnHide: !0
|
|
2633
|
-
}),
|
|
2651
|
+
}), Ga(qe) ? qe : {
|
|
2634
2652
|
default: () => [qe]
|
|
2635
2653
|
});
|
|
2636
2654
|
if (N = c("div", {
|
|
@@ -2638,8 +2656,8 @@ const {
|
|
|
2638
2656
|
style: {
|
|
2639
2657
|
"-webkit-line-clamp": Me
|
|
2640
2658
|
}
|
|
2641
|
-
}, [
|
|
2642
|
-
const Ae = typeof
|
|
2659
|
+
}, [Tt()]), R.copyable) {
|
|
2660
|
+
const Ae = typeof R.copyText == "function" ? (be = R.copyText) == null ? void 0 : be.call(R, R) : R.copyText || oe;
|
|
2643
2661
|
N = c("div", {
|
|
2644
2662
|
class: `${i}-copyable`
|
|
2645
2663
|
}, [c("div", {
|
|
@@ -2647,65 +2665,65 @@ const {
|
|
|
2647
2665
|
style: {
|
|
2648
2666
|
"-webkit-line-clamp": Me
|
|
2649
2667
|
}
|
|
2650
|
-
}, [
|
|
2668
|
+
}, [Tt()]), c(zl, {
|
|
2651
2669
|
class: `${i}-copyable-icon`,
|
|
2652
2670
|
onClick: () => {
|
|
2653
|
-
|
|
2671
|
+
qa(Ae), Zl.success("复制成功");
|
|
2654
2672
|
}
|
|
2655
2673
|
}, null)]);
|
|
2656
2674
|
}
|
|
2657
2675
|
}
|
|
2658
2676
|
return N;
|
|
2659
2677
|
};
|
|
2660
|
-
function
|
|
2661
|
-
var
|
|
2662
|
-
const h = Pe(
|
|
2663
|
-
if (h !== !1 && ((
|
|
2664
|
-
const A = ((N = e.emptyTextProps) == null ? void 0 : N.extraProps) || {}, de = h || ((k =
|
|
2678
|
+
function wt() {
|
|
2679
|
+
var R, N, k, H, se;
|
|
2680
|
+
const h = Pe(l, e, "emptyText");
|
|
2681
|
+
if (h !== !1 && ((R = a == null ? void 0 : a.emptyText) == null ? void 0 : R.value) !== !1) {
|
|
2682
|
+
const A = ((N = e.emptyTextProps) == null ? void 0 : N.extraProps) || {}, de = h || ((k = a == null ? void 0 : a.emptyText) == null ? void 0 : k.value), be = ee(de), oe = be ? At(de, A) : jt(de || []);
|
|
2665
2683
|
return c("div", {
|
|
2666
|
-
class:
|
|
2667
|
-
style: (
|
|
2668
|
-
}, [be ?
|
|
2684
|
+
class: pe(`${i}-empty-text`, v.value, (H = e.emptyTextProps) == null ? void 0 : H.class),
|
|
2685
|
+
style: (se = e.emptyTextProps) == null ? void 0 : se.style
|
|
2686
|
+
}, [be ? oe : re(oe) ? oe.map((E) => ct(E, A)) : c(ea, null, null)]);
|
|
2669
2687
|
}
|
|
2670
2688
|
return null;
|
|
2671
2689
|
}
|
|
2672
|
-
const
|
|
2690
|
+
const ol = () => {
|
|
2673
2691
|
var $;
|
|
2674
|
-
const h =
|
|
2692
|
+
const h = Nt(l, e, "customRender");
|
|
2675
2693
|
if (h) {
|
|
2676
2694
|
if (($ = Ne.value) != null && $.length) {
|
|
2677
|
-
const
|
|
2695
|
+
const R = ue(C(Ne));
|
|
2678
2696
|
return h == null ? void 0 : h({
|
|
2679
|
-
dataSource:
|
|
2680
|
-
currentData:
|
|
2697
|
+
dataSource: R,
|
|
2698
|
+
currentData: Va(R, t.value)
|
|
2681
2699
|
});
|
|
2682
2700
|
}
|
|
2683
|
-
return
|
|
2701
|
+
return wt();
|
|
2684
2702
|
}
|
|
2685
2703
|
return c(Ye, null, null);
|
|
2686
|
-
},
|
|
2704
|
+
}, rl = (h) => {
|
|
2687
2705
|
var k, H;
|
|
2688
|
-
const $ = Pe(
|
|
2689
|
-
return c(
|
|
2706
|
+
const $ = Pe(l, e, "headerTitle"), R = Pe(l, e, "titleTip"), N = Pe(l, e, "toolBarBtn");
|
|
2707
|
+
return c(Ta, {
|
|
2690
2708
|
headerTitle: $,
|
|
2691
|
-
titleTip:
|
|
2709
|
+
titleTip: R,
|
|
2692
2710
|
titleTipText: e.titleTipText,
|
|
2693
|
-
options:
|
|
2711
|
+
options: ie(Ee.value) ? Ee.value : {
|
|
2694
2712
|
...Ee.value,
|
|
2695
2713
|
setting: h ? !1 : (k = Ee.value) == null ? void 0 : k.setting,
|
|
2696
2714
|
density: h ? !1 : (H = Ee.value) == null ? void 0 : H.density
|
|
2697
2715
|
},
|
|
2698
|
-
settingExtra: Pe(
|
|
2699
|
-
optionsExtra: Pe(
|
|
2716
|
+
settingExtra: Pe(l, e, "settingExtra"),
|
|
2717
|
+
optionsExtra: Pe(l, e, "optionsExtra"),
|
|
2700
2718
|
toolBarBtn: N
|
|
2701
2719
|
}, null);
|
|
2702
2720
|
};
|
|
2703
|
-
return
|
|
2704
|
-
tableSize:
|
|
2721
|
+
return aa({
|
|
2722
|
+
tableSize: Te,
|
|
2705
2723
|
columns: m,
|
|
2706
|
-
cacheColumns:
|
|
2724
|
+
cacheColumns: le,
|
|
2707
2725
|
isMobile: G,
|
|
2708
|
-
searchConfig:
|
|
2726
|
+
searchConfig: te,
|
|
2709
2727
|
manualSearch: z,
|
|
2710
2728
|
searchActions: Y,
|
|
2711
2729
|
action: {
|
|
@@ -2715,7 +2733,7 @@ const {
|
|
|
2715
2733
|
},
|
|
2716
2734
|
settingsAction: {
|
|
2717
2735
|
autoScroll: fe(e, "autoScroll"),
|
|
2718
|
-
columnsMap:
|
|
2736
|
+
columnsMap: $e,
|
|
2719
2737
|
operationType: je,
|
|
2720
2738
|
setColumnsMap: ne,
|
|
2721
2739
|
sortKeyColumns: ye,
|
|
@@ -2724,142 +2742,142 @@ const {
|
|
|
2724
2742
|
},
|
|
2725
2743
|
setPagination: F,
|
|
2726
2744
|
changeColumns: _,
|
|
2727
|
-
slots:
|
|
2745
|
+
slots: l
|
|
2728
2746
|
}), o({
|
|
2729
2747
|
formRef: () => ({
|
|
2730
|
-
getFormState: () => C(
|
|
2748
|
+
getFormState: () => C(ft),
|
|
2731
2749
|
getFormInnerState: () => {
|
|
2732
2750
|
var h;
|
|
2733
2751
|
return ((h = y.value) == null ? void 0 : h.getFormState()) || {};
|
|
2734
2752
|
},
|
|
2735
2753
|
restFormState: (h) => {
|
|
2736
2754
|
var $;
|
|
2737
|
-
|
|
2755
|
+
S.value = !0, h && (h == null || h()), ($ = y.value) == null || $.resetForm(!1), S.value = !1;
|
|
2738
2756
|
}
|
|
2739
2757
|
}),
|
|
2740
2758
|
actionRef: () => ({
|
|
2741
2759
|
loading: Z,
|
|
2742
2760
|
dataSource: Ne,
|
|
2743
2761
|
pageState: g,
|
|
2744
|
-
pagination:
|
|
2745
|
-
selectedKeys: w(() =>
|
|
2746
|
-
selectedItems: w(() =>
|
|
2762
|
+
pagination: t.value,
|
|
2763
|
+
selectedKeys: w(() => ht.value),
|
|
2764
|
+
selectedItems: w(() => Qt.value),
|
|
2747
2765
|
rowsSelection: {
|
|
2748
|
-
clear:
|
|
2749
|
-
select:
|
|
2750
|
-
remove:
|
|
2751
|
-
sync:
|
|
2752
|
-
selectAll:
|
|
2766
|
+
clear: Xt,
|
|
2767
|
+
select: vt,
|
|
2768
|
+
remove: yt,
|
|
2769
|
+
sync: gt,
|
|
2770
|
+
selectAll: mt
|
|
2753
2771
|
},
|
|
2754
2772
|
reload: De,
|
|
2755
|
-
getLoadingStatus: () => C(
|
|
2773
|
+
getLoadingStatus: () => C(Se),
|
|
2756
2774
|
reloadAndReset: async (h) => {
|
|
2757
|
-
var $,
|
|
2758
|
-
|
|
2775
|
+
var $, R, N;
|
|
2776
|
+
S.value = !0, F({
|
|
2759
2777
|
current: 1,
|
|
2760
2778
|
pageSize: (g == null ? void 0 : g.pageSize) || 10
|
|
2761
|
-
}), h != null && h.callBack && (h != null && h.wait ? await (($ = h == null ? void 0 : h.callBack) == null ? void 0 : $.call(h)) : (
|
|
2779
|
+
}), h != null && h.callBack && (h != null && h.wait ? await (($ = h == null ? void 0 : h.callBack) == null ? void 0 : $.call(h)) : (R = h == null ? void 0 : h.callBack) == null || R.call(h)), (N = y.value) == null || N.resetForm(!1), S.value = !1;
|
|
2762
2780
|
},
|
|
2763
|
-
reSetDataList:
|
|
2764
|
-
setPageAndReload:
|
|
2781
|
+
reSetDataList: Jt,
|
|
2782
|
+
setPageAndReload: St,
|
|
2765
2783
|
setPagination: F,
|
|
2766
|
-
setDataValue:
|
|
2767
|
-
setLoading:
|
|
2784
|
+
setDataValue: Zt,
|
|
2785
|
+
setLoading: we
|
|
2768
2786
|
})
|
|
2769
2787
|
}), () => {
|
|
2770
|
-
var $,
|
|
2771
|
-
const h = ke(e.customRender ||
|
|
2788
|
+
var $, R;
|
|
2789
|
+
const h = ke(e.customRender || l.customRender);
|
|
2772
2790
|
return d(c("div", {
|
|
2773
2791
|
ref: r,
|
|
2774
|
-
class:
|
|
2792
|
+
class: pe([{
|
|
2775
2793
|
[`${v.value}`]: !0,
|
|
2776
2794
|
[`${i}`]: !0,
|
|
2777
2795
|
[`${u.class}`]: u.class,
|
|
2778
|
-
[`${i}-beautify-scroll`]:
|
|
2796
|
+
[`${i}-beautify-scroll`]: ie(e.useDefaultScrollStyle) ? !e.useDefaultScrollStyle : !0,
|
|
2779
2797
|
[`${i}-no-scroll`]: !Object.keys(C(T) || {}).length,
|
|
2780
|
-
[`${i}-table-tree`]:
|
|
2798
|
+
[`${i}-table-tree`]: el.value,
|
|
2781
2799
|
[`${i}-full-screen`]: O.value
|
|
2782
2800
|
}]),
|
|
2783
2801
|
style: u.style
|
|
2784
2802
|
}, [c("div", {
|
|
2785
2803
|
class: [`${i}-content`, v.value]
|
|
2786
|
-
}, [(
|
|
2804
|
+
}, [(J.value.length > 0 || ke(l.search)) && e.search !== !1 && c(Ht, {
|
|
2787
2805
|
ref: y,
|
|
2788
2806
|
modal: e.modalScroll,
|
|
2789
2807
|
cardBordered: e.cardBordered,
|
|
2790
|
-
searchMap:
|
|
2808
|
+
searchMap: J.value,
|
|
2791
2809
|
prefixCls: i,
|
|
2792
|
-
loading: !!C(
|
|
2793
|
-
onSearch:
|
|
2794
|
-
defaultParams:
|
|
2810
|
+
loading: !!C(Se),
|
|
2811
|
+
onSearch: ll,
|
|
2812
|
+
defaultParams: Gt
|
|
2795
2813
|
}, {
|
|
2796
|
-
default:
|
|
2814
|
+
default: l.search ? () => {
|
|
2797
2815
|
var N;
|
|
2798
|
-
return (N =
|
|
2816
|
+
return (N = l.search) == null ? void 0 : N.call(l);
|
|
2799
2817
|
} : null
|
|
2800
2818
|
}), c("div", {
|
|
2801
|
-
class:
|
|
2802
|
-
}, [
|
|
2819
|
+
class: pe(v.value, `${i}-card`, e.cardBordered && `${i}-card-border`)
|
|
2820
|
+
}, [rl(h), h ? c(ot, Ct.value, {
|
|
2803
2821
|
default: () => {
|
|
2804
2822
|
var N, k, H;
|
|
2805
2823
|
return [c("div", {
|
|
2806
2824
|
class: `${i}-wrapper ${v.value}`
|
|
2807
2825
|
}, [c("div", {
|
|
2808
|
-
class:
|
|
2826
|
+
class: pe(`${i}-list`, v.value, (N = e.tableProps) == null ? void 0 : N.class),
|
|
2809
2827
|
style: (k = e.tableProps) == null ? void 0 : k.style
|
|
2810
|
-
}, [
|
|
2828
|
+
}, [ol()]), e.pagination !== !1 && ((H = Ne.value) == null ? void 0 : H.length) > 0 && c(Ul, q({
|
|
2811
2829
|
class: {
|
|
2812
2830
|
[`${i}-pagination ${v.value}`]: !0,
|
|
2813
|
-
[`${i}-pagination-${
|
|
2831
|
+
[`${i}-pagination-${xt.value} ${v.value}`]: !!xt.value
|
|
2814
2832
|
}
|
|
2815
|
-
},
|
|
2816
|
-
onChange:
|
|
2833
|
+
}, Be(C(t)), {
|
|
2834
|
+
onChange: al
|
|
2817
2835
|
}), null)])];
|
|
2818
2836
|
}
|
|
2819
|
-
}) : c(
|
|
2837
|
+
}) : c(Jl, q(Rt(e, Object.keys(Wt)), tl.value, {
|
|
2820
2838
|
style: ($ = e.tableProps) == null ? void 0 : $.style,
|
|
2821
|
-
class: (
|
|
2822
|
-
loading:
|
|
2839
|
+
class: (R = e.tableProps) == null ? void 0 : R.class,
|
|
2840
|
+
loading: Ct.value,
|
|
2823
2841
|
rowKey: (N) => N[e.rowKey],
|
|
2824
2842
|
transformCellText: (N) => {
|
|
2825
|
-
var de, be,
|
|
2843
|
+
var de, be, oe, E, Me;
|
|
2826
2844
|
e.transformCellText && typeof e.transformCellText && ((de = e.transformCellText) == null || de.call(e, N));
|
|
2827
2845
|
const {
|
|
2828
2846
|
column: k
|
|
2829
2847
|
} = N;
|
|
2830
2848
|
if (!k) return N.text;
|
|
2831
2849
|
const H = (k == null ? void 0 : k.key) || (k == null ? void 0 : k.dataIndex);
|
|
2832
|
-
let
|
|
2833
|
-
if (
|
|
2850
|
+
let se = !0, A = N.text;
|
|
2851
|
+
if (re(A))
|
|
2834
2852
|
if (A.length === 0 || A.length === 1 && !ee(A[0])) {
|
|
2835
2853
|
A = A == null ? void 0 : A[0];
|
|
2836
|
-
const Oe =
|
|
2837
|
-
|
|
2854
|
+
const Oe = yl(A, (k == null ? void 0 : k.columnEmptyText) || (e == null ? void 0 : e.columnEmptyText) || "");
|
|
2855
|
+
se = Oe.success, A = Ha(Oe.value, (k == null ? void 0 : k.valueType) || ((oe = (be = e.columns) == null ? void 0 : be.find((Ve) => (Ve.key || Ve.dataIndex) === H)) == null ? void 0 : oe.valueType), i, v.value);
|
|
2838
2856
|
} else ((E = A[0]) == null ? void 0 : E.type) === "template" && (A = (Me = A[0]) == null ? void 0 : Me.children);
|
|
2839
|
-
return k != null && k.ellipsis ?
|
|
2857
|
+
return k != null && k.ellipsis ? sl(A, se, k) : A;
|
|
2840
2858
|
},
|
|
2841
2859
|
rowSelection: e.rowSelection ? {
|
|
2842
2860
|
...Je(e.rowSelection, ["onSelect", "onSelectAll", "onChange", "selectedRowKeys"]),
|
|
2843
|
-
selectedRowKeys:
|
|
2844
|
-
onSelect:
|
|
2845
|
-
onSelectAll:
|
|
2846
|
-
onChange:
|
|
2861
|
+
selectedRowKeys: ht.value || [],
|
|
2862
|
+
onSelect: vt,
|
|
2863
|
+
onSelectAll: mt,
|
|
2864
|
+
onChange: _t
|
|
2847
2865
|
} : void 0,
|
|
2848
|
-
onChange:
|
|
2849
|
-
onExpandedRowsChange:
|
|
2850
|
-
onExpand:
|
|
2851
|
-
onResizeColumn: (N, k) =>
|
|
2866
|
+
onChange: St,
|
|
2867
|
+
onExpandedRowsChange: nl,
|
|
2868
|
+
onExpand: ul,
|
|
2869
|
+
onResizeColumn: (N, k) => il(N, k)
|
|
2852
2870
|
}), {
|
|
2853
|
-
...
|
|
2854
|
-
emptyText: () =>
|
|
2871
|
+
...l,
|
|
2872
|
+
emptyText: () => wt()
|
|
2855
2873
|
})])])]));
|
|
2856
2874
|
};
|
|
2857
2875
|
}
|
|
2858
2876
|
});
|
|
2859
|
-
|
|
2877
|
+
it.install = (e) => (e.component(it.name, it), e);
|
|
2860
2878
|
export {
|
|
2861
|
-
|
|
2862
|
-
|
|
2879
|
+
it as GProTable,
|
|
2880
|
+
it as default,
|
|
2863
2881
|
he as proTableProps,
|
|
2864
|
-
|
|
2882
|
+
dn as useTable
|
|
2865
2883
|
};
|