@gx-design-vue/pro-table 0.2.0-beta.84 → 0.2.0-beta.85
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/pro-table.js +189 -189
- package/dist/pro-table.umd.cjs +1 -1
- package/package.json +1 -1
package/dist/pro-table.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { isObject as Q, isBoolean as se, getSlot as
|
|
2
|
-
import { reactive as he, isReactive as
|
|
1
|
+
import { isObject as Q, isBoolean as se, getSlot as vt, isFunction as Fe, arrayRepeat as Ht, runFunction as Wt, convertValueBoolean as xe, isArray as fe, getSortIndex as _t, isDeepEqualReact as De, handleCurrentPage as Gt, genColumnKey as gt, compareArray as qt, isNumber as yt, isString as Ut, filterEmpty as bt, classNames as je, getPrefixCls as Ge, getRandomNumber as We, handleShowIndex as Xt, hanndleEmptyField as Jt, getSlotVNode as Se } from "@gx-design-vue/pro-utils";
|
|
2
|
+
import { reactive as he, isReactive as Qt, watch as W, computed as T, ref as D, toRaw as ye, createVNode as r, mergeProps as X, isVNode as Ce, watchEffect as Ie, unref as x, onUnmounted as Zt, onDeactivated as el, onMounted as tl, defineComponent as oe, Fragment as Ne, nextTick as ll, h as Ct, cloneVNode as qe, createTextVNode as Re, renderSlot as al, toRef as ae } from "vue";
|
|
3
3
|
import "ant-design-vue/es/_util/props-util";
|
|
4
|
-
import { warning as
|
|
5
|
-
import { omit as Ee, cloneDeep as ie, pick as
|
|
6
|
-
import { tableProps as
|
|
7
|
-
import { UpOutlined as
|
|
8
|
-
import { useFullscreen as
|
|
9
|
-
import { Form as
|
|
10
|
-
import { useProAppContext as
|
|
11
|
-
import { useContext as
|
|
4
|
+
import { warning as nl } from "ant-design-vue/es/vc-util/warning";
|
|
5
|
+
import { omit as Ee, cloneDeep as ie, pick as ct } from "lodash-es";
|
|
6
|
+
import { tableProps as ul } from "ant-design-vue/es/table/Table";
|
|
7
|
+
import { UpOutlined as il, DownOutlined as sl, SettingOutlined as St, VerticalAlignTopOutlined as ol, VerticalAlignMiddleOutlined as rl, VerticalAlignBottomOutlined as cl, FullscreenExitOutlined as dl, FullscreenOutlined as fl, ColumnHeightOutlined as hl, InfoCircleOutlined as ml, ReloadOutlined as vl, CopyOutlined as gl } from "@ant-design/icons-vue";
|
|
8
|
+
import { useFullscreen as xt, useWindowSize as yl } from "@vueuse/core";
|
|
9
|
+
import { Form as dt, Grid as Ue, Space as de, Button as ft, Input as ht, TimePicker as bl, DatePicker as wt, TreeSelect as Cl, Spin as _e, Select as Sl, Popover as xl, Checkbox as wl, Tooltip as ne, Tree as pl, Dropdown as Tl, Menu as ke, Pagination as $l, Table as Fl, message as Rl, Empty as Pl } from "ant-design-vue";
|
|
10
|
+
import { useProAppContext as pt } from "@gx-design-vue/pro-app";
|
|
11
|
+
import { useContext as Il, useProStyle as ze } from "@gx-design-vue/pro-provider";
|
|
12
12
|
import q from "dayjs";
|
|
13
|
-
import { tryOnUnmounted as
|
|
14
|
-
function
|
|
13
|
+
import { tryOnUnmounted as Bl, useMemo as Me } from "@gx-design-vue/pro-hooks";
|
|
14
|
+
function Oa(e, a) {
|
|
15
15
|
var b, $, v;
|
|
16
16
|
function l() {
|
|
17
17
|
return a != null && a.state && Q(a == null ? void 0 : a.state) ? ye(a == null ? void 0 : a.state) : {};
|
|
@@ -23,7 +23,7 @@ function Ba(e, a) {
|
|
|
23
23
|
return a != null && a.request ? await ((n = a == null ? void 0 : a.request) == null ? void 0 : n.call(a, ...s)) : void 0;
|
|
24
24
|
}
|
|
25
25
|
});
|
|
26
|
-
a != null && a.state && (
|
|
26
|
+
a != null && a.state && (Qt(a.state) ? W(() => a == null ? void 0 : a.state, () => {
|
|
27
27
|
Object.assign(u, l());
|
|
28
28
|
}, { deep: !0, immediate: !0 }) : Object.assign(u, l()));
|
|
29
29
|
const o = T(() => {
|
|
@@ -93,8 +93,8 @@ function Ba(e, a) {
|
|
|
93
93
|
}
|
|
94
94
|
};
|
|
95
95
|
}
|
|
96
|
-
const
|
|
97
|
-
...Ee(
|
|
96
|
+
const Ol = ["rowKey", "rowSelection", "columns", "pagination", "size", "bordered", "loading"], Tt = {
|
|
97
|
+
...Ee(ul(), Ol),
|
|
98
98
|
transformCellText: Function,
|
|
99
99
|
/**
|
|
100
100
|
* @Author gx12358
|
|
@@ -115,7 +115,7 @@ const Bl = ["rowKey", "rowSelection", "columns", "pagination", "size", "bordered
|
|
|
115
115
|
default: void 0
|
|
116
116
|
}
|
|
117
117
|
}, be = {
|
|
118
|
-
...
|
|
118
|
+
...Tt,
|
|
119
119
|
rowSelection: {
|
|
120
120
|
type: Object,
|
|
121
121
|
default: void 0
|
|
@@ -369,10 +369,10 @@ const Bl = ["rowKey", "rowSelection", "columns", "pagination", "size", "bordered
|
|
|
369
369
|
onBeforeSearchSubmit: Function,
|
|
370
370
|
onColumnsStateChange: Function
|
|
371
371
|
};
|
|
372
|
-
function
|
|
372
|
+
function kl(e) {
|
|
373
373
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !Ce(e);
|
|
374
374
|
}
|
|
375
|
-
function
|
|
375
|
+
function Dl(e, a, l, u) {
|
|
376
376
|
if (!a) return e;
|
|
377
377
|
let o = e;
|
|
378
378
|
if (Q(a)) {
|
|
@@ -380,7 +380,7 @@ function kl(e, a, l, u) {
|
|
|
380
380
|
return r(i, X((a == null ? void 0 : a.attr) || {}, {
|
|
381
381
|
class: [a.class, a.node === "a" ? `${l}-a` : ""],
|
|
382
382
|
onClick: a.click
|
|
383
|
-
}),
|
|
383
|
+
}), kl(e) ? e : {
|
|
384
384
|
default: () => [e]
|
|
385
385
|
});
|
|
386
386
|
}
|
|
@@ -402,15 +402,15 @@ function kl(e, a, l, u) {
|
|
|
402
402
|
}
|
|
403
403
|
return o;
|
|
404
404
|
}
|
|
405
|
-
function
|
|
405
|
+
function jl(e, a) {
|
|
406
406
|
const l = a && a.current || 1, u = a && a.pageSize || 10;
|
|
407
407
|
return e.filter((o, i) => i < l * u && i >= u * (l - 1));
|
|
408
408
|
}
|
|
409
|
-
function
|
|
409
|
+
function Ml(e) {
|
|
410
410
|
const a = document.createElement("textarea");
|
|
411
411
|
a.style.position = "absolute", a.style.opacity = "0", a.value = e, document.body.appendChild(a), a.select(), document.execCommand("copy"), document.body.removeChild(a);
|
|
412
412
|
}
|
|
413
|
-
function
|
|
413
|
+
function Nl({ emit: e, loading: a }) {
|
|
414
414
|
var i;
|
|
415
415
|
const l = D(se(a.value) ? a.value : Q(a.value) ? (i = a.value) == null ? void 0 : i.spinning : !1);
|
|
416
416
|
W(() => a.value, (d) => {
|
|
@@ -422,7 +422,7 @@ function Ml({ emit: e, loading: a }) {
|
|
|
422
422
|
}
|
|
423
423
|
return { loadingComputed: u, loading: l, setLoading: o };
|
|
424
424
|
}
|
|
425
|
-
function
|
|
425
|
+
function El({ size: e, emit: a }) {
|
|
426
426
|
const l = D("middle");
|
|
427
427
|
Ie(() => {
|
|
428
428
|
l.value = e.value;
|
|
@@ -432,7 +432,7 @@ function Nl({ size: e, emit: a }) {
|
|
|
432
432
|
}
|
|
433
433
|
return { sizeRef: l, setTableSize: u };
|
|
434
434
|
}
|
|
435
|
-
function
|
|
435
|
+
function zl({
|
|
436
436
|
slots: e,
|
|
437
437
|
props: a,
|
|
438
438
|
pagination: l
|
|
@@ -444,7 +444,7 @@ function El({
|
|
|
444
444
|
o.value = !1;
|
|
445
445
|
return;
|
|
446
446
|
}
|
|
447
|
-
const d =
|
|
447
|
+
const d = vt(e, x(a), "pageItemRender"), h = Fe(d) ? {
|
|
448
448
|
itemRender: ({
|
|
449
449
|
page: v,
|
|
450
450
|
type: s,
|
|
@@ -477,7 +477,7 @@ function El({
|
|
|
477
477
|
const h = {};
|
|
478
478
|
Object.keys(d).forEach((b) => {
|
|
479
479
|
Object.prototype.hasOwnProperty.call(d, b) && o.value[b] === d[b] || (h[b] = d[b]);
|
|
480
|
-
}), Object.keys(h).length > 0 && (Object.assign(o.value, h),
|
|
480
|
+
}), Object.keys(h).length > 0 && (Object.assign(o.value, h), Kl(h) && Object.assign(u, h));
|
|
481
481
|
}
|
|
482
482
|
}
|
|
483
483
|
return {
|
|
@@ -486,19 +486,19 @@ function El({
|
|
|
486
486
|
setPagination: i
|
|
487
487
|
};
|
|
488
488
|
}
|
|
489
|
-
function
|
|
489
|
+
function Kl(e) {
|
|
490
490
|
if (typeof e != "object" || e === null)
|
|
491
491
|
return !1;
|
|
492
492
|
const a = Object.keys(e);
|
|
493
493
|
return a.length === 2 && a.includes("pageNum") && a.includes("pageSize");
|
|
494
494
|
}
|
|
495
|
-
function
|
|
495
|
+
function Al(e, a) {
|
|
496
496
|
const l = D([]), u = D([]);
|
|
497
497
|
W(() => {
|
|
498
498
|
var v;
|
|
499
499
|
return (v = a.value) == null ? void 0 : v.selectedRowKeys;
|
|
500
500
|
}, (v) => {
|
|
501
|
-
l.value =
|
|
501
|
+
l.value = Ht([...v || []]);
|
|
502
502
|
}, {
|
|
503
503
|
deep: !0,
|
|
504
504
|
immediate: !0
|
|
@@ -533,7 +533,7 @@ function Kl(e, a) {
|
|
|
533
533
|
}
|
|
534
534
|
};
|
|
535
535
|
}
|
|
536
|
-
function
|
|
536
|
+
function Yl(e, a) {
|
|
537
537
|
const l = T(() => a || 0), u = D(), o = D(e);
|
|
538
538
|
function i() {
|
|
539
539
|
u.value && clearTimeout(u.value);
|
|
@@ -546,12 +546,12 @@ function Al(e, a) {
|
|
|
546
546
|
}, l.value);
|
|
547
547
|
}));
|
|
548
548
|
}
|
|
549
|
-
return
|
|
549
|
+
return Bl(i), {
|
|
550
550
|
cancel: i,
|
|
551
551
|
run: d
|
|
552
552
|
};
|
|
553
553
|
}
|
|
554
|
-
function
|
|
554
|
+
function Ll(e) {
|
|
555
555
|
const a = T(() => e.polling), l = T(() => e.debounceTime), u = T(() => e.dataSource);
|
|
556
556
|
return {
|
|
557
557
|
polling: a,
|
|
@@ -561,7 +561,7 @@ function Yl(e) {
|
|
|
561
561
|
dataSource: u
|
|
562
562
|
};
|
|
563
563
|
}
|
|
564
|
-
function
|
|
564
|
+
function Vl({ polling: e, request: a, postData: l, dataSource: u, waitRequest: o, debounceTime: i }, { columns: d, loading: h, setLoading: b, setColumns: $, removeRowKeys: v, syncSelectedRows: s, formParamsRef: n, setPagination: c, paginationInfo: g, onBeforeSearchSubmit: m, hasCustomRender: S }, P) {
|
|
565
565
|
const R = D(), k = D(!0), Y = D(!1), L = D(!1), z = D([]), H = D(), re = async (y = {}) => {
|
|
566
566
|
var Be;
|
|
567
567
|
const { pagination: p, filters: E = {}, sorter: K = {}, removeKeys: w = [], isPolling: Ke = !1 } = y;
|
|
@@ -578,7 +578,7 @@ function Ll({ polling: e, request: a, postData: l, dataSource: u, waitRequest: o
|
|
|
578
578
|
ce = {};
|
|
579
579
|
else {
|
|
580
580
|
const { current: A = 1, pageSize: ve = 10, total: G } = x(g) || {};
|
|
581
|
-
ce.pageNum =
|
|
581
|
+
ce.pageNum = Gt({ current: A, pageSize: ve, total: G }, w.length), w.length && v(w), ce.pageSize = ve;
|
|
582
582
|
}
|
|
583
583
|
const Oe = Q(K) ? [K] : K;
|
|
584
584
|
Oe.forEach((A) => {
|
|
@@ -607,16 +607,16 @@ function Ll({ polling: e, request: a, postData: l, dataSource: u, waitRequest: o
|
|
|
607
607
|
k.value = !1, b(!1);
|
|
608
608
|
}
|
|
609
609
|
return [];
|
|
610
|
-
}, N =
|
|
610
|
+
}, N = Yl(async (y) => {
|
|
611
611
|
H.value && clearTimeout(H.value);
|
|
612
|
-
const p = await re(y), E =
|
|
612
|
+
const p = await re(y), E = Wt(e.value, p);
|
|
613
613
|
return E && !R.value && (H.value = setTimeout(() => {
|
|
614
614
|
N.run({ ...y, isPolling: E });
|
|
615
615
|
}, Math.max(E, 2e3))), p;
|
|
616
616
|
}, i.value || 10);
|
|
617
|
-
|
|
617
|
+
Zt(() => {
|
|
618
618
|
R.value = !0, clearTimeout(H.value);
|
|
619
|
-
}),
|
|
619
|
+
}), el(() => {
|
|
620
620
|
R.value = !0, clearTimeout(H.value);
|
|
621
621
|
}), W(() => e.value, () => {
|
|
622
622
|
e.value ? N.run({ isPolling: !0 }) : clearTimeout(H.value);
|
|
@@ -640,7 +640,7 @@ function Ll({ polling: e, request: a, postData: l, dataSource: u, waitRequest: o
|
|
|
640
640
|
}
|
|
641
641
|
function C(y) {
|
|
642
642
|
var E;
|
|
643
|
-
const p =
|
|
643
|
+
const p = _t(ie(y), x(g.value));
|
|
644
644
|
if (!De(p, z.value) && (z.value = p, !a || !Fe(a))) {
|
|
645
645
|
const K = p.length || 0;
|
|
646
646
|
K !== ((E = x(g)) == null ? void 0 : E.total) && c({
|
|
@@ -675,7 +675,7 @@ function Ll({ polling: e, request: a, postData: l, dataSource: u, waitRequest: o
|
|
|
675
675
|
}
|
|
676
676
|
};
|
|
677
677
|
}
|
|
678
|
-
function
|
|
678
|
+
function Hl(e) {
|
|
679
679
|
const a = {};
|
|
680
680
|
return e.forEach((l) => {
|
|
681
681
|
let u = l.initialValue;
|
|
@@ -683,7 +683,7 @@ function Vl(e) {
|
|
|
683
683
|
!u && o.includes(l.valueType) ? u = void 0 : !u && i.includes(l.valueType) ? u = null : u || (u = ""), l.name === "dateRange" ? (a[l.rangeStartName || "start"] = u ? u[0] : null, a[l.rangeEndName || "end"] = u ? u[1] : null) : l.name && (a[l.name] = u);
|
|
684
684
|
}), a;
|
|
685
685
|
}
|
|
686
|
-
function
|
|
686
|
+
function Wl({ search: e, searchMap: a, params: l, columns: u, setPagination: o }) {
|
|
687
687
|
const i = he({}), d = he({}), h = D([]), b = T(() => {
|
|
688
688
|
var s;
|
|
689
689
|
return Q(e.value) ? !!((s = e.value) != null && s.showSearch) : !!e.value;
|
|
@@ -704,14 +704,14 @@ function Hl({ search: e, searchMap: a, params: l, columns: u, setPagination: o }
|
|
|
704
704
|
} : S) : h.value.push(m);
|
|
705
705
|
})), s === "all" || s === "searchMap" || s === "columns") {
|
|
706
706
|
o({ current: 1 });
|
|
707
|
-
const m =
|
|
707
|
+
const m = Hl(n);
|
|
708
708
|
Object.assign(d, { ...m });
|
|
709
709
|
for (const S in m)
|
|
710
710
|
i[S] || (i[S] = m[S]);
|
|
711
711
|
}
|
|
712
712
|
(s === "all" || s === "params") && !b.value && (o({ current: 1 }), Object.assign(i, l.value));
|
|
713
713
|
};
|
|
714
|
-
|
|
714
|
+
tl(() => {
|
|
715
715
|
$("all");
|
|
716
716
|
}), W(() => l.value, () => {
|
|
717
717
|
$("params");
|
|
@@ -725,12 +725,12 @@ function Hl({ search: e, searchMap: a, params: l, columns: u, setPagination: o }
|
|
|
725
725
|
}
|
|
726
726
|
return { formDataRef: h, formParamsRef: i, defaultParamsRef: d, setFormParams: v };
|
|
727
727
|
}
|
|
728
|
-
function
|
|
728
|
+
function _l({ columns: e, columnsState: a, changeColumns: l }) {
|
|
729
729
|
const u = D(void 0), o = he({}), i = he({}), d = he({}), h = D([]);
|
|
730
730
|
W(() => e.value, () => {
|
|
731
731
|
var s;
|
|
732
732
|
(s = x(e)) == null || s.forEach(({ show: n, key: c, fixed: g }, m) => {
|
|
733
|
-
const S =
|
|
733
|
+
const S = gt(c, m);
|
|
734
734
|
S && (d[S] = { show: n === void 0 ? !0 : n, fixed: g });
|
|
735
735
|
});
|
|
736
736
|
const v = x(e).map((n) => n.key);
|
|
@@ -758,7 +758,7 @@ function Wl({ columns: e, columnsState: a, changeColumns: l }) {
|
|
|
758
758
|
setSortKeyColumns: $
|
|
759
759
|
};
|
|
760
760
|
}
|
|
761
|
-
function
|
|
761
|
+
function Gl(e) {
|
|
762
762
|
const a = T(() => e.draggabled), l = T(() => e.neverScroll), u = T(() => e.autoScroll);
|
|
763
763
|
return {
|
|
764
764
|
draggabled: a,
|
|
@@ -766,7 +766,7 @@ function _l(e) {
|
|
|
766
766
|
autoScroll: u
|
|
767
767
|
};
|
|
768
768
|
}
|
|
769
|
-
function
|
|
769
|
+
function ql({ scroll: e, columns: a, breakpoint: l, draggabled: u, autoScroll: o, neverScroll: i }) {
|
|
770
770
|
const d = D([]), h = D([]);
|
|
771
771
|
W([
|
|
772
772
|
() => e.value,
|
|
@@ -792,12 +792,12 @@ function Gl({ scroll: e, columns: a, breakpoint: l, draggabled: u, autoScroll: o
|
|
|
792
792
|
];
|
|
793
793
|
});
|
|
794
794
|
function $(g) {
|
|
795
|
-
return g.sort((m, S) =>
|
|
795
|
+
return g.sort((m, S) => qt(m, S, "order", 0));
|
|
796
796
|
}
|
|
797
797
|
function v(g) {
|
|
798
798
|
return ie(g).map((m, S) => {
|
|
799
799
|
var P;
|
|
800
|
-
if (m.dataIndex === "action" || S === g.length - 1 ? m.resizable = !1 : m.resizable = se(m.resizable) ? m.resizable : !!(
|
|
800
|
+
if (m.dataIndex === "action" || S === g.length - 1 ? m.resizable = !1 : m.resizable = se(m.resizable) ? m.resizable : !!(yt(m.width) && x(u)), !m.width || x(i))
|
|
801
801
|
return m;
|
|
802
802
|
if (m.dataIndex === "action" && x(o))
|
|
803
803
|
if ((P = x(e)) != null && P.x || !x(l))
|
|
@@ -839,7 +839,7 @@ function Gl({ scroll: e, columns: a, breakpoint: l, draggabled: u, autoScroll: o
|
|
|
839
839
|
resizeColumnWidth: s
|
|
840
840
|
};
|
|
841
841
|
}
|
|
842
|
-
function
|
|
842
|
+
function Ul(e) {
|
|
843
843
|
const a = T(() => e.scroll), l = T(() => e.autoScroll), u = T(() => e.modalScroll), o = T(() => e.neverScroll), i = T(() => e.rowSelection), d = T(() => e.scrollBreakpoint);
|
|
844
844
|
return {
|
|
845
845
|
scroll: a,
|
|
@@ -850,10 +850,10 @@ function ql(e) {
|
|
|
850
850
|
scrollBreakpoint: d
|
|
851
851
|
};
|
|
852
852
|
}
|
|
853
|
-
function
|
|
853
|
+
function Xl({ scroll: e, columns: a, autoScroll: l, modalScroll: u, neverScroll: o, rowSelection: i, screens: d, innerWidth: h, scrollBreakpoint: b }) {
|
|
854
854
|
const $ = T(() => {
|
|
855
855
|
var n, c, g;
|
|
856
|
-
return x(b) ?
|
|
856
|
+
return x(b) ? yt(x(b)) ? h.value > x(b) : Ut(x(b)) ? (n = d.value) == null ? void 0 : n[x(b)] : (c = d.value) == null ? void 0 : c.xl : (g = d.value) == null ? void 0 : g.xl;
|
|
857
857
|
}), v = T(() => {
|
|
858
858
|
let n = 0;
|
|
859
859
|
const c = x(i) ? 60 : 0, g = 150, m = ie(x(a));
|
|
@@ -870,8 +870,8 @@ function Ul({ scroll: e, columns: a, autoScroll: l, modalScroll: u, neverScroll:
|
|
|
870
870
|
} : x(l) ? $.value ? {} : se($.value) ? { x: x(v) } : {} : {};
|
|
871
871
|
}), breakpoint: $ };
|
|
872
872
|
}
|
|
873
|
-
const { provideContext:
|
|
874
|
-
function
|
|
873
|
+
const { provideContext: Jl, useInjectContext: me } = Il("pro-table");
|
|
874
|
+
function Ql(e, a) {
|
|
875
875
|
const l = he({});
|
|
876
876
|
function u() {
|
|
877
877
|
Object.keys(e).forEach((d) => {
|
|
@@ -895,7 +895,7 @@ function Jl(e, a) {
|
|
|
895
895
|
changeFormState: o
|
|
896
896
|
};
|
|
897
897
|
}
|
|
898
|
-
const
|
|
898
|
+
const Zl = (e) => ({
|
|
899
899
|
[`${e.componentCls}-form`]: {
|
|
900
900
|
"&-collapse-button": {
|
|
901
901
|
display: "flex",
|
|
@@ -929,11 +929,11 @@ const Ql = (e) => ({
|
|
|
929
929
|
alignItems: "center"
|
|
930
930
|
}
|
|
931
931
|
}), {
|
|
932
|
-
useBreakpoint:
|
|
932
|
+
useBreakpoint: ea
|
|
933
933
|
} = Ue, {
|
|
934
|
-
MonthPicker:
|
|
935
|
-
RangePicker:
|
|
936
|
-
} =
|
|
934
|
+
MonthPicker: ta,
|
|
935
|
+
RangePicker: la
|
|
936
|
+
} = wt, $t = /* @__PURE__ */ oe({
|
|
937
937
|
name: "ProTableForm",
|
|
938
938
|
props: {
|
|
939
939
|
search: {
|
|
@@ -961,11 +961,11 @@ const Ql = (e) => ({
|
|
|
961
961
|
const {
|
|
962
962
|
wrapSSR: o,
|
|
963
963
|
hashId: i
|
|
964
|
-
} = ze("ProTableForm", [
|
|
964
|
+
} = ze("ProTableForm", [Zl], e.prefixCls), d = pt(), h = ea(), {
|
|
965
965
|
formState: b,
|
|
966
966
|
resetFormState: $,
|
|
967
967
|
changeFormState: v
|
|
968
|
-
} =
|
|
968
|
+
} = Ql(e.defaultParams || {}, e.searchMap || []), s = D(!1), n = T(() => {
|
|
969
969
|
var t;
|
|
970
970
|
return !!((t = e.search) != null && t.showSearch);
|
|
971
971
|
}), c = T(() => {
|
|
@@ -1021,7 +1021,7 @@ const Ql = (e) => ({
|
|
|
1021
1021
|
const t = ie(b), C = e.searchMap.find((p) => p.valueType === "text") || "", O = e.searchMap.find((p) => p.valueType === "dateRange") || "", y = e.searchMap.find((p) => p.valueType === "treeSelect");
|
|
1022
1022
|
return C && (t[C.name] = b[C.name] || C.initialValue || ""), O && (t[O.rangeStartName || "start"] = t[O.name] ? t[O.name][0] : "", t[O.rangeEndName || "end"] = t[O.name] ? t[O.name][1] : "", delete t[O.name]), y && (y != null && y.name && fe(b[y == null ? void 0 : y.name]) && (t[y.name] = b[y.name].length ? b[y.name].map((p) => p[y.valueKey === "text" ? "label" : "value"]).join() : ""), y != null && y.name && fe(t[y == null ? void 0 : y.name]) && (t[y.name] = t[y.name].length ? t[y.name].map((p) => p[y.valueKey === "text" ? "label" : "value"]) : "")), t;
|
|
1023
1023
|
}, Y = (t = !1, C) => {
|
|
1024
|
-
|
|
1024
|
+
ll(() => {
|
|
1025
1025
|
(!n.value || t) && a("search", k(), !!C);
|
|
1026
1026
|
});
|
|
1027
1027
|
}, L = (t, C) => {
|
|
@@ -1061,20 +1061,20 @@ const Ql = (e) => ({
|
|
|
1061
1061
|
var C;
|
|
1062
1062
|
const t = (C = d == null ? void 0 : d.emptyText) == null ? void 0 : C.value;
|
|
1063
1063
|
if (t) {
|
|
1064
|
-
const O = Ce(t), y = O ?
|
|
1064
|
+
const O = Ce(t), y = O ? Ct(t) : bt(t || []);
|
|
1065
1065
|
return r("div", {
|
|
1066
1066
|
class: je(`${e.prefixCls}-search-empty-text`, i.value)
|
|
1067
1067
|
}, [O ? y : fe(y) ? y.map((p) => qe(p)) : void 0]);
|
|
1068
1068
|
}
|
|
1069
1069
|
}, re = () => (n.value || c.value) && r(de, null, {
|
|
1070
|
-
default: () => [c.value && r(
|
|
1070
|
+
default: () => [c.value && r(ft, {
|
|
1071
1071
|
onClick: () => z()
|
|
1072
1072
|
}, {
|
|
1073
1073
|
default: () => {
|
|
1074
1074
|
var t;
|
|
1075
1075
|
return [((t = e.search) == null ? void 0 : t.resetText) || "重置"];
|
|
1076
1076
|
}
|
|
1077
|
-
}), n.value && r(
|
|
1077
|
+
}), n.value && r(ft, {
|
|
1078
1078
|
loading: e.loading,
|
|
1079
1079
|
type: "primary",
|
|
1080
1080
|
onClick: () => Y(!0)
|
|
@@ -1099,12 +1099,12 @@ const Ql = (e) => ({
|
|
|
1099
1099
|
return [re(), O && r("span", {
|
|
1100
1100
|
class: `${e.prefixCls}-a ${i.value}`,
|
|
1101
1101
|
onClick: () => P(!C)
|
|
1102
|
-
}, [C ? "收起" : "展开", (y = e.search) != null && y.collapseRender ? (p = e.search) == null ? void 0 : p.collapseRender() : C ? r(
|
|
1102
|
+
}, [C ? "收起" : "展开", (y = e.search) != null && y.collapseRender ? (p = e.search) == null ? void 0 : p.collapseRender() : C ? r(il, null, null) : r(sl, null, null)])];
|
|
1103
1103
|
}
|
|
1104
1104
|
})]), Z = (t) => {
|
|
1105
1105
|
var y, p, E, K;
|
|
1106
1106
|
let C;
|
|
1107
|
-
const O = n.value ?
|
|
1107
|
+
const O = n.value ? ht : ht.Search;
|
|
1108
1108
|
switch (t.valueType) {
|
|
1109
1109
|
case "text":
|
|
1110
1110
|
C = r(O, X({
|
|
@@ -1119,7 +1119,7 @@ const Ql = (e) => ({
|
|
|
1119
1119
|
}, t.field || {}), null);
|
|
1120
1120
|
break;
|
|
1121
1121
|
case "select":
|
|
1122
|
-
C = r(
|
|
1122
|
+
C = r(Sl, X({
|
|
1123
1123
|
style: {
|
|
1124
1124
|
width: "100%"
|
|
1125
1125
|
},
|
|
@@ -1141,7 +1141,7 @@ const Ql = (e) => ({
|
|
|
1141
1141
|
}, t.field || {}), null);
|
|
1142
1142
|
break;
|
|
1143
1143
|
case "treeSelect":
|
|
1144
|
-
C = r(
|
|
1144
|
+
C = r(Cl, X({
|
|
1145
1145
|
style: {
|
|
1146
1146
|
width: "100%"
|
|
1147
1147
|
},
|
|
@@ -1158,7 +1158,7 @@ const Ql = (e) => ({
|
|
|
1158
1158
|
}, t.field || {}), null);
|
|
1159
1159
|
break;
|
|
1160
1160
|
case "date":
|
|
1161
|
-
C = r(
|
|
1161
|
+
C = r(wt, X({
|
|
1162
1162
|
style: {
|
|
1163
1163
|
width: "100%"
|
|
1164
1164
|
},
|
|
@@ -1173,7 +1173,7 @@ const Ql = (e) => ({
|
|
|
1173
1173
|
}, t.field || {}), null);
|
|
1174
1174
|
break;
|
|
1175
1175
|
case "dateMonth":
|
|
1176
|
-
C = r(
|
|
1176
|
+
C = r(ta, X({
|
|
1177
1177
|
style: {
|
|
1178
1178
|
width: "100%"
|
|
1179
1179
|
},
|
|
@@ -1184,7 +1184,7 @@ const Ql = (e) => ({
|
|
|
1184
1184
|
}, t.field || {}), null);
|
|
1185
1185
|
break;
|
|
1186
1186
|
case "dateRange":
|
|
1187
|
-
C = r(
|
|
1187
|
+
C = r(la, X({
|
|
1188
1188
|
style: {
|
|
1189
1189
|
width: "100%"
|
|
1190
1190
|
},
|
|
@@ -1197,7 +1197,7 @@ const Ql = (e) => ({
|
|
|
1197
1197
|
}, t.field || {}), null);
|
|
1198
1198
|
break;
|
|
1199
1199
|
case "time":
|
|
1200
|
-
C = r(
|
|
1200
|
+
C = r(bl, X({
|
|
1201
1201
|
style: {
|
|
1202
1202
|
width: "100%"
|
|
1203
1203
|
},
|
|
@@ -1218,7 +1218,7 @@ const Ql = (e) => ({
|
|
|
1218
1218
|
}) => r("div", {
|
|
1219
1219
|
class: `${e.prefixCls}-form-item`,
|
|
1220
1220
|
style: t
|
|
1221
|
-
}, [r(
|
|
1221
|
+
}, [r(dt.Item, null, {
|
|
1222
1222
|
default: () => [C.__v_isVNode ? C : Z(C)]
|
|
1223
1223
|
})]), we = () => {
|
|
1224
1224
|
var O;
|
|
@@ -1261,7 +1261,7 @@ const Ql = (e) => ({
|
|
|
1261
1261
|
[`${x(e.prefixCls)}-search`]: !0,
|
|
1262
1262
|
[`${(t = e.search) == null ? void 0 : t.className}`]: (C = e.search) == null ? void 0 : C.className
|
|
1263
1263
|
}
|
|
1264
|
-
}, [r(
|
|
1264
|
+
}, [r(dt, {
|
|
1265
1265
|
class: `${x(e.prefixCls)}-form ${i.value}`,
|
|
1266
1266
|
layout: "horizontal"
|
|
1267
1267
|
}, {
|
|
@@ -1272,14 +1272,14 @@ const Ql = (e) => ({
|
|
|
1272
1272
|
};
|
|
1273
1273
|
}
|
|
1274
1274
|
});
|
|
1275
|
-
|
|
1275
|
+
$t.inheritAttrs = !1;
|
|
1276
1276
|
const Pe = (e) => {
|
|
1277
1277
|
const a = D(null);
|
|
1278
1278
|
return a.value = e, (...l) => {
|
|
1279
1279
|
var u;
|
|
1280
1280
|
return (u = a.value) == null ? void 0 : u.call(a, ...l);
|
|
1281
1281
|
};
|
|
1282
|
-
},
|
|
1282
|
+
}, aa = (e) => ({
|
|
1283
1283
|
[`${e.componentCls}`]: {
|
|
1284
1284
|
width: "auto",
|
|
1285
1285
|
"&-title": {
|
|
@@ -1396,7 +1396,7 @@ const Pe = (e) => {
|
|
|
1396
1396
|
}, [(h = o.default) == null ? void 0 : h.call(o)])];
|
|
1397
1397
|
}
|
|
1398
1398
|
}) : null;
|
|
1399
|
-
},
|
|
1399
|
+
}, na = /* @__PURE__ */ oe({
|
|
1400
1400
|
props: {
|
|
1401
1401
|
treeKey: String,
|
|
1402
1402
|
hashId: String,
|
|
@@ -1421,21 +1421,21 @@ const Pe = (e) => {
|
|
|
1421
1421
|
title: "固定在列首",
|
|
1422
1422
|
show: e.fixed !== "left" && !u.value
|
|
1423
1423
|
}, {
|
|
1424
|
-
default: () => [r(
|
|
1424
|
+
default: () => [r(ol, null, null)]
|
|
1425
1425
|
}), r(Ye, {
|
|
1426
1426
|
treeKey: e.treeKey || "",
|
|
1427
1427
|
fixed: void 0,
|
|
1428
1428
|
title: "不固定",
|
|
1429
1429
|
show: !!e.fixed && !u.value
|
|
1430
1430
|
}, {
|
|
1431
|
-
default: () => [r(
|
|
1431
|
+
default: () => [r(rl, null, null)]
|
|
1432
1432
|
}), r(Ye, {
|
|
1433
1433
|
treeKey: e.treeKey || "",
|
|
1434
1434
|
fixed: "right",
|
|
1435
1435
|
title: "固定在列尾",
|
|
1436
1436
|
show: e.fixed !== "right"
|
|
1437
1437
|
}, {
|
|
1438
|
-
default: () => [r(
|
|
1438
|
+
default: () => [r(cl, null, null)]
|
|
1439
1439
|
})]);
|
|
1440
1440
|
return r("span", {
|
|
1441
1441
|
class: [`${e.className}-list-item`, e.hashId],
|
|
@@ -1518,7 +1518,7 @@ const Pe = (e) => {
|
|
|
1518
1518
|
h == null || h.setColumnsMap(P, "show");
|
|
1519
1519
|
}), s = (n) => {
|
|
1520
1520
|
const c = x(i).find((g) => g.uuid === n.key);
|
|
1521
|
-
return n.title ||
|
|
1521
|
+
return n.title || al(d, "headerCell", {
|
|
1522
1522
|
title: c.title,
|
|
1523
1523
|
column: c
|
|
1524
1524
|
}, () => [c.title]);
|
|
@@ -1527,7 +1527,7 @@ const Pe = (e) => {
|
|
|
1527
1527
|
var n, c;
|
|
1528
1528
|
return l.value ? r(Ne, null, [e.showTitle && r("span", {
|
|
1529
1529
|
class: [`${e.className}-list-title`, e.hashId]
|
|
1530
|
-
}, [e.title]), r(
|
|
1530
|
+
}, [e.title]), r(pl, {
|
|
1531
1531
|
key: a.value,
|
|
1532
1532
|
draggable: e.draggable && !!((n = u.value) != null && n.length) && ((c = u.value) == null ? void 0 : c.length) > 1,
|
|
1533
1533
|
checkable: e.checkable,
|
|
@@ -1553,7 +1553,7 @@ const Pe = (e) => {
|
|
|
1553
1553
|
title: s(g),
|
|
1554
1554
|
autoScroll: (S = h == null ? void 0 : h.autoScroll) == null ? void 0 : S.value
|
|
1555
1555
|
};
|
|
1556
|
-
return r(
|
|
1556
|
+
return r(na, X({
|
|
1557
1557
|
hashId: e.hashId,
|
|
1558
1558
|
className: e.className
|
|
1559
1559
|
}, m, {
|
|
@@ -1563,7 +1563,7 @@ const Pe = (e) => {
|
|
|
1563
1563
|
})]) : null;
|
|
1564
1564
|
};
|
|
1565
1565
|
}
|
|
1566
|
-
}),
|
|
1566
|
+
}), ua = /* @__PURE__ */ oe({
|
|
1567
1567
|
props: {
|
|
1568
1568
|
hashId: String,
|
|
1569
1569
|
className: String,
|
|
@@ -1630,7 +1630,7 @@ const Pe = (e) => {
|
|
|
1630
1630
|
className: e.className
|
|
1631
1631
|
}, null)]);
|
|
1632
1632
|
}
|
|
1633
|
-
}),
|
|
1633
|
+
}), ia = /* @__PURE__ */ oe({
|
|
1634
1634
|
props: {
|
|
1635
1635
|
draggable: {
|
|
1636
1636
|
type: Boolean,
|
|
@@ -1650,7 +1650,7 @@ const Pe = (e) => {
|
|
|
1650
1650
|
}), {
|
|
1651
1651
|
wrapSSR: l,
|
|
1652
1652
|
hashId: u
|
|
1653
|
-
} = ze("ColumnSetting", [
|
|
1653
|
+
} = ze("ColumnSetting", [aa], a), {
|
|
1654
1654
|
columns: o,
|
|
1655
1655
|
settingsAction: i
|
|
1656
1656
|
} = me(), d = Pe((s = !0) => {
|
|
@@ -1661,7 +1661,7 @@ const Pe = (e) => {
|
|
|
1661
1661
|
index: P,
|
|
1662
1662
|
children: R
|
|
1663
1663
|
}) => {
|
|
1664
|
-
const k =
|
|
1664
|
+
const k = gt(m, P);
|
|
1665
1665
|
k && (n[k] = {
|
|
1666
1666
|
show: s,
|
|
1667
1667
|
fixed: S
|
|
@@ -1677,11 +1677,11 @@ const Pe = (e) => {
|
|
|
1677
1677
|
// @ts-ignore
|
|
1678
1678
|
Object.values(i == null ? void 0 : i.columnsMap).filter((s) => !s || s.show === !1)
|
|
1679
1679
|
)), v = T(() => x($).length > 0 && x($).length !== o.value.length);
|
|
1680
|
-
return () => l(r(
|
|
1680
|
+
return () => l(r(xl, {
|
|
1681
1681
|
arrowPointAtCenter: !0,
|
|
1682
1682
|
title: r("div", {
|
|
1683
1683
|
class: [`${a}-title`, u.value]
|
|
1684
|
-
}, [r(
|
|
1684
|
+
}, [r(wl, {
|
|
1685
1685
|
indeterminate: v.value,
|
|
1686
1686
|
checked: x($).length === 0 && x($).length !== o.value.length,
|
|
1687
1687
|
onChange: (s) => h(s)
|
|
@@ -1699,7 +1699,7 @@ const Pe = (e) => {
|
|
|
1699
1699
|
overlayClassName: `${a}-overlay ${u.value}`,
|
|
1700
1700
|
trigger: "click",
|
|
1701
1701
|
placement: "bottomRight",
|
|
1702
|
-
content: r(
|
|
1702
|
+
content: r(ua, {
|
|
1703
1703
|
hashId: u.value,
|
|
1704
1704
|
checkable: e.checkable ?? !0,
|
|
1705
1705
|
draggable: e.draggable ?? !0,
|
|
@@ -1709,31 +1709,31 @@ const Pe = (e) => {
|
|
|
1709
1709
|
default: () => [r(ne, {
|
|
1710
1710
|
title: "列设置"
|
|
1711
1711
|
}, {
|
|
1712
|
-
default: () => [r(
|
|
1712
|
+
default: () => [r(St, null, null)]
|
|
1713
1713
|
})]
|
|
1714
1714
|
}));
|
|
1715
1715
|
}
|
|
1716
|
-
}),
|
|
1716
|
+
}), Ft = /* @__PURE__ */ oe({
|
|
1717
1717
|
setup() {
|
|
1718
1718
|
const {
|
|
1719
1719
|
isFullscreen: e
|
|
1720
|
-
} =
|
|
1720
|
+
} = xt();
|
|
1721
1721
|
return () => e.value ? r(ne, {
|
|
1722
1722
|
title: "退出全屏"
|
|
1723
1723
|
}, {
|
|
1724
|
-
default: () => [r(
|
|
1724
|
+
default: () => [r(dl, null, null)]
|
|
1725
1725
|
}) : r(ne, {
|
|
1726
1726
|
title: "全屏"
|
|
1727
1727
|
}, {
|
|
1728
|
-
default: () => [r(
|
|
1728
|
+
default: () => [r(fl, null, null)]
|
|
1729
1729
|
});
|
|
1730
1730
|
}
|
|
1731
|
-
}),
|
|
1731
|
+
}), sa = () => {
|
|
1732
1732
|
const {
|
|
1733
1733
|
action: e,
|
|
1734
1734
|
tableSize: a
|
|
1735
1735
|
} = me();
|
|
1736
|
-
return r(
|
|
1736
|
+
return r(Tl, {
|
|
1737
1737
|
overlay: r(ke, {
|
|
1738
1738
|
selectedKeys: [a.value],
|
|
1739
1739
|
onClick: ({
|
|
@@ -1765,10 +1765,10 @@ const Pe = (e) => {
|
|
|
1765
1765
|
default: () => [r(ne, {
|
|
1766
1766
|
title: "表格密度"
|
|
1767
1767
|
}, {
|
|
1768
|
-
default: () => [r(
|
|
1768
|
+
default: () => [r(hl, null, null)]
|
|
1769
1769
|
})]
|
|
1770
1770
|
});
|
|
1771
|
-
},
|
|
1771
|
+
}, oa = (e) => ({
|
|
1772
1772
|
[`${e.componentCls}`]: {
|
|
1773
1773
|
lineHeight: 1,
|
|
1774
1774
|
"&-container": {
|
|
@@ -1810,13 +1810,13 @@ const Pe = (e) => {
|
|
|
1810
1810
|
}
|
|
1811
1811
|
}
|
|
1812
1812
|
});
|
|
1813
|
-
function
|
|
1813
|
+
function mt(e) {
|
|
1814
1814
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !Ce(e);
|
|
1815
1815
|
}
|
|
1816
1816
|
const {
|
|
1817
|
-
useBreakpoint:
|
|
1817
|
+
useBreakpoint: ra
|
|
1818
1818
|
} = Ue;
|
|
1819
|
-
function
|
|
1819
|
+
function ca(e) {
|
|
1820
1820
|
if (Ce(e))
|
|
1821
1821
|
return e;
|
|
1822
1822
|
if (e) {
|
|
@@ -1839,7 +1839,7 @@ function ra(e) {
|
|
|
1839
1839
|
}
|
|
1840
1840
|
return null;
|
|
1841
1841
|
}
|
|
1842
|
-
const
|
|
1842
|
+
const Rt = /* @__PURE__ */ oe({
|
|
1843
1843
|
props: {
|
|
1844
1844
|
actions: be.toolBarBtn,
|
|
1845
1845
|
settings: [Array],
|
|
@@ -1853,7 +1853,7 @@ const Ft = /* @__PURE__ */ oe({
|
|
|
1853
1853
|
const {
|
|
1854
1854
|
wrapSSR: a,
|
|
1855
1855
|
hashId: l
|
|
1856
|
-
} = ze("ListToolBar", [
|
|
1856
|
+
} = ze("ListToolBar", [oa], e.prefixCls), u = ra(), {
|
|
1857
1857
|
isMobile: o
|
|
1858
1858
|
} = me(), i = T(() => {
|
|
1859
1859
|
var n;
|
|
@@ -1866,7 +1866,7 @@ const Ft = /* @__PURE__ */ oe({
|
|
|
1866
1866
|
let n;
|
|
1867
1867
|
return Array.isArray(e.actions) ? ((c = e.actions) == null ? void 0 : c.length) < 1 ? null : r(de, {
|
|
1868
1868
|
align: "center"
|
|
1869
|
-
},
|
|
1869
|
+
}, mt(n = e.actions.map((g, m) => Ce(g) ? qe(g, {
|
|
1870
1870
|
key: m,
|
|
1871
1871
|
...g == null ? void 0 : g.props
|
|
1872
1872
|
}) : r("template", {
|
|
@@ -1884,7 +1884,7 @@ const Ft = /* @__PURE__ */ oe({
|
|
|
1884
1884
|
}, [e.headerTitle, e.titleTip && r(ne, {
|
|
1885
1885
|
title: e.titleTipText
|
|
1886
1886
|
}, {
|
|
1887
|
-
default: () => [se(e.titleTip) && e.titleTip ? r(
|
|
1887
|
+
default: () => [se(e.titleTip) && e.titleTip ? r(ml, null, null) : e.titleTip]
|
|
1888
1888
|
})]), b.value && r("div", {
|
|
1889
1889
|
class: `${e.prefixCls}-actions ${l.value}`
|
|
1890
1890
|
}, [b.value])]
|
|
@@ -1908,8 +1908,8 @@ const Ft = /* @__PURE__ */ oe({
|
|
|
1908
1908
|
size: 12,
|
|
1909
1909
|
align: "center",
|
|
1910
1910
|
class: `${e.prefixCls}-setting-items`
|
|
1911
|
-
},
|
|
1912
|
-
const S =
|
|
1911
|
+
}, mt(n = e.settings.map((g, m) => {
|
|
1912
|
+
const S = ca(g);
|
|
1913
1913
|
return r("div", {
|
|
1914
1914
|
key: m,
|
|
1915
1915
|
class: `${e.prefixCls}-setting-item`
|
|
@@ -1935,28 +1935,28 @@ const Ft = /* @__PURE__ */ oe({
|
|
|
1935
1935
|
}, [s.value]));
|
|
1936
1936
|
}
|
|
1937
1937
|
});
|
|
1938
|
-
|
|
1939
|
-
function
|
|
1938
|
+
Rt.inheritAttrs = !1;
|
|
1939
|
+
function da() {
|
|
1940
1940
|
return {
|
|
1941
1941
|
reload: {
|
|
1942
1942
|
text: "刷新",
|
|
1943
|
-
icon: r(
|
|
1943
|
+
icon: r(vl, null, null)
|
|
1944
1944
|
},
|
|
1945
1945
|
density: {
|
|
1946
1946
|
text: "表格密度",
|
|
1947
|
-
icon: r(
|
|
1947
|
+
icon: r(sa, null, null)
|
|
1948
1948
|
},
|
|
1949
1949
|
setting: {
|
|
1950
1950
|
text: "列设置",
|
|
1951
|
-
icon: r(
|
|
1951
|
+
icon: r(St, null, null)
|
|
1952
1952
|
},
|
|
1953
1953
|
fullScreen: {
|
|
1954
1954
|
text: "全屏",
|
|
1955
|
-
icon: r(
|
|
1955
|
+
icon: r(Ft, null, null)
|
|
1956
1956
|
}
|
|
1957
1957
|
};
|
|
1958
1958
|
}
|
|
1959
|
-
function
|
|
1959
|
+
function fa(e, a) {
|
|
1960
1960
|
return Object.keys(e).filter((l) => l).map((l) => {
|
|
1961
1961
|
const u = e[l];
|
|
1962
1962
|
if (!u)
|
|
@@ -1964,15 +1964,15 @@ function da(e, a) {
|
|
|
1964
1964
|
let o = u === !0 ? a[l] : () => u == null ? void 0 : u();
|
|
1965
1965
|
if (typeof o != "function" && (o = () => {
|
|
1966
1966
|
}), l === "setting")
|
|
1967
|
-
return r(
|
|
1967
|
+
return r(ia, X(e[l], {
|
|
1968
1968
|
key: l
|
|
1969
1969
|
}), null);
|
|
1970
1970
|
if (l === "fullScreen")
|
|
1971
1971
|
return r("span", {
|
|
1972
1972
|
key: l,
|
|
1973
1973
|
onClick: o
|
|
1974
|
-
}, [r(
|
|
1975
|
-
const i =
|
|
1974
|
+
}, [r(Ft, null, null)]);
|
|
1975
|
+
const i = da()[l];
|
|
1976
1976
|
return i ? r("span", {
|
|
1977
1977
|
key: l,
|
|
1978
1978
|
onClick: o
|
|
@@ -1983,7 +1983,7 @@ function da(e, a) {
|
|
|
1983
1983
|
})]) : null;
|
|
1984
1984
|
}).filter((l) => l);
|
|
1985
1985
|
}
|
|
1986
|
-
const
|
|
1986
|
+
const ha = {
|
|
1987
1987
|
options: [Boolean, Object, Array],
|
|
1988
1988
|
titleTip: [Function, Boolean, Object, String],
|
|
1989
1989
|
settingExtra: [Function, Boolean, Object, Array],
|
|
@@ -1991,8 +1991,8 @@ const fa = {
|
|
|
1991
1991
|
titleTipText: [String],
|
|
1992
1992
|
toolBarBtn: [Function, Boolean, Object, Array],
|
|
1993
1993
|
headerTitle: [Function, Boolean, Object, Array, String]
|
|
1994
|
-
},
|
|
1995
|
-
props:
|
|
1994
|
+
}, ma = /* @__PURE__ */ oe({
|
|
1995
|
+
props: ha,
|
|
1996
1996
|
inheritAttrs: !1,
|
|
1997
1997
|
setup(e) {
|
|
1998
1998
|
const a = Ge({
|
|
@@ -2013,13 +2013,13 @@ const fa = {
|
|
|
2013
2013
|
...o,
|
|
2014
2014
|
...e.options
|
|
2015
2015
|
};
|
|
2016
|
-
return i.setting !== !1 && e.settingExtra && (i.setting = {}, i.setting.extra = e.settingExtra),
|
|
2016
|
+
return i.setting !== !1 && e.settingExtra && (i.setting = {}, i.setting.extra = e.settingExtra), fa(i, {
|
|
2017
2017
|
...o
|
|
2018
2018
|
});
|
|
2019
2019
|
}, [() => l, () => e.options]);
|
|
2020
2020
|
return () => {
|
|
2021
2021
|
const o = e.toolBarBtn || [];
|
|
2022
|
-
return r(
|
|
2022
|
+
return r(Rt, {
|
|
2023
2023
|
prefixCls: a,
|
|
2024
2024
|
optionsExtra: e.optionsExtra,
|
|
2025
2025
|
headerTitle: e.headerTitle,
|
|
@@ -2043,7 +2043,7 @@ const fa = {
|
|
|
2043
2043
|
backgroundColor: "transparent",
|
|
2044
2044
|
borderRadius: 2
|
|
2045
2045
|
}
|
|
2046
|
-
},
|
|
2046
|
+
}, va = (e) => {
|
|
2047
2047
|
const a = `${e.antCls}-table`;
|
|
2048
2048
|
return {
|
|
2049
2049
|
[e.componentCls]: {
|
|
@@ -2234,8 +2234,8 @@ const fa = {
|
|
|
2234
2234
|
}
|
|
2235
2235
|
};
|
|
2236
2236
|
}, {
|
|
2237
|
-
useBreakpoint:
|
|
2238
|
-
} = Ue,
|
|
2237
|
+
useBreakpoint: ga
|
|
2238
|
+
} = Ue, ya = {
|
|
2239
2239
|
reload: !0,
|
|
2240
2240
|
density: !0,
|
|
2241
2241
|
setting: !0,
|
|
@@ -2258,18 +2258,18 @@ const fa = {
|
|
|
2258
2258
|
}), {
|
|
2259
2259
|
wrapSSR: d,
|
|
2260
2260
|
hashId: h
|
|
2261
|
-
} = ze("ProBaseTable", [
|
|
2261
|
+
} = ze("ProBaseTable", [va], i), b = ga(), {
|
|
2262
2262
|
width: $
|
|
2263
|
-
} =
|
|
2263
|
+
} = yl(), v = pt(), s = D(), n = D(), c = D(e.waitRequest);
|
|
2264
2264
|
Ie(() => c.value = e.waitRequest);
|
|
2265
2265
|
const {
|
|
2266
2266
|
toggle: g,
|
|
2267
2267
|
isFullscreen: m
|
|
2268
|
-
} =
|
|
2268
|
+
} = xt(s), S = T(() => ({
|
|
2269
2269
|
...e
|
|
2270
2270
|
})), P = T(() => !b.value.xl), R = T(() => {
|
|
2271
2271
|
var f, F;
|
|
2272
|
-
return e.virtualScroll &&
|
|
2272
|
+
return e.virtualScroll && nl(!((f = e.scroll) != null && f.y), "参数scroll的Y值不能为空!"), !!((F = e.scroll) != null && F.y && e.virtualScroll);
|
|
2273
2273
|
}), k = T(() => {
|
|
2274
2274
|
const f = (e.columns || []).filter((F) => F.key || F.dataIndex).map((F) => ({
|
|
2275
2275
|
...F,
|
|
@@ -2277,7 +2277,7 @@ const fa = {
|
|
|
2277
2277
|
align: F.align || e.align,
|
|
2278
2278
|
uuid: We().uuid(15)
|
|
2279
2279
|
}));
|
|
2280
|
-
return
|
|
2280
|
+
return Xt(f, {
|
|
2281
2281
|
align: e.align || "left",
|
|
2282
2282
|
showIndex: e.showIndex || !1
|
|
2283
2283
|
});
|
|
@@ -2285,38 +2285,38 @@ const fa = {
|
|
|
2285
2285
|
loadingComputed: Y,
|
|
2286
2286
|
loading: L,
|
|
2287
2287
|
setLoading: z
|
|
2288
|
-
} =
|
|
2288
|
+
} = Nl({
|
|
2289
2289
|
emit: a,
|
|
2290
2290
|
loading: ae(e, "loading")
|
|
2291
2291
|
}), {
|
|
2292
2292
|
sizeRef: H,
|
|
2293
2293
|
setTableSize: re
|
|
2294
|
-
} =
|
|
2294
|
+
} = El({
|
|
2295
2295
|
emit: a,
|
|
2296
2296
|
size: ae(e, "size")
|
|
2297
2297
|
}), {
|
|
2298
2298
|
paginationInfo: N,
|
|
2299
2299
|
requestPagination: Z,
|
|
2300
2300
|
setPagination: _
|
|
2301
|
-
} =
|
|
2301
|
+
} = zl({
|
|
2302
2302
|
slots: l,
|
|
2303
2303
|
props: S,
|
|
2304
2304
|
pagination: ae(e, "pagination")
|
|
2305
|
-
}), we =
|
|
2305
|
+
}), we = Ul(e), {
|
|
2306
2306
|
proScroll: t,
|
|
2307
2307
|
breakpoint: C
|
|
2308
|
-
} =
|
|
2308
|
+
} = Xl({
|
|
2309
2309
|
...we,
|
|
2310
2310
|
innerWidth: $,
|
|
2311
2311
|
columns: k,
|
|
2312
2312
|
screens: b
|
|
2313
|
-
}), O =
|
|
2313
|
+
}), O = Gl(e), {
|
|
2314
2314
|
proColumns: y,
|
|
2315
2315
|
cacheProColumns: p,
|
|
2316
2316
|
setColumns: E,
|
|
2317
2317
|
changeColumns: K,
|
|
2318
2318
|
resizeColumnWidth: w
|
|
2319
|
-
} =
|
|
2319
|
+
} = ql({
|
|
2320
2320
|
...O,
|
|
2321
2321
|
breakpoint: C,
|
|
2322
2322
|
scroll: t,
|
|
@@ -2328,7 +2328,7 @@ const fa = {
|
|
|
2328
2328
|
sortKeyColumns: Oe,
|
|
2329
2329
|
cacheColumnsMap: pe,
|
|
2330
2330
|
setSortKeyColumns: J
|
|
2331
|
-
} =
|
|
2331
|
+
} = _l({
|
|
2332
2332
|
columns: p,
|
|
2333
2333
|
columnsState: ae(e, "columnsState"),
|
|
2334
2334
|
changeColumns: K
|
|
@@ -2337,7 +2337,7 @@ const fa = {
|
|
|
2337
2337
|
formParamsRef: A,
|
|
2338
2338
|
defaultParamsRef: ve,
|
|
2339
2339
|
setFormParams: G
|
|
2340
|
-
} =
|
|
2340
|
+
} = Wl({
|
|
2341
2341
|
search: ae(e, "search"),
|
|
2342
2342
|
searchMap: ae(e, "searchMap"),
|
|
2343
2343
|
params: ae(e, "params"),
|
|
@@ -2345,22 +2345,22 @@ const fa = {
|
|
|
2345
2345
|
setPagination: _
|
|
2346
2346
|
}), {
|
|
2347
2347
|
selectedKey: Xe,
|
|
2348
|
-
selectedItem:
|
|
2349
|
-
changeRowKey:
|
|
2348
|
+
selectedItem: Pt,
|
|
2349
|
+
changeRowKey: It,
|
|
2350
2350
|
selectRowKey: Je,
|
|
2351
2351
|
selectAllRowKey: Qe,
|
|
2352
2352
|
syncSelectedRows: Ze,
|
|
2353
2353
|
removeRowKeys: et,
|
|
2354
|
-
clearAllRowKeys:
|
|
2355
|
-
} =
|
|
2354
|
+
clearAllRowKeys: Bt
|
|
2355
|
+
} = Al(ae(e, "rowKey"), ae(e, "rowSelection")), Ot = Ll(e), {
|
|
2356
2356
|
reload: Ae,
|
|
2357
|
-
reSetDataList:
|
|
2358
|
-
changeDataValue:
|
|
2359
|
-
isTreeDataRef:
|
|
2357
|
+
reSetDataList: kt,
|
|
2358
|
+
changeDataValue: Dt,
|
|
2359
|
+
isTreeDataRef: jt,
|
|
2360
2360
|
dataSource: Te,
|
|
2361
2361
|
handleTableChange: tt
|
|
2362
|
-
} =
|
|
2363
|
-
...
|
|
2362
|
+
} = Vl({
|
|
2363
|
+
...Ot,
|
|
2364
2364
|
waitRequest: c
|
|
2365
2365
|
}, {
|
|
2366
2366
|
loading: Y,
|
|
@@ -2375,9 +2375,9 @@ const fa = {
|
|
|
2375
2375
|
onBeforeSearchSubmit: e.onBeforeSearchSubmit,
|
|
2376
2376
|
hasCustomRender: T(() => xe(e.customRender || (l == null ? void 0 : l.customRender)))
|
|
2377
2377
|
}, a), $e = T(() => e.options ? {
|
|
2378
|
-
...
|
|
2378
|
+
...ya,
|
|
2379
2379
|
...Q(e.options) ? e.options : {}
|
|
2380
|
-
} : !1),
|
|
2380
|
+
} : !1), Mt = T(() => ({
|
|
2381
2381
|
size: x(H),
|
|
2382
2382
|
scroll: x(t),
|
|
2383
2383
|
dataSource: x(Te),
|
|
@@ -2407,11 +2407,11 @@ const fa = {
|
|
|
2407
2407
|
...f,
|
|
2408
2408
|
...e.params || {}
|
|
2409
2409
|
}), await Ae()) : G(f);
|
|
2410
|
-
},
|
|
2410
|
+
}, Nt = async (f, F) => {
|
|
2411
2411
|
F ? (a("reset", f), e.request && await nt(f)) : e.request ? (a("submit", f), await nt(f)) : a("submit", f);
|
|
2412
2412
|
}, ut = (f, F, I, j) => {
|
|
2413
|
-
_(
|
|
2414
|
-
},
|
|
2413
|
+
_(ct(f, ["current", "pageSize"])), tt(f, F, I, j);
|
|
2414
|
+
}, Et = (f, F) => {
|
|
2415
2415
|
var I;
|
|
2416
2416
|
_({
|
|
2417
2417
|
current: f,
|
|
@@ -2421,11 +2421,11 @@ const fa = {
|
|
|
2421
2421
|
pageSize: F,
|
|
2422
2422
|
total: N.value && ((I = N.value) == null ? void 0 : I.total) || 0
|
|
2423
2423
|
}, {}, {});
|
|
2424
|
-
},
|
|
2424
|
+
}, zt = (f) => {
|
|
2425
2425
|
a("expandedRowsChange", f);
|
|
2426
|
-
},
|
|
2426
|
+
}, Kt = (f, F) => {
|
|
2427
2427
|
a("expand", f, F);
|
|
2428
|
-
},
|
|
2428
|
+
}, At = (f, F) => w(f, F), Yt = (f, F, I) => {
|
|
2429
2429
|
var B, V, ee;
|
|
2430
2430
|
let j = f;
|
|
2431
2431
|
if (F) {
|
|
@@ -2456,10 +2456,10 @@ const fa = {
|
|
|
2456
2456
|
default: () => [r("div", {
|
|
2457
2457
|
class: `${i}-ellipsis-text`
|
|
2458
2458
|
}, [f])]
|
|
2459
|
-
}), r(
|
|
2459
|
+
}), r(gl, {
|
|
2460
2460
|
class: `${i}-copyable-icon`,
|
|
2461
2461
|
onClick: () => {
|
|
2462
|
-
|
|
2462
|
+
Ml(te), Rl.success("复制成功");
|
|
2463
2463
|
}
|
|
2464
2464
|
}, null)]);
|
|
2465
2465
|
}
|
|
@@ -2470,32 +2470,32 @@ const fa = {
|
|
|
2470
2470
|
var I, j, B, V, ee;
|
|
2471
2471
|
const f = Se(l, e, "emptyText");
|
|
2472
2472
|
if (f !== !1 && ((I = v == null ? void 0 : v.emptyText) == null ? void 0 : I.value) !== !1) {
|
|
2473
|
-
const M = ((j = e.emptyTextProps) == null ? void 0 : j.extraProps) || {}, U = f || ((B = v == null ? void 0 : v.emptyText) == null ? void 0 : B.value), te = Ce(U), le = te ?
|
|
2473
|
+
const M = ((j = e.emptyTextProps) == null ? void 0 : j.extraProps) || {}, U = f || ((B = v == null ? void 0 : v.emptyText) == null ? void 0 : B.value), te = Ce(U), le = te ? Ct(U, M) : bt(U || []);
|
|
2474
2474
|
return r("div", {
|
|
2475
2475
|
class: je(`${i}-empty-text`, h.value, (V = e.emptyTextProps) == null ? void 0 : V.class),
|
|
2476
2476
|
style: (ee = e.emptyTextProps) == null ? void 0 : ee.style
|
|
2477
|
-
}, [te ? le : fe(le) ? le.map((ge) => qe(ge, M)) : r(
|
|
2477
|
+
}, [te ? le : fe(le) ? le.map((ge) => qe(ge, M)) : r(Pl, null, null)]);
|
|
2478
2478
|
}
|
|
2479
2479
|
return null;
|
|
2480
2480
|
}
|
|
2481
|
-
const
|
|
2481
|
+
const Lt = () => {
|
|
2482
2482
|
var F;
|
|
2483
|
-
const f =
|
|
2483
|
+
const f = vt(l, e, "customRender");
|
|
2484
2484
|
if (f) {
|
|
2485
2485
|
if ((F = Te.value) != null && F.length) {
|
|
2486
2486
|
const I = ie(x(Te));
|
|
2487
2487
|
return f == null ? void 0 : f({
|
|
2488
2488
|
dataSource: I,
|
|
2489
|
-
currentData:
|
|
2489
|
+
currentData: jl(I, N.value)
|
|
2490
2490
|
});
|
|
2491
2491
|
}
|
|
2492
2492
|
return it();
|
|
2493
2493
|
}
|
|
2494
2494
|
return r(Ne, null, null);
|
|
2495
|
-
},
|
|
2495
|
+
}, Vt = (f) => {
|
|
2496
2496
|
var B, V;
|
|
2497
2497
|
const F = Se(l, e, "headerTitle"), I = Se(l, e, "titleTip"), j = Se(l, e, "toolBarBtn");
|
|
2498
|
-
return r(
|
|
2498
|
+
return r(ma, {
|
|
2499
2499
|
headerTitle: F,
|
|
2500
2500
|
titleTip: I,
|
|
2501
2501
|
titleTipText: e.titleTipText,
|
|
@@ -2509,7 +2509,7 @@ const fa = {
|
|
|
2509
2509
|
toolBarBtn: j
|
|
2510
2510
|
}, null);
|
|
2511
2511
|
};
|
|
2512
|
-
return
|
|
2512
|
+
return Jl({
|
|
2513
2513
|
tableSize: H,
|
|
2514
2514
|
columns: y,
|
|
2515
2515
|
cacheColumns: k,
|
|
@@ -2549,9 +2549,9 @@ const fa = {
|
|
|
2549
2549
|
pageState: Z,
|
|
2550
2550
|
pagination: N.value,
|
|
2551
2551
|
selectedKey: T(() => Xe.value),
|
|
2552
|
-
selectedItem: T(() =>
|
|
2552
|
+
selectedItem: T(() => Pt.value),
|
|
2553
2553
|
rowsSelection: {
|
|
2554
|
-
clear:
|
|
2554
|
+
clear: Bt,
|
|
2555
2555
|
select: Je,
|
|
2556
2556
|
remove: et,
|
|
2557
2557
|
sync: Ze,
|
|
@@ -2566,10 +2566,10 @@ const fa = {
|
|
|
2566
2566
|
pageSize: (Z == null ? void 0 : Z.pageSize) || 10
|
|
2567
2567
|
}), f != null && f.callBack && (f != null && f.wait ? await ((F = f == null ? void 0 : f.callBack) == null ? void 0 : F.call(f)) : (I = f == null ? void 0 : f.callBack) == null || I.call(f)), (j = n.value) == null || j.resetForm(!1), c.value = !1;
|
|
2568
2568
|
},
|
|
2569
|
-
reSetDataList:
|
|
2569
|
+
reSetDataList: kt,
|
|
2570
2570
|
setPageAndReload: ut,
|
|
2571
2571
|
setPagination: _,
|
|
2572
|
-
setData:
|
|
2572
|
+
setData: Dt,
|
|
2573
2573
|
setLoading: z
|
|
2574
2574
|
})
|
|
2575
2575
|
}), () => {
|
|
@@ -2582,27 +2582,27 @@ const fa = {
|
|
|
2582
2582
|
[`${i}`]: !0,
|
|
2583
2583
|
[`${u.class}`]: u.class,
|
|
2584
2584
|
[`${i}-no-scroll`]: !Object.keys(x(t) || {}).length,
|
|
2585
|
-
[`${i}-table-tree`]:
|
|
2585
|
+
[`${i}-table-tree`]: jt.value,
|
|
2586
2586
|
[`${i}-full-screen`]: m.value
|
|
2587
2587
|
}]),
|
|
2588
2588
|
style: u.style
|
|
2589
2589
|
}, [r("div", {
|
|
2590
2590
|
class: [`${i}-content`, h.value]
|
|
2591
|
-
}, [(ue.value.length > 0 || xe(l.search)) && r(
|
|
2591
|
+
}, [(ue.value.length > 0 || xe(l.search)) && r($t, {
|
|
2592
2592
|
ref: n,
|
|
2593
2593
|
search: e.search,
|
|
2594
2594
|
modal: e.modalScroll,
|
|
2595
2595
|
searchMap: ue.value,
|
|
2596
2596
|
prefixCls: i,
|
|
2597
2597
|
loading: !!x(Y),
|
|
2598
|
-
onSearch:
|
|
2598
|
+
onSearch: Nt,
|
|
2599
2599
|
defaultParams: ve
|
|
2600
2600
|
}, {
|
|
2601
2601
|
default: l.search ? () => {
|
|
2602
2602
|
var j;
|
|
2603
2603
|
return (j = l.search) == null ? void 0 : j.call(l);
|
|
2604
2604
|
} : null
|
|
2605
|
-
}), !R.value &&
|
|
2605
|
+
}), !R.value && Vt(f), f ? r(_e, lt.value, {
|
|
2606
2606
|
default: () => {
|
|
2607
2607
|
var j, B, V;
|
|
2608
2608
|
return [r("div", {
|
|
@@ -2610,22 +2610,22 @@ const fa = {
|
|
|
2610
2610
|
}, [r("div", {
|
|
2611
2611
|
class: je(`${i}-list`, h.value, (j = e.tableProps) == null ? void 0 : j.class),
|
|
2612
2612
|
style: (B = e.tableProps) == null ? void 0 : B.style
|
|
2613
|
-
}, [
|
|
2613
|
+
}, [Lt()]), e.pagination !== !1 && ((V = Te.value) == null ? void 0 : V.length) > 0 && r($l, X({
|
|
2614
2614
|
class: {
|
|
2615
2615
|
[`${i}-pagination ${h.value}`]: !0,
|
|
2616
2616
|
[`${i}-pagination-${at.value} ${h.value}`]: !!at.value
|
|
2617
2617
|
}
|
|
2618
2618
|
}, ye(x(N)), {
|
|
2619
|
-
onChange:
|
|
2619
|
+
onChange: Et
|
|
2620
2620
|
}), null)])];
|
|
2621
2621
|
}
|
|
2622
|
-
}) : r(
|
|
2622
|
+
}) : r(Fl, X(ct(e, Object.keys(Tt)), Mt.value, {
|
|
2623
2623
|
style: (F = e.tableProps) == null ? void 0 : F.style,
|
|
2624
2624
|
class: (I = e.tableProps) == null ? void 0 : I.class,
|
|
2625
2625
|
loading: lt.value,
|
|
2626
2626
|
rowKey: (j) => j[e.rowKey],
|
|
2627
2627
|
transformCellText: (j) => {
|
|
2628
|
-
var U, te, le, ge;
|
|
2628
|
+
var U, te, le, ge, st;
|
|
2629
2629
|
e.transformCellText && typeof e.transformCellText && ((U = e.transformCellText) == null || U.call(e, j));
|
|
2630
2630
|
const {
|
|
2631
2631
|
column: B
|
|
@@ -2633,22 +2633,22 @@ const fa = {
|
|
|
2633
2633
|
let ee = !0, M = j.text;
|
|
2634
2634
|
if (fe(M) && M.length === 1 && !Ce(M == null ? void 0 : M[0])) {
|
|
2635
2635
|
M = M == null ? void 0 : M[0];
|
|
2636
|
-
const
|
|
2637
|
-
ee =
|
|
2638
|
-
} else fe(M) && M[0].type === "template" && (M = (
|
|
2639
|
-
return B != null && B.ellipsis ?
|
|
2636
|
+
const ot = Jt(M, (B == null ? void 0 : B.columnEmptyText) || (e == null ? void 0 : e.columnEmptyText) || "");
|
|
2637
|
+
ee = ot.success, M = Dl(ot.value, (B == null ? void 0 : B.valueType) || ((le = (te = e.columns) == null ? void 0 : te.find((rt) => (rt.key || rt.dataIndex) === V)) == null ? void 0 : le.valueType), i, h.value);
|
|
2638
|
+
} else fe(M) && M.length === 1 && ((ge = M[0]) == null ? void 0 : ge.type) === "template" && (M = (st = M[0]) == null ? void 0 : st.children);
|
|
2639
|
+
return B != null && B.ellipsis ? Yt(M, ee, B) : M;
|
|
2640
2640
|
},
|
|
2641
2641
|
rowSelection: e.rowSelection ? {
|
|
2642
2642
|
...Ee(e.rowSelection, ["onSelect", "onSelectAll", "onChange", "selectedRowKeys"]),
|
|
2643
2643
|
selectedRowKeys: Xe.value,
|
|
2644
2644
|
onSelect: Je,
|
|
2645
2645
|
onSelectAll: Qe,
|
|
2646
|
-
onChange:
|
|
2646
|
+
onChange: It
|
|
2647
2647
|
} : void 0,
|
|
2648
2648
|
onChange: ut,
|
|
2649
|
-
onExpandedRowsChange:
|
|
2650
|
-
onExpand:
|
|
2651
|
-
onResizeColumn: (j, B) =>
|
|
2649
|
+
onExpandedRowsChange: zt,
|
|
2650
|
+
onExpand: Kt,
|
|
2651
|
+
onResizeColumn: (j, B) => At(j, B)
|
|
2652
2652
|
}), {
|
|
2653
2653
|
...l,
|
|
2654
2654
|
emptyText: () => it()
|
|
@@ -2661,5 +2661,5 @@ export {
|
|
|
2661
2661
|
He as GProTable,
|
|
2662
2662
|
He as default,
|
|
2663
2663
|
be as proTableProps,
|
|
2664
|
-
|
|
2664
|
+
Oa as useTable
|
|
2665
2665
|
};
|