@gx-design-vue/pro-table 0.2.0-beta.42 → 0.2.0-beta.44
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 +8 -8
- package/dist/_utils/ant-design-vue/table/props.d.ts +1 -1
- package/dist/components/ColumnSetting/index.d.ts +2 -2
- package/dist/components/Form/index.d.ts +5 -5
- package/dist/components/ListToolBar/index.d.ts +4 -4
- package/dist/components/ToolBar/FullscreenIcon.d.ts +1 -1
- package/dist/components/ToolBar/index.d.ts +2 -2
- package/dist/hooks/useColums.d.ts +2 -2
- package/dist/hooks/useFetchData.d.ts +1 -1
- package/dist/hooks/useTableForm.d.ts +1 -1
- package/dist/{pro-table.mjs → pro-table.js} +436 -436
- package/dist/pro-table.umd.cjs +1 -0
- package/dist/props.d.ts +2 -2
- package/package.json +36 -33
- package/dist/pro-table.umd.js +0 -1
- package/dist/types/ColumnTypings.d.ts +0 -91
- package/dist/types/TableTypings.d.ts +0 -154
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { computed as S, ref as
|
|
2
|
-
import { isBoolean as te, isObject as ue, getSlot as ze, isFunction as $e, arrayRepeat as Ht, runFunction as Wt, handleCurrentPage as _t, getSortIndex as Gt, isDeepEqualReact as nt, genColumnKey as ot, compareArray as qt, isNumber as ut, isString as Ut, isArray as Ke, getPrefixCls as Ve, getRandomNumber as
|
|
1
|
+
import { computed as S, ref as P, watch as X, unref as v, watchEffect as he, reactive as de, onUnmounted as jt, onDeactivated as kt, onMounted as zt, provide as Kt, inject as At, defineComponent as ae, createVNode as i, Fragment as Ie, nextTick as Yt, mergeProps as U, createTextVNode as pe, renderSlot as Lt, isVNode as Ce, cloneVNode as Vt, toRef as Z, toRaw as Ee } from "vue";
|
|
2
|
+
import { isBoolean as te, isObject as ue, getSlot as ze, isFunction as $e, arrayRepeat as Ht, runFunction as Wt, handleCurrentPage as _t, getSortIndex as Gt, isDeepEqualReact as nt, genColumnKey as ot, compareArray as qt, isNumber as ut, isString as Ut, isArray as Ke, getPrefixCls as Ve, getRandomNumber as Ae, handleShowIndex as Xt, getSlotVNode as ge, hanndleField as Jt } from "@gx-design-vue/pro-utils";
|
|
3
3
|
import { pick as it, cloneDeep as J, omit as ye } from "lodash-es";
|
|
4
4
|
import { useFullscreen as st, useWindowSize as Qt } from "@vueuse/core";
|
|
5
|
-
import { Form as et, Grid as He, Space as oe, Button as tt, Input as at, TimePicker as Zt, DatePicker as rt, TreeSelect as ea, Spin as
|
|
5
|
+
import { Form as et, Grid as He, Space as oe, Button as tt, Input as at, TimePicker as Zt, DatePicker as rt, TreeSelect as ea, Spin as Ye, Select as ta, Popover as aa, Checkbox as la, Tooltip as ee, Tree as na, Dropdown as oa, Menu as Re, Empty as ct, Pagination as ua, Table as ia, Typography as sa } from "ant-design-vue";
|
|
6
6
|
import { useProAppContext as ra } from "@gx-design-vue/pro-app";
|
|
7
|
-
import { useProStyle as
|
|
7
|
+
import { useProStyle as Be } from "@gx-design-vue/pro-provider";
|
|
8
8
|
import { tryOnUnmounted as ca, useMemo as Fe } from "@gx-design-vue/pro-hooks";
|
|
9
9
|
import _ from "dayjs";
|
|
10
10
|
import { UpOutlined as da, DownOutlined as fa, SettingOutlined as dt, VerticalAlignTopOutlined as ha, VerticalAlignMiddleOutlined as va, VerticalAlignBottomOutlined as ma, FullscreenExitOutlined as ga, FullscreenOutlined as ya, ColumnHeightOutlined as pa, InfoCircleOutlined as ba, ReloadOutlined as Ca } from "@ant-design/icons-vue";
|
|
@@ -44,8 +44,8 @@ function Cl(e) {
|
|
|
44
44
|
return (u = n == null ? void 0 : n.value) == null ? void 0 : u.selectedItem;
|
|
45
45
|
}),
|
|
46
46
|
setPageAndReload: (u, l, s, r) => {
|
|
47
|
-
var w,
|
|
48
|
-
return (
|
|
47
|
+
var w, m;
|
|
48
|
+
return (m = (w = n.value) == null ? void 0 : w.setPageAndReload) == null ? void 0 : m.call(w, u, l, s, r);
|
|
49
49
|
},
|
|
50
50
|
setPagination: (u) => {
|
|
51
51
|
var l, s;
|
|
@@ -69,15 +69,15 @@ function Cl(e) {
|
|
|
69
69
|
}
|
|
70
70
|
};
|
|
71
71
|
}
|
|
72
|
-
function
|
|
73
|
-
return
|
|
72
|
+
function Le() {
|
|
73
|
+
return Le = Object.assign ? Object.assign.bind() : function(e) {
|
|
74
74
|
for (var n = 1; n < arguments.length; n++) {
|
|
75
75
|
var t = arguments[n];
|
|
76
76
|
for (var o in t)
|
|
77
77
|
Object.prototype.hasOwnProperty.call(t, o) && (e[o] = t[o]);
|
|
78
78
|
}
|
|
79
79
|
return e;
|
|
80
|
-
},
|
|
80
|
+
}, Le.apply(this, arguments);
|
|
81
81
|
}
|
|
82
82
|
function Sa(e, n) {
|
|
83
83
|
process.env.NODE_ENV !== "production" && !e && console !== void 0 && console.error(`Warning: ${n}`);
|
|
@@ -522,18 +522,18 @@ const xa = () => ({
|
|
|
522
522
|
};
|
|
523
523
|
function wa({ emit: e, loading: n }) {
|
|
524
524
|
var l;
|
|
525
|
-
const t =
|
|
525
|
+
const t = P(te(n.value) ? n.value : ue(n.value) ? (l = n.value) == null ? void 0 : l.spinning : !1);
|
|
526
526
|
X(() => n.value, (s) => {
|
|
527
527
|
t.value = te(s) ? s : ue(s) ? s == null ? void 0 : s.spinning : t.value;
|
|
528
528
|
});
|
|
529
|
-
const o = S(() =>
|
|
529
|
+
const o = S(() => v(t) || !1);
|
|
530
530
|
function u(s) {
|
|
531
531
|
t.value = s, e("loadingChange", !0);
|
|
532
532
|
}
|
|
533
533
|
return { loadingStatus: o, setLoading: u };
|
|
534
534
|
}
|
|
535
535
|
function Ta({ size: e, emit: n }) {
|
|
536
|
-
const t =
|
|
536
|
+
const t = P("middle");
|
|
537
537
|
he(() => {
|
|
538
538
|
t.value = e.value;
|
|
539
539
|
});
|
|
@@ -558,10 +558,10 @@ function Ra({
|
|
|
558
558
|
delete o[s];
|
|
559
559
|
});
|
|
560
560
|
const u = S(() => {
|
|
561
|
-
var
|
|
561
|
+
var m;
|
|
562
562
|
if (te(t.value) && !t.value)
|
|
563
563
|
return !1;
|
|
564
|
-
const s = ze(e,
|
|
564
|
+
const s = ze(e, v(n), "pageItemRender"), r = $e(s) ? {
|
|
565
565
|
itemRender: ({
|
|
566
566
|
page: g,
|
|
567
567
|
type: y,
|
|
@@ -579,13 +579,13 @@ function Ra({
|
|
|
579
579
|
showSizeChanger: !0,
|
|
580
580
|
pageSizeOptions: ["10", "20", "50", "100"],
|
|
581
581
|
...t.value || {},
|
|
582
|
-
...
|
|
582
|
+
...v(o),
|
|
583
583
|
...r || {}
|
|
584
584
|
};
|
|
585
|
-
return (
|
|
585
|
+
return (m = t.value) != null && m.showTotal || (w.showTotal = (g) => `共${g < w.pageSize ? 1 : Math.ceil(g / (w.pageSize || 10))}页 ${g}条记录`), w;
|
|
586
586
|
});
|
|
587
587
|
function l(s) {
|
|
588
|
-
const r =
|
|
588
|
+
const r = v(u);
|
|
589
589
|
Object.assign(o, {
|
|
590
590
|
...r || {},
|
|
591
591
|
...s
|
|
@@ -597,37 +597,37 @@ function Ra({
|
|
|
597
597
|
};
|
|
598
598
|
}
|
|
599
599
|
function $a(e, n) {
|
|
600
|
-
const t =
|
|
600
|
+
const t = P([]), o = P([]);
|
|
601
601
|
X(() => {
|
|
602
|
-
var
|
|
603
|
-
return (
|
|
604
|
-
}, (
|
|
605
|
-
t.value = Ht([...
|
|
602
|
+
var m;
|
|
603
|
+
return (m = n.value) == null ? void 0 : m.selectedRowKeys;
|
|
604
|
+
}, (m) => {
|
|
605
|
+
t.value = Ht([...m || []]);
|
|
606
606
|
}, {
|
|
607
607
|
deep: !0,
|
|
608
608
|
immediate: !0
|
|
609
609
|
});
|
|
610
|
-
const u = (
|
|
611
|
-
e.value && (g ?
|
|
610
|
+
const u = (m, g) => {
|
|
611
|
+
e.value && (g ? m != null && m[e.value] && (t.value.push(m[e.value]), o.value.push(m)) : (t.value = t.value.filter((y) => y !== m[e.value]), o.value = o.value.filter((y) => y[e.value] !== m[e.value])));
|
|
612
612
|
}, l = () => {
|
|
613
|
-
var
|
|
614
|
-
n.value && ((g = (
|
|
613
|
+
var m, g;
|
|
614
|
+
n.value && ((g = (m = n.value) == null ? void 0 : m.onChange) == null || g.call(m, t.value, o.value));
|
|
615
615
|
};
|
|
616
616
|
return {
|
|
617
617
|
selectedKey: t,
|
|
618
618
|
selectedItem: o,
|
|
619
619
|
selectRowKey: u,
|
|
620
|
-
selectAllRowKey: (
|
|
621
|
-
e.value && (
|
|
620
|
+
selectAllRowKey: (m, g, y) => {
|
|
621
|
+
e.value && (m ? g.map((c) => (t.value.every((b) => b !== (c == null ? void 0 : c[e.value])) && c != null && c[e.value] && (t.value.push(c[e.value]), o.value.push(c)), c)) : y.map((c) => (t.value.some((b) => b === (c == null ? void 0 : c[e.value])) && (t.value = t.value.filter((b) => b !== c[e.value]), o.value = o.value.filter((b) => b[e.value] !== c[e.value])), c)));
|
|
622
622
|
},
|
|
623
|
-
removeRowKeys: (
|
|
624
|
-
t.value = t.value.filter((g) => !
|
|
623
|
+
removeRowKeys: (m) => {
|
|
624
|
+
t.value = t.value.filter((g) => !m.includes(g)), o.value = o.value.filter((g) => !m.includes(g == null ? void 0 : g[e.value || ""])), l();
|
|
625
625
|
},
|
|
626
626
|
changeRowKey: l,
|
|
627
|
-
syncSelectedRows: (
|
|
627
|
+
syncSelectedRows: (m) => {
|
|
628
628
|
if (e.value && t.value.length !== o.value.length) {
|
|
629
629
|
const g = o.value.map((c) => c[e.value]), y = t.value.filter((c) => !g.includes(c));
|
|
630
|
-
|
|
630
|
+
m.forEach((c) => {
|
|
631
631
|
y.includes(c[e.value]) && o.value.push(J(c));
|
|
632
632
|
});
|
|
633
633
|
}
|
|
@@ -635,14 +635,14 @@ function $a(e, n) {
|
|
|
635
635
|
};
|
|
636
636
|
}
|
|
637
637
|
function Fa(e, n) {
|
|
638
|
-
const t = S(() => n || 0), o =
|
|
638
|
+
const t = S(() => n || 0), o = P(), u = P(e);
|
|
639
639
|
function l() {
|
|
640
640
|
o.value && clearTimeout(o.value);
|
|
641
641
|
}
|
|
642
642
|
async function s(...r) {
|
|
643
643
|
return t.value === 0 || t.value === void 0 ? u.value(...r) : (l(), new Promise(async (w) => {
|
|
644
|
-
var
|
|
645
|
-
(
|
|
644
|
+
var m;
|
|
645
|
+
(m = r[0]) != null && m.immediate ? w(await u.value(...r)) : o.value = setTimeout(async () => {
|
|
646
646
|
w(await u.value(...r));
|
|
647
647
|
}, t.value);
|
|
648
648
|
}));
|
|
@@ -662,111 +662,111 @@ function Ia(e) {
|
|
|
662
662
|
dataSource: l
|
|
663
663
|
};
|
|
664
664
|
}
|
|
665
|
-
function
|
|
666
|
-
const T =
|
|
667
|
-
|
|
668
|
-
const
|
|
669
|
-
return
|
|
670
|
-
G.run({ ...
|
|
671
|
-
}, Math.max(
|
|
665
|
+
function Ba({ polling: e, request: n, postData: t, dataSource: o, waitRequest: u, debounceTime: l }, { columns: s, loadingStatus: r, setLoading: w, setColumns: m, removeRowKeys: g, syncSelectedRows: y, formParamsRef: c, setPagination: b, getPaginationInfo: d, onBeforeSearchSubmit: f, hasCustomRender: x }, $) {
|
|
666
|
+
const T = P(), B = P(!0), D = P(!1), A = P(!1), N = P([]), Y = P(), G = Fa(async (h) => {
|
|
667
|
+
Y.value && clearTimeout(Y.value);
|
|
668
|
+
const M = await I(h), L = Wt(e.value, M);
|
|
669
|
+
return L && !T.value && (Y.value = setTimeout(() => {
|
|
670
|
+
G.run({ ...h, isPolling: L });
|
|
671
|
+
}, Math.max(L, 2e3))), M;
|
|
672
672
|
}, l.value || 10);
|
|
673
|
-
|
|
674
|
-
T.value = !0, clearTimeout(
|
|
675
|
-
}),
|
|
676
|
-
T.value = !0, clearTimeout(
|
|
673
|
+
jt(() => {
|
|
674
|
+
T.value = !0, clearTimeout(Y.value);
|
|
675
|
+
}), kt(() => {
|
|
676
|
+
T.value = !0, clearTimeout(Y.value);
|
|
677
677
|
}), X(() => e.value, () => {
|
|
678
|
-
e.value ? G.run({ isPolling: !0 }) : clearTimeout(
|
|
678
|
+
e.value ? G.run({ isPolling: !0 }) : clearTimeout(Y.value);
|
|
679
679
|
}, { immediate: !0 }), X([
|
|
680
680
|
() => u.value,
|
|
681
681
|
() => o.value,
|
|
682
682
|
() => c
|
|
683
683
|
], () => {
|
|
684
|
-
n.value ? (!
|
|
684
|
+
n.value ? (!B.value || !e.value) && G.run({ isPolling: !1 }) : F(o.value || []);
|
|
685
685
|
}, {
|
|
686
686
|
deep: !0,
|
|
687
687
|
immediate: !0
|
|
688
688
|
});
|
|
689
|
-
const
|
|
689
|
+
const E = S(() => {
|
|
690
690
|
if (x.value)
|
|
691
|
-
return
|
|
692
|
-
const
|
|
693
|
-
return !
|
|
694
|
-
}), H = S(() =>
|
|
695
|
-
function a(
|
|
696
|
-
|
|
691
|
+
return v(N);
|
|
692
|
+
const h = v(s).filter((M) => M.show || M.show === void 0);
|
|
693
|
+
return !v(N) || !h || h.length === 0 ? [] : v(N);
|
|
694
|
+
}), H = S(() => v(N).some((h) => h.children && h.children.length > 0));
|
|
695
|
+
function a(h) {
|
|
696
|
+
A.value = h;
|
|
697
697
|
}
|
|
698
|
-
function p(
|
|
699
|
-
G.run({ pagination:
|
|
698
|
+
function p(h, M, L, K) {
|
|
699
|
+
G.run({ pagination: h, filters: M, sorter: L, extra: K, isPolling: !1 }), $("change", h, M, L, K);
|
|
700
700
|
}
|
|
701
|
-
const I = async (
|
|
701
|
+
const I = async (h = {}) => {
|
|
702
702
|
var Se, xe, we;
|
|
703
|
-
const { pagination:
|
|
704
|
-
if (!
|
|
703
|
+
const { pagination: M, filters: L = {}, sorter: K = {}, removeKeys: ve = [], isPolling: Pe = !1 } = h;
|
|
704
|
+
if (!v(n) || !$e(v(n)) || v(u) && r.value || D.value)
|
|
705
705
|
return o.value || [];
|
|
706
|
-
if (D.value = !0, !
|
|
707
|
-
|
|
706
|
+
if (D.value = !0, !Pe || v(u) || B.value ? w(!0) : a(!0), v(u)) {
|
|
707
|
+
B.value = !1, D.value = !1;
|
|
708
708
|
return;
|
|
709
709
|
}
|
|
710
|
-
|
|
710
|
+
M && b(M);
|
|
711
711
|
try {
|
|
712
712
|
let le = {};
|
|
713
|
-
if (te(
|
|
713
|
+
if (te(M) && !M || te(d))
|
|
714
714
|
le = {};
|
|
715
715
|
else {
|
|
716
|
-
const { current:
|
|
717
|
-
le.pageNum = _t({ current:
|
|
716
|
+
const { current: j = 1, pageSize: se = 10, total: q } = v(d) || {};
|
|
717
|
+
le.pageNum = _t({ current: j, pageSize: se, total: q }, ve.length), ve.length && g(ve), le.pageSize = se;
|
|
718
718
|
}
|
|
719
|
-
(ue(K) ? [K] : K).forEach((
|
|
720
|
-
const se = (
|
|
721
|
-
|
|
719
|
+
(ue(K) ? [K] : K).forEach((j) => {
|
|
720
|
+
const se = (j == null ? void 0 : j.columnKey) || (j == null ? void 0 : j.field);
|
|
721
|
+
j && (j != null && j.order) ? m(v(s).map((q) => (q.dataIndex === se ? q.sortOrder = j == null ? void 0 : j.order : q.sortOrder = null, q))) : j && m(v(s).map((q) => (q.dataIndex === se && (q.sortOrder = null), q)));
|
|
722
722
|
});
|
|
723
723
|
let fe = {
|
|
724
724
|
...le || {},
|
|
725
|
-
...
|
|
725
|
+
...h.params,
|
|
726
726
|
...c
|
|
727
727
|
};
|
|
728
|
-
|
|
728
|
+
f && $e(f) && (fe = await f(fe, K, L));
|
|
729
729
|
let V = [];
|
|
730
|
-
const ne = await ((Se =
|
|
731
|
-
return D.value = !1, ne && ne.success ? (V = ne.data || [],
|
|
730
|
+
const ne = await ((Se = v(n)) == null ? void 0 : Se(fe, K, L));
|
|
731
|
+
return D.value = !1, ne && ne.success ? (V = ne.data || [], v(t) && $e(v(t)) && (V = await ((xe = v(t)) == null ? void 0 : xe(V))), y(V), (ne.total || (V == null ? void 0 : V.length) || 0) !== ((we = v(d)) == null ? void 0 : we.total) && b({
|
|
732
732
|
total: ne.total || (V == null ? void 0 : V.length) || 0
|
|
733
733
|
}), F(V), V) : [];
|
|
734
734
|
} catch (le) {
|
|
735
|
-
|
|
735
|
+
N.value === void 0 && F([]), $("requestError", le);
|
|
736
736
|
} finally {
|
|
737
|
-
|
|
737
|
+
B.value = !1, w(!1);
|
|
738
738
|
}
|
|
739
739
|
return [];
|
|
740
740
|
};
|
|
741
|
-
function F(
|
|
742
|
-
const
|
|
743
|
-
nt(
|
|
741
|
+
function F(h) {
|
|
742
|
+
const M = Gt(J(h), v(d.value));
|
|
743
|
+
nt(M, N.value) || (N.value = M);
|
|
744
744
|
}
|
|
745
|
-
function
|
|
746
|
-
switch (
|
|
745
|
+
function O({ key: h, params: M, type: L = "update" }) {
|
|
746
|
+
switch (L) {
|
|
747
747
|
case "update":
|
|
748
|
-
|
|
748
|
+
N.value = N.value.map((K) => h && M[h] === K[h] ? { ...K, ...M } : K);
|
|
749
749
|
break;
|
|
750
750
|
case "add":
|
|
751
|
-
|
|
751
|
+
N.value.push(M);
|
|
752
752
|
break;
|
|
753
753
|
case "delete":
|
|
754
|
-
|
|
754
|
+
N.value = N.value.filter((K) => h ? h && M[h] !== K[h] : !0);
|
|
755
755
|
break;
|
|
756
756
|
}
|
|
757
757
|
}
|
|
758
758
|
return {
|
|
759
|
-
getDataSourceRef:
|
|
759
|
+
getDataSourceRef: E,
|
|
760
760
|
isTreeDataRef: H,
|
|
761
761
|
reSetDataList: F,
|
|
762
|
-
changeDataValue:
|
|
762
|
+
changeDataValue: O,
|
|
763
763
|
handleTableChange: p,
|
|
764
|
-
reload: async (
|
|
765
|
-
|
|
764
|
+
reload: async (h) => {
|
|
765
|
+
v(n) ? await G.run({ ...h, isPolling: !1 }) : $("reload");
|
|
766
766
|
}
|
|
767
767
|
};
|
|
768
768
|
}
|
|
769
|
-
function
|
|
769
|
+
function Pa(e) {
|
|
770
770
|
const n = {};
|
|
771
771
|
return e.forEach((t) => {
|
|
772
772
|
let o = t.initialValue;
|
|
@@ -774,47 +774,47 @@ function Oa(e) {
|
|
|
774
774
|
!o && u.includes(t.valueType) ? o = void 0 : !o && l.includes(t.valueType) ? o = null : o || (o = ""), t.name === "dateRange" ? (n[t.rangeStartName || "start"] = o ? o[0] : null, n[t.rangeEndName || "end"] = o ? o[1] : null) : t.name && (n[t.name] = o);
|
|
775
775
|
}), n;
|
|
776
776
|
}
|
|
777
|
-
function
|
|
778
|
-
const l = de({}), s = de({}), r =
|
|
777
|
+
function Oa({ search: e, searchMap: n, params: t, columns: o, setPagination: u }) {
|
|
778
|
+
const l = de({}), s = de({}), r = P([]), w = S(() => {
|
|
779
779
|
var y;
|
|
780
780
|
return ue(e.value) ? !!((y = e.value) != null && y.showSearch) : !!e.value;
|
|
781
781
|
});
|
|
782
782
|
zt(() => {
|
|
783
|
-
|
|
783
|
+
m("all");
|
|
784
784
|
}), X(() => t.value, () => {
|
|
785
|
-
|
|
785
|
+
m("params");
|
|
786
786
|
}, {
|
|
787
787
|
deep: !0
|
|
788
788
|
}), X(() => n.value, () => {
|
|
789
|
-
|
|
789
|
+
m("searchMap");
|
|
790
790
|
}, {
|
|
791
791
|
deep: !0
|
|
792
792
|
}), X(() => o.value, () => {
|
|
793
|
-
|
|
793
|
+
m("columns");
|
|
794
794
|
}, {
|
|
795
795
|
deep: !0
|
|
796
796
|
});
|
|
797
|
-
const
|
|
798
|
-
var b,
|
|
797
|
+
const m = (y) => {
|
|
798
|
+
var b, d;
|
|
799
799
|
const c = [];
|
|
800
|
-
if ((y === "all" || y === "searchMap") && ((b = n.value) == null || b.forEach((
|
|
801
|
-
r.value.some((x) => x.name ===
|
|
800
|
+
if ((y === "all" || y === "searchMap") && ((b = n.value) == null || b.forEach((f) => c.push(f)), c.forEach((f) => {
|
|
801
|
+
r.value.some((x) => x.name === f.name) ? r.value = r.value.map((x) => x.name === f.name ? {
|
|
802
802
|
...x,
|
|
803
|
-
...
|
|
804
|
-
} : x) : r.value.push(
|
|
805
|
-
})), (y === "all" || y === "columns") && ((
|
|
806
|
-
|
|
807
|
-
}), c.forEach((
|
|
808
|
-
r.value.some((x) => x.name ===
|
|
803
|
+
...f
|
|
804
|
+
} : x) : r.value.push(f);
|
|
805
|
+
})), (y === "all" || y === "columns") && ((d = o.value) != null && d.length) && (o.value && o.value.forEach((f) => {
|
|
806
|
+
f.searchConfig && c.push(f.searchConfig);
|
|
807
|
+
}), c.forEach((f) => {
|
|
808
|
+
r.value.some((x) => x.name === f.name) ? r.value = r.value.map((x) => x.name === f.name ? {
|
|
809
809
|
...x,
|
|
810
|
-
...
|
|
811
|
-
} : x) : r.value.push(
|
|
810
|
+
...f
|
|
811
|
+
} : x) : r.value.push(f);
|
|
812
812
|
})), y === "all" || y === "searchMap" || y === "columns") {
|
|
813
813
|
u({ current: 1 });
|
|
814
|
-
const
|
|
815
|
-
Object.assign(s, { ...
|
|
816
|
-
for (const x in
|
|
817
|
-
l[x] || (l[x] =
|
|
814
|
+
const f = Pa(c);
|
|
815
|
+
Object.assign(s, { ...f });
|
|
816
|
+
for (const x in f)
|
|
817
|
+
l[x] || (l[x] = f[x]);
|
|
818
818
|
}
|
|
819
819
|
(y === "all" || y === "params") && !w.value && (u({ current: 1 }), Object.assign(l, t.value));
|
|
820
820
|
};
|
|
@@ -824,34 +824,34 @@ function Ba({ search: e, searchMap: n, params: t, columns: o, setPagination: u }
|
|
|
824
824
|
return { formDataRef: r, formParamsRef: l, defaultParamsRef: s, setFormParams: g };
|
|
825
825
|
}
|
|
826
826
|
function Da({ columns: e, columnsState: n, changeColumns: t }) {
|
|
827
|
-
const o =
|
|
827
|
+
const o = P(void 0), u = de({}), l = de({}), s = de({}), r = P([]);
|
|
828
828
|
X(() => e.value, () => {
|
|
829
829
|
var g;
|
|
830
|
-
(g =
|
|
831
|
-
const
|
|
832
|
-
|
|
830
|
+
(g = v(e)) == null || g.forEach(({ show: y, key: c, fixed: b }, d) => {
|
|
831
|
+
const f = ot(c, d);
|
|
832
|
+
f && (s[f] = { show: y === void 0 ? !0 : y, fixed: b });
|
|
833
833
|
});
|
|
834
834
|
}, {
|
|
835
835
|
deep: !0,
|
|
836
836
|
immediate: !0
|
|
837
837
|
}), X(() => e.value, () => {
|
|
838
|
-
const g =
|
|
839
|
-
|
|
838
|
+
const g = v(e).map((y) => y.key);
|
|
839
|
+
m(g);
|
|
840
840
|
}, {
|
|
841
841
|
deep: !0,
|
|
842
842
|
immediate: !0
|
|
843
843
|
}), he(() => {
|
|
844
844
|
var y;
|
|
845
845
|
const g = {
|
|
846
|
-
...(y =
|
|
847
|
-
...
|
|
846
|
+
...(y = v(n)) == null ? void 0 : y.value,
|
|
847
|
+
...v(s)
|
|
848
848
|
};
|
|
849
849
|
Object.assign(u, g), Object.assign(l, g);
|
|
850
850
|
});
|
|
851
851
|
function w(g, y) {
|
|
852
852
|
o.value = y, Object.assign(u, g), t == null || t(u, y === "fixed");
|
|
853
853
|
}
|
|
854
|
-
function
|
|
854
|
+
function m(g) {
|
|
855
855
|
r.value = g;
|
|
856
856
|
}
|
|
857
857
|
return {
|
|
@@ -860,10 +860,10 @@ function Da({ columns: e, columnsState: n, changeColumns: t }) {
|
|
|
860
860
|
setColumnsMap: w,
|
|
861
861
|
sortKeyColumns: r,
|
|
862
862
|
cacheColumnsMap: l,
|
|
863
|
-
setSortKeyColumns:
|
|
863
|
+
setSortKeyColumns: m
|
|
864
864
|
};
|
|
865
865
|
}
|
|
866
|
-
function
|
|
866
|
+
function Ea(e) {
|
|
867
867
|
const n = S(() => e.draggabled), t = S(() => e.neverScroll), o = S(() => e.autoScroll);
|
|
868
868
|
return {
|
|
869
869
|
draggabled: n,
|
|
@@ -871,8 +871,8 @@ function Ma(e) {
|
|
|
871
871
|
autoScroll: o
|
|
872
872
|
};
|
|
873
873
|
}
|
|
874
|
-
function
|
|
875
|
-
const s =
|
|
874
|
+
function Ma({ scroll: e, columns: n, breakpoint: t, draggabled: o, autoScroll: u, neverScroll: l }) {
|
|
875
|
+
const s = P([]), r = P([]);
|
|
876
876
|
X([
|
|
877
877
|
() => e.value,
|
|
878
878
|
() => n.value,
|
|
@@ -881,61 +881,61 @@ function Na({ scroll: e, columns: n, breakpoint: t, draggabled: o, autoScroll: u
|
|
|
881
881
|
() => u.value,
|
|
882
882
|
() => l.value
|
|
883
883
|
], () => {
|
|
884
|
-
s.value = J(g(
|
|
884
|
+
s.value = J(g(v(n))), r.value = J(g(v(n)));
|
|
885
885
|
}, {
|
|
886
886
|
deep: !0,
|
|
887
887
|
immediate: !0
|
|
888
888
|
});
|
|
889
889
|
const w = S(() => {
|
|
890
|
-
const
|
|
890
|
+
const d = m(v(s).filter(($) => $.fixed === "left")), f = m(v(s).filter(($) => $.fixed !== "left" && $.fixed !== "right")), x = m(v(s).filter(($) => $.fixed === "right"));
|
|
891
891
|
return [
|
|
892
|
-
...m,
|
|
893
892
|
...d,
|
|
893
|
+
...f,
|
|
894
894
|
...x
|
|
895
895
|
];
|
|
896
896
|
});
|
|
897
|
-
function
|
|
898
|
-
return
|
|
897
|
+
function m(d) {
|
|
898
|
+
return d.sort((f, x) => qt(f, x, "order", 0));
|
|
899
899
|
}
|
|
900
|
-
function g(
|
|
901
|
-
return J(
|
|
900
|
+
function g(d) {
|
|
901
|
+
return J(d).map((f, x) => {
|
|
902
902
|
var $;
|
|
903
|
-
if (
|
|
904
|
-
return
|
|
905
|
-
if (
|
|
906
|
-
if (($ =
|
|
907
|
-
|
|
903
|
+
if (f.dataIndex === "action" || x === d.length - 1 ? f.resizable = !1 : f.resizable = te(f.resizable) ? f.resizable : !!(ut(f.width) && v(o)), !f.width || v(l))
|
|
904
|
+
return f;
|
|
905
|
+
if (f.dataIndex === "action" && v(u))
|
|
906
|
+
if (($ = v(e)) != null && $.x || !v(t))
|
|
907
|
+
f.width = f.width || 100, f.fixed = "right";
|
|
908
908
|
else {
|
|
909
|
-
const T =
|
|
910
|
-
|
|
909
|
+
const T = v(n).find((B) => B.dataIndex === f.dataIndex);
|
|
910
|
+
f.width = (T == null ? void 0 : T.width) || "", f.fixed = T == null ? void 0 : T.fixed;
|
|
911
911
|
}
|
|
912
|
-
return
|
|
912
|
+
return f;
|
|
913
913
|
});
|
|
914
914
|
}
|
|
915
|
-
function y(
|
|
916
|
-
s.value = s.value.map((x) => (x.uuid ===
|
|
915
|
+
function y(d, f) {
|
|
916
|
+
s.value = s.value.map((x) => (x.uuid === f.uuid && (x.width = d), x));
|
|
917
917
|
}
|
|
918
|
-
function c(
|
|
919
|
-
if (
|
|
918
|
+
function c(d) {
|
|
919
|
+
if (d.length <= 0) {
|
|
920
920
|
s.value = [];
|
|
921
921
|
return;
|
|
922
922
|
}
|
|
923
|
-
nt(g(J(
|
|
923
|
+
nt(g(J(d)), s.value) || (s.value = g(J(d)));
|
|
924
924
|
}
|
|
925
|
-
function b(
|
|
926
|
-
let
|
|
927
|
-
|
|
928
|
-
var T,
|
|
925
|
+
function b(d) {
|
|
926
|
+
let f = J(n.value);
|
|
927
|
+
f = f.map((x) => {
|
|
928
|
+
var T, B, D;
|
|
929
929
|
const $ = x.key ? {
|
|
930
|
-
show: (T =
|
|
931
|
-
fixed: (
|
|
932
|
-
order: (D =
|
|
930
|
+
show: (T = d[x.key]) == null ? void 0 : T.show,
|
|
931
|
+
fixed: (B = d[x.key]) == null ? void 0 : B.fixed,
|
|
932
|
+
order: (D = d[x.key]) == null ? void 0 : D.order
|
|
933
933
|
} : {};
|
|
934
934
|
return {
|
|
935
935
|
...x,
|
|
936
936
|
...$
|
|
937
937
|
};
|
|
938
|
-
}), c(
|
|
938
|
+
}), c(f);
|
|
939
939
|
}
|
|
940
940
|
return {
|
|
941
941
|
breakpoint: t,
|
|
@@ -946,7 +946,7 @@ function Na({ scroll: e, columns: n, breakpoint: t, draggabled: o, autoScroll: u
|
|
|
946
946
|
resizeColumnWidth: y
|
|
947
947
|
};
|
|
948
948
|
}
|
|
949
|
-
function
|
|
949
|
+
function Na(e) {
|
|
950
950
|
const n = S(() => e.scroll), t = S(() => e.autoScroll), o = S(() => e.modalScroll), u = S(() => e.neverScroll), l = S(() => e.rowSelection), s = S(() => e.scrollBreakpoint);
|
|
951
951
|
return {
|
|
952
952
|
scroll: n,
|
|
@@ -957,29 +957,29 @@ function ja(e) {
|
|
|
957
957
|
scrollBreakpoint: s
|
|
958
958
|
};
|
|
959
959
|
}
|
|
960
|
-
function
|
|
961
|
-
const
|
|
962
|
-
var c, b,
|
|
963
|
-
return
|
|
960
|
+
function ja({ scroll: e, columns: n, autoScroll: t, modalScroll: o, neverScroll: u, rowSelection: l, screens: s, innerWidth: r, scrollBreakpoint: w }) {
|
|
961
|
+
const m = S(() => {
|
|
962
|
+
var c, b, d;
|
|
963
|
+
return v(w) ? ut(v(w)) ? r.value > v(w) : Ut(v(w)) ? (c = s.value) == null ? void 0 : c[v(w)] : (b = s.value) == null ? void 0 : b.xl : (d = s.value) == null ? void 0 : d.xl;
|
|
964
964
|
}), g = S(() => {
|
|
965
965
|
let c = 0;
|
|
966
|
-
const b =
|
|
967
|
-
|
|
966
|
+
const b = v(l) ? 60 : 0, d = 150, f = J(v(n));
|
|
967
|
+
f.forEach((T) => {
|
|
968
968
|
c += Number.parseInt(T.width) || 0;
|
|
969
969
|
});
|
|
970
|
-
const $ =
|
|
971
|
-
return $ !== 0 && (c += $ *
|
|
970
|
+
const $ = f.filter((T) => !Reflect.has(T, "width")).length;
|
|
971
|
+
return $ !== 0 && (c += $ * d), b && (c += b), c;
|
|
972
972
|
});
|
|
973
973
|
return { getScrollRef: S(() => {
|
|
974
974
|
var c, b;
|
|
975
|
-
return
|
|
976
|
-
y: ((c =
|
|
977
|
-
} :
|
|
978
|
-
}), breakpoint:
|
|
975
|
+
return v(u) ? {} : v(e) && Object.keys(v(e)).length ? v(e) : v(o) ? {
|
|
976
|
+
y: ((c = v(e)) == null ? void 0 : c.y) || ((b = s.value) != null && b.xl ? 400 : 235)
|
|
977
|
+
} : v(t) ? m.value ? {} : te(m.value) ? { x: v(g) } : {} : {};
|
|
978
|
+
}), breakpoint: m };
|
|
979
979
|
}
|
|
980
|
-
const ft = Symbol("table-context"),
|
|
980
|
+
const ft = Symbol("table-context"), ka = (e = Symbol(), n) => At(e, n || {}), za = (e) => {
|
|
981
981
|
Kt(ft, e);
|
|
982
|
-
}, ie = (e) =>
|
|
982
|
+
}, ie = (e) => ka(ft, e);
|
|
983
983
|
function Ka(e, n) {
|
|
984
984
|
const t = de({});
|
|
985
985
|
he(() => {
|
|
@@ -1004,9 +1004,9 @@ function Ka(e, n) {
|
|
|
1004
1004
|
changeFormState: u
|
|
1005
1005
|
};
|
|
1006
1006
|
}
|
|
1007
|
-
const
|
|
1007
|
+
const Aa = (e) => ({
|
|
1008
1008
|
[`${e.componentCls}-form`]: {
|
|
1009
|
-
|
|
1009
|
+
"&-collapse-button": {
|
|
1010
1010
|
display: "flex",
|
|
1011
1011
|
alignItems: "center",
|
|
1012
1012
|
height: 32,
|
|
@@ -1017,7 +1017,7 @@ const Ya = (e) => ({
|
|
|
1017
1017
|
lineHeight: 1.5,
|
|
1018
1018
|
verticalAlign: "top",
|
|
1019
1019
|
listStyle: "none",
|
|
1020
|
-
|
|
1020
|
+
".action": {
|
|
1021
1021
|
marginLeft: 2
|
|
1022
1022
|
}
|
|
1023
1023
|
},
|
|
@@ -1032,9 +1032,9 @@ const Ya = (e) => ({
|
|
|
1032
1032
|
}
|
|
1033
1033
|
}
|
|
1034
1034
|
}), {
|
|
1035
|
-
useBreakpoint:
|
|
1035
|
+
useBreakpoint: Ya
|
|
1036
1036
|
} = He, {
|
|
1037
|
-
MonthPicker:
|
|
1037
|
+
MonthPicker: La,
|
|
1038
1038
|
RangePicker: Va
|
|
1039
1039
|
} = rt, ht = /* @__PURE__ */ ae({
|
|
1040
1040
|
name: "ProTableForm",
|
|
@@ -1064,11 +1064,11 @@ const Ya = (e) => ({
|
|
|
1064
1064
|
const {
|
|
1065
1065
|
wrapSSR: u,
|
|
1066
1066
|
hashId: l
|
|
1067
|
-
} =
|
|
1067
|
+
} = Be("ProTableForm", [Aa], e.prefixCls), s = Ya(), {
|
|
1068
1068
|
formState: r,
|
|
1069
1069
|
resetFormState: w,
|
|
1070
|
-
changeFormState:
|
|
1071
|
-
} = Ka(e.defaultParams || {}, e.searchMap || []), g =
|
|
1070
|
+
changeFormState: m
|
|
1071
|
+
} = Ka(e.defaultParams || {}, e.searchMap || []), g = P(!1), y = S(() => {
|
|
1072
1072
|
var a;
|
|
1073
1073
|
return !!((a = e.search) != null && a.showSearch);
|
|
1074
1074
|
}), c = S(() => {
|
|
@@ -1092,9 +1092,9 @@ const Ya = (e) => ({
|
|
|
1092
1092
|
}, {
|
|
1093
1093
|
value: "xs",
|
|
1094
1094
|
span: 1
|
|
1095
|
-
}],
|
|
1095
|
+
}], d = S(() => {
|
|
1096
1096
|
var a;
|
|
1097
|
-
return
|
|
1097
|
+
return f((a = e.search) == null ? void 0 : a.span);
|
|
1098
1098
|
});
|
|
1099
1099
|
X(() => {
|
|
1100
1100
|
var a;
|
|
@@ -1102,7 +1102,7 @@ const Ya = (e) => ({
|
|
|
1102
1102
|
}, (a) => {
|
|
1103
1103
|
g.value = g.value || !!a;
|
|
1104
1104
|
});
|
|
1105
|
-
const
|
|
1105
|
+
const f = (a) => {
|
|
1106
1106
|
let p = 4;
|
|
1107
1107
|
for (let I = 0; I < b.length; I += 1) {
|
|
1108
1108
|
const F = b[I].value;
|
|
@@ -1121,48 +1121,48 @@ const Ya = (e) => ({
|
|
|
1121
1121
|
...I,
|
|
1122
1122
|
marginRight: "2%"
|
|
1123
1123
|
}, T = (a, p) => {
|
|
1124
|
-
var I, F,
|
|
1124
|
+
var I, F, O;
|
|
1125
1125
|
switch (p.valueType) {
|
|
1126
1126
|
case "text":
|
|
1127
|
-
|
|
1127
|
+
m(p.name || "", a || p.initialValue || "");
|
|
1128
1128
|
break;
|
|
1129
1129
|
case "select":
|
|
1130
|
-
|
|
1130
|
+
m(p.name || "", a || a === 0 ? a : p.initialValue || void 0);
|
|
1131
1131
|
break;
|
|
1132
1132
|
case "treeSelect":
|
|
1133
|
-
|
|
1133
|
+
m(p.name || "", a || a === 0 ? a : p.initialValue || ((I = p.field) != null && I.treeCheckable || (F = p.field) != null && F.multiple ? [] : null));
|
|
1134
1134
|
break;
|
|
1135
1135
|
case "date":
|
|
1136
|
-
|
|
1136
|
+
m(p.name || "", a ? _(a).format(p.valueFormat || "YYYY-MM-DD") : p.initialValue || null);
|
|
1137
1137
|
break;
|
|
1138
1138
|
case "dateMonth":
|
|
1139
|
-
|
|
1139
|
+
m(p.name || "", a ? _(a).format("YYYY-MM") : p.initialValue || null);
|
|
1140
1140
|
break;
|
|
1141
1141
|
case "dateRange":
|
|
1142
|
-
|
|
1142
|
+
m(p.name || "", a && a.length > 0 ? [_(a[0]).format(p.valueFormat || "YYYY-MM-DD"), _(a[1]).format(p.valueFormat || "YYYY-MM-DD")] : p.initialValue || null);
|
|
1143
1143
|
break;
|
|
1144
1144
|
case "time":
|
|
1145
|
-
|
|
1145
|
+
m(p.name || "", a ? _(a).format(p.valueFormat || "HH:mm:ss") : p.initialValue || null);
|
|
1146
1146
|
break;
|
|
1147
1147
|
}
|
|
1148
|
-
(
|
|
1149
|
-
},
|
|
1150
|
-
const a = J(r), p = e.searchMap.find((
|
|
1151
|
-
return p && (a[p.name] = r[p.name] || p.initialValue || ""), I && (a[I.rangeStartName || "start"] = a[I.name] ? a[I.name][0] : "", a[I.rangeEndName || "end"] = a[I.name] ? a[I.name][1] : "", delete a[I.name]), F && (Ke(r[F.name]) && (a[F.name] = r[F.name].length ? r[F.name].map((
|
|
1148
|
+
(O = e.search) != null && O.showSearch || p.valueType === "text" || (p.valueType === "treeSelect" || p.valueType, D());
|
|
1149
|
+
}, B = () => {
|
|
1150
|
+
const a = J(r), p = e.searchMap.find((O) => O.valueType === "text") || "", I = e.searchMap.find((O) => O.valueType === "dateRange") || "", F = e.searchMap.find((O) => O.valueType === "treeSelect") || "";
|
|
1151
|
+
return p && (a[p.name] = r[p.name] || p.initialValue || ""), I && (a[I.rangeStartName || "start"] = a[I.name] ? a[I.name][0] : "", a[I.rangeEndName || "end"] = a[I.name] ? a[I.name][1] : "", delete a[I.name]), F && (Ke(r[F.name]) && (a[F.name] = r[F.name].length ? r[F.name].map((O) => O[F.valueKey === "text" ? "label" : "value"]).join() : ""), F && Ke(a[F.name]) && (a[F.name] = a[F.name].length ? a[F.name].map((O) => O[F.valueKey === "text" ? "label" : "value"]) : "")), a;
|
|
1152
1152
|
}, D = (a = !1, p) => {
|
|
1153
|
-
|
|
1154
|
-
(!y.value || a) && n("search",
|
|
1153
|
+
Yt(() => {
|
|
1154
|
+
(!y.value || a) && n("search", B(), !!p);
|
|
1155
1155
|
});
|
|
1156
|
-
},
|
|
1156
|
+
}, A = (a = !0) => {
|
|
1157
1157
|
w(), D(!0, a);
|
|
1158
1158
|
};
|
|
1159
1159
|
o({
|
|
1160
|
-
getFormState: () =>
|
|
1161
|
-
resetForm:
|
|
1160
|
+
getFormState: () => B(),
|
|
1161
|
+
resetForm: A
|
|
1162
1162
|
});
|
|
1163
|
-
const
|
|
1163
|
+
const N = () => (y.value || c.value) && i(oe, null, {
|
|
1164
1164
|
default: () => [c.value && i(tt, {
|
|
1165
|
-
onClick: () =>
|
|
1165
|
+
onClick: () => A()
|
|
1166
1166
|
}, {
|
|
1167
1167
|
default: () => {
|
|
1168
1168
|
var a;
|
|
@@ -1178,7 +1178,7 @@ const Ya = (e) => ({
|
|
|
1178
1178
|
return [((a = e.search) == null ? void 0 : a.searchText) || "查询"];
|
|
1179
1179
|
}
|
|
1180
1180
|
})]
|
|
1181
|
-
}),
|
|
1181
|
+
}), Y = ({
|
|
1182
1182
|
formItemStyle: a,
|
|
1183
1183
|
advanced: p,
|
|
1184
1184
|
showAdvanced: I = !0
|
|
@@ -1189,14 +1189,14 @@ const Ya = (e) => ({
|
|
|
1189
1189
|
size: 16
|
|
1190
1190
|
}, {
|
|
1191
1191
|
default: () => {
|
|
1192
|
-
var F,
|
|
1193
|
-
return [
|
|
1192
|
+
var F, O;
|
|
1193
|
+
return [N(), I && i("span", {
|
|
1194
1194
|
class: `${e.prefixCls}-a ${l.value}`,
|
|
1195
1195
|
onClick: () => x(!p)
|
|
1196
|
-
}, [p ? "收起" : "展开", (F = e.search) != null && F.collapseRender ? (
|
|
1196
|
+
}, [p ? "收起" : "展开", (F = e.search) != null && F.collapseRender ? (O = e.search) == null ? void 0 : O.collapseRender() : p ? i(da, null, null) : i(fa, null, null)])];
|
|
1197
1197
|
}
|
|
1198
1198
|
})]), G = (a) => {
|
|
1199
|
-
var F,
|
|
1199
|
+
var F, O;
|
|
1200
1200
|
let p;
|
|
1201
1201
|
const I = y.value ? at : at.Search;
|
|
1202
1202
|
switch (a.valueType) {
|
|
@@ -1208,8 +1208,8 @@ const Ya = (e) => ({
|
|
|
1208
1208
|
value: r[a.name],
|
|
1209
1209
|
placeholder: a.placeholder || "请输入",
|
|
1210
1210
|
allowClear: a.allowClear || a.allowClear === !1 ? a.allowClear : !0,
|
|
1211
|
-
onChange: (
|
|
1212
|
-
onSearch: (
|
|
1211
|
+
onChange: (h) => T(h.target.value, a),
|
|
1212
|
+
onSearch: (h) => D()
|
|
1213
1213
|
}, a.field || {}), null);
|
|
1214
1214
|
break;
|
|
1215
1215
|
case "select":
|
|
@@ -1222,14 +1222,14 @@ const Ya = (e) => ({
|
|
|
1222
1222
|
placeholder: a.placeholder || "请选择",
|
|
1223
1223
|
showSearch: a.showSearch,
|
|
1224
1224
|
allowClear: a.allowClear || a.allowClear === !1 ? a.allowClear : !0,
|
|
1225
|
-
getPopupContainer: (
|
|
1226
|
-
notFoundContent: a.loading === void 0 ? void 0 : a.loading ? i(
|
|
1225
|
+
getPopupContainer: (h) => h && h.parentNode ? h.parentNode : h,
|
|
1226
|
+
notFoundContent: a.loading === void 0 ? void 0 : a.loading ? i(Ye, {
|
|
1227
1227
|
size: "small"
|
|
1228
1228
|
}, null) : void 0,
|
|
1229
|
-
onChange: (
|
|
1230
|
-
options: (F = a == null ? void 0 : a.valueEnum) == null ? void 0 : F.map((
|
|
1231
|
-
label:
|
|
1232
|
-
value:
|
|
1229
|
+
onChange: (h) => T(h, a),
|
|
1230
|
+
options: (F = a == null ? void 0 : a.valueEnum) == null ? void 0 : F.map((h) => ({
|
|
1231
|
+
label: h.text,
|
|
1232
|
+
value: h.value
|
|
1233
1233
|
}))
|
|
1234
1234
|
}, a.field || {}), null);
|
|
1235
1235
|
break;
|
|
@@ -1242,11 +1242,11 @@ const Ya = (e) => ({
|
|
|
1242
1242
|
placeholder: a.placeholder || "请选择",
|
|
1243
1243
|
allowClear: a.allowClear || a.allowClear === !1 ? a.allowClear : !0,
|
|
1244
1244
|
treeData: a.valueEnum,
|
|
1245
|
-
getPopupContainer: (
|
|
1246
|
-
notFoundContent: a.loading === void 0 ? void 0 : a.loading ? i(
|
|
1245
|
+
getPopupContainer: (h) => h && h.parentNode ? h.parentNode : h,
|
|
1246
|
+
notFoundContent: a.loading === void 0 ? void 0 : a.loading ? i(Ye, {
|
|
1247
1247
|
size: "small"
|
|
1248
1248
|
}, null) : void 0,
|
|
1249
|
-
onChange: (
|
|
1249
|
+
onChange: (h) => T(h, a)
|
|
1250
1250
|
}, a.field || {}), null);
|
|
1251
1251
|
break;
|
|
1252
1252
|
case "date":
|
|
@@ -1255,24 +1255,24 @@ const Ya = (e) => ({
|
|
|
1255
1255
|
width: "100%"
|
|
1256
1256
|
},
|
|
1257
1257
|
value: r[a.name] ? _(r[a.name], a.valueFormat || "YYYY-MM-DD") : void 0,
|
|
1258
|
-
getPopupContainer: (
|
|
1258
|
+
getPopupContainer: (h) => h && h.parentNode ? h.parentNode : h,
|
|
1259
1259
|
placeholder: a.placeholder || "请选择",
|
|
1260
1260
|
allowClear: a.allowClear || a.allowClear === !1 ? a.allowClear : !0,
|
|
1261
1261
|
format: a.valueFormat || "YYYY-MM-DD",
|
|
1262
1262
|
showTime: a.showTime,
|
|
1263
1263
|
showToday: a.showToday || !0,
|
|
1264
|
-
onChange: (
|
|
1264
|
+
onChange: (h) => T(h, a)
|
|
1265
1265
|
}, a.field || {}), null);
|
|
1266
1266
|
break;
|
|
1267
1267
|
case "dateMonth":
|
|
1268
|
-
p = i(
|
|
1268
|
+
p = i(La, U({
|
|
1269
1269
|
style: {
|
|
1270
1270
|
width: "100%"
|
|
1271
1271
|
},
|
|
1272
1272
|
value: r[a.name] ? _(r[a.name], a.valueFormat || "YYYY-MM") : void 0,
|
|
1273
|
-
getPopupContainer: (
|
|
1273
|
+
getPopupContainer: (h) => h && h.parentNode ? h.parentNode : h,
|
|
1274
1274
|
placeholder: a.placeholder || "请选择",
|
|
1275
|
-
onChange: (
|
|
1275
|
+
onChange: (h) => T(h, a)
|
|
1276
1276
|
}, a.field || {}), null);
|
|
1277
1277
|
break;
|
|
1278
1278
|
case "dateRange":
|
|
@@ -1280,12 +1280,12 @@ const Ya = (e) => ({
|
|
|
1280
1280
|
style: {
|
|
1281
1281
|
width: "100%"
|
|
1282
1282
|
},
|
|
1283
|
-
value: (
|
|
1284
|
-
getPopupContainer: (
|
|
1283
|
+
value: (O = r[a.name]) != null && O.length ? [_(r[a.name][0], a.valueFormat || "YYYY-MM-DD HH:mm:ss"), _(r[a.name][1], a.valueFormat || "YYYY-MM-DD HH:mm:ss")] : void 0,
|
|
1284
|
+
getPopupContainer: (h) => h && h.parentNode ? h.parentNode : h,
|
|
1285
1285
|
placeholder: a.placeholder || ["开始日期", "结束日期"],
|
|
1286
1286
|
format: a.valueFormat || "YYYY-MM-DD HH:mm:ss",
|
|
1287
1287
|
showTime: a.showTime,
|
|
1288
|
-
onChange: (
|
|
1288
|
+
onChange: (h) => T(h, a)
|
|
1289
1289
|
}, a.field || {}), null);
|
|
1290
1290
|
break;
|
|
1291
1291
|
case "time":
|
|
@@ -1294,17 +1294,17 @@ const Ya = (e) => ({
|
|
|
1294
1294
|
width: "100%"
|
|
1295
1295
|
},
|
|
1296
1296
|
value: r[a.name] ? _(r[a.name], a.valueFormat || "HH:mm:ss") : void 0,
|
|
1297
|
-
getPopupContainer: (
|
|
1297
|
+
getPopupContainer: (h) => h && h.parentNode ? h.parentNode : h,
|
|
1298
1298
|
placeholder: a.placeholder || "请选择",
|
|
1299
1299
|
allowClear: a.allowClear || a.allowClear === !1 ? a.allowClear : !0,
|
|
1300
1300
|
use12Hours: a.use12Hours,
|
|
1301
1301
|
format: a.valueFormat || "HH:mm:ss",
|
|
1302
|
-
onChange: (
|
|
1302
|
+
onChange: (h) => T(h, a)
|
|
1303
1303
|
}, a.field || {}), null);
|
|
1304
1304
|
break;
|
|
1305
1305
|
}
|
|
1306
1306
|
return p;
|
|
1307
|
-
},
|
|
1307
|
+
}, E = ({
|
|
1308
1308
|
formItemStyle: a,
|
|
1309
1309
|
item: p
|
|
1310
1310
|
}) => i("div", {
|
|
@@ -1316,32 +1316,32 @@ const Ya = (e) => ({
|
|
|
1316
1316
|
var p;
|
|
1317
1317
|
const a = [...e.searchMap, ...((p = t.default) == null ? void 0 : p.call(t)) || []];
|
|
1318
1318
|
return a.map((I, F) => {
|
|
1319
|
-
const
|
|
1320
|
-
width: `${(100 - (
|
|
1321
|
-
},
|
|
1322
|
-
return a.length <
|
|
1323
|
-
formItemStyle:
|
|
1319
|
+
const O = {
|
|
1320
|
+
width: `${(100 - (d.value - 1) * 2) / d.value}%`
|
|
1321
|
+
}, h = $(F, d.value, O);
|
|
1322
|
+
return a.length < d.value || g.value ? i(Ie, null, [E({
|
|
1323
|
+
formItemStyle: h,
|
|
1324
1324
|
item: I
|
|
1325
|
-
}), F === a.length - 1 &&
|
|
1325
|
+
}), F === a.length - 1 && Y({
|
|
1326
1326
|
formItemStyle: {
|
|
1327
1327
|
flex: 1,
|
|
1328
1328
|
justifyContent: "flex-end"
|
|
1329
1329
|
},
|
|
1330
1330
|
advanced: g.value,
|
|
1331
1331
|
showAdvanced: g.value
|
|
1332
|
-
})]) : i(Ie, null, [F <
|
|
1333
|
-
formItemStyle:
|
|
1332
|
+
})]) : i(Ie, null, [F < d.value - 1 && E({
|
|
1333
|
+
formItemStyle: h,
|
|
1334
1334
|
item: I
|
|
1335
|
-
}), F ===
|
|
1336
|
-
formItemStyle:
|
|
1335
|
+
}), F === d.value - 1 && (d.value - 1 === 0 || a.length === d.value) && E({
|
|
1336
|
+
formItemStyle: h,
|
|
1337
1337
|
item: I
|
|
1338
|
-
}), F ===
|
|
1338
|
+
}), F === d.value - 1 && a.length !== d.value && Y({
|
|
1339
1339
|
formItemStyle: {
|
|
1340
1340
|
flex: 1,
|
|
1341
1341
|
justifyContent: "flex-end"
|
|
1342
1342
|
},
|
|
1343
1343
|
advanced: !1,
|
|
1344
|
-
showAdvanced: a.length >=
|
|
1344
|
+
showAdvanced: a.length >= d.value
|
|
1345
1345
|
})]);
|
|
1346
1346
|
});
|
|
1347
1347
|
};
|
|
@@ -1350,15 +1350,15 @@ const Ya = (e) => ({
|
|
|
1350
1350
|
return u(i("div", {
|
|
1351
1351
|
class: {
|
|
1352
1352
|
[`${l.value}`]: !0,
|
|
1353
|
-
[`${
|
|
1353
|
+
[`${v(e.prefixCls)}-search`]: !0,
|
|
1354
1354
|
[`${(a = e.search) == null ? void 0 : a.className}`]: (p = e.search) == null ? void 0 : p.className
|
|
1355
1355
|
}
|
|
1356
1356
|
}, [i(et, {
|
|
1357
|
-
class: `${
|
|
1357
|
+
class: `${v(e.prefixCls)}-form ${l.value}`,
|
|
1358
1358
|
layout: "horizontal"
|
|
1359
1359
|
}, {
|
|
1360
1360
|
default: () => [i("div", {
|
|
1361
|
-
class: `${
|
|
1361
|
+
class: `${v(e.prefixCls)}-form-container ${l.value}`
|
|
1362
1362
|
}, [H()])]
|
|
1363
1363
|
})]));
|
|
1364
1364
|
};
|
|
@@ -1366,7 +1366,7 @@ const Ya = (e) => ({
|
|
|
1366
1366
|
});
|
|
1367
1367
|
ht.inheritAttrs = !1;
|
|
1368
1368
|
function Ha(e, n) {
|
|
1369
|
-
const t =
|
|
1369
|
+
const t = Le({}, e);
|
|
1370
1370
|
for (let o = 0; o < n.length; o += 1) {
|
|
1371
1371
|
const u = n[o];
|
|
1372
1372
|
delete t[u];
|
|
@@ -1374,7 +1374,7 @@ function Ha(e, n) {
|
|
|
1374
1374
|
return t;
|
|
1375
1375
|
}
|
|
1376
1376
|
const be = (e) => {
|
|
1377
|
-
const n =
|
|
1377
|
+
const n = P(null);
|
|
1378
1378
|
return n.value = e, (...t) => {
|
|
1379
1379
|
var o;
|
|
1380
1380
|
return (o = n.value) == null ? void 0 : o.call(n, ...t);
|
|
@@ -1382,13 +1382,13 @@ const be = (e) => {
|
|
|
1382
1382
|
}, Wa = (e) => ({
|
|
1383
1383
|
[`${e.componentCls}`]: {
|
|
1384
1384
|
width: "auto",
|
|
1385
|
-
|
|
1385
|
+
"&-title": {
|
|
1386
1386
|
display: "flex",
|
|
1387
1387
|
alignItems: "center",
|
|
1388
1388
|
justifyContent: "space-between",
|
|
1389
1389
|
height: 32
|
|
1390
1390
|
},
|
|
1391
|
-
|
|
1391
|
+
"&-overlay": {
|
|
1392
1392
|
[`${e.antCls}-popover-inner-content`]: {
|
|
1393
1393
|
width: "200px",
|
|
1394
1394
|
paddingBlock: 0,
|
|
@@ -1461,7 +1461,7 @@ const be = (e) => {
|
|
|
1461
1461
|
}
|
|
1462
1462
|
}
|
|
1463
1463
|
}
|
|
1464
|
-
}),
|
|
1464
|
+
}), Me = ({
|
|
1465
1465
|
title: e,
|
|
1466
1466
|
show: n,
|
|
1467
1467
|
treeKey: t,
|
|
@@ -1480,14 +1480,14 @@ const be = (e) => {
|
|
|
1480
1480
|
var r;
|
|
1481
1481
|
return [i("span", {
|
|
1482
1482
|
onClick: (w) => {
|
|
1483
|
-
var b,
|
|
1483
|
+
var b, d;
|
|
1484
1484
|
w.stopPropagation(), w.preventDefault();
|
|
1485
|
-
const
|
|
1486
|
-
if (typeof g.disable == "boolean" ? g.disable : (
|
|
1485
|
+
const m = ((b = v(l).find((f) => f.uuid === t)) == null ? void 0 : b.key) || "", g = (s == null ? void 0 : s.columnsMap[m]) || {};
|
|
1486
|
+
if (typeof g.disable == "boolean" ? g.disable : (d = g.disable) == null ? void 0 : d.icon)
|
|
1487
1487
|
return;
|
|
1488
1488
|
const c = {
|
|
1489
1489
|
...s == null ? void 0 : s.columnsMap,
|
|
1490
|
-
[
|
|
1490
|
+
[m]: {
|
|
1491
1491
|
...g,
|
|
1492
1492
|
fixed: o
|
|
1493
1493
|
}
|
|
@@ -1516,21 +1516,21 @@ const be = (e) => {
|
|
|
1516
1516
|
return () => {
|
|
1517
1517
|
const u = i("span", {
|
|
1518
1518
|
class: [`${e.className}-list-item-option`, e.hashId]
|
|
1519
|
-
}, [i(
|
|
1519
|
+
}, [i(Me, {
|
|
1520
1520
|
treeKey: e.treeKey || "",
|
|
1521
1521
|
fixed: "left",
|
|
1522
1522
|
title: "固定在列首",
|
|
1523
1523
|
show: e.fixed !== "left" && !o.value
|
|
1524
1524
|
}, {
|
|
1525
1525
|
default: () => [i(ha, null, null)]
|
|
1526
|
-
}), i(
|
|
1526
|
+
}), i(Me, {
|
|
1527
1527
|
treeKey: e.treeKey || "",
|
|
1528
1528
|
fixed: void 0,
|
|
1529
1529
|
title: "不固定",
|
|
1530
1530
|
show: !!e.fixed && !o.value
|
|
1531
1531
|
}, {
|
|
1532
1532
|
default: () => [i(va, null, null)]
|
|
1533
|
-
}), i(
|
|
1533
|
+
}), i(Me, {
|
|
1534
1534
|
treeKey: e.treeKey || "",
|
|
1535
1535
|
fixed: "right",
|
|
1536
1536
|
title: "固定在列尾",
|
|
@@ -1546,7 +1546,7 @@ const be = (e) => {
|
|
|
1546
1546
|
}, [e.title]), u]);
|
|
1547
1547
|
};
|
|
1548
1548
|
}
|
|
1549
|
-
}),
|
|
1549
|
+
}), Ne = /* @__PURE__ */ ae({
|
|
1550
1550
|
props: {
|
|
1551
1551
|
list: Array,
|
|
1552
1552
|
keys: Array,
|
|
@@ -1561,65 +1561,65 @@ const be = (e) => {
|
|
|
1561
1561
|
}
|
|
1562
1562
|
},
|
|
1563
1563
|
setup(e) {
|
|
1564
|
-
const n =
|
|
1564
|
+
const n = P(Ae().uuid(15)), t = S(() => e.list && e.list.length > 0), o = P([]), u = P([]), {
|
|
1565
1565
|
cacheColumns: l,
|
|
1566
1566
|
slots: s,
|
|
1567
1567
|
settingsAction: r
|
|
1568
1568
|
} = ie(), w = (c, b) => c.map(({
|
|
1569
|
-
key:
|
|
1570
|
-
children:
|
|
1569
|
+
key: d,
|
|
1570
|
+
children: f,
|
|
1571
1571
|
uuid: x,
|
|
1572
1572
|
...$
|
|
1573
1573
|
}) => {
|
|
1574
|
-
var
|
|
1575
|
-
const T = (r == null ? void 0 : r.columnsMap[
|
|
1574
|
+
var A;
|
|
1575
|
+
const T = (r == null ? void 0 : r.columnsMap[d || "null"]) || {
|
|
1576
1576
|
show: !0
|
|
1577
1577
|
};
|
|
1578
|
-
let
|
|
1579
|
-
T.show !== !1 && (b == null ? void 0 : b.show) !== !1 && !
|
|
1578
|
+
let B = !1;
|
|
1579
|
+
T.show !== !1 && (b == null ? void 0 : b.show) !== !1 && !f && (B = !0);
|
|
1580
1580
|
const D = {
|
|
1581
1581
|
key: x || "",
|
|
1582
1582
|
...Ha($, ["dataIndex"]),
|
|
1583
|
-
checked:
|
|
1583
|
+
checked: B,
|
|
1584
1584
|
selectable: !1,
|
|
1585
1585
|
disabled: T.disable === !0,
|
|
1586
|
-
disableCheckbox: typeof T.disable == "boolean" ? T.disable : (
|
|
1586
|
+
disableCheckbox: typeof T.disable == "boolean" ? T.disable : (A = T.disable) == null ? void 0 : A.checkbox,
|
|
1587
1587
|
isLeaf: !0
|
|
1588
1588
|
};
|
|
1589
|
-
return
|
|
1589
|
+
return f && (D.children = w(f, T)), D;
|
|
1590
1590
|
});
|
|
1591
1591
|
he(() => {
|
|
1592
1592
|
const c = w(e.list || []);
|
|
1593
|
-
o.value = c, u.value = c.filter((b) => b.checked).map((b) => b.key), (r == null ? void 0 : r.operationType.value) === "fixed" && (n.value =
|
|
1593
|
+
o.value = c, u.value = c.filter((b) => b.checked).map((b) => b.key), (r == null ? void 0 : r.operationType.value) === "fixed" && (n.value = Ae().uuid(15));
|
|
1594
1594
|
});
|
|
1595
|
-
const
|
|
1596
|
-
var
|
|
1597
|
-
const
|
|
1595
|
+
const m = be((c, b, d) => {
|
|
1596
|
+
var Y, G;
|
|
1597
|
+
const f = ((Y = v(l).find((E) => E.uuid === c)) == null ? void 0 : Y.key) || "", x = ((G = v(l).find((E) => E.uuid === b)) == null ? void 0 : G.key) || "", $ = {
|
|
1598
1598
|
...r == null ? void 0 : r.columnsMap
|
|
1599
|
-
}, T = [...r.sortKeyColumns.value],
|
|
1600
|
-
if (
|
|
1599
|
+
}, T = [...r.sortKeyColumns.value], B = T.findIndex((E) => E === f), D = T.findIndex((E) => E === x), A = d > B;
|
|
1600
|
+
if (B < 0)
|
|
1601
1601
|
return;
|
|
1602
|
-
const
|
|
1603
|
-
T.splice(
|
|
1604
|
-
$[
|
|
1605
|
-
...$[
|
|
1602
|
+
const N = T[B];
|
|
1603
|
+
T.splice(B, 1), d === 0 ? T.unshift(N) : T.splice(A ? D : D + 1, 0, N), T.forEach((E, H) => {
|
|
1604
|
+
$[E] = {
|
|
1605
|
+
...$[E] || {},
|
|
1606
1606
|
order: H
|
|
1607
1607
|
};
|
|
1608
1608
|
}), r == null || r.setColumnsMap($, "drop"), r == null || r.setSortKeyColumns(T);
|
|
1609
1609
|
}), g = be((c) => {
|
|
1610
1610
|
var T;
|
|
1611
|
-
const b = c.node.key,
|
|
1612
|
-
...(r == null ? void 0 : r.columnsMap[
|
|
1611
|
+
const b = c.node.key, d = ((T = v(l).find((B) => B.uuid === b)) == null ? void 0 : T.key) || "", x = {
|
|
1612
|
+
...(r == null ? void 0 : r.columnsMap[d]) || {}
|
|
1613
1613
|
};
|
|
1614
1614
|
x.show = c.checked;
|
|
1615
1615
|
const $ = {
|
|
1616
1616
|
...r == null ? void 0 : r.columnsMap,
|
|
1617
|
-
[
|
|
1617
|
+
[d]: x
|
|
1618
1618
|
};
|
|
1619
1619
|
r == null || r.setColumnsMap($, "show");
|
|
1620
1620
|
}), y = (c) => {
|
|
1621
|
-
const b =
|
|
1622
|
-
return c.title ||
|
|
1621
|
+
const b = v(l).find((d) => d.uuid === c.key);
|
|
1622
|
+
return c.title || Lt(s, "headerCell", {
|
|
1623
1623
|
title: b.title,
|
|
1624
1624
|
column: b
|
|
1625
1625
|
}, () => [b.title]);
|
|
@@ -1636,29 +1636,29 @@ const be = (e) => {
|
|
|
1636
1636
|
showLine: !1,
|
|
1637
1637
|
checkedKeys: u.value,
|
|
1638
1638
|
height: 280,
|
|
1639
|
-
onDrop: (
|
|
1640
|
-
const
|
|
1639
|
+
onDrop: (d) => {
|
|
1640
|
+
const f = d.node.key, x = d.dragNode.key, {
|
|
1641
1641
|
dropPosition: $,
|
|
1642
1642
|
dropToGap: T
|
|
1643
|
-
} =
|
|
1644
|
-
|
|
1643
|
+
} = d, B = $ === -1 || !T ? $ + 1 : $;
|
|
1644
|
+
m(x, f, B);
|
|
1645
1645
|
},
|
|
1646
|
-
onCheck: (
|
|
1646
|
+
onCheck: (d, f) => g(f),
|
|
1647
1647
|
treeData: o.value
|
|
1648
1648
|
}, {
|
|
1649
|
-
title: (
|
|
1649
|
+
title: (d) => {
|
|
1650
1650
|
var x;
|
|
1651
|
-
const
|
|
1652
|
-
...
|
|
1651
|
+
const f = {
|
|
1652
|
+
...d,
|
|
1653
1653
|
children: void 0,
|
|
1654
|
-
title: y(
|
|
1654
|
+
title: y(d),
|
|
1655
1655
|
autoScroll: (x = r == null ? void 0 : r.autoScroll) == null ? void 0 : x.value
|
|
1656
1656
|
};
|
|
1657
1657
|
return i(_a, U({
|
|
1658
1658
|
hashId: e.hashId,
|
|
1659
1659
|
className: e.className
|
|
1660
|
-
},
|
|
1661
|
-
treeKey:
|
|
1660
|
+
}, f, {
|
|
1661
|
+
treeKey: f.key
|
|
1662
1662
|
}), null);
|
|
1663
1663
|
}
|
|
1664
1664
|
})]) : null;
|
|
@@ -1674,25 +1674,25 @@ const be = (e) => {
|
|
|
1674
1674
|
setup(e) {
|
|
1675
1675
|
const {
|
|
1676
1676
|
columns: n
|
|
1677
|
-
} = ie(), t =
|
|
1677
|
+
} = ie(), t = P([]), o = P([]), u = P([]), l = P([]);
|
|
1678
1678
|
X(() => n.value, (w) => {
|
|
1679
|
-
t.value = [], o.value = [], u.value = [], w.forEach((
|
|
1680
|
-
if (
|
|
1679
|
+
t.value = [], o.value = [], u.value = [], w.forEach((m) => {
|
|
1680
|
+
if (m.hideInSetting)
|
|
1681
1681
|
return;
|
|
1682
1682
|
const {
|
|
1683
1683
|
fixed: g,
|
|
1684
1684
|
show: y,
|
|
1685
1685
|
uuid: c
|
|
1686
|
-
} =
|
|
1686
|
+
} = m;
|
|
1687
1687
|
if ((y || y === void 0) && c && l.value.push(c), g === "left") {
|
|
1688
|
-
o.value.push(
|
|
1688
|
+
o.value.push(m);
|
|
1689
1689
|
return;
|
|
1690
1690
|
}
|
|
1691
1691
|
if (g === "right") {
|
|
1692
|
-
t.value.push(
|
|
1692
|
+
t.value.push(m);
|
|
1693
1693
|
return;
|
|
1694
1694
|
}
|
|
1695
|
-
u.value.push(
|
|
1695
|
+
u.value.push(m);
|
|
1696
1696
|
});
|
|
1697
1697
|
}, {
|
|
1698
1698
|
immediate: !0
|
|
@@ -1704,7 +1704,7 @@ const be = (e) => {
|
|
|
1704
1704
|
[`${e.className}-list`]: !0,
|
|
1705
1705
|
[`${e.className}-list-group`]: s.value || r.value
|
|
1706
1706
|
}
|
|
1707
|
-
}, [i(
|
|
1707
|
+
}, [i(Ne, {
|
|
1708
1708
|
title: "固定在左侧",
|
|
1709
1709
|
list: o.value,
|
|
1710
1710
|
keys: l.value,
|
|
@@ -1712,7 +1712,7 @@ const be = (e) => {
|
|
|
1712
1712
|
draggable: e.draggable,
|
|
1713
1713
|
checkable: e.checkable,
|
|
1714
1714
|
className: e.className
|
|
1715
|
-
}, null), i(
|
|
1715
|
+
}, null), i(Ne, {
|
|
1716
1716
|
list: u.value,
|
|
1717
1717
|
keys: l.value,
|
|
1718
1718
|
hashId: e.hashId,
|
|
@@ -1721,7 +1721,7 @@ const be = (e) => {
|
|
|
1721
1721
|
title: "不固定",
|
|
1722
1722
|
showTitle: r.value || s.value,
|
|
1723
1723
|
className: e.className
|
|
1724
|
-
}, null), i(
|
|
1724
|
+
}, null), i(Ne, {
|
|
1725
1725
|
title: "固定在右侧",
|
|
1726
1726
|
list: t.value,
|
|
1727
1727
|
keys: l.value,
|
|
@@ -1751,19 +1751,19 @@ const be = (e) => {
|
|
|
1751
1751
|
}), {
|
|
1752
1752
|
wrapSSR: t,
|
|
1753
1753
|
hashId: o
|
|
1754
|
-
} =
|
|
1754
|
+
} = Be("ColumnSetting", [Wa], n), {
|
|
1755
1755
|
columns: u,
|
|
1756
1756
|
settingsAction: l
|
|
1757
1757
|
} = ie(), s = be((y = !0) => {
|
|
1758
|
-
const c = {}, b = (
|
|
1759
|
-
|
|
1760
|
-
key:
|
|
1758
|
+
const c = {}, b = (d) => {
|
|
1759
|
+
d.forEach(({
|
|
1760
|
+
key: f,
|
|
1761
1761
|
fixed: x,
|
|
1762
1762
|
index: $,
|
|
1763
1763
|
children: T
|
|
1764
1764
|
}) => {
|
|
1765
|
-
const
|
|
1766
|
-
|
|
1765
|
+
const B = ot(f, $);
|
|
1766
|
+
B && (c[B] = {
|
|
1767
1767
|
show: y,
|
|
1768
1768
|
fixed: x
|
|
1769
1769
|
}), T && b(T);
|
|
@@ -1774,17 +1774,17 @@ const be = (e) => {
|
|
|
1774
1774
|
y.target.checked ? s() : s(!1);
|
|
1775
1775
|
}), w = be(() => {
|
|
1776
1776
|
l == null || l.setColumnsMap(l == null ? void 0 : l.cacheColumnsMap, "fixed");
|
|
1777
|
-
}),
|
|
1777
|
+
}), m = S(() => (
|
|
1778
1778
|
// @ts-ignore
|
|
1779
1779
|
Object.values(l == null ? void 0 : l.columnsMap).filter((y) => !y || y.show === !1)
|
|
1780
|
-
)), g = S(() =>
|
|
1780
|
+
)), g = S(() => v(m).length > 0 && v(m).length !== u.value.length);
|
|
1781
1781
|
return () => t(i(aa, {
|
|
1782
1782
|
arrowPointAtCenter: !0,
|
|
1783
1783
|
title: i("div", {
|
|
1784
1784
|
class: [`${n}-title`, o.value]
|
|
1785
1785
|
}, [i(la, {
|
|
1786
1786
|
indeterminate: g.value,
|
|
1787
|
-
checked:
|
|
1787
|
+
checked: v(m).length === 0 && v(m).length !== u.value.length,
|
|
1788
1788
|
onChange: (y) => r(y)
|
|
1789
1789
|
}, {
|
|
1790
1790
|
default: () => [pe("列展示")]
|
|
@@ -1872,12 +1872,12 @@ const be = (e) => {
|
|
|
1872
1872
|
}, Xa = (e) => ({
|
|
1873
1873
|
[`${e.componentCls}`]: {
|
|
1874
1874
|
lineHeight: 1,
|
|
1875
|
-
|
|
1875
|
+
"&-container": {
|
|
1876
1876
|
display: "flex",
|
|
1877
1877
|
alignItems: "center",
|
|
1878
1878
|
justifyContent: "space-between",
|
|
1879
1879
|
paddingBottom: e.paddingMD,
|
|
1880
|
-
|
|
1880
|
+
"&-mobile": {
|
|
1881
1881
|
flexDirection: "column",
|
|
1882
1882
|
flexWrap: "wrap",
|
|
1883
1883
|
alignItems: "flex-start",
|
|
@@ -1891,7 +1891,7 @@ const be = (e) => {
|
|
|
1891
1891
|
}
|
|
1892
1892
|
}
|
|
1893
1893
|
},
|
|
1894
|
-
|
|
1894
|
+
"&-title": {
|
|
1895
1895
|
display: "flex",
|
|
1896
1896
|
alignItems: "center",
|
|
1897
1897
|
justifyContent: "flex-start",
|
|
@@ -1900,12 +1900,12 @@ const be = (e) => {
|
|
|
1900
1900
|
fontSize: e.fontSizeLG,
|
|
1901
1901
|
gap: 4
|
|
1902
1902
|
},
|
|
1903
|
-
|
|
1903
|
+
"&-left": {
|
|
1904
1904
|
display: "flex",
|
|
1905
1905
|
alignItems: "center",
|
|
1906
1906
|
justifyContent: "flex-start"
|
|
1907
1907
|
},
|
|
1908
|
-
|
|
1908
|
+
"&-right": {
|
|
1909
1909
|
display: "flex",
|
|
1910
1910
|
justifyContent: "flex-end"
|
|
1911
1911
|
}
|
|
@@ -1954,7 +1954,7 @@ const mt = /* @__PURE__ */ ae({
|
|
|
1954
1954
|
const {
|
|
1955
1955
|
wrapSSR: n,
|
|
1956
1956
|
hashId: t
|
|
1957
|
-
} =
|
|
1957
|
+
} = Be("ListToolBar", [Xa], e.prefixCls), o = Ja(), {
|
|
1958
1958
|
isMobile: u
|
|
1959
1959
|
} = ie(), l = S(() => {
|
|
1960
1960
|
var c;
|
|
@@ -1967,15 +1967,15 @@ const mt = /* @__PURE__ */ ae({
|
|
|
1967
1967
|
let c;
|
|
1968
1968
|
return Array.isArray(e.actions) ? ((b = e.actions) == null ? void 0 : b.length) < 1 ? null : i(oe, {
|
|
1969
1969
|
align: "center"
|
|
1970
|
-
}, lt(c = e.actions.map((
|
|
1971
|
-
key:
|
|
1972
|
-
...
|
|
1970
|
+
}, lt(c = e.actions.map((d, f) => Ce(d) ? Vt(d, {
|
|
1971
|
+
key: f,
|
|
1972
|
+
...d == null ? void 0 : d.props
|
|
1973
1973
|
}) : i("template", {
|
|
1974
|
-
key:
|
|
1975
|
-
}, [
|
|
1974
|
+
key: f
|
|
1975
|
+
}, [d]))) ? c : {
|
|
1976
1976
|
default: () => [c]
|
|
1977
1977
|
}) : e.actions;
|
|
1978
|
-
}),
|
|
1978
|
+
}), m = Fe(() => !l.value && s.value ? i("div", {
|
|
1979
1979
|
class: `${e.prefixCls}-left ${t.value}`
|
|
1980
1980
|
}, null) : r.value ? i(oe, {
|
|
1981
1981
|
class: `${e.prefixCls}-left ${t.value}`
|
|
@@ -2009,10 +2009,10 @@ const mt = /* @__PURE__ */ ae({
|
|
|
2009
2009
|
size: 12,
|
|
2010
2010
|
align: "center",
|
|
2011
2011
|
class: `${e.prefixCls}-setting-items`
|
|
2012
|
-
}, lt(c = e.settings.map((
|
|
2013
|
-
const x = Qa(
|
|
2012
|
+
}, lt(c = e.settings.map((d, f) => {
|
|
2013
|
+
const x = Qa(d);
|
|
2014
2014
|
return i("div", {
|
|
2015
|
-
key:
|
|
2015
|
+
key: f,
|
|
2016
2016
|
class: `${e.prefixCls}-setting-item`
|
|
2017
2017
|
}, [x]);
|
|
2018
2018
|
})) ? c : {
|
|
@@ -2030,8 +2030,8 @@ const mt = /* @__PURE__ */ ae({
|
|
|
2030
2030
|
};
|
|
2031
2031
|
return i("div", {
|
|
2032
2032
|
class: c
|
|
2033
|
-
}, [
|
|
2034
|
-
}, [() => u.value, () => l.value, () => s.value, () =>
|
|
2033
|
+
}, [m.value, g.value]);
|
|
2034
|
+
}, [() => u.value, () => l.value, () => s.value, () => m.value, () => e.prefixCls, () => g.value]);
|
|
2035
2035
|
return () => n(i("div", {
|
|
2036
2036
|
class: `${e.prefixCls} ${t.value}`
|
|
2037
2037
|
}, [y.value]));
|
|
@@ -2127,7 +2127,7 @@ const tl = {
|
|
|
2127
2127
|
optionsExtra: e.optionsExtra,
|
|
2128
2128
|
headerTitle: e.headerTitle,
|
|
2129
2129
|
actions: u,
|
|
2130
|
-
settings:
|
|
2130
|
+
settings: v(o),
|
|
2131
2131
|
titleTip: e.titleTip,
|
|
2132
2132
|
titleTipText: e.titleTipText
|
|
2133
2133
|
}, null);
|
|
@@ -2177,36 +2177,36 @@ function ol(e, n, t, o) {
|
|
|
2177
2177
|
}
|
|
2178
2178
|
return u;
|
|
2179
2179
|
}
|
|
2180
|
-
const
|
|
2181
|
-
|
|
2180
|
+
const je = {
|
|
2181
|
+
"&::-webkit-scrollbar": {
|
|
2182
2182
|
width: 4,
|
|
2183
2183
|
height: 4
|
|
2184
2184
|
},
|
|
2185
|
-
|
|
2185
|
+
"&::-webkit-scrollbar-thumb": {
|
|
2186
2186
|
backgroundColor: "#d2d4d6",
|
|
2187
2187
|
borderRadius: 2
|
|
2188
2188
|
},
|
|
2189
|
-
|
|
2189
|
+
"&::-webkit-scrollbar-track": {
|
|
2190
2190
|
backgroundColor: "transparent",
|
|
2191
2191
|
borderRadius: 2
|
|
2192
2192
|
}
|
|
2193
2193
|
}, ul = (e) => ({
|
|
2194
2194
|
[e.componentCls]: {
|
|
2195
|
-
|
|
2195
|
+
"&-a": {
|
|
2196
2196
|
cursor: "pointer",
|
|
2197
2197
|
color: e.colorPrimary,
|
|
2198
2198
|
"&:hover": {
|
|
2199
2199
|
color: e.colorPrimaryHover
|
|
2200
2200
|
}
|
|
2201
2201
|
},
|
|
2202
|
-
|
|
2202
|
+
"&-empty": {
|
|
2203
2203
|
display: "flex",
|
|
2204
2204
|
flexDirection: "column",
|
|
2205
2205
|
alignItems: "center",
|
|
2206
2206
|
justifyContent: "center",
|
|
2207
2207
|
gap: 10
|
|
2208
2208
|
},
|
|
2209
|
-
|
|
2209
|
+
"&-table-tree": {
|
|
2210
2210
|
[`${e.antCls}-table-row-cell-ellipsis`]: {
|
|
2211
2211
|
overflow: "hidden",
|
|
2212
2212
|
textOverflow: "ellipsis",
|
|
@@ -2218,7 +2218,7 @@ const ke = {
|
|
|
2218
2218
|
}
|
|
2219
2219
|
}
|
|
2220
2220
|
},
|
|
2221
|
-
|
|
2221
|
+
"&-full-screen": {
|
|
2222
2222
|
[`${e.componentCls}-content`]: {
|
|
2223
2223
|
height: "100% !important",
|
|
2224
2224
|
padding: 24,
|
|
@@ -2226,7 +2226,7 @@ const ke = {
|
|
|
2226
2226
|
boxShadow: "0 4px 8px #0003, 0 6px 20px #00000030 !important"
|
|
2227
2227
|
}
|
|
2228
2228
|
},
|
|
2229
|
-
|
|
2229
|
+
"&-no-scroll": {
|
|
2230
2230
|
[`${e.antCls}-table`]: {
|
|
2231
2231
|
table: {
|
|
2232
2232
|
width: "100% !important",
|
|
@@ -2249,7 +2249,7 @@ const ke = {
|
|
|
2249
2249
|
}
|
|
2250
2250
|
}
|
|
2251
2251
|
},
|
|
2252
|
-
|
|
2252
|
+
"&-wrapper": {
|
|
2253
2253
|
clear: "both",
|
|
2254
2254
|
maxWidth: "100%",
|
|
2255
2255
|
[`${e.componentCls}-pagination${e.antCls}-pagination`]: {
|
|
@@ -2302,13 +2302,13 @@ const ke = {
|
|
|
2302
2302
|
[`${e.antCls}-tree > ${e.antCls}-tree-treenode`]: {
|
|
2303
2303
|
width: "100%",
|
|
2304
2304
|
alignItems: "center",
|
|
2305
|
-
|
|
2305
|
+
"&:first-child": {
|
|
2306
2306
|
paddingTop: 0
|
|
2307
2307
|
},
|
|
2308
|
-
|
|
2308
|
+
"&:last-child": {
|
|
2309
2309
|
paddingBottom: 4
|
|
2310
2310
|
},
|
|
2311
|
-
|
|
2311
|
+
"&:hover": {
|
|
2312
2312
|
backgroundColor: "#e6f7ff",
|
|
2313
2313
|
[`${e.componentCls}-action-columns-list-item-actions`]: {
|
|
2314
2314
|
display: "block"
|
|
@@ -2317,39 +2317,39 @@ const ke = {
|
|
|
2317
2317
|
},
|
|
2318
2318
|
[`${e.antCls}-tree ${e.antCls}-tree-node-content-wrapper`]: {
|
|
2319
2319
|
flex: "1",
|
|
2320
|
-
|
|
2320
|
+
"&:hover": {
|
|
2321
2321
|
backgroundColor: "transparent"
|
|
2322
2322
|
}
|
|
2323
2323
|
},
|
|
2324
|
-
|
|
2324
|
+
"&-popover-title": {
|
|
2325
2325
|
display: "flex",
|
|
2326
2326
|
alignItems: "center",
|
|
2327
2327
|
justifyContent: "space-between",
|
|
2328
|
-
|
|
2328
|
+
"&-check": {
|
|
2329
2329
|
marginRight: 8
|
|
2330
2330
|
},
|
|
2331
2331
|
[`${e.antCls}-btn-sm`]: {
|
|
2332
2332
|
padding: 0
|
|
2333
2333
|
}
|
|
2334
2334
|
},
|
|
2335
|
-
|
|
2335
|
+
"&-list-group": {
|
|
2336
2336
|
marginTop: 6,
|
|
2337
2337
|
marginBottom: 6,
|
|
2338
2338
|
fontSize: 12,
|
|
2339
2339
|
color: "rgba(0, 0, 0, 0.45)"
|
|
2340
2340
|
},
|
|
2341
|
-
|
|
2341
|
+
"$-list-item": {
|
|
2342
2342
|
display: "flex",
|
|
2343
2343
|
alignItems: "center",
|
|
2344
2344
|
justifyContent: "space-between",
|
|
2345
|
-
|
|
2345
|
+
"&-actions": {
|
|
2346
2346
|
display: "block",
|
|
2347
2347
|
float: "right",
|
|
2348
2348
|
cursor: "pointer",
|
|
2349
|
-
|
|
2349
|
+
"> span + span": {
|
|
2350
2350
|
marginLeft: 8
|
|
2351
2351
|
},
|
|
2352
|
-
|
|
2352
|
+
"&-disabled": {
|
|
2353
2353
|
action: {
|
|
2354
2354
|
color: "rgba(0, 0, 0, 0.25)"
|
|
2355
2355
|
}
|
|
@@ -2366,10 +2366,10 @@ const ke = {
|
|
|
2366
2366
|
color: e.colorWhite
|
|
2367
2367
|
}
|
|
2368
2368
|
},
|
|
2369
|
-
[`${e.antCls}-table-content`]:
|
|
2370
|
-
[`${e.antCls}-table-body`]:
|
|
2369
|
+
[`${e.antCls}-table-content`]: je,
|
|
2370
|
+
[`${e.antCls}-table-body`]: je,
|
|
2371
2371
|
[`${e.antCls}-table-empty`]: {
|
|
2372
|
-
[`${e.antCls}-table-content`]:
|
|
2372
|
+
[`${e.antCls}-table-content`]: je
|
|
2373
2373
|
}
|
|
2374
2374
|
}
|
|
2375
2375
|
}), il = ct.PRESENTED_IMAGE_SIMPLE, {
|
|
@@ -2379,7 +2379,7 @@ const ke = {
|
|
|
2379
2379
|
density: !0,
|
|
2380
2380
|
setting: !0,
|
|
2381
2381
|
fullScreen: !0
|
|
2382
|
-
},
|
|
2382
|
+
}, ke = /* @__PURE__ */ ae({
|
|
2383
2383
|
name: "GProTable",
|
|
2384
2384
|
inheritAttrs: !1,
|
|
2385
2385
|
props: ce,
|
|
@@ -2396,19 +2396,19 @@ const ke = {
|
|
|
2396
2396
|
}), {
|
|
2397
2397
|
wrapSSR: s,
|
|
2398
2398
|
hashId: r
|
|
2399
|
-
} =
|
|
2400
|
-
width:
|
|
2399
|
+
} = Be("ProBaseTable", [ul], l), w = sl(), {
|
|
2400
|
+
width: m
|
|
2401
2401
|
} = Qt(), {
|
|
2402
2402
|
emptyText: g,
|
|
2403
2403
|
indicator: y
|
|
2404
|
-
} = ra(), c =
|
|
2405
|
-
he(() =>
|
|
2404
|
+
} = ra(), c = P(), b = P(), d = P(e.waitRequest);
|
|
2405
|
+
he(() => d.value = e.waitRequest);
|
|
2406
2406
|
const {
|
|
2407
|
-
toggle:
|
|
2407
|
+
toggle: f,
|
|
2408
2408
|
isFullscreen: x
|
|
2409
2409
|
} = st(c), $ = S(() => ({
|
|
2410
2410
|
...e
|
|
2411
|
-
})), T = S(() => !w.value.xl),
|
|
2411
|
+
})), T = S(() => !w.value.xl), B = S(() => {
|
|
2412
2412
|
var C, R;
|
|
2413
2413
|
return e.virtualScroll && Sa(!((C = e.scroll) != null && C.y), "参数scroll的Y值不能为空!"), !!((R = e.scroll) != null && R.y && e.virtualScroll);
|
|
2414
2414
|
}), D = S(() => {
|
|
@@ -2416,74 +2416,74 @@ const ke = {
|
|
|
2416
2416
|
...R,
|
|
2417
2417
|
key: R.key || R.dataIndex,
|
|
2418
2418
|
align: R.align || e.align,
|
|
2419
|
-
uuid:
|
|
2419
|
+
uuid: Ae().uuid(15)
|
|
2420
2420
|
}));
|
|
2421
2421
|
return Xt(C, {
|
|
2422
2422
|
align: e.align || "left",
|
|
2423
2423
|
showIndex: e.showIndex || !1
|
|
2424
2424
|
});
|
|
2425
2425
|
}), {
|
|
2426
|
-
loadingStatus:
|
|
2427
|
-
setLoading:
|
|
2426
|
+
loadingStatus: A,
|
|
2427
|
+
setLoading: N
|
|
2428
2428
|
} = wa({
|
|
2429
2429
|
emit: n,
|
|
2430
2430
|
loading: Z(e, "loading")
|
|
2431
2431
|
}), {
|
|
2432
|
-
sizeRef:
|
|
2432
|
+
sizeRef: Y,
|
|
2433
2433
|
setTableSize: G
|
|
2434
2434
|
} = Ta({
|
|
2435
2435
|
emit: n,
|
|
2436
2436
|
size: Z(e, "size")
|
|
2437
2437
|
}), {
|
|
2438
|
-
getPaginationInfo:
|
|
2438
|
+
getPaginationInfo: E,
|
|
2439
2439
|
setPagination: H
|
|
2440
2440
|
} = Ra({
|
|
2441
2441
|
slots: t,
|
|
2442
2442
|
props: $,
|
|
2443
2443
|
pagination: Z(e, "pagination")
|
|
2444
|
-
}), a =
|
|
2444
|
+
}), a = Na(e), {
|
|
2445
2445
|
getScrollRef: p,
|
|
2446
2446
|
breakpoint: I
|
|
2447
|
-
} =
|
|
2447
|
+
} = ja({
|
|
2448
2448
|
...a,
|
|
2449
|
-
innerWidth:
|
|
2449
|
+
innerWidth: m,
|
|
2450
2450
|
columns: D,
|
|
2451
2451
|
screens: w
|
|
2452
|
-
}), F =
|
|
2453
|
-
getProColumns:
|
|
2454
|
-
cacheProColumns:
|
|
2455
|
-
setColumns:
|
|
2456
|
-
changeColumns:
|
|
2452
|
+
}), F = Ea(e), {
|
|
2453
|
+
getProColumns: O,
|
|
2454
|
+
cacheProColumns: h,
|
|
2455
|
+
setColumns: M,
|
|
2456
|
+
changeColumns: L,
|
|
2457
2457
|
resizeColumnWidth: K
|
|
2458
|
-
} =
|
|
2458
|
+
} = Ma({
|
|
2459
2459
|
...F,
|
|
2460
2460
|
breakpoint: I,
|
|
2461
2461
|
scroll: p,
|
|
2462
2462
|
columns: D
|
|
2463
2463
|
}), {
|
|
2464
2464
|
columnsMap: ve,
|
|
2465
|
-
operationType:
|
|
2465
|
+
operationType: Pe,
|
|
2466
2466
|
setColumnsMap: Se,
|
|
2467
2467
|
sortKeyColumns: xe,
|
|
2468
2468
|
cacheColumnsMap: we,
|
|
2469
2469
|
setSortKeyColumns: le
|
|
2470
2470
|
} = Da({
|
|
2471
|
-
columns:
|
|
2471
|
+
columns: h,
|
|
2472
2472
|
columnsState: Z(e, "columnsState"),
|
|
2473
|
-
changeColumns:
|
|
2473
|
+
changeColumns: L
|
|
2474
2474
|
}), {
|
|
2475
|
-
formDataRef:
|
|
2475
|
+
formDataRef: Oe,
|
|
2476
2476
|
formParamsRef: fe,
|
|
2477
2477
|
defaultParamsRef: V,
|
|
2478
2478
|
setFormParams: ne
|
|
2479
|
-
} =
|
|
2479
|
+
} = Oa({
|
|
2480
2480
|
search: Z(e, "search"),
|
|
2481
2481
|
searchMap: Z(e, "searchMap"),
|
|
2482
2482
|
params: Z(e, "params"),
|
|
2483
2483
|
columns: D,
|
|
2484
2484
|
setPagination: H
|
|
2485
2485
|
}), {
|
|
2486
|
-
selectedKey:
|
|
2486
|
+
selectedKey: j,
|
|
2487
2487
|
selectedItem: se,
|
|
2488
2488
|
changeRowKey: q,
|
|
2489
2489
|
selectRowKey: gt,
|
|
@@ -2497,18 +2497,18 @@ const ke = {
|
|
|
2497
2497
|
isTreeDataRef: We,
|
|
2498
2498
|
getDataSourceRef: me,
|
|
2499
2499
|
handleTableChange: _e
|
|
2500
|
-
} =
|
|
2500
|
+
} = Ba({
|
|
2501
2501
|
...Ct,
|
|
2502
|
-
waitRequest:
|
|
2502
|
+
waitRequest: d
|
|
2503
2503
|
}, {
|
|
2504
|
-
loadingStatus:
|
|
2505
|
-
getPaginationInfo:
|
|
2504
|
+
loadingStatus: A,
|
|
2505
|
+
getPaginationInfo: E,
|
|
2506
2506
|
setPagination: H,
|
|
2507
2507
|
removeRowKeys: bt,
|
|
2508
2508
|
syncSelectedRows: pt,
|
|
2509
|
-
setLoading:
|
|
2510
|
-
setColumns:
|
|
2511
|
-
columns:
|
|
2509
|
+
setLoading: N,
|
|
2510
|
+
setColumns: M,
|
|
2511
|
+
columns: O,
|
|
2512
2512
|
formParamsRef: fe,
|
|
2513
2513
|
onBeforeSearchSubmit: e.onBeforeSearchSubmit,
|
|
2514
2514
|
hasCustomRender: S(() => !!ze(t, e, "customRender"))
|
|
@@ -2520,30 +2520,30 @@ const ke = {
|
|
|
2520
2520
|
return !C.indicator && (y != null && y.value) && (C.indicator = y == null ? void 0 : y.value), ye({
|
|
2521
2521
|
...(ye(o), ["class", "style", "id"]),
|
|
2522
2522
|
...e,
|
|
2523
|
-
virtualScroll:
|
|
2524
|
-
size:
|
|
2525
|
-
scroll:
|
|
2523
|
+
virtualScroll: B.value,
|
|
2524
|
+
size: v(Y),
|
|
2525
|
+
scroll: v(p),
|
|
2526
2526
|
loading: {
|
|
2527
|
-
spinning: e.showLoading ? !!
|
|
2527
|
+
spinning: e.showLoading ? !!v(A) : !1,
|
|
2528
2528
|
...C
|
|
2529
2529
|
},
|
|
2530
|
-
columns:
|
|
2531
|
-
pagination:
|
|
2532
|
-
dataSource:
|
|
2530
|
+
columns: Ee(v(O).filter((R) => R.show || R.show === void 0)),
|
|
2531
|
+
pagination: Ee(v(E)),
|
|
2532
|
+
dataSource: v(me)
|
|
2533
2533
|
}, ["class", "onChange", "onExpand", "onExpandedRowsChange"]);
|
|
2534
2534
|
}), Tt = S(() => [{
|
|
2535
2535
|
[`${r.value}`]: !0,
|
|
2536
2536
|
[`${l}`]: !0,
|
|
2537
2537
|
[`${o.class}`]: o.class,
|
|
2538
|
-
[`${l}-no-scroll`]: !Object.keys(
|
|
2538
|
+
[`${l}-no-scroll`]: !Object.keys(v(p) || {}).length,
|
|
2539
2539
|
[`${l}-table-tree`]: We.value,
|
|
2540
2540
|
[`${l}-full-screen`]: x.value
|
|
2541
2541
|
}]), qe = S(() => {
|
|
2542
2542
|
var Q;
|
|
2543
2543
|
let C;
|
|
2544
|
-
const R =
|
|
2545
|
-
if (
|
|
2546
|
-
const z =
|
|
2544
|
+
const R = v($).direction === "rtl" ? "bottomLeft" : "right", k = (Q = v(E)) == null ? void 0 : Q.position;
|
|
2545
|
+
if (k !== null && Array.isArray(k)) {
|
|
2546
|
+
const z = k.find((re) => re.indexOf("top") !== -1), W = k.find((re) => re.indexOf("bottom") !== -1), Te = k.every((re) => `${re}` == "none");
|
|
2547
2547
|
!z && !W && !Te && (C = R), z && (C = z.toLowerCase().replace("top", "")), W && (C = W.toLowerCase().replace("bottom", ""));
|
|
2548
2548
|
} else
|
|
2549
2549
|
C = R;
|
|
@@ -2556,25 +2556,25 @@ const ke = {
|
|
|
2556
2556
|
}), await De()) : ne(C);
|
|
2557
2557
|
}, Rt = async (C, R) => {
|
|
2558
2558
|
R ? (n("reset", C), e.request && await Ue(C)) : e.request ? (n("submit", C), await Ue(C)) : n("submit", C);
|
|
2559
|
-
}, Xe = (C, R,
|
|
2560
|
-
H(it(C, ["current", "pageSize"])), _e(C, R,
|
|
2559
|
+
}, Xe = (C, R, k, Q) => {
|
|
2560
|
+
H(it(C, ["current", "pageSize"])), _e(C, R, k, Q);
|
|
2561
2561
|
}, $t = (C, R) => {
|
|
2562
|
-
var
|
|
2562
|
+
var k;
|
|
2563
2563
|
H({
|
|
2564
2564
|
current: C,
|
|
2565
2565
|
pageSize: R
|
|
2566
2566
|
}), _e({
|
|
2567
2567
|
current: C,
|
|
2568
2568
|
pageSize: R,
|
|
2569
|
-
total:
|
|
2569
|
+
total: E.value && ((k = E.value) == null ? void 0 : k.total) || 0
|
|
2570
2570
|
}, {}, {});
|
|
2571
2571
|
}, Ft = (C) => {
|
|
2572
2572
|
n("expandedRowsChange", C);
|
|
2573
2573
|
}, It = (C, R) => {
|
|
2574
2574
|
n("expand", C, R);
|
|
2575
|
-
},
|
|
2576
|
-
const Q =
|
|
2577
|
-
return R &&
|
|
2575
|
+
}, Bt = (C, R) => K(C, R), Pt = (C, R, k) => {
|
|
2576
|
+
const Q = k.align === "center" ? "top" : k.align === "left" || !k.align ? "topLeft" : "topRight";
|
|
2577
|
+
return R && k.copyable ? i(sa.Paragraph, {
|
|
2578
2578
|
class: `${l}-copyable`,
|
|
2579
2579
|
style: {
|
|
2580
2580
|
margin: "0",
|
|
@@ -2591,7 +2591,7 @@ const ke = {
|
|
|
2591
2591
|
class: `${l}-ellipsis`
|
|
2592
2592
|
}, [C])]
|
|
2593
2593
|
})]
|
|
2594
|
-
}) : R && !
|
|
2594
|
+
}) : R && !k.copyable ? i(ee, {
|
|
2595
2595
|
title: C,
|
|
2596
2596
|
placement: Q
|
|
2597
2597
|
}, {
|
|
@@ -2599,93 +2599,93 @@ const ke = {
|
|
|
2599
2599
|
class: `${l}-ellipsis`
|
|
2600
2600
|
}, [C])]
|
|
2601
2601
|
}) : C;
|
|
2602
|
-
},
|
|
2602
|
+
}, Ot = () => {
|
|
2603
2603
|
var R;
|
|
2604
2604
|
const C = ze(t, e, "customRender");
|
|
2605
2605
|
return C ? (R = me.value) != null && R.length ? C(me.value) : (g == null ? void 0 : g.value) || i(ct, {
|
|
2606
2606
|
image: il
|
|
2607
2607
|
}, null) : i(Ie, null, null);
|
|
2608
|
-
}, Dt = (C, R,
|
|
2608
|
+
}, Dt = (C, R, k) => i(al, {
|
|
2609
2609
|
headerTitle: C,
|
|
2610
|
-
titleTip:
|
|
2610
|
+
titleTip: k,
|
|
2611
2611
|
titleTipText: e.titleTipText,
|
|
2612
|
-
options:
|
|
2612
|
+
options: v(wt),
|
|
2613
2613
|
settingExtra: ge(t, e, "settingExtra"),
|
|
2614
2614
|
optionsExtra: ge(t, e, "optionsExtra"),
|
|
2615
2615
|
toolBarBtn: R
|
|
2616
2616
|
}, null);
|
|
2617
2617
|
za({
|
|
2618
|
-
tableSize:
|
|
2619
|
-
columns:
|
|
2618
|
+
tableSize: Y,
|
|
2619
|
+
columns: O,
|
|
2620
2620
|
cacheColumns: D,
|
|
2621
2621
|
isMobile: T,
|
|
2622
2622
|
action: {
|
|
2623
2623
|
setTableSize: G,
|
|
2624
2624
|
reload: (C) => De(C),
|
|
2625
|
-
toggle:
|
|
2625
|
+
toggle: f
|
|
2626
2626
|
},
|
|
2627
2627
|
settingsAction: {
|
|
2628
2628
|
autoScroll: Z(e, "autoScroll"),
|
|
2629
2629
|
columnsMap: ve,
|
|
2630
|
-
operationType:
|
|
2630
|
+
operationType: Pe,
|
|
2631
2631
|
setColumnsMap: Se,
|
|
2632
2632
|
sortKeyColumns: xe,
|
|
2633
2633
|
cacheColumnsMap: we,
|
|
2634
2634
|
setSortKeyColumns: le
|
|
2635
2635
|
},
|
|
2636
2636
|
setPagination: H,
|
|
2637
|
-
changeColumns:
|
|
2637
|
+
changeColumns: L,
|
|
2638
2638
|
slots: t
|
|
2639
2639
|
}), u({
|
|
2640
|
-
loading:
|
|
2640
|
+
loading: A,
|
|
2641
2641
|
formRef: () => ({
|
|
2642
2642
|
getFormState: () => {
|
|
2643
2643
|
var C;
|
|
2644
2644
|
return ((C = b.value) == null ? void 0 : C.getFormState()) || {};
|
|
2645
2645
|
},
|
|
2646
|
-
getTableFormState: () =>
|
|
2646
|
+
getTableFormState: () => v(fe),
|
|
2647
2647
|
restForm: (C) => {
|
|
2648
2648
|
var R;
|
|
2649
|
-
|
|
2649
|
+
d.value = !0, C && (C == null || C()), (R = b.value) == null || R.resetForm(!1), d.value = !1;
|
|
2650
2650
|
}
|
|
2651
2651
|
}),
|
|
2652
2652
|
actionRef: () => ({
|
|
2653
2653
|
dataSource: me.value,
|
|
2654
|
-
pageParams:
|
|
2655
|
-
selectedKey:
|
|
2654
|
+
pageParams: E.value,
|
|
2655
|
+
selectedKey: j.value,
|
|
2656
2656
|
selectedItem: se.value,
|
|
2657
2657
|
reload: De,
|
|
2658
|
-
getLoadingStatus: () =>
|
|
2658
|
+
getLoadingStatus: () => v(A),
|
|
2659
2659
|
reloadAndRest: async (C) => {
|
|
2660
|
-
|
|
2660
|
+
d.value = !0, H({
|
|
2661
2661
|
current: 1,
|
|
2662
2662
|
pageSize: 10
|
|
2663
|
-
}), C && (C == null || C()),
|
|
2663
|
+
}), C && (C == null || C()), d.value = !1;
|
|
2664
2664
|
},
|
|
2665
2665
|
reSetDataList: St,
|
|
2666
2666
|
setPageAndReload: Xe,
|
|
2667
2667
|
setPagination: H,
|
|
2668
2668
|
changeDataValue: xt,
|
|
2669
|
-
loadingOperation:
|
|
2669
|
+
loadingOperation: N
|
|
2670
2670
|
})
|
|
2671
2671
|
});
|
|
2672
|
-
const
|
|
2672
|
+
const Et = S(() => (o == null ? void 0 : o.style) || {});
|
|
2673
2673
|
return () => {
|
|
2674
2674
|
var Q;
|
|
2675
|
-
const C = ge(t, e, "headerTitle"), R = ge(t, e, "titleTip"),
|
|
2675
|
+
const C = ge(t, e, "headerTitle"), R = ge(t, e, "titleTip"), k = ge(t, e, "toolBarBtn");
|
|
2676
2676
|
return s(i("div", {
|
|
2677
2677
|
ref: c,
|
|
2678
2678
|
class: Tt.value,
|
|
2679
|
-
style:
|
|
2679
|
+
style: Et.value
|
|
2680
2680
|
}, [i("div", {
|
|
2681
2681
|
class: [`${l}-content`, r.value]
|
|
2682
|
-
}, [(!!
|
|
2682
|
+
}, [(!!Oe.value.length || !!((Q = t.search) != null && Q.call(t))) && i(ht, {
|
|
2683
2683
|
ref: b,
|
|
2684
2684
|
search: e.search,
|
|
2685
2685
|
modal: e.modalScroll,
|
|
2686
|
-
searchMap:
|
|
2686
|
+
searchMap: Oe.value,
|
|
2687
2687
|
prefixCls: l,
|
|
2688
|
-
loading: !!
|
|
2688
|
+
loading: !!v(A),
|
|
2689
2689
|
onSearch: Rt,
|
|
2690
2690
|
defaultParams: V
|
|
2691
2691
|
}, {
|
|
@@ -2693,17 +2693,17 @@ const ke = {
|
|
|
2693
2693
|
var z;
|
|
2694
2694
|
return (z = t.search) == null ? void 0 : z.call(t);
|
|
2695
2695
|
} : null
|
|
2696
|
-
}), !
|
|
2696
|
+
}), !B.value && Dt(C, k, R), e.customRender ?? t.customRender ? i(Ye, v(Ge).loading, {
|
|
2697
2697
|
default: () => {
|
|
2698
2698
|
var z;
|
|
2699
2699
|
return [i("div", {
|
|
2700
2700
|
class: `${l}-wrapper ${r.value}`
|
|
2701
|
-
}, [
|
|
2701
|
+
}, [Ot(), e.pagination !== !1 && ((z = me.value) == null ? void 0 : z.length) > 0 && i(ua, U({
|
|
2702
2702
|
class: {
|
|
2703
2703
|
[`${l}-pagination ${r.value}`]: !0,
|
|
2704
2704
|
[`${l}-pagination-${qe.value} ${r.value}`]: !!qe.value
|
|
2705
2705
|
}
|
|
2706
|
-
},
|
|
2706
|
+
}, Ee(v(E)), {
|
|
2707
2707
|
onChange: $t
|
|
2708
2708
|
}), null)])];
|
|
2709
2709
|
}
|
|
@@ -2721,13 +2721,13 @@ const ke = {
|
|
|
2721
2721
|
return z;
|
|
2722
2722
|
const {
|
|
2723
2723
|
value: re,
|
|
2724
|
-
success:
|
|
2725
|
-
} = Jt(Te, (W == null ? void 0 : W.columnEmptyText) || (e == null ? void 0 : e.columnEmptyText) || ""), Je = ol(re, ((Ze = (Qe = e.columns) == null ? void 0 : Qe.find((
|
|
2726
|
-
return W != null && W.ellipsis ?
|
|
2724
|
+
success: Mt
|
|
2725
|
+
} = Jt(Te, (W == null ? void 0 : W.columnEmptyText) || (e == null ? void 0 : e.columnEmptyText) || ""), Je = ol(re, ((Ze = (Qe = e.columns) == null ? void 0 : Qe.find((Nt) => Nt.key === W.key)) == null ? void 0 : Ze.valueType) || W.valueType, l, r.value);
|
|
2726
|
+
return W != null && W.ellipsis ? Pt(Je, Mt, W) : Je;
|
|
2727
2727
|
},
|
|
2728
2728
|
rowSelection: e.rowSelection ? {
|
|
2729
2729
|
...ye(e.rowSelection, ["onSelect", "onSelectAll", "onChange", "selectedRowKeys"]),
|
|
2730
|
-
selectedRowKeys:
|
|
2730
|
+
selectedRowKeys: j.value,
|
|
2731
2731
|
onSelect: gt,
|
|
2732
2732
|
onSelectAll: yt,
|
|
2733
2733
|
onChange: q
|
|
@@ -2735,7 +2735,7 @@ const ke = {
|
|
|
2735
2735
|
onChange: Xe,
|
|
2736
2736
|
onExpandedRowsChange: Ft,
|
|
2737
2737
|
onExpand: It,
|
|
2738
|
-
onResizeColumn:
|
|
2738
|
+
onResizeColumn: Bt
|
|
2739
2739
|
}), {
|
|
2740
2740
|
emptyText: g != null && g.value ? () => g == null ? void 0 : g.value : null,
|
|
2741
2741
|
...ye(t, ll)
|
|
@@ -2743,10 +2743,10 @@ const ke = {
|
|
|
2743
2743
|
};
|
|
2744
2744
|
}
|
|
2745
2745
|
});
|
|
2746
|
-
|
|
2746
|
+
ke.install = (e) => (e.component(ke.name, ke), e);
|
|
2747
2747
|
export {
|
|
2748
|
-
|
|
2749
|
-
|
|
2748
|
+
ke as GProTable,
|
|
2749
|
+
ke as default,
|
|
2750
2750
|
ce as proTableProps,
|
|
2751
2751
|
Cl as useTable
|
|
2752
2752
|
};
|