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