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