@gx-design-vue/pro-table 0.2.0-beta.133 → 0.2.0-beta.135
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 +1 -1
- package/dist/hooks/useFetchData.d.ts +3 -2
- package/dist/pro-table.js +690 -685
- package/dist/pro-table.umd.cjs +2 -2
- package/package.json +1 -1
package/dist/pro-table.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Gx Design Pro
|
|
3
|
-
* Version: 0.2.0-beta.
|
|
3
|
+
* Version: 0.2.0-beta.134
|
|
4
4
|
* Author: gx12358
|
|
5
5
|
* Copyright (C) 2024 gx12358
|
|
6
6
|
* License: MIT License
|
|
@@ -9,21 +9,21 @@
|
|
|
9
9
|
* Homepage:
|
|
10
10
|
* Contact: gx12358@gmail.com
|
|
11
11
|
*/
|
|
12
|
-
import { defineComponent as Te, ref as
|
|
13
|
-
import { UpOutlined as
|
|
14
|
-
import { useProAppContext as
|
|
15
|
-
import { useBreakpoint as
|
|
16
|
-
import { useContext as
|
|
17
|
-
import { isArray as
|
|
18
|
-
import { useDebounceFn as ul, useFullscreen as
|
|
19
|
-
import { Grid as
|
|
20
|
-
import { omit as
|
|
21
|
-
import { tableProps as
|
|
12
|
+
import { defineComponent as Te, ref as O, watch as Y, cloneVNode as _e, reactive as Qe, watchEffect as dt, computed as C, createVNode as s, Fragment as We, isVNode as Q, mergeProps as H, h as ft, unref as w, onActivated as Nt, nextTick as zt, getCurrentInstance as Yt, toRaw as xe, onUnmounted as Et, onDeactivated as Lt, toRef as _, isRef as He } from "vue";
|
|
13
|
+
import { UpOutlined as Wt, DownOutlined as Mt, InfoCircleOutlined as kt, FullscreenExitOutlined as Ht, FullscreenOutlined as qt, ReloadOutlined as Vt, CopyOutlined as Kt } from "@ant-design/icons-vue";
|
|
14
|
+
import { useProAppContext as mt } from "@gx-design-vue/pro-app";
|
|
15
|
+
import { useBreakpoint as vt, useMemo as De, tryOnUnmounted as Gt } from "@gx-design-vue/pro-hooks";
|
|
16
|
+
import { useContext as Xt, useProStyle as Ue, unit as ot, useProConfigContext as _t } from "@gx-design-vue/pro-provider";
|
|
17
|
+
import { isArray as q, isBoolean as fe, classNames as ie, isNumber as Oe, filterEmpty as ht, getPrefixCls as gt, isObject as U, keysOf as pt, isDeepEqualReact as Be, cloneDeep as J, compareArray as Qt, runFunction as Ut, getSortIndex as Jt, isFunction as Ie, handleCurrentPage as Zt, getRandomNumber as yt, deepMerge as Se, arrayRepeat as el, isString as bt, handleShowIndex as tl, getSlot as it, convertValueBoolean as qe, getSlotsProps as ll, handleEmptyField as al, getTextWidth as nl, getSlotVNode as ol, useDeepMerge as il } from "@gx-design-vue/pro-utils";
|
|
18
|
+
import { useDebounceFn as ul, useFullscreen as Ct, useWindowSize as rl } from "@vueuse/core";
|
|
19
|
+
import { Grid as sl, DatePicker as xt, Space as ut, Input as Ee, TimePicker as cl, TreeSelect as dl, Select as fl, InputNumber as Ve, Button as rt, Spin as St, Tooltip as we, theme as ml, Pagination as vl, Table as hl, message as gl, Empty as pl } from "ant-design-vue";
|
|
20
|
+
import { omit as Ae, cloneDeep as wt, pick as st } from "lodash-es";
|
|
21
|
+
import { tableProps as yl } from "ant-design-vue/es/table/Table";
|
|
22
22
|
import "ant-design-vue/es/_util/props-util";
|
|
23
|
-
import { warning as
|
|
24
|
-
import
|
|
25
|
-
const Cl = ["rowKey", "rowSelection", "columns", "pagination", "size", "bordered", "loading"],
|
|
26
|
-
...
|
|
23
|
+
import { warning as bl } from "ant-design-vue/es/vc-util/warning";
|
|
24
|
+
import V from "dayjs";
|
|
25
|
+
const Cl = ["rowKey", "rowSelection", "columns", "pagination", "size", "bordered", "loading"], Tt = {
|
|
26
|
+
...Ae(yl(), Cl),
|
|
27
27
|
direction: {
|
|
28
28
|
type: String,
|
|
29
29
|
default: "ltr"
|
|
@@ -47,8 +47,8 @@ const Cl = ["rowKey", "rowSelection", "columns", "pagination", "size", "bordered
|
|
|
47
47
|
type: Object,
|
|
48
48
|
default: void 0
|
|
49
49
|
}
|
|
50
|
-
}, { provideContext: xl, useInjectContext:
|
|
51
|
-
...
|
|
50
|
+
}, { provideContext: xl, useInjectContext: Je } = Xt("pro-table"), ge = {
|
|
51
|
+
...Tt,
|
|
52
52
|
rowSelection: {
|
|
53
53
|
type: Object,
|
|
54
54
|
default: void 0
|
|
@@ -329,14 +329,14 @@ const Cl = ["rowKey", "rowSelection", "columns", "pagination", "size", "bordered
|
|
|
329
329
|
setup(e, {
|
|
330
330
|
slots: a
|
|
331
331
|
}) {
|
|
332
|
-
const l =
|
|
333
|
-
return
|
|
332
|
+
const l = O([]), n = O(e.loading ?? !1), i = O("init"), o = ul(e.fetch, e.debounceTime || 10);
|
|
333
|
+
return Y([() => e.fetch, () => e.manual], () => {
|
|
334
334
|
if (i.value !== "init" && n.value) return;
|
|
335
335
|
const d = e.manual ?? !1;
|
|
336
|
-
e.fetch && !d && (n.value = !0, o().then((
|
|
337
|
-
l.value =
|
|
338
|
-
}).catch((
|
|
339
|
-
console.error(
|
|
336
|
+
e.fetch && !d && (n.value = !0, o().then((v) => {
|
|
337
|
+
l.value = wt(v), i.value = "success";
|
|
338
|
+
}).catch((v) => {
|
|
339
|
+
console.error(v), i.value = "error";
|
|
340
340
|
}).finally(() => {
|
|
341
341
|
n.value = !1;
|
|
342
342
|
}));
|
|
@@ -344,7 +344,7 @@ const Cl = ["rowKey", "rowSelection", "columns", "pagination", "size", "bordered
|
|
|
344
344
|
immediate: !0
|
|
345
345
|
}), () => {
|
|
346
346
|
const d = a.default?.();
|
|
347
|
-
return
|
|
347
|
+
return _e(q(d) ? d[0] : d, {
|
|
348
348
|
options: l.value,
|
|
349
349
|
notFoundContent: e.notFoundContent?.(n.value)
|
|
350
350
|
});
|
|
@@ -363,7 +363,7 @@ function wl(e, a) {
|
|
|
363
363
|
e[o.rangeEndName || "end"]
|
|
364
364
|
] : []);
|
|
365
365
|
}
|
|
366
|
-
|
|
366
|
+
dt(() => {
|
|
367
367
|
n();
|
|
368
368
|
});
|
|
369
369
|
function i(o, d) {
|
|
@@ -461,7 +461,7 @@ const Tl = (e) => ({
|
|
|
461
461
|
justifyContent: "center",
|
|
462
462
|
alignItems: "center"
|
|
463
463
|
}
|
|
464
|
-
}),
|
|
464
|
+
}), Ke = [
|
|
465
465
|
{ value: "xxl", span: 4 },
|
|
466
466
|
{ value: "xl", span: 3 },
|
|
467
467
|
{ value: "lg", span: 2 },
|
|
@@ -469,35 +469,35 @@ const Tl = (e) => ({
|
|
|
469
469
|
{ value: "sm", span: 2 },
|
|
470
470
|
{ value: "xs", span: 1 }
|
|
471
471
|
];
|
|
472
|
-
function
|
|
473
|
-
return typeof a == "function" ? a(
|
|
472
|
+
function de(e, a) {
|
|
473
|
+
return typeof a == "function" ? a(V(e)) : V(e).format(a);
|
|
474
474
|
}
|
|
475
475
|
function Fe(e, a) {
|
|
476
476
|
return a ? "YYYY-MM-DD HH:mm:ss" : e ?? "YYYY-MM-DD";
|
|
477
477
|
}
|
|
478
|
-
const
|
|
479
|
-
if (
|
|
478
|
+
const ct = (e, a, l = "string") => {
|
|
479
|
+
if (q(e)) {
|
|
480
480
|
const [n, i] = e;
|
|
481
481
|
let o, d;
|
|
482
482
|
if (Array.isArray(a) ? (o = a[0], d = a[1]) : typeof a == "object" && a.type === "mask" ? (o = a.format, d = a.format) : (o = a, d = a), l === "string") {
|
|
483
|
-
const
|
|
484
|
-
return [
|
|
483
|
+
const v = n ? de(n, o) : "", p = i ? de(i, d) : "";
|
|
484
|
+
return [v, p];
|
|
485
485
|
}
|
|
486
|
-
return [
|
|
486
|
+
return [V(n), V(i)];
|
|
487
487
|
}
|
|
488
488
|
};
|
|
489
489
|
function Rl(e) {
|
|
490
|
-
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !
|
|
490
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !Q(e);
|
|
491
491
|
}
|
|
492
492
|
const {
|
|
493
493
|
useBreakpoint: $l
|
|
494
|
-
} =
|
|
494
|
+
} = sl, {
|
|
495
495
|
MonthPicker: Pl,
|
|
496
496
|
RangePicker: Fl,
|
|
497
497
|
YearPicker: Dl,
|
|
498
498
|
WeekPicker: Il,
|
|
499
499
|
QuarterPicker: Bl
|
|
500
|
-
} =
|
|
500
|
+
} = xt;
|
|
501
501
|
function Ol(e) {
|
|
502
502
|
let a = e.reduce((l, n) => n.order !== void 0 ? Math.max(l, n.order) : l, 0);
|
|
503
503
|
return e.forEach((l) => {
|
|
@@ -505,13 +505,13 @@ function Ol(e) {
|
|
|
505
505
|
}), e.sort((l, n) => l.order - n.order), e;
|
|
506
506
|
}
|
|
507
507
|
const Al = {
|
|
508
|
-
modalScroll:
|
|
508
|
+
modalScroll: ge.modalScroll,
|
|
509
509
|
formCols: {
|
|
510
510
|
type: Array,
|
|
511
511
|
default: () => []
|
|
512
512
|
},
|
|
513
|
-
loading:
|
|
514
|
-
cardBordered:
|
|
513
|
+
loading: ge.loading,
|
|
514
|
+
cardBordered: ge.cardBordered,
|
|
515
515
|
prefixCls: String,
|
|
516
516
|
defaultState: Object,
|
|
517
517
|
onSearch: Function
|
|
@@ -526,24 +526,24 @@ const Al = {
|
|
|
526
526
|
const {
|
|
527
527
|
wrapSSR: n,
|
|
528
528
|
hashId: i
|
|
529
|
-
} =
|
|
530
|
-
formAutoRequest:
|
|
529
|
+
} = Ue("ProTableForm", [Tl], e.prefixCls), o = mt(), d = $l(), {
|
|
530
|
+
formAutoRequest: v,
|
|
531
531
|
formConfig: p,
|
|
532
|
-
formActions:
|
|
533
|
-
} =
|
|
534
|
-
formState:
|
|
535
|
-
resetFormState:
|
|
536
|
-
changeFormState:
|
|
537
|
-
} = wl(e.defaultState || {}, e.formCols || []), f =
|
|
538
|
-
|
|
532
|
+
formActions: P
|
|
533
|
+
} = Je(), {
|
|
534
|
+
formState: r,
|
|
535
|
+
resetFormState: F,
|
|
536
|
+
changeFormState: y
|
|
537
|
+
} = wl(e.defaultState || {}, e.formCols || []), f = O(p.value?.collapsed ?? p.value?.defaultCollapsed), h = C(() => fe(P.value?.reset) ? P.value?.reset : !v.value), b = C(() => te(p.value?.span)), $ = C(() => p.value?.label);
|
|
538
|
+
Y(() => p.value?.collapsed, (t) => {
|
|
539
539
|
f.value = t;
|
|
540
540
|
});
|
|
541
|
-
function
|
|
541
|
+
function te(t) {
|
|
542
542
|
let u = 4;
|
|
543
|
-
for (let
|
|
544
|
-
const g =
|
|
543
|
+
for (let x = 0; x < Ke.length; x += 1) {
|
|
544
|
+
const g = Ke[x].value;
|
|
545
545
|
if (d.value[g]) {
|
|
546
|
-
u = t?.[g] || (e.modalScroll ? 3 :
|
|
546
|
+
u = t?.[g] || (e.modalScroll ? 3 : Ke[x].span);
|
|
547
547
|
break;
|
|
548
548
|
}
|
|
549
549
|
}
|
|
@@ -551,347 +551,347 @@ const Al = {
|
|
|
551
551
|
}
|
|
552
552
|
const le = (t) => {
|
|
553
553
|
f.value = t;
|
|
554
|
-
}, Re = (t, u,
|
|
555
|
-
...
|
|
554
|
+
}, Re = (t, u, x) => (t + 1) % u === 0 ? {
|
|
555
|
+
...x,
|
|
556
556
|
marginRight: 0
|
|
557
557
|
} : {
|
|
558
|
-
...
|
|
558
|
+
...x,
|
|
559
559
|
marginRight: "2%"
|
|
560
|
-
},
|
|
561
|
-
const t =
|
|
562
|
-
return u && (t[u.name] =
|
|
563
|
-
},
|
|
564
|
-
(
|
|
565
|
-
},
|
|
566
|
-
const g =
|
|
560
|
+
}, pe = () => {
|
|
561
|
+
const t = wt(r), u = e.formCols.find((R) => R.valueType === "text") || "", x = e.formCols.find((R) => R.valueType === "dateRange") || "", g = e.formCols.find((R) => R.valueType === "treeSelect");
|
|
562
|
+
return u && (t[u.name] = r[u.name] || u.initialValue || ""), x && (t[x.rangeStartName || "start"] = t[x.name] ? t[x.name][0] : "", t[x.rangeEndName || "end"] = t[x.name] ? t[x.name][1] : "", delete t[x.name]), g && (g?.name && q(r[g?.name]) && (t[g.name] = r[g.name].length ? r[g.name].map((R) => R[g.valueKey === "text" ? "label" : "value"]).join() : ""), g?.name && q(t[g?.name]) && (t[g.name] = t[g.name].length ? t[g.name].map((R) => R[g.valueKey === "text" ? "label" : "value"]) : "")), t;
|
|
563
|
+
}, ae = (t = !1, u) => {
|
|
564
|
+
(v.value || t) && e.onSearch?.(pe(), t ? u ? "reset" : "submit" : void 0);
|
|
565
|
+
}, j = (t, u, x) => {
|
|
566
|
+
const g = r[u.name || ""];
|
|
567
567
|
switch (u.valueType) {
|
|
568
568
|
case "text":
|
|
569
|
-
|
|
569
|
+
y(u.name || "", t || "");
|
|
570
570
|
break;
|
|
571
571
|
case "number":
|
|
572
|
-
|
|
572
|
+
y(u.name || "", t || void 0);
|
|
573
573
|
break;
|
|
574
574
|
case "numberRange":
|
|
575
|
-
|
|
575
|
+
Oe(x?.key) && g && (g[x.key] = t, y(u.name || "", g || []));
|
|
576
576
|
break;
|
|
577
577
|
case "select":
|
|
578
|
-
|
|
578
|
+
y(u.name || "", t ?? void 0);
|
|
579
579
|
break;
|
|
580
580
|
case "treeSelect":
|
|
581
|
-
|
|
581
|
+
y(u.name || "", t ?? (u.field?.treeCheckable || u.field?.multiple ? [] : null));
|
|
582
582
|
break;
|
|
583
583
|
case "date":
|
|
584
|
-
|
|
584
|
+
y(u.name || "", t ? de(t, Fe(u.valueFormat, u.showTime)) : null);
|
|
585
585
|
break;
|
|
586
586
|
case "dateWeek":
|
|
587
|
-
|
|
587
|
+
y(u.name || "", t ? de(t, "YYYY-wo") : null);
|
|
588
588
|
break;
|
|
589
589
|
case "dateMonth":
|
|
590
|
-
|
|
590
|
+
y(u.name || "", t ? de(t, "YYYY-MM") : null);
|
|
591
591
|
break;
|
|
592
592
|
case "dateQuarter":
|
|
593
|
-
|
|
593
|
+
y(u.name || "", t ? de(t, "YYYY-QQ") : null);
|
|
594
594
|
break;
|
|
595
595
|
case "dateYear":
|
|
596
|
-
|
|
596
|
+
y(u.name || "", t ? de(t, "YYYY") : null);
|
|
597
597
|
break;
|
|
598
598
|
case "dateRange":
|
|
599
|
-
|
|
599
|
+
y(u.name || "", t && q(t) && t.length === 2 ? ct(t, Fe(u.valueFormat, u.showTime)) : null);
|
|
600
600
|
break;
|
|
601
601
|
case "time":
|
|
602
|
-
|
|
602
|
+
y(u.name || "", t ? de(t, u.valueFormat || "HH:mm:ss") : null);
|
|
603
603
|
break;
|
|
604
604
|
}
|
|
605
|
-
u.valueType === "treeSelect" || u.valueType,
|
|
606
|
-
},
|
|
607
|
-
|
|
605
|
+
u.valueType === "treeSelect" || u.valueType, ae();
|
|
606
|
+
}, me = (t = !0) => {
|
|
607
|
+
F(), ae(!0, t);
|
|
608
608
|
};
|
|
609
609
|
l({
|
|
610
|
-
getFormState: () =>
|
|
611
|
-
resetForm:
|
|
610
|
+
getFormState: () => pe(),
|
|
611
|
+
resetForm: me
|
|
612
612
|
});
|
|
613
|
-
const
|
|
613
|
+
const N = () => {
|
|
614
614
|
const t = o?.emptyText?.value;
|
|
615
615
|
if (t) {
|
|
616
|
-
const u =
|
|
617
|
-
return
|
|
616
|
+
const u = Q(t), x = u ? ft(t) : ht(t || []);
|
|
617
|
+
return s("div", {
|
|
618
618
|
class: ie(`${e.prefixCls}-search-empty-text`, i.value)
|
|
619
|
-
}, [u ?
|
|
619
|
+
}, [u ? x : q(x) ? x.map((g) => _e(g)) : void 0]);
|
|
620
620
|
}
|
|
621
|
-
},
|
|
622
|
-
default: () => [h.value &&
|
|
623
|
-
onClick: () =>
|
|
621
|
+
}, K = () => (!v.value || h.value) && s(ut, null, {
|
|
622
|
+
default: () => [h.value && s(rt, {
|
|
623
|
+
onClick: () => me()
|
|
624
624
|
}, {
|
|
625
|
-
default: () => [
|
|
626
|
-
}), !
|
|
625
|
+
default: () => [P.value?.resetText || "重置"]
|
|
626
|
+
}), !v.value && s(rt, {
|
|
627
627
|
loading: e.loading,
|
|
628
628
|
type: "primary",
|
|
629
|
-
onClick: () =>
|
|
629
|
+
onClick: () => ae(!0)
|
|
630
630
|
}, {
|
|
631
|
-
default: () => [
|
|
631
|
+
default: () => [P.value?.searchText || "查询"]
|
|
632
632
|
})]
|
|
633
|
-
}),
|
|
633
|
+
}), Z = ({
|
|
634
634
|
formItemStyle: t,
|
|
635
635
|
collapsed: u,
|
|
636
|
-
collapseRender:
|
|
637
|
-
}) =>
|
|
636
|
+
collapseRender: x = !0
|
|
637
|
+
}) => s("div", {
|
|
638
638
|
style: t,
|
|
639
639
|
class: `${e.prefixCls}-search-collapse-buttons ${i.value}`
|
|
640
|
-
}, [
|
|
640
|
+
}, [s(ut, {
|
|
641
641
|
size: 16
|
|
642
642
|
}, {
|
|
643
|
-
default: () => [
|
|
643
|
+
default: () => [K(), p.value?.collapseRender !== !1 && x && s(We, null, [typeof p.value?.collapseRender == "function" ? p.value?.collapseRender(u) : s("span", {
|
|
644
644
|
class: `${e.prefixCls}-a ${i.value}`,
|
|
645
645
|
onClick: () => le(!u)
|
|
646
|
-
}, [u ? "收起" : "展开", u ?
|
|
646
|
+
}, [u ? "收起" : "展开", u ? s(Wt, null, null) : s(Mt, null, null)])])]
|
|
647
647
|
})]);
|
|
648
648
|
function ue(t) {
|
|
649
|
-
return t === void 0 ? void 0 : t ?
|
|
649
|
+
return t === void 0 ? void 0 : t ? s(St, {
|
|
650
650
|
size: "small",
|
|
651
651
|
indicator: o?.indicator?.value
|
|
652
|
-
}, null) :
|
|
652
|
+
}, null) : N();
|
|
653
653
|
}
|
|
654
|
-
function
|
|
655
|
-
return
|
|
654
|
+
function ye(t, u) {
|
|
655
|
+
return s(Sl, H(t.request, {
|
|
656
656
|
loading: t.loading,
|
|
657
657
|
notFoundContent: ue
|
|
658
658
|
}), Rl(u) ? u : {
|
|
659
659
|
default: () => [u]
|
|
660
660
|
});
|
|
661
661
|
}
|
|
662
|
-
const
|
|
662
|
+
const ee = (t) => {
|
|
663
663
|
let u;
|
|
664
|
-
const
|
|
664
|
+
const x = v.value ? Ee.Search : Ee, g = Ae(t.field || {}, "rules");
|
|
665
665
|
let R = null;
|
|
666
666
|
switch (t.valueType) {
|
|
667
667
|
case "text":
|
|
668
|
-
u =
|
|
668
|
+
u = s(x, H({
|
|
669
669
|
style: {
|
|
670
670
|
width: "100%"
|
|
671
671
|
},
|
|
672
|
-
value:
|
|
672
|
+
value: r[t.name],
|
|
673
673
|
placeholder: t.placeholder || "请输入",
|
|
674
674
|
allowClear: t.allowClear ?? !0,
|
|
675
|
-
onChange: (c) =>
|
|
676
|
-
onSearch: (c) =>
|
|
675
|
+
onChange: (c) => j(c.target.value, t),
|
|
676
|
+
onSearch: (c) => ae()
|
|
677
677
|
}, g), null);
|
|
678
678
|
break;
|
|
679
679
|
case "number":
|
|
680
|
-
u =
|
|
680
|
+
u = s(Ve, H({
|
|
681
681
|
style: {
|
|
682
682
|
width: "100%"
|
|
683
683
|
},
|
|
684
|
-
value:
|
|
684
|
+
value: r[t.name],
|
|
685
685
|
placeholder: t.placeholder || "请输入",
|
|
686
|
-
onChange: (c) =>
|
|
686
|
+
onChange: (c) => j(c, t)
|
|
687
687
|
}, g), null);
|
|
688
688
|
break;
|
|
689
689
|
case "numberRange":
|
|
690
|
-
u =
|
|
690
|
+
u = s(Ee.Group, {
|
|
691
691
|
compact: !0,
|
|
692
692
|
class: ie(i.value, `${e.prefixCls}-search-input-compact`)
|
|
693
693
|
}, {
|
|
694
|
-
default: () => [
|
|
695
|
-
value:
|
|
696
|
-
onChange: (c) =>
|
|
694
|
+
default: () => [s(Ve, {
|
|
695
|
+
value: r[t.name]?.[0],
|
|
696
|
+
onChange: (c) => j(c, t, {
|
|
697
697
|
key: 0
|
|
698
698
|
}),
|
|
699
|
-
placeholder:
|
|
700
|
-
}, null),
|
|
699
|
+
placeholder: q(t.placeholder) && t.placeholder?.[0] || "请输入"
|
|
700
|
+
}, null), s(Ee, {
|
|
701
701
|
disabled: !0,
|
|
702
702
|
placeholder: "~"
|
|
703
|
-
}, null),
|
|
704
|
-
value:
|
|
705
|
-
onChange: (c) =>
|
|
703
|
+
}, null), s(Ve, {
|
|
704
|
+
value: r[t.name]?.[1],
|
|
705
|
+
onChange: (c) => j(c, t, {
|
|
706
706
|
key: 1
|
|
707
707
|
}),
|
|
708
|
-
placeholder:
|
|
708
|
+
placeholder: q(t.placeholder) && t.placeholder?.[1] || "请输入"
|
|
709
709
|
}, null)]
|
|
710
710
|
});
|
|
711
711
|
break;
|
|
712
712
|
case "select":
|
|
713
|
-
R =
|
|
713
|
+
R = s(fl, H({
|
|
714
714
|
style: {
|
|
715
715
|
width: "100%"
|
|
716
716
|
},
|
|
717
|
-
value: t.loading ? void 0 :
|
|
717
|
+
value: t.loading ? void 0 : r[t.name],
|
|
718
718
|
optionFilterProp: "label",
|
|
719
719
|
placeholder: t.placeholder || "请选择",
|
|
720
720
|
showSearch: t.showSearch,
|
|
721
721
|
allowClear: t.allowClear ?? !0,
|
|
722
722
|
getPopupContainer: (c) => c && c.parentNode ? c.parentNode : c,
|
|
723
723
|
notFoundContent: ue(t.loading),
|
|
724
|
-
onChange: (c) =>
|
|
724
|
+
onChange: (c) => j(c, t),
|
|
725
725
|
options: t.loading ? [] : t?.valueEnum || []
|
|
726
726
|
}, g), null);
|
|
727
727
|
break;
|
|
728
728
|
case "treeSelect":
|
|
729
|
-
R =
|
|
729
|
+
R = s(dl, H({
|
|
730
730
|
style: {
|
|
731
731
|
width: "100%"
|
|
732
732
|
},
|
|
733
|
-
value:
|
|
733
|
+
value: r[t.name],
|
|
734
734
|
placeholder: t.placeholder || "请选择",
|
|
735
735
|
allowClear: t.allowClear ?? !0,
|
|
736
736
|
treeData: t.loading ? [] : t.valueEnum || [],
|
|
737
737
|
getPopupContainer: (c) => c && c.parentNode ? c.parentNode : c,
|
|
738
738
|
notFoundContent: ue(t.loading),
|
|
739
|
-
onChange: (c) =>
|
|
739
|
+
onChange: (c) => j(c, t)
|
|
740
740
|
}, g), null);
|
|
741
741
|
break;
|
|
742
742
|
case "date":
|
|
743
|
-
u =
|
|
743
|
+
u = s(xt, H({
|
|
744
744
|
style: {
|
|
745
745
|
width: "100%"
|
|
746
746
|
},
|
|
747
|
-
value:
|
|
747
|
+
value: r[t.name] ? V(r[t.name]) : void 0,
|
|
748
748
|
getPopupContainer: (c) => c && c.parentNode ? c.parentNode : c,
|
|
749
749
|
placeholder: t.placeholder || "请选择",
|
|
750
750
|
allowClear: t.allowClear ?? !0,
|
|
751
751
|
format: Fe(t.valueFormat, t.showTime),
|
|
752
752
|
showTime: t.showTime,
|
|
753
753
|
showToday: t.showToday || !0,
|
|
754
|
-
onChange: (c) =>
|
|
754
|
+
onChange: (c) => j(c, t)
|
|
755
755
|
}, g), null);
|
|
756
756
|
break;
|
|
757
757
|
case "dateWeek":
|
|
758
|
-
u =
|
|
758
|
+
u = s(Il, H({
|
|
759
759
|
style: {
|
|
760
760
|
width: "100%"
|
|
761
761
|
},
|
|
762
|
-
value:
|
|
762
|
+
value: r[t.name] ? V(r[t.name], t.valueFormat || "YYYY-wo") : void 0,
|
|
763
763
|
getPopupContainer: (c) => c && c.parentNode ? c.parentNode : c,
|
|
764
764
|
allowClear: t.allowClear ?? !0,
|
|
765
765
|
placeholder: t.placeholder || "请选择",
|
|
766
|
-
onChange: (c) =>
|
|
766
|
+
onChange: (c) => j(c, t)
|
|
767
767
|
}, g), null);
|
|
768
768
|
break;
|
|
769
769
|
case "dateMonth":
|
|
770
|
-
u =
|
|
770
|
+
u = s(Pl, H({
|
|
771
771
|
style: {
|
|
772
772
|
width: "100%"
|
|
773
773
|
},
|
|
774
|
-
value:
|
|
774
|
+
value: r[t.name] ? V(r[t.name], t.valueFormat || "YYYY-MM") : void 0,
|
|
775
775
|
getPopupContainer: (c) => c && c.parentNode ? c.parentNode : c,
|
|
776
776
|
allowClear: t.allowClear ?? !0,
|
|
777
777
|
placeholder: t.placeholder || "请选择",
|
|
778
|
-
onChange: (c) =>
|
|
778
|
+
onChange: (c) => j(c, t)
|
|
779
779
|
}, g), null);
|
|
780
780
|
break;
|
|
781
781
|
case "dateQuarter":
|
|
782
|
-
u =
|
|
782
|
+
u = s(Bl, H({
|
|
783
783
|
style: {
|
|
784
784
|
width: "100%"
|
|
785
785
|
},
|
|
786
|
-
value:
|
|
786
|
+
value: r[t.name] ? V(r[t.name], t.valueFormat || "YYYY-QQ") : void 0,
|
|
787
787
|
getPopupContainer: (c) => c && c.parentNode ? c.parentNode : c,
|
|
788
788
|
allowClear: t.allowClear ?? !0,
|
|
789
789
|
placeholder: t.placeholder || "请选择",
|
|
790
|
-
onChange: (c) =>
|
|
790
|
+
onChange: (c) => j(c, t)
|
|
791
791
|
}, g), null);
|
|
792
792
|
break;
|
|
793
793
|
case "dateYear":
|
|
794
|
-
u =
|
|
794
|
+
u = s(Dl, H({
|
|
795
795
|
style: {
|
|
796
796
|
width: "100%"
|
|
797
797
|
},
|
|
798
|
-
value:
|
|
798
|
+
value: r[t.name] ? V(r[t.name], t.valueFormat || "YYYY") : void 0,
|
|
799
799
|
getPopupContainer: (c) => c && c.parentNode ? c.parentNode : c,
|
|
800
800
|
allowClear: t.allowClear ?? !0,
|
|
801
801
|
placeholder: t.placeholder || "请选择",
|
|
802
|
-
onChange: (c) =>
|
|
802
|
+
onChange: (c) => j(c, t)
|
|
803
803
|
}, g), null);
|
|
804
804
|
break;
|
|
805
805
|
case "dateRange":
|
|
806
|
-
u =
|
|
806
|
+
u = s(Fl, H({
|
|
807
807
|
style: {
|
|
808
808
|
width: "100%"
|
|
809
809
|
},
|
|
810
|
-
value:
|
|
810
|
+
value: r[t.name] && q(r[t.name]) && r[t.name]?.length === 2 ? ct(r[t.name], Fe(t.valueFormat, t.showTime), "dayjs") : void 0,
|
|
811
811
|
getPopupContainer: (c) => c && c.parentNode ? c.parentNode : c,
|
|
812
812
|
placeholder: t.placeholder || ["开始日期", "结束日期"],
|
|
813
813
|
format: Fe(t.valueFormat, t.showTime),
|
|
814
814
|
showTime: t.showTime,
|
|
815
|
-
onChange: (c) =>
|
|
815
|
+
onChange: (c) => j(c, t)
|
|
816
816
|
}, g), null);
|
|
817
817
|
break;
|
|
818
818
|
case "time":
|
|
819
|
-
u =
|
|
819
|
+
u = s(cl, H({
|
|
820
820
|
style: {
|
|
821
821
|
width: "100%"
|
|
822
822
|
},
|
|
823
|
-
value:
|
|
823
|
+
value: r[t.name] ? V(r[t.name], t.valueFormat || "HH:mm:ss") : void 0,
|
|
824
824
|
getPopupContainer: (c) => c && c.parentNode ? c.parentNode : c,
|
|
825
825
|
placeholder: t.placeholder || "请选择",
|
|
826
826
|
allowClear: t.allowClear || t.allowClear === !1 ? t.allowClear : !0,
|
|
827
827
|
use12Hours: t.use12Hours,
|
|
828
828
|
format: t.valueFormat || "HH:mm:ss",
|
|
829
|
-
onChange: (c) =>
|
|
829
|
+
onChange: (c) => j(c, t)
|
|
830
830
|
}, g), null);
|
|
831
831
|
break;
|
|
832
832
|
}
|
|
833
|
-
return t.valueType && ["select", "treeSelect"].includes(t.valueType) && (u = t.request ?
|
|
834
|
-
},
|
|
833
|
+
return t.valueType && ["select", "treeSelect"].includes(t.valueType) && (u = t.request ? ye(t, R) : R), u;
|
|
834
|
+
}, E = ({
|
|
835
835
|
formItemStyle: t = {},
|
|
836
836
|
item: u
|
|
837
837
|
}) => {
|
|
838
|
-
const
|
|
839
|
-
return
|
|
838
|
+
const x = Q(u) ? u.props?.label : u.label, g = (Q(u) ? u.props?.labelWidth : u.labelWidth) || $.value?.width, R = (Q(u) ? u.props?.labelAlign : u.labelAlign) || $.value?.align;
|
|
839
|
+
return s("div", {
|
|
840
840
|
class: `${e.prefixCls}-search-item`,
|
|
841
841
|
style: {
|
|
842
842
|
...t,
|
|
843
|
-
gap: $.value?.gap ?
|
|
843
|
+
gap: $.value?.gap ? ot($.value?.gap) : void 0
|
|
844
844
|
}
|
|
845
|
-
}, [
|
|
845
|
+
}, [x && s("div", {
|
|
846
846
|
class: ie(`${e.prefixCls}-search-item-label`, $.value?.colon === !1 && `${e.prefixCls}-search-item-label-no-colon`, R && `${e.prefixCls}-search-item-label-${R}`),
|
|
847
847
|
style: {
|
|
848
|
-
width: g ?
|
|
848
|
+
width: g ? ot(g) : void 0
|
|
849
849
|
}
|
|
850
|
-
}, [
|
|
850
|
+
}, [x]), s("div", {
|
|
851
851
|
class: ie(`${e.prefixCls}-search-item-children`)
|
|
852
|
-
}, [
|
|
853
|
-
},
|
|
852
|
+
}, [Q(u) ? u : ee(u)])]);
|
|
853
|
+
}, ve = () => {
|
|
854
854
|
let t = a.default?.() || [];
|
|
855
855
|
t.length === 1 && t[0].type === "template" && (t = t[0]?.children || []);
|
|
856
856
|
const u = Ol([...e.formCols, ...t.map((g) => ({
|
|
857
857
|
...g,
|
|
858
858
|
order: g.props?.order || void 0
|
|
859
|
-
}))]),
|
|
860
|
-
width: `${(100 - (
|
|
859
|
+
}))]), x = {
|
|
860
|
+
width: `${(100 - (b.value - 1) * 2) / b.value}%`
|
|
861
861
|
};
|
|
862
862
|
return u.map((g, R) => {
|
|
863
|
-
const c = Re(R,
|
|
864
|
-
return u.length <
|
|
863
|
+
const c = Re(R, b.value, x);
|
|
864
|
+
return u.length < b.value || f.value ? s(We, null, [E({
|
|
865
865
|
formItemStyle: c,
|
|
866
866
|
item: g
|
|
867
|
-
}), R === u.length - 1 &&
|
|
867
|
+
}), R === u.length - 1 && Z({
|
|
868
868
|
formItemStyle: {
|
|
869
869
|
flex: 1,
|
|
870
870
|
justifyContent: "flex-end"
|
|
871
871
|
},
|
|
872
872
|
collapsed: f.value,
|
|
873
873
|
collapseRender: !!f.value
|
|
874
|
-
})]) :
|
|
874
|
+
})]) : s(We, null, [R < b.value - 1 && E({
|
|
875
875
|
formItemStyle: c,
|
|
876
876
|
item: g
|
|
877
|
-
}), R ===
|
|
877
|
+
}), R === b.value - 1 && (b.value - 1 === 0 || u.length === b.value) && E({
|
|
878
878
|
formItemStyle: c,
|
|
879
879
|
item: g
|
|
880
|
-
}), R ===
|
|
880
|
+
}), R === b.value - 1 && u.length >= b.value && Z({
|
|
881
881
|
formItemStyle: {
|
|
882
882
|
flex: 1,
|
|
883
883
|
justifyContent: "flex-end"
|
|
884
884
|
},
|
|
885
885
|
collapsed: !1,
|
|
886
|
-
collapseRender: u.length !==
|
|
886
|
+
collapseRender: u.length !== b.value
|
|
887
887
|
})]);
|
|
888
888
|
});
|
|
889
889
|
};
|
|
890
890
|
return () => {
|
|
891
891
|
const t = e.cardBordered && `${e.prefixCls}-search-border`;
|
|
892
|
-
return n(
|
|
892
|
+
return n(s("div", {
|
|
893
893
|
class: ie(i.value, `${e.prefixCls}-search`, t, i.value, p.value?.className)
|
|
894
|
-
}, [
|
|
894
|
+
}, [ve()]));
|
|
895
895
|
};
|
|
896
896
|
}
|
|
897
897
|
}), Nl = (e) => ({
|
|
@@ -967,7 +967,7 @@ const Al = {
|
|
|
967
967
|
}
|
|
968
968
|
});
|
|
969
969
|
function zl(e) {
|
|
970
|
-
if (
|
|
970
|
+
if (Q(e))
|
|
971
971
|
return e;
|
|
972
972
|
if (e) {
|
|
973
973
|
const a = e, {
|
|
@@ -976,11 +976,11 @@ function zl(e) {
|
|
|
976
976
|
onClick: i,
|
|
977
977
|
key: o
|
|
978
978
|
} = a;
|
|
979
|
-
return l && n ?
|
|
979
|
+
return l && n ? s(we, {
|
|
980
980
|
title: n,
|
|
981
981
|
key: o
|
|
982
982
|
}, {
|
|
983
|
-
default: () => [
|
|
983
|
+
default: () => [s("span", {
|
|
984
984
|
key: o,
|
|
985
985
|
onClick: () => {
|
|
986
986
|
i && i(o);
|
|
@@ -990,102 +990,102 @@ function zl(e) {
|
|
|
990
990
|
}
|
|
991
991
|
return null;
|
|
992
992
|
}
|
|
993
|
-
const
|
|
993
|
+
const Rt = /* @__PURE__ */ Te({
|
|
994
994
|
props: {
|
|
995
995
|
actions: [Array],
|
|
996
996
|
settings: [Array],
|
|
997
|
-
titleTip:
|
|
997
|
+
titleTip: ge.titleTip,
|
|
998
998
|
prefixCls: String,
|
|
999
|
-
headerTitle:
|
|
1000
|
-
titleTipText:
|
|
999
|
+
headerTitle: ge.headerTitle,
|
|
1000
|
+
titleTipText: ge.titleTipText,
|
|
1001
1001
|
actionsPlacement: String
|
|
1002
1002
|
},
|
|
1003
1003
|
setup(e) {
|
|
1004
1004
|
const {
|
|
1005
1005
|
wrapSSR: a,
|
|
1006
1006
|
hashId: l
|
|
1007
|
-
} =
|
|
1007
|
+
} = Ue("ListToolBar", [Nl], e.prefixCls), n = vt(), {
|
|
1008
1008
|
isMobile: i
|
|
1009
|
-
} =
|
|
1009
|
+
} = Je(), o = C(() => !!(e.titleTip || e.headerTitle)), d = De(() => {
|
|
1010
1010
|
if (!Array.isArray(e.actions) || e.actions?.length < 1)
|
|
1011
1011
|
return {
|
|
1012
1012
|
left: null,
|
|
1013
1013
|
right: null
|
|
1014
1014
|
};
|
|
1015
|
-
const
|
|
1015
|
+
const y = e.actions.filter((h) => Q(h)).filter((h) => (h?.props?.placement || e.actionsPlacement) === "left"), f = e.actions.filter((h) => Q(h)).filter((h) => (h?.props?.placement || e.actionsPlacement) === "right");
|
|
1016
1016
|
return {
|
|
1017
|
-
left:
|
|
1017
|
+
left: y.length ? s("div", {
|
|
1018
1018
|
class: `${e.prefixCls}-actions ${l.value}`
|
|
1019
|
-
}, [
|
|
1020
|
-
right: f.length ?
|
|
1019
|
+
}, [y]) : null,
|
|
1020
|
+
right: f.length ? s("div", {
|
|
1021
1021
|
class: `${e.prefixCls}-actions ${l.value}`
|
|
1022
1022
|
}, [f]) : null
|
|
1023
1023
|
};
|
|
1024
|
-
}, [() => e.actions, () => e.actionsPlacement]),
|
|
1025
|
-
if (!
|
|
1026
|
-
return
|
|
1024
|
+
}, [() => e.actions, () => e.actionsPlacement]), v = C(() => !!(e.titleTip || e.headerTitle || d.value.left)), p = C(() => !!(e.settings?.length || d.value.right)), P = De(() => {
|
|
1025
|
+
if (!v.value && p.value)
|
|
1026
|
+
return s("div", {
|
|
1027
1027
|
class: `${e.prefixCls}-left ${l.value}`
|
|
1028
1028
|
}, null);
|
|
1029
|
-
const
|
|
1030
|
-
return o.value ?
|
|
1029
|
+
const y = d.value.left;
|
|
1030
|
+
return o.value ? s("div", {
|
|
1031
1031
|
class: `${e.prefixCls}-left ${l.value}`
|
|
1032
|
-
}, [
|
|
1032
|
+
}, [s("div", {
|
|
1033
1033
|
class: `${e.prefixCls}-title ${l.value}`
|
|
1034
|
-
}, [e.headerTitle, e.titleTip &&
|
|
1034
|
+
}, [e.headerTitle, e.titleTip && s(we, {
|
|
1035
1035
|
title: e.titleTipText
|
|
1036
1036
|
}, {
|
|
1037
|
-
default: () => [
|
|
1038
|
-
})]),
|
|
1037
|
+
default: () => [fe(e.titleTip) && e.titleTip ? s(kt, null, null) : e.titleTip]
|
|
1038
|
+
})]), y]) : s("div", {
|
|
1039
1039
|
class: `${e.prefixCls}-left ${l.value}`
|
|
1040
|
-
}, [
|
|
1041
|
-
}, [() =>
|
|
1040
|
+
}, [y]);
|
|
1041
|
+
}, [() => v.value, () => p.value, () => o.value, () => e.prefixCls, () => e.headerTitle, () => e.titleTipText, () => e.titleTip]), r = De(() => {
|
|
1042
1042
|
if (!p.value) return null;
|
|
1043
|
-
const
|
|
1044
|
-
return
|
|
1043
|
+
const y = d.value.right;
|
|
1044
|
+
return s("div", {
|
|
1045
1045
|
class: `${e.prefixCls}-right ${l.value}`,
|
|
1046
1046
|
style: {
|
|
1047
1047
|
alignItems: n.value.lg ? "center" : "flex-end",
|
|
1048
1048
|
flexDirection: n.value.lg ? "row" : "column"
|
|
1049
1049
|
}
|
|
1050
|
-
}, [
|
|
1050
|
+
}, [y, e.settings?.length ? s("div", {
|
|
1051
1051
|
class: ie(`${e.prefixCls}-setting-items`, l.value)
|
|
1052
1052
|
}, [e.settings.map((f, h) => {
|
|
1053
|
-
const
|
|
1054
|
-
return
|
|
1053
|
+
const b = zl(f);
|
|
1054
|
+
return s("div", {
|
|
1055
1055
|
key: h,
|
|
1056
1056
|
class: ie(`${e.prefixCls}-setting-item`, l.value)
|
|
1057
|
-
}, [
|
|
1057
|
+
}, [b]);
|
|
1058
1058
|
})]) : null]);
|
|
1059
|
-
}, [() => n.value, () => p.value, () => e.prefixCls, () => o.value, () => d.value, () => e.settings]),
|
|
1060
|
-
if (!p.value && !
|
|
1061
|
-
const
|
|
1059
|
+
}, [() => n.value, () => p.value, () => e.prefixCls, () => o.value, () => d.value, () => e.settings]), F = De(() => {
|
|
1060
|
+
if (!p.value && !v.value) return null;
|
|
1061
|
+
const y = {
|
|
1062
1062
|
[`${l.value}`]: !0,
|
|
1063
1063
|
[`${e.prefixCls}-container`]: !0,
|
|
1064
1064
|
[`${e.prefixCls}-container-mobile`]: i.value
|
|
1065
1065
|
};
|
|
1066
|
-
return
|
|
1067
|
-
class:
|
|
1068
|
-
}, [
|
|
1069
|
-
}, [() => i.value, () =>
|
|
1070
|
-
return () => a(
|
|
1066
|
+
return s("div", {
|
|
1067
|
+
class: y
|
|
1068
|
+
}, [P.value, r.value]);
|
|
1069
|
+
}, [() => i.value, () => v.value, () => p.value, () => P.value, () => e.prefixCls, () => r.value]);
|
|
1070
|
+
return () => a(s("div", {
|
|
1071
1071
|
class: `${e.prefixCls} ${l.value}`
|
|
1072
|
-
}, [
|
|
1072
|
+
}, [F.value]));
|
|
1073
1073
|
}
|
|
1074
1074
|
});
|
|
1075
|
-
|
|
1076
|
-
const
|
|
1075
|
+
Rt.inheritAttrs = !1;
|
|
1076
|
+
const $t = /* @__PURE__ */ Te({
|
|
1077
1077
|
setup() {
|
|
1078
1078
|
const {
|
|
1079
1079
|
isFullscreen: e
|
|
1080
|
-
} =
|
|
1081
|
-
return () => e.value ?
|
|
1080
|
+
} = Ct();
|
|
1081
|
+
return () => e.value ? s(we, {
|
|
1082
1082
|
title: "退出全屏"
|
|
1083
1083
|
}, {
|
|
1084
|
-
default: () => [
|
|
1085
|
-
}) :
|
|
1084
|
+
default: () => [s(Ht, null, null)]
|
|
1085
|
+
}) : s(we, {
|
|
1086
1086
|
title: "全屏"
|
|
1087
1087
|
}, {
|
|
1088
|
-
default: () => [
|
|
1088
|
+
default: () => [s(qt, null, null)]
|
|
1089
1089
|
});
|
|
1090
1090
|
}
|
|
1091
1091
|
});
|
|
@@ -1093,31 +1093,31 @@ function Yl() {
|
|
|
1093
1093
|
return {
|
|
1094
1094
|
reload: {
|
|
1095
1095
|
text: "刷新",
|
|
1096
|
-
icon:
|
|
1096
|
+
icon: s(Vt, null, null)
|
|
1097
1097
|
},
|
|
1098
1098
|
fullScreen: {
|
|
1099
1099
|
text: "全屏",
|
|
1100
|
-
icon:
|
|
1100
|
+
icon: s($t, null, null)
|
|
1101
1101
|
}
|
|
1102
1102
|
};
|
|
1103
1103
|
}
|
|
1104
1104
|
function El(e, a) {
|
|
1105
|
-
return
|
|
1105
|
+
return pt(e).filter((l) => l).map((l) => {
|
|
1106
1106
|
const n = e[l];
|
|
1107
1107
|
if (!n)
|
|
1108
1108
|
return null;
|
|
1109
1109
|
let i = n === !0 ? a[l] : () => n?.();
|
|
1110
1110
|
if (typeof i != "function" && (i = () => {
|
|
1111
1111
|
}), l === "fullScreen")
|
|
1112
|
-
return
|
|
1112
|
+
return s("span", {
|
|
1113
1113
|
key: l,
|
|
1114
1114
|
onClick: i
|
|
1115
|
-
}, [
|
|
1115
|
+
}, [s($t, null, null)]);
|
|
1116
1116
|
const o = Yl()[l];
|
|
1117
|
-
return o ?
|
|
1117
|
+
return o ? s("span", {
|
|
1118
1118
|
key: l,
|
|
1119
1119
|
onClick: i
|
|
1120
|
-
}, [
|
|
1120
|
+
}, [s(we, {
|
|
1121
1121
|
title: o.text
|
|
1122
1122
|
}, {
|
|
1123
1123
|
default: () => [o.icon]
|
|
@@ -1136,23 +1136,23 @@ const Ll = {
|
|
|
1136
1136
|
props: Ll,
|
|
1137
1137
|
inheritAttrs: !1,
|
|
1138
1138
|
setup(e) {
|
|
1139
|
-
const a =
|
|
1139
|
+
const a = gt({
|
|
1140
1140
|
suffixCls: "table-list-toolbar",
|
|
1141
1141
|
isPor: !0
|
|
1142
1142
|
}), {
|
|
1143
1143
|
action: l
|
|
1144
|
-
} =
|
|
1144
|
+
} = Je(), n = De(() => e.options === !1 ? [] : El({
|
|
1145
1145
|
reload: () => l?.reload(),
|
|
1146
1146
|
fullScreen: () => l?.toggle()
|
|
1147
1147
|
}, U(e.options) ? e.options : {}), [() => e.options]);
|
|
1148
1148
|
return () => {
|
|
1149
1149
|
const i = e.actionsRender || [];
|
|
1150
|
-
return
|
|
1150
|
+
return s(Rt, {
|
|
1151
1151
|
prefixCls: a,
|
|
1152
1152
|
headerTitle: e.headerTitle,
|
|
1153
1153
|
actions: i,
|
|
1154
1154
|
actionsPlacement: e.actionsPlacement,
|
|
1155
|
-
settings:
|
|
1155
|
+
settings: w(n),
|
|
1156
1156
|
titleTip: e.titleTip,
|
|
1157
1157
|
titleTipText: e.titleTipText
|
|
1158
1158
|
}, null);
|
|
@@ -1160,13 +1160,13 @@ const Ll = {
|
|
|
1160
1160
|
}
|
|
1161
1161
|
});
|
|
1162
1162
|
function Ml(e) {
|
|
1163
|
-
return
|
|
1163
|
+
return Yt();
|
|
1164
1164
|
}
|
|
1165
1165
|
function kl(e, a = !0, l) {
|
|
1166
|
-
Ml() ?
|
|
1166
|
+
Ml() ? Nt(e, l) : a ? e() : zt(e);
|
|
1167
1167
|
}
|
|
1168
1168
|
function Hl(e) {
|
|
1169
|
-
const a =
|
|
1169
|
+
const a = C(() => e.draggable), l = C(() => e.neverScroll), n = C(() => e.autoScroll);
|
|
1170
1170
|
return {
|
|
1171
1171
|
draggable: a,
|
|
1172
1172
|
neverScroll: l,
|
|
@@ -1174,8 +1174,8 @@ function Hl(e) {
|
|
|
1174
1174
|
};
|
|
1175
1175
|
}
|
|
1176
1176
|
function ql({ scroll: e, columns: a, breakpoint: l, draggable: n, autoScroll: i, neverScroll: o }) {
|
|
1177
|
-
const d =
|
|
1178
|
-
|
|
1177
|
+
const d = O([]);
|
|
1178
|
+
Y([
|
|
1179
1179
|
() => e.value,
|
|
1180
1180
|
() => a.value,
|
|
1181
1181
|
() => l.value,
|
|
@@ -1184,220 +1184,223 @@ function ql({ scroll: e, columns: a, breakpoint: l, draggable: n, autoScroll: i,
|
|
|
1184
1184
|
() => i.value,
|
|
1185
1185
|
() => o.value
|
|
1186
1186
|
], () => {
|
|
1187
|
-
const f =
|
|
1188
|
-
|
|
1187
|
+
const f = P(xe(a.value));
|
|
1188
|
+
Be(f, xe(d.value)) || (d.value = J(f));
|
|
1189
1189
|
}, {
|
|
1190
1190
|
deep: !0,
|
|
1191
1191
|
immediate: !0
|
|
1192
1192
|
});
|
|
1193
|
-
const
|
|
1194
|
-
const f = p(
|
|
1193
|
+
const v = C(() => {
|
|
1194
|
+
const f = p(w(d).filter(($) => $.fixed === "left")), h = p(w(d).filter(($) => $.fixed !== "left" && $.fixed !== "right")), b = p(w(d).filter(($) => $.fixed === "right"));
|
|
1195
1195
|
return [
|
|
1196
1196
|
...f,
|
|
1197
1197
|
...h,
|
|
1198
|
-
...
|
|
1198
|
+
...b
|
|
1199
1199
|
];
|
|
1200
1200
|
});
|
|
1201
1201
|
function p(f) {
|
|
1202
|
-
return f.sort((h,
|
|
1202
|
+
return f.sort((h, b) => Qt(h, b, "order", 0));
|
|
1203
1203
|
}
|
|
1204
|
-
function
|
|
1205
|
-
return J(f).map((h,
|
|
1206
|
-
if (h.dataIndex === "action" ||
|
|
1204
|
+
function P(f) {
|
|
1205
|
+
return J(f).map((h, b) => {
|
|
1206
|
+
if (h.dataIndex === "action" || b === f.length - 1 ? h.resizable = !1 : h.resizable = fe(h.resizable) ? h.resizable : !!(Oe(h.width) && w(n)), !h.width || w(o))
|
|
1207
1207
|
return h;
|
|
1208
|
-
if (h.dataIndex === "action" &&
|
|
1209
|
-
if (
|
|
1208
|
+
if (h.dataIndex === "action" && w(i))
|
|
1209
|
+
if (w(e)?.x || !w(l))
|
|
1210
1210
|
h.width = h.width || 100, h.fixed = "right";
|
|
1211
1211
|
else {
|
|
1212
|
-
const $ =
|
|
1212
|
+
const $ = w(a).find((te) => te.dataIndex === h.dataIndex);
|
|
1213
1213
|
h.width = $?.width || "", h.fixed = $?.fixed;
|
|
1214
1214
|
}
|
|
1215
1215
|
return h;
|
|
1216
1216
|
});
|
|
1217
1217
|
}
|
|
1218
|
-
function
|
|
1219
|
-
d.value = d.value.map((
|
|
1218
|
+
function r(f, h) {
|
|
1219
|
+
d.value = d.value.map((b) => (b.uuid === h.uuid && (b.width = f), b));
|
|
1220
1220
|
}
|
|
1221
|
-
function
|
|
1221
|
+
function F(f) {
|
|
1222
1222
|
if (f.length <= 0) {
|
|
1223
1223
|
d.value = [];
|
|
1224
1224
|
return;
|
|
1225
1225
|
}
|
|
1226
|
-
|
|
1226
|
+
Be(P(f), xe(d.value)) || (d.value = P(f));
|
|
1227
1227
|
}
|
|
1228
|
-
function
|
|
1229
|
-
|
|
1230
|
-
const
|
|
1228
|
+
function y(f) {
|
|
1229
|
+
F(J(xe(a.value)).map((h) => {
|
|
1230
|
+
const b = h.key ? {
|
|
1231
1231
|
show: f[h.key]?.show,
|
|
1232
1232
|
fixed: f[h.key]?.fixed,
|
|
1233
1233
|
order: f[h.key]?.order
|
|
1234
1234
|
} : {};
|
|
1235
|
-
return { ...h, ...
|
|
1235
|
+
return { ...h, ...b };
|
|
1236
1236
|
}));
|
|
1237
1237
|
}
|
|
1238
1238
|
return {
|
|
1239
1239
|
breakpoint: l,
|
|
1240
|
-
proColumns:
|
|
1241
|
-
setColumns:
|
|
1242
|
-
changeColumns:
|
|
1243
|
-
resizeColumnWidth:
|
|
1240
|
+
proColumns: v,
|
|
1241
|
+
setColumns: F,
|
|
1242
|
+
changeColumns: y,
|
|
1243
|
+
resizeColumnWidth: r
|
|
1244
1244
|
};
|
|
1245
1245
|
}
|
|
1246
1246
|
function Vl(e, a) {
|
|
1247
|
-
const l =
|
|
1247
|
+
const l = C(() => a), n = O(), i = O(e);
|
|
1248
1248
|
function o() {
|
|
1249
|
-
n.value && clearTimeout(n.value);
|
|
1249
|
+
n.value && (clearTimeout(n.value), n.value = null);
|
|
1250
1250
|
}
|
|
1251
|
-
async function d(...
|
|
1252
|
-
return l.value === 0 || l.value === void 0 ? i.value(...
|
|
1253
|
-
|
|
1254
|
-
p(await i.value(...
|
|
1251
|
+
async function d(...v) {
|
|
1252
|
+
return l.value === 0 || l.value === void 0 ? i.value(...v) : (o(), new Promise(async (p) => {
|
|
1253
|
+
v[0]?.immediate ? p(await i.value(...v)) : n.value = setTimeout(async () => {
|
|
1254
|
+
p(await i.value(...v));
|
|
1255
1255
|
}, l.value);
|
|
1256
1256
|
}));
|
|
1257
1257
|
}
|
|
1258
|
-
return
|
|
1258
|
+
return Gt(o), {
|
|
1259
1259
|
cancel: o,
|
|
1260
1260
|
run: d
|
|
1261
1261
|
};
|
|
1262
1262
|
}
|
|
1263
1263
|
function Kl(e) {
|
|
1264
|
-
const a =
|
|
1264
|
+
const a = C(() => e.rowKey), l = C(() => e.polling), n = C(() => e.debounceTime), i = C(() => e.dataSource), o = C(() => e.autoRequest);
|
|
1265
1265
|
return {
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
polling: n,
|
|
1266
|
+
rowKey: a,
|
|
1267
|
+
polling: l,
|
|
1269
1268
|
request: e.request,
|
|
1270
1269
|
postData: e.postData,
|
|
1271
|
-
debounceTime:
|
|
1272
|
-
dataSource:
|
|
1273
|
-
autoRequest:
|
|
1270
|
+
debounceTime: n,
|
|
1271
|
+
dataSource: i,
|
|
1272
|
+
autoRequest: o
|
|
1274
1273
|
};
|
|
1275
1274
|
}
|
|
1276
|
-
function Gl({
|
|
1277
|
-
const
|
|
1278
|
-
|
|
1279
|
-
},
|
|
1280
|
-
const { pagination:
|
|
1281
|
-
if (!
|
|
1282
|
-
return
|
|
1283
|
-
|
|
1284
|
-
A.value = !1;
|
|
1285
|
-
return;
|
|
1286
|
-
}
|
|
1287
|
-
N && $(N);
|
|
1275
|
+
function Gl({ rowKey: e, autoRequest: a, polling: l, request: n, postData: i, dataSource: o, waitRequest: d, debounceTime: v }, { params: p, columns: P, setLoading: r, setColumns: F, removeRowKeys: y, syncSelectedRows: f, defaultState: h, setPagination: b, paginationInfo: $, onRequestError: te, onBeforeSearchSubmit: le, hasCustomRender: Re }, pe) {
|
|
1276
|
+
const ae = O(""), j = O(), me = O(!1), N = O([]), K = O(), Z = O(null), ue = () => {
|
|
1277
|
+
r(!1), x(!1);
|
|
1278
|
+
}, ye = async (D = {}) => {
|
|
1279
|
+
const { pagination: A, filters: I = {}, sorter: W = {}, removeKeys: re = [], isPolling: ne = !1, extra: he } = D;
|
|
1280
|
+
if (!n || !Ie(n))
|
|
1281
|
+
return o.value || [];
|
|
1282
|
+
ne ? x(!0) : r(!0), A && b(A);
|
|
1288
1283
|
try {
|
|
1289
|
-
let
|
|
1290
|
-
if (
|
|
1291
|
-
|
|
1284
|
+
let M = {};
|
|
1285
|
+
if (fe(A) && !A || fe($))
|
|
1286
|
+
M = {};
|
|
1292
1287
|
else {
|
|
1293
|
-
const { current:
|
|
1294
|
-
|
|
1288
|
+
const { current: G = 1, pageSize: ce = 10, total: se } = w($) || {};
|
|
1289
|
+
M.pageNum = Zt({ current: G, pageSize: ce, total: se }, re.length), re.length && y(re), M.pageSize = ce;
|
|
1295
1290
|
}
|
|
1296
|
-
const
|
|
1297
|
-
|
|
1298
|
-
const
|
|
1291
|
+
const be = U(W) ? Object.keys(W).length ? [W] : [] : W;
|
|
1292
|
+
F(w(P).map((G) => {
|
|
1293
|
+
const ce = be.find((se) => (se?.columnKey || se?.field) === G.dataIndex);
|
|
1299
1294
|
return {
|
|
1300
|
-
...
|
|
1301
|
-
sortOrder:
|
|
1295
|
+
...G,
|
|
1296
|
+
sortOrder: ce?.order
|
|
1302
1297
|
};
|
|
1303
1298
|
}));
|
|
1304
1299
|
let Ce = {
|
|
1305
|
-
...
|
|
1306
|
-
...
|
|
1307
|
-
...
|
|
1300
|
+
...M,
|
|
1301
|
+
...w(h),
|
|
1302
|
+
...D.params
|
|
1308
1303
|
};
|
|
1309
1304
|
le && Ie(le) && (Ce = await le({
|
|
1310
1305
|
params: Ce,
|
|
1311
|
-
sorter:
|
|
1312
|
-
filter:
|
|
1313
|
-
extra:
|
|
1306
|
+
sorter: be,
|
|
1307
|
+
filter: I,
|
|
1308
|
+
extra: he
|
|
1314
1309
|
}));
|
|
1315
1310
|
let oe = [];
|
|
1316
|
-
const
|
|
1311
|
+
const je = `use_request_${yt().uuid(10)}`;
|
|
1312
|
+
ae.value = je;
|
|
1313
|
+
const $e = await n?.({
|
|
1317
1314
|
params: J(xe(Ce)),
|
|
1318
|
-
sorter:
|
|
1319
|
-
filter:
|
|
1320
|
-
extra:
|
|
1315
|
+
sorter: be,
|
|
1316
|
+
filter: I,
|
|
1317
|
+
extra: he
|
|
1321
1318
|
});
|
|
1319
|
+
if (ae.value !== je)
|
|
1320
|
+
return [];
|
|
1322
1321
|
if ($e) {
|
|
1323
|
-
const { success:
|
|
1324
|
-
if (!
|
|
1322
|
+
const { success: G = !0, data: ce = [] } = $e;
|
|
1323
|
+
if (!G)
|
|
1325
1324
|
return [];
|
|
1326
|
-
oe =
|
|
1327
|
-
const
|
|
1328
|
-
return
|
|
1329
|
-
total:
|
|
1330
|
-
}),
|
|
1325
|
+
oe = ce, i && Ie(i) && (oe = await i?.(oe)), f(oe);
|
|
1326
|
+
const se = $e.total || oe?.length || 0;
|
|
1327
|
+
return se !== w($)?.total && b({
|
|
1328
|
+
total: se || 0
|
|
1329
|
+
}), Be(oe, J(N.value.map((Me) => Ae(Me, "sortIndex")))) ? w(N) : (R(oe), oe);
|
|
1331
1330
|
} else
|
|
1332
1331
|
return [];
|
|
1333
|
-
} catch (
|
|
1334
|
-
|
|
1332
|
+
} catch (M) {
|
|
1333
|
+
if (te === void 0)
|
|
1334
|
+
throw new Error(M);
|
|
1335
|
+
N.value === void 0 && R([]), te(M);
|
|
1335
1336
|
} finally {
|
|
1336
|
-
|
|
1337
|
+
ue();
|
|
1337
1338
|
}
|
|
1338
1339
|
return [];
|
|
1339
|
-
},
|
|
1340
|
-
if (
|
|
1340
|
+
}, ee = Vl(async (D) => {
|
|
1341
|
+
if (K.value && clearTimeout(K.value), !n)
|
|
1341
1342
|
return;
|
|
1342
|
-
const
|
|
1343
|
-
|
|
1343
|
+
const A = new AbortController();
|
|
1344
|
+
Z.value = A;
|
|
1344
1345
|
try {
|
|
1345
|
-
const
|
|
1346
|
-
|
|
1347
|
-
new Promise((
|
|
1348
|
-
|
|
1349
|
-
ne("aborted"),
|
|
1346
|
+
const I = await Promise.race([
|
|
1347
|
+
ye(D),
|
|
1348
|
+
new Promise((re, ne) => {
|
|
1349
|
+
Z.value?.signal?.addEventListener?.("abort", () => {
|
|
1350
|
+
ne("aborted"), ee.cancel(), ue();
|
|
1350
1351
|
});
|
|
1351
1352
|
})
|
|
1352
1353
|
]);
|
|
1353
|
-
if (
|
|
1354
|
+
if (A.signal.aborted)
|
|
1354
1355
|
return;
|
|
1355
|
-
const W =
|
|
1356
|
-
return W && !
|
|
1357
|
-
|
|
1358
|
-
}, Math.max(W, 2e3))),
|
|
1359
|
-
} catch (
|
|
1360
|
-
if (
|
|
1356
|
+
const W = Ut(l.value, I);
|
|
1357
|
+
return W && !j.value && (K.value = setTimeout(() => {
|
|
1358
|
+
ee.run({ ...D, isPolling: W });
|
|
1359
|
+
}, Math.max(W, 2e3))), I;
|
|
1360
|
+
} catch (I) {
|
|
1361
|
+
if (I === "aborted")
|
|
1361
1362
|
return;
|
|
1362
|
-
throw
|
|
1363
|
+
throw I;
|
|
1363
1364
|
}
|
|
1364
|
-
},
|
|
1365
|
-
|
|
1365
|
+
}, v.value || 30), E = () => {
|
|
1366
|
+
Z.value?.abort(), ee.cancel(), ue();
|
|
1366
1367
|
};
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
}),
|
|
1370
|
-
|
|
1371
|
-
}),
|
|
1372
|
-
|
|
1373
|
-
}, { immediate: !0 }),
|
|
1374
|
-
|
|
1375
|
-
}, {
|
|
1376
|
-
|
|
1377
|
-
}, { deep: !0, immediate: !0 }),
|
|
1378
|
-
|
|
1368
|
+
Et(() => {
|
|
1369
|
+
E(), j.value = !0, clearTimeout(K.value);
|
|
1370
|
+
}), Lt(() => {
|
|
1371
|
+
E(), j.value = !0, clearTimeout(K.value);
|
|
1372
|
+
}), Y(() => l.value, () => {
|
|
1373
|
+
d.value || (l.value ? ee.run({ isPolling: !0 }) : clearTimeout(K.value));
|
|
1374
|
+
}, { immediate: !0 }), Y(() => d.value, () => {
|
|
1375
|
+
d.value ? r(!0) : ee.run({ isPolling: !1 });
|
|
1376
|
+
}, { immediate: !0 }), Y(() => o.value, () => {
|
|
1377
|
+
o.value && R(o.value || []);
|
|
1378
|
+
}, { deep: !0, immediate: !0 }), Y(() => p.value, () => {
|
|
1379
|
+
d.value || a.value && (b({ current: 1 }), ve());
|
|
1380
|
+
}, { deep: !0, immediate: !0 }), Y(() => h.value, (D, A) => {
|
|
1381
|
+
d.value || Be(D, A) || (b({ current: 1 }), ve());
|
|
1379
1382
|
}, { deep: !0, immediate: !0 });
|
|
1380
|
-
function
|
|
1381
|
-
|
|
1383
|
+
function ve() {
|
|
1384
|
+
n ? l.value || (E(), ee.run({ isPolling: !1 })) : R(o.value || []);
|
|
1382
1385
|
}
|
|
1383
|
-
const t =
|
|
1386
|
+
const t = C(() => {
|
|
1384
1387
|
if (Re.value)
|
|
1385
|
-
return
|
|
1386
|
-
const
|
|
1387
|
-
return !
|
|
1388
|
-
}), u =
|
|
1389
|
-
function
|
|
1390
|
-
|
|
1388
|
+
return w(N);
|
|
1389
|
+
const D = P.value.filter((A) => A.show || A.show === void 0);
|
|
1390
|
+
return !w(N) || !D || D.length === 0 ? [] : w(N);
|
|
1391
|
+
}), u = C(() => w(N).some((D) => q(D.children) && D.children.length > 0));
|
|
1392
|
+
function x(D) {
|
|
1393
|
+
me.value = D;
|
|
1391
1394
|
}
|
|
1392
|
-
function g(
|
|
1393
|
-
|
|
1395
|
+
function g(D, A = {}, I = {}, W) {
|
|
1396
|
+
E(), ee.run({ pagination: D, filters: A, sorter: I, extra: W, isPolling: !1 });
|
|
1394
1397
|
}
|
|
1395
|
-
function R(
|
|
1396
|
-
const
|
|
1397
|
-
if (!
|
|
1398
|
-
const
|
|
1399
|
-
|
|
1400
|
-
total:
|
|
1398
|
+
function R(D) {
|
|
1399
|
+
const A = Jt(J(D), w($.value));
|
|
1400
|
+
if (!Be(A, N.value) && (N.value = A, !n || !Ie(n))) {
|
|
1401
|
+
const I = A.length || 0;
|
|
1402
|
+
I !== w($)?.total && b({
|
|
1403
|
+
total: I
|
|
1401
1404
|
});
|
|
1402
1405
|
}
|
|
1403
1406
|
}
|
|
@@ -1405,43 +1408,43 @@ function Gl({ params: e, rowKey: a, autoRequest: l, polling: n, request: i, post
|
|
|
1405
1408
|
dataSource: t,
|
|
1406
1409
|
isTreeDataRef: u,
|
|
1407
1410
|
reSetDataList: R,
|
|
1408
|
-
changeDataValue: (
|
|
1409
|
-
const { key:
|
|
1410
|
-
switch (!
|
|
1411
|
+
changeDataValue: (D) => {
|
|
1412
|
+
const { key: A, row: I, value: W, type: re = "update" } = D, ne = A ?? e.value, he = I?.[ne] ?? W;
|
|
1413
|
+
switch (!I && re !== "delete" && console.warn("row is required"), re) {
|
|
1411
1414
|
case "update":
|
|
1412
|
-
ne &&
|
|
1415
|
+
ne && he && I && (N.value = N.value.map((M) => he === M[ne] ? Se(M, I) : M));
|
|
1413
1416
|
break;
|
|
1414
1417
|
case "push":
|
|
1415
|
-
|
|
1418
|
+
I && N.value.push(I);
|
|
1416
1419
|
break;
|
|
1417
1420
|
case "unshift":
|
|
1418
|
-
|
|
1421
|
+
I && N.value.unshift(I);
|
|
1419
1422
|
break;
|
|
1420
1423
|
case "delete":
|
|
1421
|
-
ne && (
|
|
1424
|
+
ne && (N.value = N.value.filter((M) => W !== M[ne]));
|
|
1422
1425
|
break;
|
|
1423
1426
|
}
|
|
1424
1427
|
},
|
|
1425
1428
|
handleTableChange: g,
|
|
1426
|
-
run: async (
|
|
1427
|
-
|
|
1429
|
+
run: async (D) => {
|
|
1430
|
+
d.value || (n ? await ee.run({ ...D, isPolling: !1 }) : pe("reload"));
|
|
1428
1431
|
}
|
|
1429
1432
|
};
|
|
1430
1433
|
}
|
|
1431
1434
|
function Xl(e) {
|
|
1432
|
-
const a =
|
|
1433
|
-
|
|
1435
|
+
const a = O(l(e.loading.value));
|
|
1436
|
+
Y(() => e.loading.value, (i) => {
|
|
1434
1437
|
a.value = l(i, a.value);
|
|
1435
1438
|
});
|
|
1436
1439
|
function l(i, o = !1) {
|
|
1437
|
-
return
|
|
1440
|
+
return fe(i) ? i : U(i) ? i?.spinning ?? o : o;
|
|
1438
1441
|
}
|
|
1439
1442
|
function n(i) {
|
|
1440
1443
|
a.value = i;
|
|
1441
1444
|
}
|
|
1442
1445
|
return [a, n];
|
|
1443
1446
|
}
|
|
1444
|
-
const
|
|
1447
|
+
const Le = {
|
|
1445
1448
|
current: 1,
|
|
1446
1449
|
pageSize: 10,
|
|
1447
1450
|
size: "default",
|
|
@@ -1449,37 +1452,37 @@ const Ye = {
|
|
|
1449
1452
|
showSizeChanger: !0,
|
|
1450
1453
|
pageSizeOptions: ["10", "20", "50", "100"]
|
|
1451
1454
|
};
|
|
1452
|
-
function
|
|
1455
|
+
function _l({
|
|
1453
1456
|
pagination: e,
|
|
1454
1457
|
pageItemRender: a
|
|
1455
1458
|
}) {
|
|
1456
|
-
const l =
|
|
1457
|
-
...
|
|
1459
|
+
const l = O({
|
|
1460
|
+
...Le
|
|
1458
1461
|
}), n = Qe({
|
|
1459
|
-
pageNum:
|
|
1460
|
-
pageSize:
|
|
1462
|
+
pageNum: Le.current,
|
|
1463
|
+
pageSize: Le.pageSize
|
|
1461
1464
|
});
|
|
1462
|
-
|
|
1465
|
+
Y(() => e.value, () => {
|
|
1463
1466
|
if (e.value === !1) {
|
|
1464
1467
|
l.value = !1;
|
|
1465
1468
|
return;
|
|
1466
1469
|
}
|
|
1467
1470
|
const o = Ie(a) ? {
|
|
1468
1471
|
itemRender: ({
|
|
1469
|
-
page:
|
|
1472
|
+
page: v,
|
|
1470
1473
|
type: p,
|
|
1471
|
-
originalElement:
|
|
1474
|
+
originalElement: P
|
|
1472
1475
|
}) => a ? a({
|
|
1473
|
-
page:
|
|
1476
|
+
page: v,
|
|
1474
1477
|
type: p,
|
|
1475
|
-
originalElement:
|
|
1478
|
+
originalElement: P
|
|
1476
1479
|
}) : null
|
|
1477
1480
|
} : null, d = {
|
|
1478
|
-
...
|
|
1481
|
+
...Le,
|
|
1479
1482
|
...e.value || {},
|
|
1480
1483
|
...o || {}
|
|
1481
1484
|
};
|
|
1482
|
-
e.value?.showTotal || (d.showTotal = (
|
|
1485
|
+
e.value?.showTotal || (d.showTotal = (v) => `共${v < d.pageSize ? 1 : Math.ceil(v / (d.pageSize || 10))}页 ${v}条记录`), l.value = d, Object.assign(n, {
|
|
1483
1486
|
pageNum: d.current,
|
|
1484
1487
|
pageSize: d.pageSize
|
|
1485
1488
|
});
|
|
@@ -1490,9 +1493,9 @@ function Ql({
|
|
|
1490
1493
|
function i(o) {
|
|
1491
1494
|
if (U(l.value) && U(o)) {
|
|
1492
1495
|
const d = {};
|
|
1493
|
-
Object.keys(o).forEach((
|
|
1494
|
-
Object.prototype.hasOwnProperty.call(o,
|
|
1495
|
-
}), Object.keys(d).length > 0 && (Object.assign(l.value, d),
|
|
1496
|
+
Object.keys(o).forEach((v) => {
|
|
1497
|
+
Object.prototype.hasOwnProperty.call(o, v) && l.value[v] === o[v] || (d[v] = o[v]);
|
|
1498
|
+
}), Object.keys(d).length > 0 && (Object.assign(l.value, d), Ql(d) && Object.assign(n, d));
|
|
1496
1499
|
}
|
|
1497
1500
|
}
|
|
1498
1501
|
return {
|
|
@@ -1501,28 +1504,28 @@ function Ql({
|
|
|
1501
1504
|
setPagination: i
|
|
1502
1505
|
};
|
|
1503
1506
|
}
|
|
1504
|
-
function
|
|
1507
|
+
function Ql(e) {
|
|
1505
1508
|
if (typeof e != "object" || e === null)
|
|
1506
1509
|
return !1;
|
|
1507
1510
|
const a = Object.keys(e);
|
|
1508
1511
|
return a.length === 2 && a.includes("pageNum") && a.includes("pageSize");
|
|
1509
1512
|
}
|
|
1510
1513
|
function Ul(e, a) {
|
|
1511
|
-
const l =
|
|
1512
|
-
|
|
1513
|
-
n.value = J(
|
|
1514
|
+
const l = O([]), n = O([]);
|
|
1515
|
+
Y(() => a.value?.selectedRows, (r) => {
|
|
1516
|
+
n.value = J(r || []);
|
|
1514
1517
|
}, {
|
|
1515
1518
|
deep: !0,
|
|
1516
1519
|
immediate: !0
|
|
1517
|
-
}),
|
|
1518
|
-
l.value =
|
|
1520
|
+
}), Y(() => a.value?.selectedRowKeys, (r) => {
|
|
1521
|
+
l.value = el([...r || []]);
|
|
1519
1522
|
}, {
|
|
1520
1523
|
deep: !0,
|
|
1521
1524
|
immediate: !0
|
|
1522
1525
|
});
|
|
1523
|
-
const i = (
|
|
1524
|
-
const
|
|
1525
|
-
e.value && (
|
|
1526
|
+
const i = (r, F) => {
|
|
1527
|
+
const y = a.value?.type || "checkbox";
|
|
1528
|
+
e.value && (F ? r?.[e.value] && y === "checkbox" ? (l.value.push(r[e.value]), n.value.push(r)) : (l.value = [r[e.value]], n.value = [r]) : (l.value = l.value.filter((f) => f !== r[e.value]), n.value = n.value.filter((f) => f[e.value] !== r[e.value])));
|
|
1526
1529
|
}, o = () => {
|
|
1527
1530
|
a.value && a.value?.onChange?.(l.value, n.value);
|
|
1528
1531
|
};
|
|
@@ -1530,18 +1533,18 @@ function Ul(e, a) {
|
|
|
1530
1533
|
selectedKeys: l,
|
|
1531
1534
|
selectedItems: n,
|
|
1532
1535
|
selectRowKey: i,
|
|
1533
|
-
selectAllRowKey: (
|
|
1534
|
-
e.value && (
|
|
1536
|
+
selectAllRowKey: (r, F, y) => {
|
|
1537
|
+
e.value && (r ? F.map((f) => (l.value.every((h) => h !== f?.[e.value]) && f?.[e.value] && (l.value.push(f[e.value]), n.value.push(f)), f)) : y.map((f) => (l.value.includes(f?.[e.value]) && (l.value = l.value.filter((h) => h !== f[e.value]), n.value = n.value.filter((h) => h[e.value] !== f[e.value])), f)));
|
|
1535
1538
|
},
|
|
1536
|
-
removeRowKeys: (
|
|
1537
|
-
l.value = l.value.filter((
|
|
1539
|
+
removeRowKeys: (r) => {
|
|
1540
|
+
l.value = l.value.filter((F) => !r.includes(F)), n.value = n.value.filter((F) => !r.includes(F?.[e.value || ""])), o();
|
|
1538
1541
|
},
|
|
1539
1542
|
changeRowKey: o,
|
|
1540
|
-
syncSelectedRows: (
|
|
1543
|
+
syncSelectedRows: (r) => {
|
|
1541
1544
|
if (e.value && l.value.length !== n.value.length) {
|
|
1542
|
-
const
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
+
const F = n.value.map((f) => f[e.value]), y = l.value.filter((f) => !F.includes(f));
|
|
1546
|
+
r.forEach((f) => {
|
|
1547
|
+
y.includes(f[e.value]) && n.value.push(J(f));
|
|
1545
1548
|
});
|
|
1546
1549
|
}
|
|
1547
1550
|
},
|
|
@@ -1559,47 +1562,47 @@ function Jl(e) {
|
|
|
1559
1562
|
}), a;
|
|
1560
1563
|
}
|
|
1561
1564
|
function Zl({ searchMap: e, columns: a }) {
|
|
1562
|
-
const l =
|
|
1565
|
+
const l = O([]), n = O({});
|
|
1563
1566
|
function i(o) {
|
|
1564
|
-
o.forEach((
|
|
1565
|
-
l.value.some((p) => p.name ===
|
|
1567
|
+
o.forEach((v) => {
|
|
1568
|
+
l.value.some((p) => p.name === v.name) ? l.value = l.value.map((p) => p.name === v.name ? { ...p, ...v } : p) : l.value.push(v);
|
|
1566
1569
|
});
|
|
1567
1570
|
const d = Jl(o);
|
|
1568
1571
|
n.value = { ...n.value, ...d };
|
|
1569
1572
|
}
|
|
1570
|
-
return
|
|
1573
|
+
return Y(() => e.value, () => {
|
|
1571
1574
|
const o = [];
|
|
1572
1575
|
e.value?.forEach((d) => o.push(d)), i(o);
|
|
1573
|
-
}, { deep: !0 }),
|
|
1576
|
+
}, { deep: !0 }), Y(() => a.value, () => {
|
|
1574
1577
|
const o = [];
|
|
1575
1578
|
a.value && a.value?.length && a.value.forEach((d) => {
|
|
1576
1579
|
d.searchConfig && o.push(d.searchConfig);
|
|
1577
1580
|
}), i(o);
|
|
1578
1581
|
}, { deep: !0 }), { formCols: l, defaultState: n };
|
|
1579
1582
|
}
|
|
1580
|
-
function ea({ scroll: e, columns: a, autoScroll: l, modalScroll: n, neverScroll: i, rowSelection: o, screens: d, innerWidth:
|
|
1581
|
-
const
|
|
1582
|
-
let
|
|
1583
|
-
const f =
|
|
1584
|
-
|
|
1585
|
-
|
|
1583
|
+
function ea({ scroll: e, columns: a, autoScroll: l, modalScroll: n, neverScroll: i, rowSelection: o, screens: d, innerWidth: v, scrollBreakpoint: p }) {
|
|
1584
|
+
const P = C(() => p.value ? Oe(p.value) ? v.value > p.value : bt(p.value) ? d.value?.[p.value] : d.value?.xl : d.value?.xl), r = C(() => {
|
|
1585
|
+
let y = 0;
|
|
1586
|
+
const f = w(o) ? 60 : 0, h = 150, b = J(w(a));
|
|
1587
|
+
b.forEach((le) => {
|
|
1588
|
+
y += Number.parseInt(String(le.width)) || 0;
|
|
1586
1589
|
});
|
|
1587
|
-
const
|
|
1588
|
-
return
|
|
1590
|
+
const te = b.filter((le) => !Reflect.has(le, "width")).length;
|
|
1591
|
+
return te !== 0 && (y += te * h), f && (y += f), y;
|
|
1589
1592
|
});
|
|
1590
|
-
return { proScroll:
|
|
1593
|
+
return { proScroll: C(() => i.value ? {} : e.value && pt(e.value).length ? w(e) : n.value ? {
|
|
1591
1594
|
y: e.value?.y || (d.value?.xl ? 400 : 235)
|
|
1592
|
-
} : l.value ?
|
|
1595
|
+
} : l.value ? P.value ? {} : fe(P.value) ? { x: r.value } : {} : {}), breakpoint: P };
|
|
1593
1596
|
}
|
|
1594
1597
|
function ta(e) {
|
|
1595
|
-
const a =
|
|
1596
|
-
|
|
1598
|
+
const a = O(e.size.value || "middle");
|
|
1599
|
+
Y(() => e.size.value, (n) => a.value = n);
|
|
1597
1600
|
function l(n) {
|
|
1598
1601
|
a.value = n || a.value;
|
|
1599
1602
|
}
|
|
1600
1603
|
return [a, l];
|
|
1601
1604
|
}
|
|
1602
|
-
const
|
|
1605
|
+
const Ge = (e) => ({
|
|
1603
1606
|
"&::-webkit-scrollbar": {
|
|
1604
1607
|
width: 4,
|
|
1605
1608
|
height: 4
|
|
@@ -1814,24 +1817,24 @@ const Ke = (e) => ({
|
|
|
1814
1817
|
}
|
|
1815
1818
|
},
|
|
1816
1819
|
[`&${e.componentCls}-beautify-scroll`]: {
|
|
1817
|
-
[`${e.antCls}-table-content`]:
|
|
1818
|
-
[`${e.antCls}-table-body`]:
|
|
1820
|
+
[`${e.antCls}-table-content`]: Ge(e),
|
|
1821
|
+
[`${e.antCls}-table-body`]: Ge(e),
|
|
1819
1822
|
[`${e.antCls}-table-empty`]: {
|
|
1820
|
-
[`${e.antCls}-table-content`]:
|
|
1823
|
+
[`${e.antCls}-table-content`]: Ge(e)
|
|
1821
1824
|
}
|
|
1822
1825
|
}
|
|
1823
1826
|
}
|
|
1824
1827
|
};
|
|
1825
1828
|
};
|
|
1826
1829
|
function aa(e) {
|
|
1827
|
-
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !
|
|
1830
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !Q(e);
|
|
1828
1831
|
}
|
|
1829
1832
|
function na(e, a, l, n) {
|
|
1830
1833
|
if (!a) return e;
|
|
1831
1834
|
let i = e;
|
|
1832
1835
|
if (U(a)) {
|
|
1833
1836
|
const o = a.node === "a" ? "span" : a.node;
|
|
1834
|
-
return
|
|
1837
|
+
return s(o, H(a?.attr || {}, {
|
|
1835
1838
|
class: [a.class, a.node === "a" ? `${l}-a` : ""],
|
|
1836
1839
|
onClick: a.click
|
|
1837
1840
|
}), aa(e) ? e : {
|
|
@@ -1840,21 +1843,21 @@ function na(e, a, l, n) {
|
|
|
1840
1843
|
}
|
|
1841
1844
|
switch (a) {
|
|
1842
1845
|
case "link":
|
|
1843
|
-
i =
|
|
1846
|
+
i = s("span", {
|
|
1844
1847
|
class: [`${l}-a`, n]
|
|
1845
1848
|
}, [e]);
|
|
1846
1849
|
break;
|
|
1847
1850
|
case "time":
|
|
1848
|
-
i =
|
|
1851
|
+
i = V(e).format("HH:mm:ss");
|
|
1849
1852
|
break;
|
|
1850
1853
|
case "dateMonth":
|
|
1851
|
-
i = `${
|
|
1854
|
+
i = `${V(e).month() + 1}月`;
|
|
1852
1855
|
break;
|
|
1853
1856
|
case "date":
|
|
1854
|
-
i =
|
|
1857
|
+
i = V(e).format("YYYY-MM-DD");
|
|
1855
1858
|
break;
|
|
1856
1859
|
case "dateTime":
|
|
1857
|
-
i =
|
|
1860
|
+
i = V(e).format("YYYY-MM-DD HH:mm:ss");
|
|
1858
1861
|
break;
|
|
1859
1862
|
}
|
|
1860
1863
|
return i;
|
|
@@ -1868,15 +1871,15 @@ function ia(e) {
|
|
|
1868
1871
|
a.style.position = "absolute", a.style.opacity = "0", a.value = e, document.body.appendChild(a), a.select(), document.execCommand("copy"), document.body.removeChild(a);
|
|
1869
1872
|
}
|
|
1870
1873
|
function ua(e) {
|
|
1871
|
-
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !
|
|
1874
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !Q(e);
|
|
1872
1875
|
}
|
|
1873
|
-
const
|
|
1876
|
+
const ra = {
|
|
1874
1877
|
reload: !0,
|
|
1875
1878
|
fullScreen: !0
|
|
1876
|
-
},
|
|
1879
|
+
}, sa = ml.useToken, Xe = /* @__PURE__ */ Te({
|
|
1877
1880
|
name: "GProTable",
|
|
1878
1881
|
inheritAttrs: !1,
|
|
1879
|
-
props:
|
|
1882
|
+
props: ge,
|
|
1880
1883
|
emits: ["reset", "reload", "submit", "sizeChange", "expandedRowsChange", "expand", "change", "requestError", "columnsStateChange", "loadingChange"],
|
|
1881
1884
|
slots: Object,
|
|
1882
1885
|
setup(e, {
|
|
@@ -1885,453 +1888,455 @@ const sa = {
|
|
|
1885
1888
|
attrs: n,
|
|
1886
1889
|
expose: i
|
|
1887
1890
|
}) {
|
|
1888
|
-
const o =
|
|
1891
|
+
const o = gt({
|
|
1889
1892
|
suffixCls: "table",
|
|
1890
1893
|
isPor: !0
|
|
1891
1894
|
}), {
|
|
1892
1895
|
wrapSSR: d,
|
|
1893
|
-
hashId:
|
|
1894
|
-
} =
|
|
1896
|
+
hashId: v
|
|
1897
|
+
} = Ue("ProBaseTable", [la], o), {
|
|
1895
1898
|
token: p
|
|
1896
|
-
} =
|
|
1897
|
-
width:
|
|
1898
|
-
} =
|
|
1899
|
-
|
|
1899
|
+
} = sa(), P = _t(), r = vt(), {
|
|
1900
|
+
width: F
|
|
1901
|
+
} = rl(), y = O(!1), f = mt(), h = O(), b = O(), $ = O(e.waitRequest);
|
|
1902
|
+
dt(() => $.value = e.waitRequest);
|
|
1900
1903
|
const {
|
|
1901
|
-
toggle:
|
|
1904
|
+
toggle: te,
|
|
1902
1905
|
isFullscreen: le
|
|
1903
|
-
} =
|
|
1906
|
+
} = Ct(h), Re = C(() => !r.value.xl), pe = C(() => (e.virtualScroll && bl(!e.scroll?.y, "参数scroll的Y值不能为空!"), !!(e.scroll?.y && e.virtualScroll))), ae = C(() => {
|
|
1904
1907
|
if (e.form === !1) return !1;
|
|
1905
|
-
const
|
|
1908
|
+
const m = {
|
|
1906
1909
|
actions: {
|
|
1907
1910
|
resetReload: !0
|
|
1908
1911
|
},
|
|
1909
1912
|
resetText: "重置",
|
|
1910
1913
|
searchText: "查询"
|
|
1911
1914
|
};
|
|
1912
|
-
return U(e.form) ? Se(
|
|
1913
|
-
}),
|
|
1914
|
-
const
|
|
1915
|
-
const
|
|
1916
|
-
return T.key =
|
|
1915
|
+
return U(e.form) ? Se(m, e.form) : m;
|
|
1916
|
+
}), j = C(() => ae.value === !1 ? {} : ae.value), me = C(() => j.value?.autoRequest ?? e.autoRequest), N = C(() => j.value?.actions), K = C(() => {
|
|
1917
|
+
const m = (e.columns || []).filter((T) => T.key || T.dataIndex).map((T) => {
|
|
1918
|
+
const S = T.key || T.dataIndex;
|
|
1919
|
+
return T.key = S, T.dataIndex = S, T.align = T.align || e.align, T.uuid = T.uuid || yt().uuid(15), T;
|
|
1917
1920
|
});
|
|
1918
|
-
return tl(
|
|
1921
|
+
return tl(m, {
|
|
1919
1922
|
align: e.align ?? "left",
|
|
1920
1923
|
showIndex: e.showIndex ?? !1
|
|
1921
1924
|
});
|
|
1922
|
-
}), [
|
|
1923
|
-
loading:
|
|
1924
|
-
}), [
|
|
1925
|
-
size:
|
|
1925
|
+
}), [Z, ue] = Xl({
|
|
1926
|
+
loading: _(e, "loading")
|
|
1927
|
+
}), [ye, ee] = ta({
|
|
1928
|
+
size: _(e, "size")
|
|
1926
1929
|
}), {
|
|
1927
|
-
paginationInfo:
|
|
1928
|
-
requestPagination:
|
|
1930
|
+
paginationInfo: E,
|
|
1931
|
+
requestPagination: ve,
|
|
1929
1932
|
setPagination: t
|
|
1930
|
-
} =
|
|
1931
|
-
pagination:
|
|
1932
|
-
pageItemRender:
|
|
1933
|
+
} = _l({
|
|
1934
|
+
pagination: _(e, "pagination"),
|
|
1935
|
+
pageItemRender: it({
|
|
1933
1936
|
slots: l,
|
|
1934
1937
|
props: e,
|
|
1935
1938
|
key: "pageItemRender"
|
|
1936
1939
|
})
|
|
1937
1940
|
}), {
|
|
1938
1941
|
proScroll: u,
|
|
1939
|
-
breakpoint:
|
|
1942
|
+
breakpoint: x
|
|
1940
1943
|
} = ea({
|
|
1941
|
-
scroll:
|
|
1942
|
-
autoScroll:
|
|
1943
|
-
modalScroll:
|
|
1944
|
-
neverScroll:
|
|
1945
|
-
rowSelection:
|
|
1946
|
-
scrollBreakpoint:
|
|
1947
|
-
innerWidth:
|
|
1948
|
-
columns:
|
|
1949
|
-
screens:
|
|
1944
|
+
scroll: _(e, "scroll"),
|
|
1945
|
+
autoScroll: _(e, "autoScroll"),
|
|
1946
|
+
modalScroll: _(e, "modalScroll"),
|
|
1947
|
+
neverScroll: _(e, "neverScroll"),
|
|
1948
|
+
rowSelection: _(e, "rowSelection"),
|
|
1949
|
+
scrollBreakpoint: _(e, "scrollBreakpoint"),
|
|
1950
|
+
innerWidth: F,
|
|
1951
|
+
columns: K,
|
|
1952
|
+
screens: r
|
|
1950
1953
|
}), g = Hl(e), {
|
|
1951
1954
|
proColumns: R,
|
|
1952
1955
|
setColumns: c,
|
|
1953
|
-
changeColumns:
|
|
1954
|
-
resizeColumnWidth:
|
|
1956
|
+
changeColumns: D,
|
|
1957
|
+
resizeColumnWidth: A
|
|
1955
1958
|
} = ql({
|
|
1956
1959
|
...g,
|
|
1957
|
-
breakpoint:
|
|
1960
|
+
breakpoint: x,
|
|
1958
1961
|
scroll: u,
|
|
1959
|
-
columns:
|
|
1962
|
+
columns: K
|
|
1960
1963
|
}), {
|
|
1961
|
-
formCols:
|
|
1964
|
+
formCols: I,
|
|
1962
1965
|
defaultState: W
|
|
1963
1966
|
} = Zl({
|
|
1964
|
-
searchMap:
|
|
1965
|
-
columns:
|
|
1967
|
+
searchMap: _(e, "searchMap"),
|
|
1968
|
+
columns: K
|
|
1966
1969
|
}), {
|
|
1967
|
-
selectedKeys:
|
|
1970
|
+
selectedKeys: re,
|
|
1968
1971
|
selectedItems: ne,
|
|
1969
|
-
changeRowKey:
|
|
1970
|
-
selectRowKey:
|
|
1971
|
-
selectAllRowKey:
|
|
1972
|
+
changeRowKey: he,
|
|
1973
|
+
selectRowKey: M,
|
|
1974
|
+
selectAllRowKey: be,
|
|
1972
1975
|
syncSelectedRows: Ce,
|
|
1973
1976
|
removeRowKeys: oe,
|
|
1974
|
-
clearAllRowKeys:
|
|
1975
|
-
} = Ul(
|
|
1976
|
-
run:
|
|
1977
|
-
reSetDataList:
|
|
1978
|
-
changeDataValue:
|
|
1979
|
-
isTreeDataRef:
|
|
1977
|
+
clearAllRowKeys: je
|
|
1978
|
+
} = Ul(_(e, "rowKey"), _(e, "rowSelection")), $e = Kl(e), {
|
|
1979
|
+
run: G,
|
|
1980
|
+
reSetDataList: ce,
|
|
1981
|
+
changeDataValue: se,
|
|
1982
|
+
isTreeDataRef: Me,
|
|
1980
1983
|
dataSource: Pe,
|
|
1981
|
-
handleTableChange:
|
|
1984
|
+
handleTableChange: Ze
|
|
1982
1985
|
} = Gl({
|
|
1983
|
-
|
|
1986
|
+
...$e,
|
|
1984
1987
|
waitRequest: $
|
|
1985
1988
|
}, {
|
|
1986
|
-
loading:
|
|
1987
|
-
paginationInfo:
|
|
1989
|
+
loading: Z,
|
|
1990
|
+
paginationInfo: E,
|
|
1988
1991
|
setPagination: t,
|
|
1989
1992
|
removeRowKeys: oe,
|
|
1990
1993
|
syncSelectedRows: Ce,
|
|
1991
1994
|
setLoading: ue,
|
|
1992
1995
|
setColumns: c,
|
|
1996
|
+
params: _(e, "params"),
|
|
1993
1997
|
columns: R,
|
|
1994
1998
|
defaultState: W,
|
|
1999
|
+
onRequestError: e.onRequestError,
|
|
1995
2000
|
onBeforeSearchSubmit: e.onBeforeSearchSubmit,
|
|
1996
|
-
hasCustomRender:
|
|
1997
|
-
}, a),
|
|
1998
|
-
size:
|
|
1999
|
-
scroll:
|
|
2000
|
-
dataSource:
|
|
2001
|
-
pagination:
|
|
2002
|
-
virtualScroll:
|
|
2003
|
-
columns:
|
|
2004
|
-
})),
|
|
2005
|
-
const
|
|
2006
|
-
return !
|
|
2007
|
-
spinning: e.showLoading ?
|
|
2008
|
-
...
|
|
2001
|
+
hasCustomRender: C(() => qe(e.customRender || l?.customRender))
|
|
2002
|
+
}, a), Pt = C(() => ({
|
|
2003
|
+
size: w(ye),
|
|
2004
|
+
scroll: w(u),
|
|
2005
|
+
dataSource: w(Pe),
|
|
2006
|
+
pagination: w(E),
|
|
2007
|
+
virtualScroll: pe.value,
|
|
2008
|
+
columns: w(R).filter((m) => m.show || m.show === void 0)
|
|
2009
|
+
})), et = C(() => {
|
|
2010
|
+
const m = U(e.loading) ? Ae(e.loading, "spinning") : {};
|
|
2011
|
+
return !m.indicator && f?.indicator?.value && (m.indicator = f?.indicator?.value), {
|
|
2012
|
+
spinning: e.showLoading ? qe(Z.value) : !1,
|
|
2013
|
+
...m
|
|
2009
2014
|
};
|
|
2010
|
-
}),
|
|
2011
|
-
let
|
|
2012
|
-
const T = e.direction === "rtl" ? "bottomLeft" : "right",
|
|
2013
|
-
if (
|
|
2014
|
-
const
|
|
2015
|
-
!
|
|
2015
|
+
}), tt = C(() => {
|
|
2016
|
+
let m;
|
|
2017
|
+
const T = e.direction === "rtl" ? "bottomLeft" : "right", S = w(E)?.position;
|
|
2018
|
+
if (S !== null && Array.isArray(S)) {
|
|
2019
|
+
const B = S.find((X) => X.includes("top")), z = S.find((X) => X.includes("bottom")), k = S.every((X) => `${X}` == "none");
|
|
2020
|
+
!B && !z && !k && (m = T), B && (m = B.toLowerCase().replace("top", "")), z && (m = z.toLowerCase().replace("bottom", ""));
|
|
2016
2021
|
} else
|
|
2017
|
-
|
|
2018
|
-
return
|
|
2022
|
+
m = T;
|
|
2023
|
+
return m;
|
|
2019
2024
|
});
|
|
2020
2025
|
kl(() => {
|
|
2021
|
-
|
|
2026
|
+
y.value && e.keepAliveReload ? G() : y.value = !0;
|
|
2022
2027
|
});
|
|
2023
|
-
const
|
|
2024
|
-
if (
|
|
2025
|
-
|
|
2026
|
-
params:
|
|
2028
|
+
const Ft = async (m, T) => {
|
|
2029
|
+
if (me.value) {
|
|
2030
|
+
G({
|
|
2031
|
+
params: m
|
|
2027
2032
|
});
|
|
2028
2033
|
return;
|
|
2029
2034
|
}
|
|
2030
|
-
T === "reset" ? (a("reset",
|
|
2031
|
-
params:
|
|
2032
|
-
})) : e.request && (a("submit",
|
|
2033
|
-
params:
|
|
2035
|
+
T === "reset" ? (a("reset", m), e.request && N.value?.resetReload && G({
|
|
2036
|
+
params: m
|
|
2037
|
+
})) : e.request && (a("submit", m), G({
|
|
2038
|
+
params: m
|
|
2034
2039
|
}));
|
|
2035
|
-
},
|
|
2036
|
-
t(st(
|
|
2037
|
-
},
|
|
2038
|
-
const
|
|
2039
|
-
current:
|
|
2040
|
+
}, lt = (m, T, S, B) => {
|
|
2041
|
+
t(st(m, ["current", "pageSize"])), Ze(m, T, S, B), a("change", m, T, S, B);
|
|
2042
|
+
}, Dt = (m, T) => {
|
|
2043
|
+
const S = {
|
|
2044
|
+
current: m,
|
|
2040
2045
|
pageSize: T,
|
|
2041
|
-
total:
|
|
2046
|
+
total: E.value && E.value?.total || 0
|
|
2042
2047
|
};
|
|
2043
|
-
t(
|
|
2044
|
-
},
|
|
2045
|
-
a("expandedRowsChange",
|
|
2046
|
-
},
|
|
2047
|
-
a("expand",
|
|
2048
|
-
},
|
|
2049
|
-
let
|
|
2048
|
+
t(S), a("change", S), Ze(S);
|
|
2049
|
+
}, It = (m) => {
|
|
2050
|
+
a("expandedRowsChange", m);
|
|
2051
|
+
}, Bt = (m, T) => {
|
|
2052
|
+
a("expand", m, T);
|
|
2053
|
+
}, Ot = (m, T) => A(m, T), At = (m, T, S) => {
|
|
2054
|
+
let B = m;
|
|
2050
2055
|
if (T) {
|
|
2051
|
-
const z =
|
|
2056
|
+
const z = q(m) ? typeof m?.[0]?.children == "string" ? m?.[0]?.children : "" : m ? m.toString() : "", k = S.tooltip === !1 ? {} : S.tooltip, X = S.tooltip === !1 ? 1 : Oe(k?.hiddenLine) && k?.hiddenLine > 0 ? k?.hiddenLine : 1, L = S.tooltip === !1 ? 0 : Oe(k?.width) ? k?.width : 0, Ne = S.tooltip !== !1 && bt(z) && L > 0 ? nl(z, {
|
|
2052
2057
|
cssObject: {
|
|
2053
2058
|
fontSize: "14px",
|
|
2054
2059
|
lineHeight: "22px",
|
|
2055
|
-
fontFamily:
|
|
2056
|
-
...
|
|
2060
|
+
fontFamily: P?.token?.value?.fontFamily || p?.value?.fontFamily,
|
|
2061
|
+
...k?.targetStyle || {}
|
|
2057
2062
|
}
|
|
2058
|
-
}) : 0,
|
|
2063
|
+
}) : 0, ze = document.querySelector(`.${o} .ant-table-tbody`), Ye = s("div", {
|
|
2059
2064
|
class: `${o}-ellipsis-text`
|
|
2060
|
-
}, [
|
|
2061
|
-
title:
|
|
2062
|
-
getPopupContainer: (
|
|
2063
|
-
}, U(
|
|
2065
|
+
}, [m]), nt = () => S.tooltip === !1 || U(S.tooltip) && Ne < L && L > 0 ? Ye : s(we, H({
|
|
2066
|
+
title: m,
|
|
2067
|
+
getPopupContainer: (ke) => ze ?? ke?.parentNode?.parentNode
|
|
2068
|
+
}, U(S.tooltip) ? S.tooltip : {}, {
|
|
2064
2069
|
destroyTooltipOnHide: !0
|
|
2065
|
-
}), ua(
|
|
2066
|
-
default: () => [
|
|
2070
|
+
}), ua(Ye) ? Ye : {
|
|
2071
|
+
default: () => [Ye]
|
|
2067
2072
|
});
|
|
2068
|
-
if (
|
|
2069
|
-
class: `${o}-ellipsis ${
|
|
2073
|
+
if (B = s("div", {
|
|
2074
|
+
class: `${o}-ellipsis ${k?.class ?? ""}`,
|
|
2070
2075
|
style: {
|
|
2071
|
-
"-webkit-line-clamp":
|
|
2076
|
+
"-webkit-line-clamp": X
|
|
2072
2077
|
}
|
|
2073
|
-
}, [
|
|
2074
|
-
const
|
|
2075
|
-
|
|
2078
|
+
}, [nt()]), S.copyable) {
|
|
2079
|
+
const ke = typeof S.copyText == "function" ? S.copyText?.(S) : S.copyText || z;
|
|
2080
|
+
B = s("div", {
|
|
2076
2081
|
class: `${o}-copyable`
|
|
2077
|
-
}, [
|
|
2078
|
-
class: `${o}-ellipsis ${
|
|
2082
|
+
}, [s("div", {
|
|
2083
|
+
class: `${o}-ellipsis ${k?.class ?? ""}`,
|
|
2079
2084
|
style: {
|
|
2080
|
-
"-webkit-line-clamp":
|
|
2085
|
+
"-webkit-line-clamp": X
|
|
2081
2086
|
}
|
|
2082
|
-
}, [
|
|
2087
|
+
}, [nt()]), s(Kt, {
|
|
2083
2088
|
class: `${o}-copyable-icon`,
|
|
2084
2089
|
onClick: () => {
|
|
2085
|
-
ia(
|
|
2090
|
+
ia(ke), gl.success("复制成功");
|
|
2086
2091
|
}
|
|
2087
2092
|
}, null)]);
|
|
2088
2093
|
}
|
|
2089
2094
|
}
|
|
2090
|
-
return
|
|
2095
|
+
return B;
|
|
2091
2096
|
};
|
|
2092
|
-
function
|
|
2093
|
-
const
|
|
2097
|
+
function at() {
|
|
2098
|
+
const m = ol({
|
|
2094
2099
|
slots: l,
|
|
2095
2100
|
props: e,
|
|
2096
2101
|
key: "emptyText"
|
|
2097
2102
|
});
|
|
2098
|
-
if (
|
|
2099
|
-
const
|
|
2100
|
-
return
|
|
2101
|
-
class: ie(`${o}-empty-text`,
|
|
2103
|
+
if (m !== !1 && f?.emptyText?.value !== !1) {
|
|
2104
|
+
const S = e.emptyTextProps?.extraProps || {}, B = m || f?.emptyText?.value, z = Q(B), k = z ? ft(B, S) : ht(q(B) ? B : [B]);
|
|
2105
|
+
return s("div", {
|
|
2106
|
+
class: ie(`${o}-empty-text`, v.value, e.emptyTextProps?.class),
|
|
2102
2107
|
style: e.emptyTextProps?.style
|
|
2103
|
-
}, [z ?
|
|
2108
|
+
}, [z ? k : q(k) ? k.map((X) => _e(X, S)) : s(pl, null, null)]);
|
|
2104
2109
|
}
|
|
2105
2110
|
return null;
|
|
2106
2111
|
}
|
|
2107
|
-
const
|
|
2108
|
-
const
|
|
2112
|
+
const jt = () => {
|
|
2113
|
+
const m = it({
|
|
2109
2114
|
slots: l,
|
|
2110
2115
|
props: e,
|
|
2111
2116
|
key: "customRender"
|
|
2112
2117
|
});
|
|
2113
|
-
if (
|
|
2118
|
+
if (m) {
|
|
2114
2119
|
if (Pe.value?.length) {
|
|
2115
|
-
const T = J(
|
|
2116
|
-
return
|
|
2120
|
+
const T = J(w(Pe));
|
|
2121
|
+
return m?.({
|
|
2117
2122
|
dataSource: T,
|
|
2118
|
-
currentData: oa(T,
|
|
2123
|
+
currentData: oa(T, E.value)
|
|
2119
2124
|
});
|
|
2120
2125
|
}
|
|
2121
|
-
return
|
|
2126
|
+
return at();
|
|
2122
2127
|
}
|
|
2123
|
-
return
|
|
2128
|
+
return s(We, null, null);
|
|
2124
2129
|
};
|
|
2125
2130
|
return xl({
|
|
2126
|
-
tableSize:
|
|
2131
|
+
tableSize: ye,
|
|
2127
2132
|
columns: R,
|
|
2128
|
-
cacheColumns:
|
|
2133
|
+
cacheColumns: K,
|
|
2129
2134
|
isMobile: Re,
|
|
2130
|
-
formConfig:
|
|
2131
|
-
formAutoRequest:
|
|
2132
|
-
formActions:
|
|
2135
|
+
formConfig: j,
|
|
2136
|
+
formAutoRequest: me,
|
|
2137
|
+
formActions: N,
|
|
2133
2138
|
action: {
|
|
2134
|
-
setTableSize:
|
|
2135
|
-
reload: (
|
|
2136
|
-
toggle:
|
|
2139
|
+
setTableSize: ee,
|
|
2140
|
+
reload: (m) => G(m),
|
|
2141
|
+
toggle: te
|
|
2137
2142
|
},
|
|
2138
2143
|
setPagination: t,
|
|
2139
|
-
changeColumns:
|
|
2144
|
+
changeColumns: D
|
|
2140
2145
|
}), i({
|
|
2141
2146
|
formRef: () => ({
|
|
2142
2147
|
getFormState: () => ({
|
|
2143
2148
|
...e.params,
|
|
2144
|
-
...
|
|
2149
|
+
...b.value?.getFormState()
|
|
2145
2150
|
}),
|
|
2146
|
-
getFormInnerState: () =>
|
|
2147
|
-
restFormState: (
|
|
2148
|
-
$.value = !0,
|
|
2151
|
+
getFormInnerState: () => b.value?.getFormState() || {},
|
|
2152
|
+
restFormState: (m) => {
|
|
2153
|
+
$.value = !0, m && m?.(), b.value?.resetForm(!1), $.value = !1;
|
|
2149
2154
|
}
|
|
2150
2155
|
}),
|
|
2151
2156
|
actionRef: () => ({
|
|
2152
|
-
loading:
|
|
2157
|
+
loading: Z,
|
|
2153
2158
|
dataSource: Pe,
|
|
2154
|
-
pageState:
|
|
2155
|
-
pagination:
|
|
2156
|
-
selectedKeys:
|
|
2157
|
-
selectedItems:
|
|
2159
|
+
pageState: ve,
|
|
2160
|
+
pagination: E.value,
|
|
2161
|
+
selectedKeys: C(() => re.value),
|
|
2162
|
+
selectedItems: C(() => ne.value),
|
|
2158
2163
|
rowsSelection: {
|
|
2159
|
-
clear:
|
|
2160
|
-
select:
|
|
2164
|
+
clear: je,
|
|
2165
|
+
select: M,
|
|
2161
2166
|
remove: oe,
|
|
2162
2167
|
sync: Ce,
|
|
2163
|
-
selectAll:
|
|
2168
|
+
selectAll: be
|
|
2164
2169
|
},
|
|
2165
|
-
reload:
|
|
2166
|
-
getLoadingStatus: () =>
|
|
2167
|
-
reloadAndReset: async (
|
|
2170
|
+
reload: G,
|
|
2171
|
+
getLoadingStatus: () => w(Z),
|
|
2172
|
+
reloadAndReset: async (m) => {
|
|
2168
2173
|
$.value = !0, t({
|
|
2169
2174
|
current: 1,
|
|
2170
|
-
pageSize:
|
|
2171
|
-
}),
|
|
2175
|
+
pageSize: ve?.pageSize || 10
|
|
2176
|
+
}), m?.callBack && (m?.wait ? await m?.callBack?.() : m?.callBack?.()), b.value?.resetForm(!1), $.value = !1;
|
|
2172
2177
|
},
|
|
2173
|
-
reSetDataList:
|
|
2174
|
-
setPageAndReload:
|
|
2178
|
+
reSetDataList: ce,
|
|
2179
|
+
setPageAndReload: lt,
|
|
2175
2180
|
setPagination: t,
|
|
2176
|
-
setDataValue:
|
|
2181
|
+
setDataValue: se,
|
|
2177
2182
|
setLoading: ue
|
|
2178
2183
|
})
|
|
2179
2184
|
}), () => {
|
|
2180
|
-
const
|
|
2185
|
+
const m = qe(e.customRender || l.customRender), T = l.actions?.() || e.actionProps?.actions, S = ll({
|
|
2181
2186
|
slots: l,
|
|
2182
2187
|
props: e,
|
|
2183
2188
|
keys: ["headerTitle", "titleTip", "settingExtra"],
|
|
2184
2189
|
render: !0
|
|
2185
2190
|
});
|
|
2186
|
-
return d(
|
|
2191
|
+
return d(s("div", {
|
|
2187
2192
|
ref: h,
|
|
2188
2193
|
class: ie([{
|
|
2189
|
-
[`${
|
|
2194
|
+
[`${v.value}`]: !0,
|
|
2190
2195
|
[`${o}`]: !0,
|
|
2191
2196
|
[`${n.class}`]: n.class,
|
|
2192
|
-
[`${o}-beautify-scroll`]:
|
|
2193
|
-
[`${o}-no-scroll`]: !Object.keys(
|
|
2194
|
-
[`${o}-table-tree`]:
|
|
2197
|
+
[`${o}-beautify-scroll`]: fe(e.useDefaultScrollStyle) ? !e.useDefaultScrollStyle : !0,
|
|
2198
|
+
[`${o}-no-scroll`]: !Object.keys(w(u) || {}).length,
|
|
2199
|
+
[`${o}-table-tree`]: Me.value,
|
|
2195
2200
|
[`${o}-full-screen`]: le.value
|
|
2196
2201
|
}]),
|
|
2197
2202
|
style: n.style
|
|
2198
|
-
}, [
|
|
2199
|
-
class: [`${o}-content`,
|
|
2200
|
-
}, [(
|
|
2201
|
-
ref:
|
|
2203
|
+
}, [s("div", {
|
|
2204
|
+
class: [`${o}-content`, v.value]
|
|
2205
|
+
}, [(I.value.length > 0 || !!l.form) && e.form !== !1 && s(jl, {
|
|
2206
|
+
ref: b,
|
|
2202
2207
|
modalScroll: e.modalScroll,
|
|
2203
2208
|
cardBordered: e.cardBordered,
|
|
2204
|
-
formCols:
|
|
2209
|
+
formCols: I.value,
|
|
2205
2210
|
prefixCls: o,
|
|
2206
|
-
loading:
|
|
2207
|
-
onSearch:
|
|
2211
|
+
loading: w(Z),
|
|
2212
|
+
onSearch: Ft,
|
|
2208
2213
|
defaultState: W.value
|
|
2209
2214
|
}, {
|
|
2210
2215
|
default: l.form ? () => l.form?.() : null
|
|
2211
|
-
}),
|
|
2212
|
-
class: ie(
|
|
2213
|
-
}, [
|
|
2216
|
+
}), s("div", {
|
|
2217
|
+
class: ie(v.value, `${o}-card`, e.cardBordered && `${o}-card-border`)
|
|
2218
|
+
}, [s(Wl, {
|
|
2214
2219
|
options: e.options ? {
|
|
2215
|
-
...
|
|
2220
|
+
...ra,
|
|
2216
2221
|
...U(e.options) ? e.options : {}
|
|
2217
2222
|
} : !1,
|
|
2218
2223
|
titleTipText: e.titleTipText,
|
|
2219
2224
|
actionsPlacement: e.actionProps?.placement,
|
|
2220
2225
|
actionsRender: T,
|
|
2221
|
-
headerTitle:
|
|
2222
|
-
titleTip:
|
|
2223
|
-
settingExtra:
|
|
2224
|
-
}, null),
|
|
2225
|
-
default: () => [
|
|
2226
|
-
class: `${o}-wrapper ${
|
|
2227
|
-
}, [
|
|
2228
|
-
class: ie(`${o}-list`,
|
|
2226
|
+
headerTitle: S.headerTitle,
|
|
2227
|
+
titleTip: S.titleTip,
|
|
2228
|
+
settingExtra: S.settingExtra
|
|
2229
|
+
}, null), m ? s(St, et.value, {
|
|
2230
|
+
default: () => [s("div", {
|
|
2231
|
+
class: `${o}-wrapper ${v.value}`
|
|
2232
|
+
}, [s("div", {
|
|
2233
|
+
class: ie(`${o}-list`, v.value, e.tableProps?.class),
|
|
2229
2234
|
style: e.tableProps?.style
|
|
2230
|
-
}, [
|
|
2235
|
+
}, [jt()]), e.pagination !== !1 && Pe.value?.length > 0 && s(vl, H({
|
|
2231
2236
|
class: {
|
|
2232
|
-
[`${o}-pagination ${
|
|
2233
|
-
[`${o}-pagination-${
|
|
2237
|
+
[`${o}-pagination ${v.value}`]: !0,
|
|
2238
|
+
[`${o}-pagination-${tt.value} ${v.value}`]: !!tt.value
|
|
2234
2239
|
}
|
|
2235
|
-
}, xe(
|
|
2236
|
-
onChange:
|
|
2240
|
+
}, xe(w(E)), {
|
|
2241
|
+
onChange: Dt
|
|
2237
2242
|
}), null)])]
|
|
2238
|
-
}) :
|
|
2243
|
+
}) : s(hl, H(st(e, Object.keys(Tt)), Pt.value, {
|
|
2239
2244
|
style: e.tableProps?.style,
|
|
2240
2245
|
class: e.tableProps?.class,
|
|
2241
|
-
loading:
|
|
2242
|
-
rowKey: (
|
|
2243
|
-
transformCellText: (
|
|
2244
|
-
e.transformCellText && typeof e.transformCellText && e.transformCellText?.(
|
|
2246
|
+
loading: et.value,
|
|
2247
|
+
rowKey: (B) => B[e.rowKey],
|
|
2248
|
+
transformCellText: (B) => {
|
|
2249
|
+
e.transformCellText && typeof e.transformCellText && e.transformCellText?.(B);
|
|
2245
2250
|
const {
|
|
2246
2251
|
column: z
|
|
2247
|
-
} =
|
|
2248
|
-
if (!z) return
|
|
2249
|
-
const
|
|
2250
|
-
let
|
|
2251
|
-
if (
|
|
2252
|
-
if (
|
|
2253
|
-
|
|
2254
|
-
const
|
|
2255
|
-
|
|
2256
|
-
} else
|
|
2257
|
-
return z?.ellipsis ?
|
|
2252
|
+
} = B;
|
|
2253
|
+
if (!z) return B.text;
|
|
2254
|
+
const k = z?.key || z?.dataIndex;
|
|
2255
|
+
let X = !0, L = B.text;
|
|
2256
|
+
if (q(L))
|
|
2257
|
+
if (L.length === 0 || L.length === 1 && !Q(L[0])) {
|
|
2258
|
+
L = L?.[0];
|
|
2259
|
+
const Ne = al(L, z?.columnEmptyText || e?.columnEmptyText || "");
|
|
2260
|
+
X = Ne.success, L = na(Ne.value, z?.valueType || e.columns?.find((ze) => (ze.key || ze.dataIndex) === k)?.valueType, o, v.value);
|
|
2261
|
+
} else L[0]?.type === "template" && (L = L[0]?.children);
|
|
2262
|
+
return z?.ellipsis ? At(L, X, z) : L;
|
|
2258
2263
|
},
|
|
2259
2264
|
rowSelection: e.rowSelection ? {
|
|
2260
|
-
...
|
|
2261
|
-
selectedRowKeys:
|
|
2262
|
-
onSelect:
|
|
2263
|
-
onSelectAll:
|
|
2264
|
-
onChange:
|
|
2265
|
+
...Ae(e.rowSelection, ["onSelect", "onSelectAll", "onChange", "selectedRowKeys"]),
|
|
2266
|
+
selectedRowKeys: re.value || [],
|
|
2267
|
+
onSelect: M,
|
|
2268
|
+
onSelectAll: be,
|
|
2269
|
+
onChange: he
|
|
2265
2270
|
} : void 0,
|
|
2266
|
-
onChange:
|
|
2267
|
-
onExpandedRowsChange:
|
|
2268
|
-
onExpand:
|
|
2269
|
-
onResizeColumn: (
|
|
2271
|
+
onChange: lt,
|
|
2272
|
+
onExpandedRowsChange: It,
|
|
2273
|
+
onExpand: Bt,
|
|
2274
|
+
onResizeColumn: (B, z) => Ot(B, z)
|
|
2270
2275
|
}), {
|
|
2271
2276
|
...l,
|
|
2272
|
-
emptyText: () =>
|
|
2277
|
+
emptyText: () => at()
|
|
2273
2278
|
})])])]));
|
|
2274
2279
|
};
|
|
2275
2280
|
}
|
|
2276
2281
|
});
|
|
2277
|
-
|
|
2282
|
+
Xe.install = (e) => (e.component(Xe.name, Xe), e);
|
|
2278
2283
|
function wa(e, a) {
|
|
2279
2284
|
function l() {
|
|
2280
|
-
const
|
|
2285
|
+
const r = {
|
|
2281
2286
|
params: {},
|
|
2282
2287
|
searchMap: []
|
|
2283
2288
|
};
|
|
2284
2289
|
if (a?.state) {
|
|
2285
|
-
if (
|
|
2286
|
-
return Se(
|
|
2287
|
-
if (U(a.state) && !
|
|
2288
|
-
return Se(
|
|
2290
|
+
if (He(a.state) && U(a.state.value))
|
|
2291
|
+
return Se(r, J(a.state.value));
|
|
2292
|
+
if (U(a.state) && !He(a.state))
|
|
2293
|
+
return Se(r, J(a.state));
|
|
2289
2294
|
}
|
|
2290
|
-
return
|
|
2295
|
+
return r;
|
|
2291
2296
|
}
|
|
2292
2297
|
const n = Qe(Se(l(), {
|
|
2293
2298
|
request: a?.request
|
|
2294
2299
|
}));
|
|
2295
|
-
a?.state &&
|
|
2300
|
+
a?.state && Y(() => a.state && He(a.state) ? a.state.value : a.state, () => {
|
|
2296
2301
|
p();
|
|
2297
2302
|
}, { deep: !0 });
|
|
2298
|
-
const i =
|
|
2303
|
+
const i = C(() => e?.value?.actionRef?.()), o = C(() => e?.value?.formRef?.()), d = C(() => ({
|
|
2299
2304
|
...i.value?.pageState || {},
|
|
2300
2305
|
...o.value?.getFormState?.() || {}
|
|
2301
|
-
})),
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
}),
|
|
2305
|
-
i.value?.setLoading?.(!!
|
|
2306
|
+
})), v = O(!!i.value?.loading?.value);
|
|
2307
|
+
Y(() => i.value?.loading?.value, (r) => {
|
|
2308
|
+
v.value = !!r;
|
|
2309
|
+
}), Y(v, (r) => {
|
|
2310
|
+
i.value?.setLoading?.(!!r);
|
|
2306
2311
|
});
|
|
2307
2312
|
function p() {
|
|
2308
2313
|
il(n, l());
|
|
2309
2314
|
}
|
|
2310
|
-
function
|
|
2311
|
-
n.searchMap && (n.searchMap = J(n.searchMap).map((
|
|
2315
|
+
function P(r, F) {
|
|
2316
|
+
n.searchMap && (n.searchMap = J(n.searchMap).map((y) => y.name === r ? Se(y, F) : y));
|
|
2312
2317
|
}
|
|
2313
2318
|
return {
|
|
2314
2319
|
formRef: o,
|
|
2315
2320
|
actionRef: i,
|
|
2316
2321
|
tableState: n,
|
|
2317
2322
|
requestSearch: d,
|
|
2318
|
-
loading:
|
|
2319
|
-
dataSource:
|
|
2320
|
-
selectedKeys:
|
|
2321
|
-
selectedItems:
|
|
2323
|
+
loading: v,
|
|
2324
|
+
dataSource: C(() => i?.value?.dataSource?.value || []),
|
|
2325
|
+
selectedKeys: C(() => i?.value?.selectedKeys?.value || []),
|
|
2326
|
+
selectedItems: C(() => i?.value?.selectedItems?.value || []),
|
|
2322
2327
|
rowsSelection: i?.value?.rowsSelection,
|
|
2323
|
-
mutate: (
|
|
2324
|
-
reloadAndReset: (
|
|
2325
|
-
setPageAndReload: (
|
|
2326
|
-
setPagination: (
|
|
2327
|
-
setLoading: (
|
|
2328
|
-
setDataValue: (
|
|
2329
|
-
reload: (
|
|
2330
|
-
updateSearchMap:
|
|
2328
|
+
mutate: (r) => i.value?.reSetDataList?.(r),
|
|
2329
|
+
reloadAndReset: (r) => i.value?.reloadAndReset?.(r),
|
|
2330
|
+
setPageAndReload: (r, F, y, f) => i.value?.setPageAndReload?.(r, F, y, f),
|
|
2331
|
+
setPagination: (r) => i.value?.setPagination?.(r),
|
|
2332
|
+
setLoading: (r) => v.value = r,
|
|
2333
|
+
setDataValue: (r) => i.value?.setDataValue?.(r),
|
|
2334
|
+
reload: (r) => i.value?.reload?.(r),
|
|
2335
|
+
updateSearchMap: P
|
|
2331
2336
|
};
|
|
2332
2337
|
}
|
|
2333
2338
|
export {
|
|
2334
|
-
|
|
2335
|
-
|
|
2339
|
+
Xe as GProTable,
|
|
2340
|
+
ge as proTableProps,
|
|
2336
2341
|
wa as useTable
|
|
2337
2342
|
};
|