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