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