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