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