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