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