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