@gx-design-vue/pro-table 0.2.0-beta.117 → 0.2.0-beta.119
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/hooks/usePagination.d.ts +4 -5
- package/dist/pro-table.js +949 -934
- package/dist/pro-table.umd.cjs +3 -3
- package/package.json +5 -5
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.118
|
|
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-08-
|
|
8
|
+
* Date Created: 2025-08-17
|
|
9
9
|
* Homepage:
|
|
10
10
|
* Contact: gx12358@gmail.com
|
|
11
11
|
*/
|
|
12
|
-
import { defineComponent as ne, ref as
|
|
13
|
-
import { UpOutlined as hl, DownOutlined as
|
|
12
|
+
import { defineComponent as ne, ref as P, watch as N, cloneVNode as Ve, reactive as be, watchEffect as Ne, computed as S, createVNode as i, Fragment as ke, isVNode as U, mergeProps as M, h as Tt, unref as p, createTextVNode as Ae, renderSlot as ol, onActivated as il, nextTick as ul, getCurrentInstance as sl, toRaw as ve, onUnmounted as rl, onDeactivated as cl, onMounted as dl, toRef as se, isRef as _e, isReactive as fl } from "vue";
|
|
13
|
+
import { UpOutlined as hl, DownOutlined as ml, SettingOutlined as $t, VerticalAlignTopOutlined as vl, VerticalAlignMiddleOutlined as gl, VerticalAlignBottomOutlined as pl, InfoCircleOutlined as yl, ColumnHeightOutlined as bl, FullscreenExitOutlined as Cl, FullscreenOutlined as xl, ReloadOutlined as Sl, CopyOutlined as wl } from "@ant-design/icons-vue";
|
|
14
14
|
import { useProAppContext as Rt } from "@gx-design-vue/pro-app";
|
|
15
|
-
import { useContext as
|
|
16
|
-
import { isArray as
|
|
17
|
-
import { useDebounceFn as
|
|
18
|
-
import { Grid as
|
|
19
|
-
import { omit as
|
|
20
|
-
import { tableProps as
|
|
15
|
+
import { useContext as Tl, getProSolidColor as Ft, useProStyle as He, unit as yt, useProConfigContext as $l } from "@gx-design-vue/pro-provider";
|
|
16
|
+
import { isArray as V, isBoolean as le, classNames as re, isNumber as De, filterEmpty as Bt, getPrefixCls as lt, getRandomNumber as tt, genColumnKey as Pt, isDeepEqualReact as Ye, cloneDeep as Z, compareArray as Rl, isObject as q, runFunction as Fl, convertValueBoolean as we, getSortIndex as Bl, isFunction as Ie, handleCurrentPage as Pl, deepMerge as It, arrayRepeat as Il, isString as kt, handleShowIndex as kl, getSlot as bt, handleEmptyField as Al, getSlotsProps as Ol, getTextWidth as Dl, getSlotVNode as jl } from "@gx-design-vue/pro-utils";
|
|
17
|
+
import { useDebounceFn as Nl, useFullscreen as At, useWindowSize as El, toReactive as Ml } from "@vueuse/core";
|
|
18
|
+
import { Grid as at, DatePicker as Ot, Space as ge, Input as ze, TimePicker as zl, TreeSelect as Kl, Select as Yl, InputNumber as Qe, Button as Ct, Spin as Dt, Popover as Ll, Checkbox as Wl, Tooltip as de, Tree as Vl, Dropdown as Hl, Menu as Ke, theme as ql, Pagination as Gl, Table as _l, message as Ql, Empty as Xl } from "ant-design-vue";
|
|
19
|
+
import { omit as je, cloneDeep as jt, pick as xt } from "lodash-es";
|
|
20
|
+
import { tableProps as Ul } from "ant-design-vue/es/table/Table";
|
|
21
21
|
import "ant-design-vue/es/_util/props-util";
|
|
22
|
-
import { warning as
|
|
23
|
-
import
|
|
24
|
-
import { useMemo as
|
|
25
|
-
const
|
|
26
|
-
...
|
|
22
|
+
import { warning as Le } from "ant-design-vue/es/vc-util/warning";
|
|
23
|
+
import H from "dayjs";
|
|
24
|
+
import { useMemo as We, tryOnUnmounted as Jl } from "@gx-design-vue/pro-hooks";
|
|
25
|
+
const Zl = ["rowKey", "rowSelection", "columns", "pagination", "size", "bordered", "loading"], Nt = {
|
|
26
|
+
...je(Ul(), Zl),
|
|
27
27
|
transformCellText: Function,
|
|
28
28
|
/**
|
|
29
29
|
* @Author gx12358
|
|
@@ -43,8 +43,8 @@ const Jl = ["rowKey", "rowSelection", "columns", "pagination", "size", "bordered
|
|
|
43
43
|
type: Object,
|
|
44
44
|
default: void 0
|
|
45
45
|
}
|
|
46
|
-
}, { provideContext:
|
|
47
|
-
...
|
|
46
|
+
}, { provideContext: ea, useInjectContext: fe } = Tl("pro-table"), ce = {
|
|
47
|
+
...Nt,
|
|
48
48
|
rowSelection: {
|
|
49
49
|
type: Object,
|
|
50
50
|
default: void 0
|
|
@@ -320,7 +320,7 @@ const Jl = ["rowKey", "rowSelection", "columns", "pagination", "size", "bordered
|
|
|
320
320
|
onRequestError: Function,
|
|
321
321
|
onBeforeSearchSubmit: Function,
|
|
322
322
|
onColumnsStateChange: Function
|
|
323
|
-
},
|
|
323
|
+
}, ta = /* @__PURE__ */ ne({
|
|
324
324
|
name: "RequestSelect",
|
|
325
325
|
props: {
|
|
326
326
|
fetch: Function,
|
|
@@ -341,53 +341,53 @@ const Jl = ["rowKey", "rowSelection", "columns", "pagination", "size", "bordered
|
|
|
341
341
|
setup(e, {
|
|
342
342
|
slots: a
|
|
343
343
|
}) {
|
|
344
|
-
const l =
|
|
345
|
-
return
|
|
346
|
-
if (
|
|
347
|
-
const
|
|
348
|
-
e.fetch && !
|
|
349
|
-
l.value =
|
|
350
|
-
}).catch((
|
|
351
|
-
console.error(
|
|
344
|
+
const l = P([]), n = P(e.loading ?? !1), u = P("init"), o = Nl(e.fetch, e.debounceTime || 10);
|
|
345
|
+
return N([() => e.fetch, () => e.manual], () => {
|
|
346
|
+
if (u.value !== "init" && n.value) return;
|
|
347
|
+
const c = e.manual ?? !1;
|
|
348
|
+
e.fetch && !c && (n.value = !0, o().then((h) => {
|
|
349
|
+
l.value = jt(h), u.value = "success";
|
|
350
|
+
}).catch((h) => {
|
|
351
|
+
console.error(h), u.value = "error";
|
|
352
352
|
}).finally(() => {
|
|
353
353
|
n.value = !1;
|
|
354
354
|
}));
|
|
355
355
|
}, {
|
|
356
356
|
immediate: !0
|
|
357
357
|
}), () => {
|
|
358
|
-
const
|
|
359
|
-
return Ve(
|
|
358
|
+
const c = a.default?.();
|
|
359
|
+
return Ve(V(c) ? c[0] : c, {
|
|
360
360
|
options: l.value,
|
|
361
361
|
notFoundContent: e.notFoundContent?.(n.value)
|
|
362
362
|
});
|
|
363
363
|
};
|
|
364
364
|
}
|
|
365
365
|
});
|
|
366
|
-
function
|
|
366
|
+
function la(e, a) {
|
|
367
367
|
const l = be({});
|
|
368
368
|
function n() {
|
|
369
|
-
Object.keys(e).forEach((
|
|
370
|
-
|
|
369
|
+
Object.keys(e).forEach((c) => {
|
|
370
|
+
u(c, e[c]);
|
|
371
371
|
});
|
|
372
|
-
const
|
|
373
|
-
|
|
374
|
-
e[
|
|
375
|
-
e[
|
|
372
|
+
const o = a.find((c) => c.valueType === "dateRange");
|
|
373
|
+
o && u(o.name || "", e[o.rangeStartName || "start"] ? [
|
|
374
|
+
e[o.rangeStartName || "start"],
|
|
375
|
+
e[o.rangeEndName || "end"]
|
|
376
376
|
] : []);
|
|
377
377
|
}
|
|
378
|
-
|
|
378
|
+
Ne(() => {
|
|
379
379
|
n();
|
|
380
380
|
});
|
|
381
|
-
function o
|
|
382
|
-
l[
|
|
381
|
+
function u(o, c) {
|
|
382
|
+
l[o] = c;
|
|
383
383
|
}
|
|
384
384
|
return {
|
|
385
385
|
formState: l,
|
|
386
386
|
resetFormState: n,
|
|
387
|
-
changeFormState:
|
|
387
|
+
changeFormState: u
|
|
388
388
|
};
|
|
389
389
|
}
|
|
390
|
-
const
|
|
390
|
+
const aa = (e) => ({
|
|
391
391
|
[`${e.componentCls}-search`]: {
|
|
392
392
|
position: "relative",
|
|
393
393
|
display: "flex",
|
|
@@ -473,7 +473,7 @@ const la = (e) => ({
|
|
|
473
473
|
justifyContent: "center",
|
|
474
474
|
alignItems: "center"
|
|
475
475
|
}
|
|
476
|
-
}),
|
|
476
|
+
}), Xe = [
|
|
477
477
|
{ value: "xxl", span: 4 },
|
|
478
478
|
{ value: "xl", span: 3 },
|
|
479
479
|
{ value: "lg", span: 2 },
|
|
@@ -481,42 +481,42 @@ const la = (e) => ({
|
|
|
481
481
|
{ value: "sm", span: 2 },
|
|
482
482
|
{ value: "xs", span: 1 }
|
|
483
483
|
];
|
|
484
|
-
function
|
|
485
|
-
return typeof a == "function" ? a(
|
|
484
|
+
function me(e, a) {
|
|
485
|
+
return typeof a == "function" ? a(H(e)) : H(e).format(a);
|
|
486
486
|
}
|
|
487
487
|
function Pe(e, a) {
|
|
488
488
|
return a ? "YYYY-MM-DD HH:mm:ss" : e ?? "YYYY-MM-DD";
|
|
489
489
|
}
|
|
490
490
|
const St = (e, a, l = "string") => {
|
|
491
|
-
if (
|
|
492
|
-
const [n,
|
|
493
|
-
let
|
|
494
|
-
if (Array.isArray(a) ? (
|
|
495
|
-
const
|
|
496
|
-
return [
|
|
491
|
+
if (V(e)) {
|
|
492
|
+
const [n, u] = e;
|
|
493
|
+
let o, c;
|
|
494
|
+
if (Array.isArray(a) ? (o = a[0], c = a[1]) : typeof a == "object" && a.type === "mask" ? (o = a.format, c = a.format) : (o = a, c = a), l === "string") {
|
|
495
|
+
const h = n ? me(n, o) : "", x = u ? me(u, c) : "";
|
|
496
|
+
return [h, x];
|
|
497
497
|
}
|
|
498
|
-
return [
|
|
498
|
+
return [H(n), H(u)];
|
|
499
499
|
}
|
|
500
500
|
};
|
|
501
|
-
function
|
|
501
|
+
function na(e) {
|
|
502
502
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !U(e);
|
|
503
503
|
}
|
|
504
504
|
const {
|
|
505
|
-
useBreakpoint:
|
|
506
|
-
} =
|
|
507
|
-
MonthPicker:
|
|
508
|
-
RangePicker:
|
|
509
|
-
YearPicker:
|
|
510
|
-
WeekPicker:
|
|
511
|
-
QuarterPicker:
|
|
512
|
-
} =
|
|
513
|
-
function
|
|
505
|
+
useBreakpoint: oa
|
|
506
|
+
} = at, {
|
|
507
|
+
MonthPicker: ia,
|
|
508
|
+
RangePicker: ua,
|
|
509
|
+
YearPicker: sa,
|
|
510
|
+
WeekPicker: ra,
|
|
511
|
+
QuarterPicker: ca
|
|
512
|
+
} = Ot;
|
|
513
|
+
function da(e) {
|
|
514
514
|
let a = e.reduce((l, n) => n.order !== void 0 ? Math.max(l, n.order) : l, 0);
|
|
515
515
|
return e.forEach((l) => {
|
|
516
516
|
l.order === void 0 && (a += 1, l.order = a);
|
|
517
517
|
}), e.sort((l, n) => l.order - n.order), e;
|
|
518
518
|
}
|
|
519
|
-
const
|
|
519
|
+
const fa = {
|
|
520
520
|
modal: ce.modalScroll,
|
|
521
521
|
searchMap: {
|
|
522
522
|
type: Array,
|
|
@@ -527,156 +527,156 @@ const da = {
|
|
|
527
527
|
prefixCls: String,
|
|
528
528
|
defaultParams: Object,
|
|
529
529
|
onSearch: Function
|
|
530
|
-
},
|
|
530
|
+
}, Et = /* @__PURE__ */ ne({
|
|
531
531
|
name: "ProTableForm",
|
|
532
|
-
props:
|
|
532
|
+
props: fa,
|
|
533
533
|
setup(e, {
|
|
534
534
|
slots: a,
|
|
535
535
|
expose: l
|
|
536
536
|
}) {
|
|
537
537
|
const {
|
|
538
538
|
wrapSSR: n,
|
|
539
|
-
hashId:
|
|
540
|
-
} =
|
|
541
|
-
manualSearch:
|
|
542
|
-
searchConfig:
|
|
543
|
-
searchActions:
|
|
539
|
+
hashId: u
|
|
540
|
+
} = He("ProTableForm", [aa], e.prefixCls), o = Rt(), c = oa(), {
|
|
541
|
+
manualSearch: h,
|
|
542
|
+
searchConfig: x,
|
|
543
|
+
searchActions: y
|
|
544
544
|
} = fe(), {
|
|
545
545
|
formState: r,
|
|
546
546
|
resetFormState: C,
|
|
547
|
-
changeFormState:
|
|
548
|
-
} =
|
|
549
|
-
|
|
550
|
-
|
|
547
|
+
changeFormState: d
|
|
548
|
+
} = la(e.defaultParams || {}, e.searchMap || []), m = P(x.value?.collapsed ?? x.value?.defaultCollapsed), b = S(() => le(y.value?.reset) ? y.value?.reset : h.value), v = S(() => I(x.value?.span)), F = S(() => x.value?.label);
|
|
549
|
+
N(() => x.value?.collapsed, (t) => {
|
|
550
|
+
m.value = t;
|
|
551
551
|
});
|
|
552
|
-
function
|
|
552
|
+
function I(t) {
|
|
553
553
|
let f = 4;
|
|
554
|
-
for (let R = 0; R <
|
|
555
|
-
const $ =
|
|
556
|
-
if (
|
|
557
|
-
f = t?.[$] || (e.modal ? 3 :
|
|
554
|
+
for (let R = 0; R < Xe.length; R += 1) {
|
|
555
|
+
const $ = Xe[R].value;
|
|
556
|
+
if (c.value[$]) {
|
|
557
|
+
f = t?.[$] || (e.modal ? 3 : Xe[R].span);
|
|
558
558
|
break;
|
|
559
559
|
}
|
|
560
560
|
}
|
|
561
561
|
return f;
|
|
562
562
|
}
|
|
563
563
|
const k = (t) => {
|
|
564
|
-
|
|
565
|
-
},
|
|
564
|
+
m.value = t;
|
|
565
|
+
}, E = (t, f, R) => (t + 1) % f === 0 ? {
|
|
566
566
|
...R,
|
|
567
567
|
marginRight: 0
|
|
568
568
|
} : {
|
|
569
569
|
...R,
|
|
570
570
|
marginRight: "2%"
|
|
571
571
|
}, L = () => {
|
|
572
|
-
const t =
|
|
573
|
-
return f && (t[f.name] = r[f.name] || f.initialValue || ""), R && (t[R.rangeStartName || "start"] = t[R.name] ? t[R.name][0] : "", t[R.rangeEndName || "end"] = t[R.name] ? t[R.name][1] : "", delete t[R.name]), $ && ($?.name &&
|
|
572
|
+
const t = jt(r), f = e.searchMap.find((T) => T.valueType === "text") || "", R = e.searchMap.find((T) => T.valueType === "dateRange") || "", $ = e.searchMap.find((T) => T.valueType === "treeSelect");
|
|
573
|
+
return f && (t[f.name] = r[f.name] || f.initialValue || ""), R && (t[R.rangeStartName || "start"] = t[R.name] ? t[R.name][0] : "", t[R.rangeEndName || "end"] = t[R.name] ? t[R.name][1] : "", delete t[R.name]), $ && ($?.name && V(r[$?.name]) && (t[$.name] = r[$.name].length ? r[$.name].map((T) => T[$.valueKey === "text" ? "label" : "value"]).join() : ""), $?.name && V(t[$?.name]) && (t[$.name] = t[$.name].length ? t[$.name].map((T) => T[$.valueKey === "text" ? "label" : "value"]) : "")), t;
|
|
574
574
|
}, W = (t = !1, f) => {
|
|
575
|
-
(!
|
|
575
|
+
(!h.value || t) && e.onSearch?.(L(), t ? f ? "reset" : "submit" : void 0);
|
|
576
576
|
}, O = (t, f, R) => {
|
|
577
577
|
const $ = r[f.name || ""];
|
|
578
578
|
switch (f.valueType) {
|
|
579
579
|
case "text":
|
|
580
|
-
|
|
580
|
+
d(f.name || "", t || "");
|
|
581
581
|
break;
|
|
582
582
|
case "number":
|
|
583
|
-
|
|
583
|
+
d(f.name || "", t || void 0);
|
|
584
584
|
break;
|
|
585
585
|
case "numberRange":
|
|
586
|
-
|
|
586
|
+
De(R?.key) && ($[R.key] = t, d(f.name || "", $ || []));
|
|
587
587
|
break;
|
|
588
588
|
case "select":
|
|
589
|
-
|
|
589
|
+
d(f.name || "", t ?? void 0);
|
|
590
590
|
break;
|
|
591
591
|
case "treeSelect":
|
|
592
|
-
|
|
592
|
+
d(f.name || "", t ?? (f.field?.treeCheckable || f.field?.multiple ? [] : null));
|
|
593
593
|
break;
|
|
594
594
|
case "date":
|
|
595
|
-
|
|
595
|
+
d(f.name || "", t ? me(t, Pe(f.valueFormat, f.showTime)) : null);
|
|
596
596
|
break;
|
|
597
597
|
case "dateWeek":
|
|
598
|
-
|
|
598
|
+
d(f.name || "", t ? me(t, "YYYY-wo") : null);
|
|
599
599
|
break;
|
|
600
600
|
case "dateMonth":
|
|
601
|
-
|
|
601
|
+
d(f.name || "", t ? me(t, "YYYY-MM") : null);
|
|
602
602
|
break;
|
|
603
603
|
case "dateQuarter":
|
|
604
|
-
|
|
604
|
+
d(f.name || "", t ? me(t, "YYYY-QQ") : null);
|
|
605
605
|
break;
|
|
606
606
|
case "dateYear":
|
|
607
|
-
|
|
607
|
+
d(f.name || "", t ? me(t, "YYYY") : null);
|
|
608
608
|
break;
|
|
609
609
|
case "dateRange":
|
|
610
|
-
|
|
610
|
+
d(f.name || "", t && V(t) && t.length === 2 ? St(t, Pe(f.valueFormat, f.showTime)) : null);
|
|
611
611
|
break;
|
|
612
612
|
case "time":
|
|
613
|
-
|
|
613
|
+
d(f.name || "", t ? me(t, f.valueFormat || "HH:mm:ss") : null);
|
|
614
614
|
break;
|
|
615
615
|
}
|
|
616
616
|
f.valueType === "treeSelect" || f.valueType, W();
|
|
617
|
-
},
|
|
617
|
+
}, j = (t = !0) => {
|
|
618
618
|
C(), W(!0, t);
|
|
619
619
|
};
|
|
620
620
|
l({
|
|
621
621
|
getFormState: () => L(),
|
|
622
|
-
resetForm:
|
|
622
|
+
resetForm: j
|
|
623
623
|
});
|
|
624
624
|
const D = () => {
|
|
625
|
-
const t =
|
|
625
|
+
const t = o?.emptyText?.value;
|
|
626
626
|
if (t) {
|
|
627
627
|
const f = U(t), R = f ? Tt(t) : Bt(t || []);
|
|
628
|
-
return
|
|
629
|
-
class: re(`${e.prefixCls}-search-empty-text`,
|
|
630
|
-
}, [f ? R :
|
|
628
|
+
return i("div", {
|
|
629
|
+
class: re(`${e.prefixCls}-search-empty-text`, u.value)
|
|
630
|
+
}, [f ? R : V(R) ? R.map(($) => Ve($)) : void 0]);
|
|
631
631
|
}
|
|
632
|
-
}, ee = () => (
|
|
633
|
-
default: () => [
|
|
634
|
-
onClick: () =>
|
|
632
|
+
}, ee = () => (h.value || b.value) && i(ge, null, {
|
|
633
|
+
default: () => [b.value && i(Ct, {
|
|
634
|
+
onClick: () => j()
|
|
635
635
|
}, {
|
|
636
|
-
default: () => [
|
|
637
|
-
}),
|
|
636
|
+
default: () => [y.value?.resetText || "重置"]
|
|
637
|
+
}), h.value && i(Ct, {
|
|
638
638
|
loading: e.loading,
|
|
639
639
|
type: "primary",
|
|
640
640
|
onClick: () => W(!0)
|
|
641
641
|
}, {
|
|
642
|
-
default: () => [
|
|
642
|
+
default: () => [y.value?.searchText || "查询"]
|
|
643
643
|
})]
|
|
644
644
|
}), oe = ({
|
|
645
645
|
formItemStyle: t,
|
|
646
646
|
collapsed: f,
|
|
647
647
|
collapseRender: R = !0
|
|
648
|
-
}) =>
|
|
648
|
+
}) => i("div", {
|
|
649
649
|
style: t,
|
|
650
|
-
class: `${e.prefixCls}-search-collapse-buttons ${
|
|
651
|
-
}, [
|
|
650
|
+
class: `${e.prefixCls}-search-collapse-buttons ${u.value}`
|
|
651
|
+
}, [i(ge, {
|
|
652
652
|
size: 16
|
|
653
653
|
}, {
|
|
654
|
-
default: () => [ee(),
|
|
655
|
-
class: `${e.prefixCls}-a ${
|
|
654
|
+
default: () => [ee(), x.value?.collapseRender !== !1 && R && i(ke, null, [typeof x.value?.collapseRender == "function" ? x.value?.collapseRender(f) : i("span", {
|
|
655
|
+
class: `${e.prefixCls}-a ${u.value}`,
|
|
656
656
|
onClick: () => k(!f)
|
|
657
|
-
}, [f ? "收起" : "展开", f ?
|
|
657
|
+
}, [f ? "收起" : "展开", f ? i(hl, null, null) : i(ml, null, null)])])]
|
|
658
658
|
})]);
|
|
659
659
|
function ie(t) {
|
|
660
|
-
return t === void 0 ? void 0 : t ?
|
|
660
|
+
return t === void 0 ? void 0 : t ? i(Dt, {
|
|
661
661
|
size: "small",
|
|
662
|
-
indicator:
|
|
662
|
+
indicator: o?.indicator?.value
|
|
663
663
|
}, null) : D();
|
|
664
664
|
}
|
|
665
665
|
function ae(t, f) {
|
|
666
|
-
return
|
|
666
|
+
return i(ta, M(t.request, {
|
|
667
667
|
loading: t.loading,
|
|
668
668
|
notFoundContent: ie
|
|
669
|
-
}),
|
|
669
|
+
}), na(f) ? f : {
|
|
670
670
|
default: () => [f]
|
|
671
671
|
});
|
|
672
672
|
}
|
|
673
673
|
const pe = (t) => {
|
|
674
674
|
let f;
|
|
675
|
-
const R =
|
|
676
|
-
let
|
|
675
|
+
const R = h.value ? ze : ze.Search, $ = je(t.field || {}, "rules");
|
|
676
|
+
let T = null;
|
|
677
677
|
switch (t.valueType) {
|
|
678
678
|
case "text":
|
|
679
|
-
f =
|
|
679
|
+
f = i(R, M({
|
|
680
680
|
style: {
|
|
681
681
|
width: "100%"
|
|
682
682
|
},
|
|
@@ -688,7 +688,7 @@ const da = {
|
|
|
688
688
|
}, $), null);
|
|
689
689
|
break;
|
|
690
690
|
case "number":
|
|
691
|
-
f =
|
|
691
|
+
f = i(Qe, M({
|
|
692
692
|
style: {
|
|
693
693
|
width: "100%"
|
|
694
694
|
},
|
|
@@ -698,30 +698,30 @@ const da = {
|
|
|
698
698
|
}, $), null);
|
|
699
699
|
break;
|
|
700
700
|
case "numberRange":
|
|
701
|
-
f =
|
|
701
|
+
f = i(ze.Group, {
|
|
702
702
|
compact: !0,
|
|
703
|
-
class: re(
|
|
703
|
+
class: re(u.value, `${e.prefixCls}-search-input-compact`)
|
|
704
704
|
}, {
|
|
705
|
-
default: () => [
|
|
705
|
+
default: () => [i(Qe, {
|
|
706
706
|
value: r[t.name]?.[0],
|
|
707
707
|
onChange: (s) => O(s, t, {
|
|
708
708
|
key: 0
|
|
709
709
|
}),
|
|
710
|
-
placeholder:
|
|
711
|
-
}, null),
|
|
710
|
+
placeholder: V(t.placeholder) && t.placeholder?.[0] || "请输入"
|
|
711
|
+
}, null), i(ze, {
|
|
712
712
|
disabled: !0,
|
|
713
713
|
placeholder: "~"
|
|
714
|
-
}, null),
|
|
714
|
+
}, null), i(Qe, {
|
|
715
715
|
value: r[t.name]?.[1],
|
|
716
716
|
onChange: (s) => O(s, t, {
|
|
717
717
|
key: 1
|
|
718
718
|
}),
|
|
719
|
-
placeholder:
|
|
719
|
+
placeholder: V(t.placeholder) && t.placeholder?.[1] || "请输入"
|
|
720
720
|
}, null)]
|
|
721
721
|
});
|
|
722
722
|
break;
|
|
723
723
|
case "select":
|
|
724
|
-
|
|
724
|
+
T = i(Yl, M({
|
|
725
725
|
style: {
|
|
726
726
|
width: "100%"
|
|
727
727
|
},
|
|
@@ -737,7 +737,7 @@ const da = {
|
|
|
737
737
|
}, $), null);
|
|
738
738
|
break;
|
|
739
739
|
case "treeSelect":
|
|
740
|
-
|
|
740
|
+
T = i(Kl, M({
|
|
741
741
|
style: {
|
|
742
742
|
width: "100%"
|
|
743
743
|
},
|
|
@@ -751,11 +751,11 @@ const da = {
|
|
|
751
751
|
}, $), null);
|
|
752
752
|
break;
|
|
753
753
|
case "date":
|
|
754
|
-
f =
|
|
754
|
+
f = i(Ot, M({
|
|
755
755
|
style: {
|
|
756
756
|
width: "100%"
|
|
757
757
|
},
|
|
758
|
-
value: r[t.name] ?
|
|
758
|
+
value: r[t.name] ? H(r[t.name]) : void 0,
|
|
759
759
|
getPopupContainer: (s) => s && s.parentNode ? s.parentNode : s,
|
|
760
760
|
placeholder: t.placeholder || "请选择",
|
|
761
761
|
allowClear: t.allowClear ?? !0,
|
|
@@ -766,11 +766,11 @@ const da = {
|
|
|
766
766
|
}, $), null);
|
|
767
767
|
break;
|
|
768
768
|
case "dateWeek":
|
|
769
|
-
f =
|
|
769
|
+
f = i(ra, M({
|
|
770
770
|
style: {
|
|
771
771
|
width: "100%"
|
|
772
772
|
},
|
|
773
|
-
value: r[t.name] ?
|
|
773
|
+
value: r[t.name] ? H(r[t.name], t.valueFormat || "YYYY-wo") : void 0,
|
|
774
774
|
getPopupContainer: (s) => s && s.parentNode ? s.parentNode : s,
|
|
775
775
|
allowClear: t.allowClear ?? !0,
|
|
776
776
|
placeholder: t.placeholder || "请选择",
|
|
@@ -778,11 +778,11 @@ const da = {
|
|
|
778
778
|
}, $), null);
|
|
779
779
|
break;
|
|
780
780
|
case "dateMonth":
|
|
781
|
-
f =
|
|
781
|
+
f = i(ia, M({
|
|
782
782
|
style: {
|
|
783
783
|
width: "100%"
|
|
784
784
|
},
|
|
785
|
-
value: r[t.name] ?
|
|
785
|
+
value: r[t.name] ? H(r[t.name], t.valueFormat || "YYYY-MM") : void 0,
|
|
786
786
|
getPopupContainer: (s) => s && s.parentNode ? s.parentNode : s,
|
|
787
787
|
allowClear: t.allowClear ?? !0,
|
|
788
788
|
placeholder: t.placeholder || "请选择",
|
|
@@ -790,11 +790,11 @@ const da = {
|
|
|
790
790
|
}, $), null);
|
|
791
791
|
break;
|
|
792
792
|
case "dateQuarter":
|
|
793
|
-
f =
|
|
793
|
+
f = i(ca, M({
|
|
794
794
|
style: {
|
|
795
795
|
width: "100%"
|
|
796
796
|
},
|
|
797
|
-
value: r[t.name] ?
|
|
797
|
+
value: r[t.name] ? H(r[t.name], t.valueFormat || "YYYY-QQ") : void 0,
|
|
798
798
|
getPopupContainer: (s) => s && s.parentNode ? s.parentNode : s,
|
|
799
799
|
allowClear: t.allowClear ?? !0,
|
|
800
800
|
placeholder: t.placeholder || "请选择",
|
|
@@ -802,11 +802,11 @@ const da = {
|
|
|
802
802
|
}, $), null);
|
|
803
803
|
break;
|
|
804
804
|
case "dateYear":
|
|
805
|
-
f =
|
|
805
|
+
f = i(sa, M({
|
|
806
806
|
style: {
|
|
807
807
|
width: "100%"
|
|
808
808
|
},
|
|
809
|
-
value: r[t.name] ?
|
|
809
|
+
value: r[t.name] ? H(r[t.name], t.valueFormat || "YYYY") : void 0,
|
|
810
810
|
getPopupContainer: (s) => s && s.parentNode ? s.parentNode : s,
|
|
811
811
|
allowClear: t.allowClear ?? !0,
|
|
812
812
|
placeholder: t.placeholder || "请选择",
|
|
@@ -814,11 +814,11 @@ const da = {
|
|
|
814
814
|
}, $), null);
|
|
815
815
|
break;
|
|
816
816
|
case "dateRange":
|
|
817
|
-
f =
|
|
817
|
+
f = i(ua, M({
|
|
818
818
|
style: {
|
|
819
819
|
width: "100%"
|
|
820
820
|
},
|
|
821
|
-
value: r[t.name] &&
|
|
821
|
+
value: r[t.name] && V(r[t.name]) && r[t.name]?.length === 2 ? St(r[t.name], Pe(t.valueFormat, t.showTime), "dayjs") : void 0,
|
|
822
822
|
getPopupContainer: (s) => s && s.parentNode ? s.parentNode : s,
|
|
823
823
|
placeholder: t.placeholder || ["开始日期", "结束日期"],
|
|
824
824
|
format: Pe(t.valueFormat, t.showTime),
|
|
@@ -827,11 +827,11 @@ const da = {
|
|
|
827
827
|
}, $), null);
|
|
828
828
|
break;
|
|
829
829
|
case "time":
|
|
830
|
-
f =
|
|
830
|
+
f = i(zl, M({
|
|
831
831
|
style: {
|
|
832
832
|
width: "100%"
|
|
833
833
|
},
|
|
834
|
-
value: r[t.name] ?
|
|
834
|
+
value: r[t.name] ? H(r[t.name], t.valueFormat || "HH:mm:ss") : void 0,
|
|
835
835
|
getPopupContainer: (s) => s && s.parentNode ? s.parentNode : s,
|
|
836
836
|
placeholder: t.placeholder || "请选择",
|
|
837
837
|
allowClear: t.allowClear || t.allowClear === !1 ? t.allowClear : !0,
|
|
@@ -841,54 +841,54 @@ const da = {
|
|
|
841
841
|
}, $), null);
|
|
842
842
|
break;
|
|
843
843
|
}
|
|
844
|
-
return t.valueType && ["select", "treeSelect"].includes(t.valueType) && (f = t.request ? ae(t,
|
|
845
|
-
},
|
|
844
|
+
return t.valueType && ["select", "treeSelect"].includes(t.valueType) && (f = t.request ? ae(t, T) : T), f;
|
|
845
|
+
}, he = ({
|
|
846
846
|
formItemStyle: t = {},
|
|
847
847
|
item: f
|
|
848
848
|
}) => {
|
|
849
|
-
const R = U(f) ? f.props?.label : f.label, $ = (U(f) ? f.props?.labelWidth : f.labelWidth) || F.value?.width,
|
|
850
|
-
return
|
|
849
|
+
const R = U(f) ? f.props?.label : f.label, $ = (U(f) ? f.props?.labelWidth : f.labelWidth) || F.value?.width, T = (U(f) ? f.props?.labelAlign : f.labelAlign) || F.value?.align;
|
|
850
|
+
return i("div", {
|
|
851
851
|
class: `${e.prefixCls}-search-item`,
|
|
852
852
|
style: {
|
|
853
853
|
...t,
|
|
854
|
-
gap: F.value?.gap ?
|
|
854
|
+
gap: F.value?.gap ? yt(F.value?.gap) : void 0
|
|
855
855
|
}
|
|
856
|
-
}, [R &&
|
|
857
|
-
class: re(`${e.prefixCls}-search-item-label`, F.value?.colon === !1 && `${e.prefixCls}-search-item-label-no-colon`,
|
|
856
|
+
}, [R && i("div", {
|
|
857
|
+
class: re(`${e.prefixCls}-search-item-label`, F.value?.colon === !1 && `${e.prefixCls}-search-item-label-no-colon`, T && `${e.prefixCls}-search-item-label-${T}`),
|
|
858
858
|
style: {
|
|
859
|
-
width: $ ?
|
|
859
|
+
width: $ ? yt($) : void 0
|
|
860
860
|
}
|
|
861
|
-
}, [R]),
|
|
861
|
+
}, [R]), i("div", {
|
|
862
862
|
class: re(`${e.prefixCls}-search-item-children`)
|
|
863
863
|
}, [U(f) ? f : pe(f)])]);
|
|
864
|
-
},
|
|
864
|
+
}, Te = () => {
|
|
865
865
|
let t = a.default?.() || [];
|
|
866
866
|
t.length === 1 && t[0].type === "template" && (t = t[0]?.children || []);
|
|
867
|
-
const f =
|
|
867
|
+
const f = da([...e.searchMap, ...t.map(($) => ({
|
|
868
868
|
...$,
|
|
869
869
|
order: $.props?.order || void 0
|
|
870
870
|
}))]), R = {
|
|
871
871
|
width: `${(100 - (v.value - 1) * 2) / v.value}%`
|
|
872
872
|
};
|
|
873
|
-
return f.map(($,
|
|
874
|
-
const s =
|
|
875
|
-
return f.length < v.value ||
|
|
873
|
+
return f.map(($, T) => {
|
|
874
|
+
const s = E(T, v.value, R);
|
|
875
|
+
return f.length < v.value || m.value ? i(ke, null, [he({
|
|
876
876
|
formItemStyle: s,
|
|
877
877
|
item: $
|
|
878
|
-
}),
|
|
878
|
+
}), T === f.length - 1 && oe({
|
|
879
879
|
formItemStyle: {
|
|
880
880
|
flex: 1,
|
|
881
881
|
justifyContent: "flex-end"
|
|
882
882
|
},
|
|
883
|
-
collapsed:
|
|
884
|
-
collapseRender: !!
|
|
885
|
-
})]) :
|
|
883
|
+
collapsed: m.value,
|
|
884
|
+
collapseRender: !!m.value
|
|
885
|
+
})]) : i(ke, null, [T < v.value - 1 && he({
|
|
886
886
|
formItemStyle: s,
|
|
887
887
|
item: $
|
|
888
|
-
}),
|
|
888
|
+
}), T === v.value - 1 && (v.value - 1 === 0 || f.length === v.value) && he({
|
|
889
889
|
formItemStyle: s,
|
|
890
890
|
item: $
|
|
891
|
-
}),
|
|
891
|
+
}), T === v.value - 1 && f.length >= v.value && oe({
|
|
892
892
|
formItemStyle: {
|
|
893
893
|
flex: 1,
|
|
894
894
|
justifyContent: "flex-end"
|
|
@@ -900,17 +900,17 @@ const da = {
|
|
|
900
900
|
};
|
|
901
901
|
return () => {
|
|
902
902
|
const t = e.cardBordered && `${e.prefixCls}-search-border`;
|
|
903
|
-
return n(
|
|
904
|
-
class: re(
|
|
905
|
-
}, [
|
|
903
|
+
return n(i("div", {
|
|
904
|
+
class: re(u.value, `${e.prefixCls}-search`, t, u.value, x.value?.className)
|
|
905
|
+
}, [Te()]));
|
|
906
906
|
};
|
|
907
907
|
}
|
|
908
908
|
});
|
|
909
|
-
|
|
910
|
-
const
|
|
911
|
-
const a =
|
|
909
|
+
Et.inheritAttrs = !1;
|
|
910
|
+
const Oe = (e) => {
|
|
911
|
+
const a = P(null);
|
|
912
912
|
return a.value = e, (...l) => a.value?.(...l);
|
|
913
|
-
},
|
|
913
|
+
}, ha = (e) => ({
|
|
914
914
|
[`${e.componentCls}`]: {
|
|
915
915
|
width: "auto",
|
|
916
916
|
"&-title": {
|
|
@@ -992,36 +992,36 @@ const De = (e) => {
|
|
|
992
992
|
}
|
|
993
993
|
}
|
|
994
994
|
}
|
|
995
|
-
}),
|
|
995
|
+
}), Ue = ({
|
|
996
996
|
title: e,
|
|
997
997
|
show: a,
|
|
998
998
|
treeKey: l,
|
|
999
999
|
fixed: n
|
|
1000
1000
|
}, {
|
|
1001
|
-
slots:
|
|
1001
|
+
slots: u
|
|
1002
1002
|
}) => {
|
|
1003
1003
|
const {
|
|
1004
|
-
cacheColumns:
|
|
1005
|
-
settingsAction:
|
|
1004
|
+
cacheColumns: o,
|
|
1005
|
+
settingsAction: c
|
|
1006
1006
|
} = fe();
|
|
1007
|
-
return a ?
|
|
1007
|
+
return a ? i(de, {
|
|
1008
1008
|
title: e
|
|
1009
1009
|
}, {
|
|
1010
|
-
default: () => [
|
|
1011
|
-
onClick: (
|
|
1012
|
-
|
|
1013
|
-
const
|
|
1014
|
-
if (typeof
|
|
1010
|
+
default: () => [i("span", {
|
|
1011
|
+
onClick: (h) => {
|
|
1012
|
+
h.stopPropagation(), h.preventDefault();
|
|
1013
|
+
const x = p(o)?.find((d) => d.uuid === l)?.key || "", y = c?.columnsMap[x] || {};
|
|
1014
|
+
if (typeof y.disable == "boolean" ? y.disable : y.disable?.icon) return;
|
|
1015
1015
|
const C = {
|
|
1016
|
-
...
|
|
1017
|
-
[
|
|
1018
|
-
...
|
|
1016
|
+
...c?.columnsMap,
|
|
1017
|
+
[x]: {
|
|
1018
|
+
...y,
|
|
1019
1019
|
fixed: n
|
|
1020
1020
|
}
|
|
1021
1021
|
};
|
|
1022
|
-
|
|
1022
|
+
c?.setColumnsMap(C, "fixed");
|
|
1023
1023
|
}
|
|
1024
|
-
}, [
|
|
1024
|
+
}, [u.default?.()])]
|
|
1025
1025
|
}) : null;
|
|
1026
1026
|
}, ma = /* @__PURE__ */ ne({
|
|
1027
1027
|
props: {
|
|
@@ -1035,41 +1035,41 @@ const De = (e) => {
|
|
|
1035
1035
|
setup(e) {
|
|
1036
1036
|
const {
|
|
1037
1037
|
cacheColumns: a
|
|
1038
|
-
} = fe(), l = S(() =>
|
|
1038
|
+
} = fe(), l = S(() => p(a)?.find((u) => u.uuid === e.treeKey)?.key || ""), n = S(() => l.value === "action" && e.autoScroll);
|
|
1039
1039
|
return () => {
|
|
1040
|
-
const
|
|
1040
|
+
const u = i("span", {
|
|
1041
1041
|
class: [`${e.className}-list-item-option`, e.hashId]
|
|
1042
|
-
}, [
|
|
1042
|
+
}, [i(Ue, {
|
|
1043
1043
|
treeKey: e.treeKey || "",
|
|
1044
1044
|
fixed: "left",
|
|
1045
1045
|
title: "固定在列首",
|
|
1046
1046
|
show: e.fixed !== "left" && !n.value
|
|
1047
1047
|
}, {
|
|
1048
|
-
default: () => [
|
|
1049
|
-
}),
|
|
1048
|
+
default: () => [i(vl, null, null)]
|
|
1049
|
+
}), i(Ue, {
|
|
1050
1050
|
treeKey: e.treeKey || "",
|
|
1051
1051
|
fixed: void 0,
|
|
1052
1052
|
title: "不固定",
|
|
1053
1053
|
show: !!e.fixed && !n.value
|
|
1054
1054
|
}, {
|
|
1055
|
-
default: () => [
|
|
1056
|
-
}),
|
|
1055
|
+
default: () => [i(gl, null, null)]
|
|
1056
|
+
}), i(Ue, {
|
|
1057
1057
|
treeKey: e.treeKey || "",
|
|
1058
1058
|
fixed: "right",
|
|
1059
1059
|
title: "固定在列尾",
|
|
1060
1060
|
show: e.fixed !== "right"
|
|
1061
1061
|
}, {
|
|
1062
|
-
default: () => [
|
|
1062
|
+
default: () => [i(pl, null, null)]
|
|
1063
1063
|
})]);
|
|
1064
|
-
return
|
|
1064
|
+
return i("span", {
|
|
1065
1065
|
class: [`${e.className}-list-item`, e.hashId],
|
|
1066
1066
|
key: e.treeKey
|
|
1067
|
-
}, [
|
|
1067
|
+
}, [i("div", {
|
|
1068
1068
|
class: [`${e.className}-list-item-title`, e.hashId]
|
|
1069
|
-
}, [e.title]),
|
|
1069
|
+
}, [e.title]), u]);
|
|
1070
1070
|
};
|
|
1071
1071
|
}
|
|
1072
|
-
}),
|
|
1072
|
+
}), Je = /* @__PURE__ */ ne({
|
|
1073
1073
|
props: {
|
|
1074
1074
|
list: Array,
|
|
1075
1075
|
keys: Array,
|
|
@@ -1084,103 +1084,103 @@ const De = (e) => {
|
|
|
1084
1084
|
}
|
|
1085
1085
|
},
|
|
1086
1086
|
setup(e) {
|
|
1087
|
-
const a =
|
|
1088
|
-
cacheColumns:
|
|
1089
|
-
slots:
|
|
1090
|
-
settingsAction:
|
|
1091
|
-
} = fe(),
|
|
1092
|
-
key:
|
|
1087
|
+
const a = P(tt().uuid(15)), l = S(() => e.list && e.list.length > 0), n = P([]), u = P([]), {
|
|
1088
|
+
cacheColumns: o,
|
|
1089
|
+
slots: c,
|
|
1090
|
+
settingsAction: h
|
|
1091
|
+
} = fe(), x = (d, m) => d.map(({
|
|
1092
|
+
key: b,
|
|
1093
1093
|
children: v,
|
|
1094
1094
|
uuid: F,
|
|
1095
|
-
...
|
|
1095
|
+
...I
|
|
1096
1096
|
}) => {
|
|
1097
|
-
const k =
|
|
1097
|
+
const k = h?.columnsMap[b || "null"] || {
|
|
1098
1098
|
show: !0
|
|
1099
1099
|
};
|
|
1100
|
-
let
|
|
1101
|
-
k.show !== !1 &&
|
|
1100
|
+
let E = !1;
|
|
1101
|
+
k.show !== !1 && m?.show !== !1 && !v && (E = !0);
|
|
1102
1102
|
const L = {
|
|
1103
1103
|
key: F || "",
|
|
1104
|
-
...
|
|
1105
|
-
checked:
|
|
1104
|
+
...je(I, ["dataIndex"]),
|
|
1105
|
+
checked: E,
|
|
1106
1106
|
selectable: !1,
|
|
1107
1107
|
disabled: k.disable === !0,
|
|
1108
1108
|
disableCheckbox: typeof k.disable == "boolean" ? k.disable : k.disable?.checkbox,
|
|
1109
1109
|
isLeaf: !0
|
|
1110
1110
|
};
|
|
1111
|
-
return v && (L.children =
|
|
1111
|
+
return v && (L.children = x(v, k)), L;
|
|
1112
1112
|
});
|
|
1113
|
-
|
|
1114
|
-
const
|
|
1115
|
-
n.value =
|
|
1113
|
+
Ne(() => {
|
|
1114
|
+
const d = x(e.list || []);
|
|
1115
|
+
n.value = d, u.value = d.filter((m) => m.checked).map((m) => m.key), h?.operationType.value === "fixed" && (a.value = tt().uuid(15));
|
|
1116
1116
|
});
|
|
1117
|
-
const
|
|
1118
|
-
const v =
|
|
1119
|
-
...
|
|
1120
|
-
}, k = [...
|
|
1121
|
-
if (
|
|
1117
|
+
const y = Oe((d, m, b) => {
|
|
1118
|
+
const v = p(o).find((j) => j.uuid === d)?.key || "", F = p(o).find((j) => j.uuid === m)?.key || "", I = {
|
|
1119
|
+
...h?.columnsMap
|
|
1120
|
+
}, k = [...h.sortKeyColumns.value], E = k.findIndex((j) => j === v), L = k.findIndex((j) => j === F), W = b > E;
|
|
1121
|
+
if (E < 0)
|
|
1122
1122
|
return;
|
|
1123
|
-
const O = k[
|
|
1124
|
-
k.splice(
|
|
1125
|
-
|
|
1126
|
-
...
|
|
1123
|
+
const O = k[E];
|
|
1124
|
+
k.splice(E, 1), b === 0 ? k.unshift(O) : k.splice(W ? L : L + 1, 0, O), k.forEach((j, D) => {
|
|
1125
|
+
I[j] = {
|
|
1126
|
+
...I[j] || {},
|
|
1127
1127
|
order: D
|
|
1128
1128
|
};
|
|
1129
|
-
}),
|
|
1130
|
-
}), r =
|
|
1131
|
-
const
|
|
1132
|
-
...
|
|
1129
|
+
}), h?.setColumnsMap(I, "drop"), h?.setSortKeyColumns(k);
|
|
1130
|
+
}), r = Oe((d) => {
|
|
1131
|
+
const m = d.node.key, b = p(o).find((k) => k.uuid === m)?.key || "", F = {
|
|
1132
|
+
...h?.columnsMap[b] || {}
|
|
1133
1133
|
};
|
|
1134
|
-
F.show =
|
|
1135
|
-
const
|
|
1136
|
-
...
|
|
1137
|
-
[
|
|
1134
|
+
F.show = d.checked;
|
|
1135
|
+
const I = {
|
|
1136
|
+
...h?.columnsMap,
|
|
1137
|
+
[b]: F
|
|
1138
1138
|
};
|
|
1139
|
-
|
|
1140
|
-
}), C = (
|
|
1141
|
-
const
|
|
1142
|
-
return
|
|
1143
|
-
title:
|
|
1144
|
-
column:
|
|
1145
|
-
}, () => [
|
|
1139
|
+
h?.setColumnsMap(I, "show");
|
|
1140
|
+
}), C = (d) => {
|
|
1141
|
+
const m = p(o).find((b) => b.uuid === d.key);
|
|
1142
|
+
return d.title || ol(c, "headerCell", {
|
|
1143
|
+
title: m.title,
|
|
1144
|
+
column: m
|
|
1145
|
+
}, () => [m.title]);
|
|
1146
1146
|
};
|
|
1147
|
-
return () => l.value ?
|
|
1147
|
+
return () => l.value ? i(ke, null, [e.showTitle && i("span", {
|
|
1148
1148
|
class: [`${e.className}-list-title`, e.hashId]
|
|
1149
|
-
}, [e.title]),
|
|
1149
|
+
}, [e.title]), i(Vl, {
|
|
1150
1150
|
key: a.value,
|
|
1151
1151
|
draggable: e.draggable && !!n.value?.length && n.value?.length > 1,
|
|
1152
1152
|
checkable: e.checkable,
|
|
1153
1153
|
blockNode: !0,
|
|
1154
1154
|
showLine: !1,
|
|
1155
|
-
checkedKeys:
|
|
1155
|
+
checkedKeys: u.value,
|
|
1156
1156
|
height: 280,
|
|
1157
|
-
onDrop: (
|
|
1158
|
-
const
|
|
1157
|
+
onDrop: (d) => {
|
|
1158
|
+
const m = d.node.key, b = d.dragNode.key, {
|
|
1159
1159
|
dropPosition: v,
|
|
1160
1160
|
dropToGap: F
|
|
1161
|
-
} =
|
|
1162
|
-
|
|
1161
|
+
} = d, I = v === -1 || !F ? v + 1 : v;
|
|
1162
|
+
y(b, m, I);
|
|
1163
1163
|
},
|
|
1164
|
-
onCheck: (
|
|
1164
|
+
onCheck: (d, m) => r(m),
|
|
1165
1165
|
treeData: n.value
|
|
1166
1166
|
}, {
|
|
1167
|
-
title: (
|
|
1168
|
-
const
|
|
1169
|
-
...
|
|
1167
|
+
title: (d) => {
|
|
1168
|
+
const m = {
|
|
1169
|
+
...d,
|
|
1170
1170
|
children: void 0,
|
|
1171
|
-
title: C(
|
|
1172
|
-
autoScroll:
|
|
1171
|
+
title: C(d),
|
|
1172
|
+
autoScroll: h?.autoScroll?.value
|
|
1173
1173
|
};
|
|
1174
|
-
return
|
|
1174
|
+
return i(ma, M({
|
|
1175
1175
|
hashId: e.hashId,
|
|
1176
1176
|
className: e.className
|
|
1177
|
-
},
|
|
1178
|
-
treeKey:
|
|
1177
|
+
}, m, {
|
|
1178
|
+
treeKey: m.key
|
|
1179
1179
|
}), null);
|
|
1180
1180
|
}
|
|
1181
1181
|
})]) : null;
|
|
1182
1182
|
}
|
|
1183
|
-
}),
|
|
1183
|
+
}), va = /* @__PURE__ */ ne({
|
|
1184
1184
|
props: {
|
|
1185
1185
|
hashId: String,
|
|
1186
1186
|
className: String,
|
|
@@ -1190,64 +1190,64 @@ const De = (e) => {
|
|
|
1190
1190
|
setup(e) {
|
|
1191
1191
|
const {
|
|
1192
1192
|
columns: a
|
|
1193
|
-
} = fe(), l =
|
|
1194
|
-
|
|
1195
|
-
l.value = [], n.value = [],
|
|
1196
|
-
if (
|
|
1193
|
+
} = fe(), l = P([]), n = P([]), u = P([]), o = P([]);
|
|
1194
|
+
N(() => a.value, (x) => {
|
|
1195
|
+
l.value = [], n.value = [], u.value = [], x.forEach((y) => {
|
|
1196
|
+
if (y.hideInSetting)
|
|
1197
1197
|
return;
|
|
1198
1198
|
const {
|
|
1199
1199
|
fixed: r,
|
|
1200
1200
|
show: C,
|
|
1201
|
-
uuid:
|
|
1202
|
-
} =
|
|
1203
|
-
if ((C || C === void 0) &&
|
|
1204
|
-
n.value.push(
|
|
1201
|
+
uuid: d
|
|
1202
|
+
} = y;
|
|
1203
|
+
if ((C || C === void 0) && d && o.value.push(d), r === "left") {
|
|
1204
|
+
n.value.push(y);
|
|
1205
1205
|
return;
|
|
1206
1206
|
}
|
|
1207
1207
|
if (r === "right") {
|
|
1208
|
-
l.value.push(
|
|
1208
|
+
l.value.push(y);
|
|
1209
1209
|
return;
|
|
1210
1210
|
}
|
|
1211
|
-
|
|
1211
|
+
u.value.push(y);
|
|
1212
1212
|
});
|
|
1213
1213
|
}, {
|
|
1214
1214
|
immediate: !0
|
|
1215
1215
|
});
|
|
1216
|
-
const
|
|
1217
|
-
return () =>
|
|
1216
|
+
const c = S(() => l.value && l.value.length > 0), h = S(() => n.value && n.value.length > 0);
|
|
1217
|
+
return () => i("div", {
|
|
1218
1218
|
class: {
|
|
1219
1219
|
[`${e.hashId}`]: !0,
|
|
1220
1220
|
[`${e.className}-list`]: !0,
|
|
1221
|
-
[`${e.className}-list-group`]:
|
|
1221
|
+
[`${e.className}-list-group`]: c.value || h.value
|
|
1222
1222
|
}
|
|
1223
|
-
}, [
|
|
1223
|
+
}, [i(Je, {
|
|
1224
1224
|
title: "固定在左侧",
|
|
1225
1225
|
list: n.value,
|
|
1226
|
-
keys:
|
|
1226
|
+
keys: o.value,
|
|
1227
1227
|
hashId: e.hashId,
|
|
1228
1228
|
draggable: e.draggable,
|
|
1229
1229
|
checkable: e.checkable,
|
|
1230
1230
|
className: e.className
|
|
1231
|
-
}, null),
|
|
1232
|
-
list:
|
|
1233
|
-
keys:
|
|
1231
|
+
}, null), i(Je, {
|
|
1232
|
+
list: u.value,
|
|
1233
|
+
keys: o.value,
|
|
1234
1234
|
hashId: e.hashId,
|
|
1235
1235
|
draggable: e.draggable,
|
|
1236
1236
|
checkable: e.checkable,
|
|
1237
1237
|
title: "不固定",
|
|
1238
|
-
showTitle:
|
|
1238
|
+
showTitle: h.value || c.value,
|
|
1239
1239
|
className: e.className
|
|
1240
|
-
}, null),
|
|
1240
|
+
}, null), i(Je, {
|
|
1241
1241
|
title: "固定在右侧",
|
|
1242
1242
|
list: l.value,
|
|
1243
|
-
keys:
|
|
1243
|
+
keys: o.value,
|
|
1244
1244
|
hashId: e.hashId,
|
|
1245
1245
|
draggable: e.draggable,
|
|
1246
1246
|
checkable: e.checkable,
|
|
1247
1247
|
className: e.className
|
|
1248
1248
|
}, null)]);
|
|
1249
1249
|
}
|
|
1250
|
-
}),
|
|
1250
|
+
}), ga = /* @__PURE__ */ ne({
|
|
1251
1251
|
props: {
|
|
1252
1252
|
draggable: {
|
|
1253
1253
|
type: Boolean,
|
|
@@ -1261,53 +1261,53 @@ const De = (e) => {
|
|
|
1261
1261
|
extra: [Function, Object, String, Boolean]
|
|
1262
1262
|
},
|
|
1263
1263
|
setup(e) {
|
|
1264
|
-
const a =
|
|
1264
|
+
const a = lt({
|
|
1265
1265
|
suffixCls: "table-column-setting",
|
|
1266
1266
|
isPor: !0
|
|
1267
1267
|
}), {
|
|
1268
1268
|
wrapSSR: l,
|
|
1269
1269
|
hashId: n
|
|
1270
|
-
} =
|
|
1271
|
-
columns:
|
|
1272
|
-
settingsAction:
|
|
1273
|
-
} = fe(),
|
|
1274
|
-
const
|
|
1275
|
-
|
|
1270
|
+
} = He("ColumnSetting", [ha], a), {
|
|
1271
|
+
columns: u,
|
|
1272
|
+
settingsAction: o
|
|
1273
|
+
} = fe(), c = Oe((C = !0) => {
|
|
1274
|
+
const d = {}, m = (b) => {
|
|
1275
|
+
b.forEach(({
|
|
1276
1276
|
key: v,
|
|
1277
1277
|
fixed: F,
|
|
1278
|
-
index:
|
|
1278
|
+
index: I,
|
|
1279
1279
|
children: k
|
|
1280
1280
|
}) => {
|
|
1281
|
-
const
|
|
1282
|
-
|
|
1281
|
+
const E = Pt(v, I);
|
|
1282
|
+
E && (d[E] = {
|
|
1283
1283
|
show: C,
|
|
1284
1284
|
fixed: F
|
|
1285
|
-
}), k &&
|
|
1285
|
+
}), k && m(k);
|
|
1286
1286
|
});
|
|
1287
1287
|
};
|
|
1288
|
-
|
|
1289
|
-
}),
|
|
1290
|
-
C.target.checked ?
|
|
1291
|
-
}),
|
|
1292
|
-
|
|
1293
|
-
}),
|
|
1288
|
+
m(u.value), o?.setColumnsMap(d, "show");
|
|
1289
|
+
}), h = Oe((C) => {
|
|
1290
|
+
C.target.checked ? c() : c(!1);
|
|
1291
|
+
}), x = Oe(() => {
|
|
1292
|
+
o?.setColumnsMap(o?.cacheColumnsMap, "fixed");
|
|
1293
|
+
}), y = S(() => (
|
|
1294
1294
|
// @ts-ignore
|
|
1295
|
-
Object.values(
|
|
1296
|
-
)), r = S(() =>
|
|
1297
|
-
return () => l(
|
|
1295
|
+
Object.values(o?.columnsMap).filter((C) => !C || C.show === !1)
|
|
1296
|
+
)), r = S(() => p(y).length > 0 && p(y).length !== u.value.length);
|
|
1297
|
+
return () => l(i(Ll, {
|
|
1298
1298
|
arrowPointAtCenter: !0,
|
|
1299
|
-
title:
|
|
1299
|
+
title: i("div", {
|
|
1300
1300
|
class: [`${a}-title`, n.value]
|
|
1301
|
-
}, [
|
|
1301
|
+
}, [i(Wl, {
|
|
1302
1302
|
indeterminate: r.value,
|
|
1303
|
-
checked:
|
|
1304
|
-
onChange: (C) =>
|
|
1303
|
+
checked: p(y).length === 0 && p(y).length !== u.value.length,
|
|
1304
|
+
onChange: (C) => h(C)
|
|
1305
1305
|
}, {
|
|
1306
|
-
default: () => [
|
|
1307
|
-
}), e.checkedReset ?
|
|
1308
|
-
onClick:
|
|
1306
|
+
default: () => [Ae("列展示")]
|
|
1307
|
+
}), e.checkedReset ? i("a", {
|
|
1308
|
+
onClick: x,
|
|
1309
1309
|
class: [`${a}-action-rest-button`, n.value]
|
|
1310
|
-
}, [
|
|
1310
|
+
}, [Ae("重置")]) : null, e?.extra ? i(ge, {
|
|
1311
1311
|
size: 12,
|
|
1312
1312
|
align: "center"
|
|
1313
1313
|
}, {
|
|
@@ -1316,21 +1316,21 @@ const De = (e) => {
|
|
|
1316
1316
|
overlayClassName: `${a}-overlay ${n.value}`,
|
|
1317
1317
|
trigger: "click",
|
|
1318
1318
|
placement: "bottomRight",
|
|
1319
|
-
content:
|
|
1319
|
+
content: i(va, {
|
|
1320
1320
|
hashId: n.value,
|
|
1321
1321
|
checkable: e.checkable ?? !0,
|
|
1322
1322
|
draggable: e.draggable ?? !0,
|
|
1323
1323
|
className: a
|
|
1324
1324
|
}, null)
|
|
1325
1325
|
}, {
|
|
1326
|
-
default: () => [
|
|
1326
|
+
default: () => [i(de, {
|
|
1327
1327
|
title: "列设置"
|
|
1328
1328
|
}, {
|
|
1329
|
-
default: () => [
|
|
1329
|
+
default: () => [i($t, null, null)]
|
|
1330
1330
|
})]
|
|
1331
1331
|
}));
|
|
1332
1332
|
}
|
|
1333
|
-
}),
|
|
1333
|
+
}), pa = (e) => ({
|
|
1334
1334
|
[`${e.componentCls}`]: {
|
|
1335
1335
|
lineHeight: 1,
|
|
1336
1336
|
"&-container": {
|
|
@@ -1376,32 +1376,32 @@ function wt(e) {
|
|
|
1376
1376
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !U(e);
|
|
1377
1377
|
}
|
|
1378
1378
|
const {
|
|
1379
|
-
useBreakpoint:
|
|
1380
|
-
} =
|
|
1381
|
-
function
|
|
1379
|
+
useBreakpoint: ya
|
|
1380
|
+
} = at;
|
|
1381
|
+
function ba(e) {
|
|
1382
1382
|
if (U(e))
|
|
1383
1383
|
return e;
|
|
1384
1384
|
if (e) {
|
|
1385
1385
|
const a = e, {
|
|
1386
1386
|
icon: l,
|
|
1387
1387
|
tooltip: n,
|
|
1388
|
-
onClick:
|
|
1389
|
-
key:
|
|
1388
|
+
onClick: u,
|
|
1389
|
+
key: o
|
|
1390
1390
|
} = a;
|
|
1391
|
-
return l && n ?
|
|
1391
|
+
return l && n ? i(de, {
|
|
1392
1392
|
title: n
|
|
1393
1393
|
}, {
|
|
1394
|
-
default: () => [
|
|
1395
|
-
key:
|
|
1394
|
+
default: () => [i("span", {
|
|
1395
|
+
key: o,
|
|
1396
1396
|
onClick: () => {
|
|
1397
|
-
|
|
1397
|
+
u && u(o);
|
|
1398
1398
|
}
|
|
1399
1399
|
}, [l])]
|
|
1400
1400
|
}) : l;
|
|
1401
1401
|
}
|
|
1402
1402
|
return null;
|
|
1403
1403
|
}
|
|
1404
|
-
const
|
|
1404
|
+
const Mt = /* @__PURE__ */ ne({
|
|
1405
1405
|
props: {
|
|
1406
1406
|
actions: ce.toolBarBtn,
|
|
1407
1407
|
settings: [Array],
|
|
@@ -1415,86 +1415,86 @@ const zt = /* @__PURE__ */ ne({
|
|
|
1415
1415
|
const {
|
|
1416
1416
|
wrapSSR: a,
|
|
1417
1417
|
hashId: l
|
|
1418
|
-
} =
|
|
1419
|
-
isMobile:
|
|
1420
|
-
} = fe(),
|
|
1421
|
-
let
|
|
1422
|
-
return Array.isArray(e.actions) ? e.actions?.length < 1 ? null :
|
|
1418
|
+
} = He("ListToolBar", [pa], e.prefixCls), n = ya(), {
|
|
1419
|
+
isMobile: u
|
|
1420
|
+
} = fe(), o = S(() => !!(e.titleTip || e.headerTitle || e.actions?.length)), c = S(() => !!(e.settings?.length || e.optionsExtra)), h = S(() => !!(e.titleTip || e.headerTitle)), x = S(() => {
|
|
1421
|
+
let d;
|
|
1422
|
+
return Array.isArray(e.actions) ? e.actions?.length < 1 ? null : i(ge, {
|
|
1423
1423
|
align: "center"
|
|
1424
|
-
}, wt(
|
|
1425
|
-
key:
|
|
1426
|
-
...
|
|
1427
|
-
}) :
|
|
1428
|
-
key:
|
|
1429
|
-
}, [
|
|
1430
|
-
default: () => [
|
|
1424
|
+
}, wt(d = e.actions.map((m, b) => U(m) ? Ve(m, {
|
|
1425
|
+
key: b,
|
|
1426
|
+
...m?.props
|
|
1427
|
+
}) : i("template", {
|
|
1428
|
+
key: b
|
|
1429
|
+
}, [m]))) ? d : {
|
|
1430
|
+
default: () => [d]
|
|
1431
1431
|
}) : e.actions;
|
|
1432
|
-
}),
|
|
1432
|
+
}), y = We(() => !o.value && c.value ? i("div", {
|
|
1433
1433
|
class: `${e.prefixCls}-left ${l.value}`
|
|
1434
|
-
}, null) :
|
|
1434
|
+
}, null) : h.value ? i(ge, {
|
|
1435
1435
|
class: `${e.prefixCls}-left ${l.value}`
|
|
1436
1436
|
}, {
|
|
1437
|
-
default: () => [
|
|
1437
|
+
default: () => [i("div", {
|
|
1438
1438
|
class: `${e.prefixCls}-title ${l.value}`
|
|
1439
|
-
}, [e.headerTitle, e.titleTip &&
|
|
1439
|
+
}, [e.headerTitle, e.titleTip && i(de, {
|
|
1440
1440
|
title: e.titleTipText
|
|
1441
1441
|
}, {
|
|
1442
|
-
default: () => [le(e.titleTip) && e.titleTip ?
|
|
1443
|
-
})]),
|
|
1442
|
+
default: () => [le(e.titleTip) && e.titleTip ? i(yl, null, null) : e.titleTip]
|
|
1443
|
+
})]), x.value && i("div", {
|
|
1444
1444
|
class: `${e.prefixCls}-actions ${l.value}`
|
|
1445
|
-
}, [
|
|
1446
|
-
}) :
|
|
1445
|
+
}, [x.value])]
|
|
1446
|
+
}) : i(ge, {
|
|
1447
1447
|
class: `${e.prefixCls}-left ${l.value}`
|
|
1448
1448
|
}, {
|
|
1449
|
-
default: () => [
|
|
1449
|
+
default: () => [x.value && i("div", {
|
|
1450
1450
|
class: `${e.prefixCls}-actions`
|
|
1451
|
-
}, [
|
|
1452
|
-
}), [() =>
|
|
1453
|
-
let
|
|
1454
|
-
return
|
|
1451
|
+
}, [x.value])]
|
|
1452
|
+
}), [() => o.value, () => c.value, () => h.value, () => e.prefixCls, () => e.headerTitle, () => e.titleTipText, () => e.titleTip]), r = We(() => {
|
|
1453
|
+
let d;
|
|
1454
|
+
return c.value ? i(ge, {
|
|
1455
1455
|
size: 16,
|
|
1456
1456
|
class: `${e.prefixCls}-right ${l.value}`,
|
|
1457
1457
|
align: n.value.lg ? "center" : "end",
|
|
1458
1458
|
direction: n.value.lg ? "horizontal" : "vertical"
|
|
1459
1459
|
}, {
|
|
1460
|
-
default: () => [e.optionsExtra, e.settings?.length ?
|
|
1460
|
+
default: () => [e.optionsExtra, e.settings?.length ? i(ge, {
|
|
1461
1461
|
size: 12,
|
|
1462
1462
|
align: "center",
|
|
1463
1463
|
class: `${e.prefixCls}-setting-items`
|
|
1464
|
-
}, wt(
|
|
1465
|
-
const v =
|
|
1466
|
-
return
|
|
1467
|
-
key:
|
|
1464
|
+
}, wt(d = e.settings.map((m, b) => {
|
|
1465
|
+
const v = ba(m);
|
|
1466
|
+
return i("div", {
|
|
1467
|
+
key: b,
|
|
1468
1468
|
class: `${e.prefixCls}-setting-item`
|
|
1469
1469
|
}, [v]);
|
|
1470
|
-
})) ?
|
|
1471
|
-
default: () => [
|
|
1470
|
+
})) ? d : {
|
|
1471
|
+
default: () => [d]
|
|
1472
1472
|
}) : null]
|
|
1473
1473
|
}) : null;
|
|
1474
|
-
}, [() => n.value, () =>
|
|
1475
|
-
if (!
|
|
1476
|
-
const
|
|
1474
|
+
}, [() => n.value, () => c.value, () => e.prefixCls, () => h.value, () => x.value, () => e.settings]), C = We(() => {
|
|
1475
|
+
if (!c.value && !o.value) return null;
|
|
1476
|
+
const d = {
|
|
1477
1477
|
[`${l.value}`]: !0,
|
|
1478
1478
|
[`${e.prefixCls}-container`]: !0,
|
|
1479
|
-
[`${e.prefixCls}-container-mobile`]:
|
|
1479
|
+
[`${e.prefixCls}-container-mobile`]: u.value
|
|
1480
1480
|
};
|
|
1481
|
-
return
|
|
1482
|
-
class:
|
|
1483
|
-
}, [
|
|
1484
|
-
}, [() =>
|
|
1485
|
-
return () => a(
|
|
1481
|
+
return i("div", {
|
|
1482
|
+
class: d
|
|
1483
|
+
}, [y.value, r.value]);
|
|
1484
|
+
}, [() => u.value, () => o.value, () => c.value, () => y.value, () => e.prefixCls, () => r.value]);
|
|
1485
|
+
return () => a(i("div", {
|
|
1486
1486
|
class: `${e.prefixCls} ${l.value}`
|
|
1487
1487
|
}, [C.value]));
|
|
1488
1488
|
}
|
|
1489
1489
|
});
|
|
1490
|
-
|
|
1491
|
-
const
|
|
1490
|
+
Mt.inheritAttrs = !1;
|
|
1491
|
+
const Ca = () => {
|
|
1492
1492
|
const {
|
|
1493
1493
|
action: e,
|
|
1494
1494
|
tableSize: a
|
|
1495
1495
|
} = fe();
|
|
1496
|
-
return
|
|
1497
|
-
overlay:
|
|
1496
|
+
return i(Hl, {
|
|
1497
|
+
overlay: i(Ke, {
|
|
1498
1498
|
selectedKeys: [a.value],
|
|
1499
1499
|
onClick: ({
|
|
1500
1500
|
key: l
|
|
@@ -1505,92 +1505,92 @@ const ba = () => {
|
|
|
1505
1505
|
width: 80
|
|
1506
1506
|
}
|
|
1507
1507
|
}, {
|
|
1508
|
-
default: () => [
|
|
1508
|
+
default: () => [i(Ke.Item, {
|
|
1509
1509
|
key: "large"
|
|
1510
1510
|
}, {
|
|
1511
|
-
default: () => [
|
|
1512
|
-
}),
|
|
1511
|
+
default: () => [Ae("默认")]
|
|
1512
|
+
}), i(Ke.Item, {
|
|
1513
1513
|
key: "middle"
|
|
1514
1514
|
}, {
|
|
1515
|
-
default: () => [
|
|
1516
|
-
}),
|
|
1515
|
+
default: () => [Ae("中等")]
|
|
1516
|
+
}), i(Ke.Item, {
|
|
1517
1517
|
key: "small"
|
|
1518
1518
|
}, {
|
|
1519
|
-
default: () => [
|
|
1519
|
+
default: () => [Ae("紧凑")]
|
|
1520
1520
|
})]
|
|
1521
1521
|
}),
|
|
1522
1522
|
trigger: ["click"]
|
|
1523
1523
|
}, {
|
|
1524
|
-
default: () => [
|
|
1524
|
+
default: () => [i(de, {
|
|
1525
1525
|
title: "表格密度"
|
|
1526
1526
|
}, {
|
|
1527
|
-
default: () => [
|
|
1527
|
+
default: () => [i(bl, null, null)]
|
|
1528
1528
|
})]
|
|
1529
1529
|
});
|
|
1530
|
-
},
|
|
1530
|
+
}, zt = /* @__PURE__ */ ne({
|
|
1531
1531
|
setup() {
|
|
1532
1532
|
const {
|
|
1533
1533
|
isFullscreen: e
|
|
1534
|
-
} =
|
|
1535
|
-
return () => e.value ?
|
|
1534
|
+
} = At();
|
|
1535
|
+
return () => e.value ? i(de, {
|
|
1536
1536
|
title: "退出全屏"
|
|
1537
1537
|
}, {
|
|
1538
|
-
default: () => [
|
|
1539
|
-
}) :
|
|
1538
|
+
default: () => [i(Cl, null, null)]
|
|
1539
|
+
}) : i(de, {
|
|
1540
1540
|
title: "全屏"
|
|
1541
1541
|
}, {
|
|
1542
|
-
default: () => [
|
|
1542
|
+
default: () => [i(xl, null, null)]
|
|
1543
1543
|
});
|
|
1544
1544
|
}
|
|
1545
1545
|
});
|
|
1546
|
-
function
|
|
1546
|
+
function xa() {
|
|
1547
1547
|
return {
|
|
1548
1548
|
reload: {
|
|
1549
1549
|
text: "刷新",
|
|
1550
|
-
icon:
|
|
1550
|
+
icon: i(Sl, null, null)
|
|
1551
1551
|
},
|
|
1552
1552
|
density: {
|
|
1553
1553
|
text: "表格密度",
|
|
1554
|
-
icon:
|
|
1554
|
+
icon: i(Ca, null, null)
|
|
1555
1555
|
},
|
|
1556
1556
|
setting: {
|
|
1557
1557
|
text: "列设置",
|
|
1558
|
-
icon:
|
|
1558
|
+
icon: i($t, null, null)
|
|
1559
1559
|
},
|
|
1560
1560
|
fullScreen: {
|
|
1561
1561
|
text: "全屏",
|
|
1562
|
-
icon:
|
|
1562
|
+
icon: i(zt, null, null)
|
|
1563
1563
|
}
|
|
1564
1564
|
};
|
|
1565
1565
|
}
|
|
1566
|
-
function
|
|
1566
|
+
function Sa(e, a) {
|
|
1567
1567
|
return Object.keys(e).filter((l) => l).map((l) => {
|
|
1568
1568
|
const n = e[l];
|
|
1569
1569
|
if (!n)
|
|
1570
1570
|
return null;
|
|
1571
|
-
let
|
|
1572
|
-
if (typeof
|
|
1571
|
+
let u = n === !0 ? a[l] : () => n?.();
|
|
1572
|
+
if (typeof u != "function" && (u = () => {
|
|
1573
1573
|
}), l === "setting")
|
|
1574
|
-
return
|
|
1574
|
+
return i(ga, M(e[l], {
|
|
1575
1575
|
key: l
|
|
1576
1576
|
}), null);
|
|
1577
1577
|
if (l === "fullScreen")
|
|
1578
|
-
return
|
|
1578
|
+
return i("span", {
|
|
1579
1579
|
key: l,
|
|
1580
|
-
onClick:
|
|
1581
|
-
}, [
|
|
1582
|
-
const
|
|
1583
|
-
return
|
|
1580
|
+
onClick: u
|
|
1581
|
+
}, [i(zt, null, null)]);
|
|
1582
|
+
const o = xa()[l];
|
|
1583
|
+
return o ? i("span", {
|
|
1584
1584
|
key: l,
|
|
1585
|
-
onClick:
|
|
1586
|
-
}, [
|
|
1587
|
-
title:
|
|
1585
|
+
onClick: u
|
|
1586
|
+
}, [i(de, {
|
|
1587
|
+
title: o.text
|
|
1588
1588
|
}, {
|
|
1589
|
-
default: () => [
|
|
1589
|
+
default: () => [o.icon]
|
|
1590
1590
|
})]) : null;
|
|
1591
1591
|
}).filter((l) => l);
|
|
1592
1592
|
}
|
|
1593
|
-
const
|
|
1593
|
+
const wa = {
|
|
1594
1594
|
options: [Boolean, Object, Array],
|
|
1595
1595
|
titleTip: [Function, Boolean, Object, String],
|
|
1596
1596
|
settingExtra: [Function, Boolean, Object, Array],
|
|
@@ -1598,52 +1598,52 @@ const Sa = {
|
|
|
1598
1598
|
titleTipText: [String],
|
|
1599
1599
|
toolBarBtn: [Function, Boolean, Object, Array],
|
|
1600
1600
|
headerTitle: [Function, Boolean, Object, Array, String]
|
|
1601
|
-
},
|
|
1602
|
-
props:
|
|
1601
|
+
}, Ta = /* @__PURE__ */ ne({
|
|
1602
|
+
props: wa,
|
|
1603
1603
|
inheritAttrs: !1,
|
|
1604
1604
|
setup(e) {
|
|
1605
|
-
const a =
|
|
1605
|
+
const a = lt({
|
|
1606
1606
|
suffixCls: "table-list-toolbar",
|
|
1607
1607
|
isPor: !0
|
|
1608
1608
|
}), {
|
|
1609
1609
|
action: l
|
|
1610
|
-
} = fe(), n =
|
|
1611
|
-
const
|
|
1610
|
+
} = fe(), n = We(() => {
|
|
1611
|
+
const u = {
|
|
1612
1612
|
reload: () => l?.reload(),
|
|
1613
1613
|
density: !0,
|
|
1614
1614
|
setting: !0,
|
|
1615
1615
|
fullScreen: () => l?.toggle()
|
|
1616
1616
|
};
|
|
1617
1617
|
if (e.options === !1 || Object.keys(e.options)?.length === 0) return [];
|
|
1618
|
-
const
|
|
1619
|
-
...
|
|
1618
|
+
const o = {
|
|
1619
|
+
...u,
|
|
1620
1620
|
...e.options
|
|
1621
1621
|
};
|
|
1622
|
-
return
|
|
1623
|
-
...
|
|
1622
|
+
return o.setting !== !1 && e.settingExtra && (o.setting = {}, o.setting.extra = e.settingExtra), Sa(o, {
|
|
1623
|
+
...u
|
|
1624
1624
|
});
|
|
1625
1625
|
}, [() => l, () => e.options]);
|
|
1626
1626
|
return () => {
|
|
1627
|
-
const
|
|
1628
|
-
return
|
|
1627
|
+
const u = e.toolBarBtn || [];
|
|
1628
|
+
return i(Mt, {
|
|
1629
1629
|
prefixCls: a,
|
|
1630
1630
|
optionsExtra: e.optionsExtra,
|
|
1631
1631
|
headerTitle: e.headerTitle,
|
|
1632
|
-
actions:
|
|
1633
|
-
settings:
|
|
1632
|
+
actions: u,
|
|
1633
|
+
settings: p(n),
|
|
1634
1634
|
titleTip: e.titleTip,
|
|
1635
1635
|
titleTipText: e.titleTipText
|
|
1636
1636
|
}, null);
|
|
1637
1637
|
};
|
|
1638
1638
|
}
|
|
1639
1639
|
});
|
|
1640
|
-
function
|
|
1641
|
-
return
|
|
1640
|
+
function $a(e) {
|
|
1641
|
+
return sl();
|
|
1642
1642
|
}
|
|
1643
|
-
function
|
|
1644
|
-
|
|
1643
|
+
function Ra(e, a = !0, l) {
|
|
1644
|
+
$a() ? il(e, l) : a ? e() : ul(e);
|
|
1645
1645
|
}
|
|
1646
|
-
function
|
|
1646
|
+
function Fa(e) {
|
|
1647
1647
|
const a = S(() => e.draggable), l = S(() => e.neverScroll), n = S(() => e.autoScroll);
|
|
1648
1648
|
return {
|
|
1649
1649
|
draggable: a,
|
|
@@ -1651,142 +1651,142 @@ function Ra(e) {
|
|
|
1651
1651
|
autoScroll: n
|
|
1652
1652
|
};
|
|
1653
1653
|
}
|
|
1654
|
-
function
|
|
1655
|
-
const
|
|
1656
|
-
|
|
1654
|
+
function Ba({ scroll: e, columns: a, breakpoint: l, draggable: n, autoScroll: u, neverScroll: o }) {
|
|
1655
|
+
const c = P([]), h = P([]);
|
|
1656
|
+
N([
|
|
1657
1657
|
() => e.value,
|
|
1658
1658
|
() => a.value,
|
|
1659
1659
|
() => l.value,
|
|
1660
1660
|
() => n.value,
|
|
1661
1661
|
() => l.value,
|
|
1662
|
-
() =>
|
|
1663
|
-
() =>
|
|
1662
|
+
() => u.value,
|
|
1663
|
+
() => o.value
|
|
1664
1664
|
], () => {
|
|
1665
|
-
const
|
|
1666
|
-
|
|
1665
|
+
const b = r(ve(a.value));
|
|
1666
|
+
Ye(b, ve(c.value)) || (c.value = Z(b)), Ye(b, ve(h.value)) || (h.value = Z(b));
|
|
1667
1667
|
}, {
|
|
1668
1668
|
deep: !0,
|
|
1669
1669
|
immediate: !0
|
|
1670
1670
|
});
|
|
1671
|
-
const
|
|
1672
|
-
const
|
|
1671
|
+
const x = S(() => {
|
|
1672
|
+
const b = y(p(c).filter((I) => I.fixed === "left")), v = y(p(c).filter((I) => I.fixed !== "left" && I.fixed !== "right")), F = y(p(c).filter((I) => I.fixed === "right"));
|
|
1673
1673
|
return [
|
|
1674
|
-
...
|
|
1674
|
+
...b,
|
|
1675
1675
|
...v,
|
|
1676
1676
|
...F
|
|
1677
1677
|
];
|
|
1678
1678
|
});
|
|
1679
|
-
function
|
|
1680
|
-
return
|
|
1679
|
+
function y(b) {
|
|
1680
|
+
return b.sort((v, F) => Rl(v, F, "order", 0));
|
|
1681
1681
|
}
|
|
1682
|
-
function r(
|
|
1683
|
-
return Z(
|
|
1684
|
-
if (v.dataIndex === "action" || F ===
|
|
1682
|
+
function r(b) {
|
|
1683
|
+
return Z(b).map((v, F) => {
|
|
1684
|
+
if (v.dataIndex === "action" || F === b.length - 1 ? v.resizable = !1 : v.resizable = le(v.resizable) ? v.resizable : !!(De(v.width) && p(n)), !v.width || p(o))
|
|
1685
1685
|
return v;
|
|
1686
|
-
if (v.dataIndex === "action" &&
|
|
1687
|
-
if (
|
|
1686
|
+
if (v.dataIndex === "action" && p(u))
|
|
1687
|
+
if (p(e)?.x || !p(l))
|
|
1688
1688
|
v.width = v.width || 100, v.fixed = "right";
|
|
1689
1689
|
else {
|
|
1690
|
-
const
|
|
1691
|
-
v.width =
|
|
1690
|
+
const I = p(a).find((k) => k.dataIndex === v.dataIndex);
|
|
1691
|
+
v.width = I?.width || "", v.fixed = I?.fixed;
|
|
1692
1692
|
}
|
|
1693
1693
|
return v;
|
|
1694
1694
|
});
|
|
1695
1695
|
}
|
|
1696
|
-
function C(
|
|
1697
|
-
|
|
1696
|
+
function C(b, v) {
|
|
1697
|
+
c.value = c.value.map((F) => (F.uuid === v.uuid && (F.width = b), F));
|
|
1698
1698
|
}
|
|
1699
|
-
function
|
|
1700
|
-
if (
|
|
1701
|
-
|
|
1699
|
+
function d(b) {
|
|
1700
|
+
if (b.length <= 0) {
|
|
1701
|
+
c.value = [];
|
|
1702
1702
|
return;
|
|
1703
1703
|
}
|
|
1704
|
-
|
|
1704
|
+
Ye(r(b), ve(c.value)) || (c.value = r(b));
|
|
1705
1705
|
}
|
|
1706
|
-
function
|
|
1707
|
-
|
|
1706
|
+
function m(b) {
|
|
1707
|
+
d(Z(ve(a.value)).map((v) => {
|
|
1708
1708
|
const F = v.key ? {
|
|
1709
|
-
show:
|
|
1710
|
-
fixed:
|
|
1711
|
-
order:
|
|
1709
|
+
show: b[v.key]?.show,
|
|
1710
|
+
fixed: b[v.key]?.fixed,
|
|
1711
|
+
order: b[v.key]?.order
|
|
1712
1712
|
} : {};
|
|
1713
1713
|
return { ...v, ...F };
|
|
1714
1714
|
}));
|
|
1715
1715
|
}
|
|
1716
1716
|
return {
|
|
1717
1717
|
breakpoint: l,
|
|
1718
|
-
proColumns:
|
|
1719
|
-
cacheProColumns:
|
|
1720
|
-
setColumns:
|
|
1721
|
-
changeColumns:
|
|
1718
|
+
proColumns: x,
|
|
1719
|
+
cacheProColumns: h,
|
|
1720
|
+
setColumns: d,
|
|
1721
|
+
changeColumns: m,
|
|
1722
1722
|
resizeColumnWidth: C
|
|
1723
1723
|
};
|
|
1724
1724
|
}
|
|
1725
|
-
function
|
|
1726
|
-
const n =
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
const v =
|
|
1730
|
-
v && (
|
|
1725
|
+
function Pa({ columns: e, columnsState: a, changeColumns: l }) {
|
|
1726
|
+
const n = P(void 0), u = be({}), o = be({}), c = be({}), h = P([]);
|
|
1727
|
+
N(() => e.value, () => {
|
|
1728
|
+
p(e)?.forEach(({ show: C, key: d, fixed: m }, b) => {
|
|
1729
|
+
const v = Pt(d, b);
|
|
1730
|
+
v && (c[v] = { show: C === void 0 ? !0 : C, fixed: m });
|
|
1731
1731
|
});
|
|
1732
|
-
const r =
|
|
1733
|
-
|
|
1734
|
-
}, { deep: !0, immediate: !0 }),
|
|
1732
|
+
const r = p(e).map((C) => C.key);
|
|
1733
|
+
y(r);
|
|
1734
|
+
}, { deep: !0, immediate: !0 }), Ne(() => {
|
|
1735
1735
|
const r = {
|
|
1736
|
-
...
|
|
1737
|
-
...
|
|
1736
|
+
...p(a)?.value,
|
|
1737
|
+
...p(c)
|
|
1738
1738
|
};
|
|
1739
|
-
Object.assign(
|
|
1739
|
+
Object.assign(u, r), Object.assign(o, r);
|
|
1740
1740
|
});
|
|
1741
|
-
function
|
|
1742
|
-
n.value = C, Object.assign(
|
|
1741
|
+
function x(r, C) {
|
|
1742
|
+
n.value = C, Object.assign(u, r), l?.(u, C === "fixed");
|
|
1743
1743
|
}
|
|
1744
|
-
function
|
|
1745
|
-
|
|
1744
|
+
function y(r) {
|
|
1745
|
+
h.value = r;
|
|
1746
1746
|
}
|
|
1747
1747
|
return {
|
|
1748
|
-
columnsMap:
|
|
1748
|
+
columnsMap: u,
|
|
1749
1749
|
operationType: n,
|
|
1750
|
-
setColumnsMap:
|
|
1751
|
-
sortKeyColumns:
|
|
1752
|
-
cacheColumnsMap:
|
|
1753
|
-
setSortKeyColumns:
|
|
1750
|
+
setColumnsMap: x,
|
|
1751
|
+
sortKeyColumns: h,
|
|
1752
|
+
cacheColumnsMap: o,
|
|
1753
|
+
setSortKeyColumns: y
|
|
1754
1754
|
};
|
|
1755
1755
|
}
|
|
1756
1756
|
function Ia(e, a) {
|
|
1757
|
-
const l = S(() => a), n =
|
|
1758
|
-
function
|
|
1757
|
+
const l = S(() => a), n = P(), u = P(e);
|
|
1758
|
+
function o() {
|
|
1759
1759
|
n.value && clearTimeout(n.value);
|
|
1760
1760
|
}
|
|
1761
|
-
async function
|
|
1762
|
-
return l.value === 0 || l.value === void 0 ?
|
|
1763
|
-
|
|
1764
|
-
|
|
1761
|
+
async function c(...h) {
|
|
1762
|
+
return l.value === 0 || l.value === void 0 ? u.value(...h) : (o(), new Promise(async (x) => {
|
|
1763
|
+
h[0]?.immediate ? x(await u.value(...h)) : n.value = setTimeout(async () => {
|
|
1764
|
+
x(await u.value(...h));
|
|
1765
1765
|
}, l.value);
|
|
1766
1766
|
}));
|
|
1767
1767
|
}
|
|
1768
|
-
return
|
|
1769
|
-
cancel:
|
|
1770
|
-
run:
|
|
1768
|
+
return Jl(o), {
|
|
1769
|
+
cancel: o,
|
|
1770
|
+
run: c
|
|
1771
1771
|
};
|
|
1772
1772
|
}
|
|
1773
|
-
function
|
|
1774
|
-
const a = S(() => e.rowKey), l = S(() => e.polling), n = S(() => e.debounceTime),
|
|
1773
|
+
function ka(e) {
|
|
1774
|
+
const a = S(() => e.rowKey), l = S(() => e.polling), n = S(() => e.debounceTime), u = S(() => e.dataSource);
|
|
1775
1775
|
return {
|
|
1776
1776
|
rowKey: a,
|
|
1777
1777
|
polling: l,
|
|
1778
1778
|
request: e.request,
|
|
1779
1779
|
postData: e.postData,
|
|
1780
1780
|
debounceTime: n,
|
|
1781
|
-
dataSource:
|
|
1781
|
+
dataSource: u
|
|
1782
1782
|
};
|
|
1783
1783
|
}
|
|
1784
|
-
function
|
|
1785
|
-
const L =
|
|
1786
|
-
const { pagination: s, filters:
|
|
1787
|
-
if (!l || !
|
|
1788
|
-
return
|
|
1789
|
-
if (O.value = !0, !Ce ||
|
|
1784
|
+
function Aa({ rowKey: e, polling: a, request: l, postData: n, dataSource: u, waitRequest: o, debounceTime: c }, { search: h, columns: x, loading: y, setLoading: r, setColumns: C, removeRowKeys: d, syncSelectedRows: m, formParamsRef: b, setPagination: v, paginationInfo: F, onBeforeSearchSubmit: I, hasCustomRender: k }, E) {
|
|
1785
|
+
const L = P(), W = P(!0), O = P(!1), j = P(!1), D = P([]), ee = P(), oe = S(() => q(h.value) ? h.value?.manualRequest : !1), ie = async (T = {}) => {
|
|
1786
|
+
const { pagination: s, filters: z = {}, sorter: G = {}, removeKeys: te = [], isPolling: Ce = !1 } = T;
|
|
1787
|
+
if (!l || !Ie(l) || p(o) && y.value || O.value)
|
|
1788
|
+
return u.value || [];
|
|
1789
|
+
if (O.value = !0, !Ce || p(o) || W.value ? r(!0) : t(!0), p(o)) {
|
|
1790
1790
|
W.value = !1, O.value = !1;
|
|
1791
1791
|
return;
|
|
1792
1792
|
}
|
|
@@ -1796,305 +1796,304 @@ function ka({ rowKey: e, polling: a, request: l, postData: n, dataSource: o, wai
|
|
|
1796
1796
|
if (le(s) && !s || le(F))
|
|
1797
1797
|
Y = {};
|
|
1798
1798
|
else {
|
|
1799
|
-
const { current: _ = 1, pageSize: ye = 10, total: J } =
|
|
1800
|
-
Y.pageNum = Pl({ current: _, pageSize: ye, total: J }, te.length), te.length &&
|
|
1799
|
+
const { current: _ = 1, pageSize: ye = 10, total: J } = p(F) || {};
|
|
1800
|
+
Y.pageNum = Pl({ current: _, pageSize: ye, total: J }, te.length), te.length && d(te), Y.pageSize = ye;
|
|
1801
1801
|
}
|
|
1802
|
-
const
|
|
1803
|
-
|
|
1802
|
+
const Ee = q(G) ? [G] : G;
|
|
1803
|
+
Ee.forEach((_) => {
|
|
1804
1804
|
const ye = _?.columnKey || _?.field;
|
|
1805
|
-
_ && _?.order ? C(
|
|
1805
|
+
_ && _?.order ? C(p(x).map((J) => (J.dataIndex === ye ? J.sortOrder = _?.order : J.sortOrder = null, J))) : _ && C(p(x).map((J) => (J.dataIndex === ye && (J.sortOrder = null), J)));
|
|
1806
1806
|
});
|
|
1807
|
-
let
|
|
1807
|
+
let $e = {
|
|
1808
1808
|
...Y || {},
|
|
1809
|
-
...
|
|
1810
|
-
...
|
|
1809
|
+
...T.params,
|
|
1810
|
+
...b
|
|
1811
1811
|
};
|
|
1812
|
-
|
|
1812
|
+
I && Ie(I) && ($e = await I($e, G, z));
|
|
1813
1813
|
let ue = [];
|
|
1814
|
-
const xe = await l?.(Z(ve(
|
|
1814
|
+
const xe = await l?.(Z(ve($e)), Ee, z);
|
|
1815
1815
|
if (O.value = !1, xe && xe?.success) {
|
|
1816
|
-
ue = xe.data || [], n &&
|
|
1816
|
+
ue = xe.data || [], n && Ie(n) && (ue = await n?.(ue)), m(ue);
|
|
1817
1817
|
const _ = xe.total || ue?.length || 0;
|
|
1818
|
-
return _ !==
|
|
1818
|
+
return _ !== p(F)?.total && v({
|
|
1819
1819
|
total: _ || 0
|
|
1820
1820
|
}), R(ue), ue;
|
|
1821
1821
|
} else
|
|
1822
1822
|
return [];
|
|
1823
1823
|
} catch (Y) {
|
|
1824
|
-
D.value === void 0 && R([]),
|
|
1824
|
+
D.value === void 0 && R([]), E("requestError", Y);
|
|
1825
1825
|
} finally {
|
|
1826
1826
|
W.value = !1, r(!1);
|
|
1827
1827
|
}
|
|
1828
1828
|
return [];
|
|
1829
|
-
}, ae = Ia(async (
|
|
1829
|
+
}, ae = Ia(async (T) => {
|
|
1830
1830
|
ee.value && clearTimeout(ee.value);
|
|
1831
|
-
const s = await ie(
|
|
1832
|
-
return
|
|
1833
|
-
ae.run({ ...
|
|
1834
|
-
}, Math.max(
|
|
1835
|
-
},
|
|
1836
|
-
|
|
1831
|
+
const s = await ie(T), z = Fl(a.value, s);
|
|
1832
|
+
return z && !L.value && (ee.value = setTimeout(() => {
|
|
1833
|
+
ae.run({ ...T, isPolling: z });
|
|
1834
|
+
}, Math.max(z, 2e3))), s;
|
|
1835
|
+
}, c.value || 10);
|
|
1836
|
+
rl(() => {
|
|
1837
1837
|
L.value = !0, clearTimeout(ee.value);
|
|
1838
|
-
}),
|
|
1838
|
+
}), cl(() => {
|
|
1839
1839
|
L.value = !0, clearTimeout(ee.value);
|
|
1840
|
-
}),
|
|
1840
|
+
}), N(() => a.value, () => {
|
|
1841
1841
|
a.value ? ae.run({ isPolling: !0 }) : clearTimeout(ee.value);
|
|
1842
|
-
}, { immediate: !0 }),
|
|
1842
|
+
}, { immediate: !0 }), N([() => o.value, () => u.value], () => {
|
|
1843
1843
|
pe();
|
|
1844
|
-
}, { deep: !0, immediate: !0 }),
|
|
1844
|
+
}, { deep: !0, immediate: !0 }), N([() => b], () => {
|
|
1845
1845
|
oe.value || pe();
|
|
1846
1846
|
}, {
|
|
1847
1847
|
deep: !0,
|
|
1848
1848
|
immediate: !0
|
|
1849
1849
|
});
|
|
1850
1850
|
function pe() {
|
|
1851
|
-
|
|
1851
|
+
we(l) ? (!W.value || !a.value) && ae.run({ isPolling: !1 }) : R(u.value || []);
|
|
1852
1852
|
}
|
|
1853
|
-
const
|
|
1853
|
+
const he = S(() => {
|
|
1854
1854
|
if (k.value)
|
|
1855
|
-
return
|
|
1856
|
-
const
|
|
1857
|
-
return !
|
|
1858
|
-
}),
|
|
1859
|
-
function t(
|
|
1860
|
-
|
|
1855
|
+
return p(D);
|
|
1856
|
+
const T = x.value.filter((s) => s.show || s.show === void 0);
|
|
1857
|
+
return !p(D) || !T || T.length === 0 ? [] : p(D);
|
|
1858
|
+
}), Te = S(() => p(D).some((T) => V(T.children) && T.children.length > 0));
|
|
1859
|
+
function t(T) {
|
|
1860
|
+
j.value = T;
|
|
1861
1861
|
}
|
|
1862
|
-
function f(
|
|
1863
|
-
ae.run({ pagination:
|
|
1862
|
+
function f(T, s, z, G) {
|
|
1863
|
+
ae.run({ pagination: T, filters: s, sorter: z, extra: G, isPolling: !1 }), E("change", T, s, z, G);
|
|
1864
1864
|
}
|
|
1865
|
-
function R(
|
|
1866
|
-
const s =
|
|
1867
|
-
if (!
|
|
1868
|
-
const
|
|
1869
|
-
|
|
1870
|
-
total:
|
|
1865
|
+
function R(T) {
|
|
1866
|
+
const s = Bl(Z(T), p(F.value));
|
|
1867
|
+
if (!Ye(s, D.value) && (D.value = s, !l || !Ie(l))) {
|
|
1868
|
+
const z = s.length || 0;
|
|
1869
|
+
z !== p(F)?.total && v({
|
|
1870
|
+
total: z
|
|
1871
1871
|
});
|
|
1872
1872
|
}
|
|
1873
1873
|
}
|
|
1874
1874
|
return {
|
|
1875
|
-
dataSource:
|
|
1876
|
-
isTreeDataRef:
|
|
1875
|
+
dataSource: he,
|
|
1876
|
+
isTreeDataRef: Te,
|
|
1877
1877
|
reSetDataList: R,
|
|
1878
|
-
changeDataValue: ({ key:
|
|
1879
|
-
const te =
|
|
1878
|
+
changeDataValue: ({ key: T, params: s, value: z, type: G = "update" }) => {
|
|
1879
|
+
const te = T ?? e.value, Ce = s?.[te] ?? z;
|
|
1880
1880
|
switch (G) {
|
|
1881
1881
|
case "update":
|
|
1882
|
-
te && Ce && s && (D.value = D.value.map((Y) => Ce === Y[te] ?
|
|
1882
|
+
te && Ce && s && (D.value = D.value.map((Y) => Ce === Y[te] ? It(Y, s, {
|
|
1883
1883
|
omitNil: !1,
|
|
1884
1884
|
omitEmpty: !1
|
|
1885
|
-
}) : Y)),
|
|
1885
|
+
}) : Y)), Le(!!s, "params is required");
|
|
1886
1886
|
break;
|
|
1887
1887
|
case "push":
|
|
1888
|
-
s && D.value.push(s),
|
|
1888
|
+
s && D.value.push(s), Le(!!s, "params is required");
|
|
1889
1889
|
break;
|
|
1890
1890
|
case "unshift":
|
|
1891
|
-
s && D.value.unshift(s),
|
|
1891
|
+
s && D.value.unshift(s), Le(!!s, "params is required");
|
|
1892
1892
|
break;
|
|
1893
1893
|
case "delete":
|
|
1894
|
-
te && (D.value = D.value.filter((Y) =>
|
|
1894
|
+
te && (D.value = D.value.filter((Y) => z !== Y[te]));
|
|
1895
1895
|
break;
|
|
1896
1896
|
}
|
|
1897
1897
|
},
|
|
1898
1898
|
handleTableChange: f,
|
|
1899
|
-
reload: async (
|
|
1900
|
-
|
|
1899
|
+
reload: async (T) => {
|
|
1900
|
+
we(l) ? await ae.run({ ...T, isPolling: !1 }) : E("reload");
|
|
1901
1901
|
}
|
|
1902
1902
|
};
|
|
1903
1903
|
}
|
|
1904
|
-
function
|
|
1905
|
-
const l =
|
|
1906
|
-
|
|
1907
|
-
l.value = le(
|
|
1904
|
+
function Oa({ emit: e, loading: a }) {
|
|
1905
|
+
const l = P(le(a.value) ? a.value : q(a.value) ? a.value?.spinning : !1);
|
|
1906
|
+
N(() => a.value, (o) => {
|
|
1907
|
+
l.value = le(o) ? o : q(o) ? o?.spinning : l.value;
|
|
1908
1908
|
});
|
|
1909
1909
|
const n = S(() => l.value);
|
|
1910
|
-
function o
|
|
1911
|
-
l.value =
|
|
1910
|
+
function u(o) {
|
|
1911
|
+
l.value = o, e("loadingChange", !0);
|
|
1912
1912
|
}
|
|
1913
|
-
return { loadingComputed: n, loading: l, setLoading:
|
|
1913
|
+
return { loadingComputed: n, loading: l, setLoading: u };
|
|
1914
1914
|
}
|
|
1915
|
-
function
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
pagination: l
|
|
1915
|
+
function Da({
|
|
1916
|
+
pagination: e,
|
|
1917
|
+
pageItemRender: a
|
|
1919
1918
|
}) {
|
|
1920
|
-
const
|
|
1921
|
-
|
|
1922
|
-
if (le(
|
|
1923
|
-
|
|
1919
|
+
const l = be({}), n = P();
|
|
1920
|
+
N(() => e.value, () => {
|
|
1921
|
+
if (le(e.value) && !e.value) {
|
|
1922
|
+
n.value = !1;
|
|
1924
1923
|
return;
|
|
1925
1924
|
}
|
|
1926
|
-
const
|
|
1925
|
+
const o = Ie(a) ? {
|
|
1927
1926
|
itemRender: ({
|
|
1928
|
-
page:
|
|
1929
|
-
type:
|
|
1930
|
-
originalElement:
|
|
1931
|
-
}) =>
|
|
1932
|
-
page:
|
|
1933
|
-
type:
|
|
1934
|
-
originalElement:
|
|
1927
|
+
page: h,
|
|
1928
|
+
type: x,
|
|
1929
|
+
originalElement: y
|
|
1930
|
+
}) => a ? a({
|
|
1931
|
+
page: h,
|
|
1932
|
+
type: x,
|
|
1933
|
+
originalElement: y
|
|
1935
1934
|
}) : null
|
|
1936
|
-
} : null,
|
|
1935
|
+
} : null, c = {
|
|
1937
1936
|
current: 1,
|
|
1938
1937
|
pageSize: 10,
|
|
1939
1938
|
size: "default",
|
|
1940
1939
|
showQuickJumper: !0,
|
|
1941
1940
|
showSizeChanger: !0,
|
|
1942
1941
|
pageSizeOptions: ["10", "20", "50", "100"],
|
|
1943
|
-
...
|
|
1944
|
-
...
|
|
1942
|
+
...e.value || {},
|
|
1943
|
+
...o || {}
|
|
1945
1944
|
};
|
|
1946
|
-
|
|
1947
|
-
pageNum:
|
|
1948
|
-
pageSize:
|
|
1945
|
+
e.value?.showTotal || (c.showTotal = (h) => `共${h < c.pageSize ? 1 : Math.ceil(h / (c.pageSize || 10))}页 ${h}条记录`), n.value = c, Object.assign(l, {
|
|
1946
|
+
pageNum: c.current,
|
|
1947
|
+
pageSize: c.pageSize
|
|
1949
1948
|
});
|
|
1950
1949
|
}, {
|
|
1951
1950
|
deep: 1,
|
|
1952
1951
|
immediate: !0
|
|
1953
1952
|
});
|
|
1954
|
-
function
|
|
1955
|
-
if (q(
|
|
1956
|
-
const
|
|
1957
|
-
Object.keys(
|
|
1958
|
-
Object.prototype.hasOwnProperty.call(
|
|
1959
|
-
}), Object.keys(
|
|
1953
|
+
function u(o) {
|
|
1954
|
+
if (q(n.value) && q(o)) {
|
|
1955
|
+
const c = {};
|
|
1956
|
+
Object.keys(o).forEach((h) => {
|
|
1957
|
+
Object.prototype.hasOwnProperty.call(o, h) && n.value[h] === o[h] || (c[h] = o[h]);
|
|
1958
|
+
}), Object.keys(c).length > 0 && (Object.assign(n.value, c), ja(c) && Object.assign(l, c));
|
|
1960
1959
|
}
|
|
1961
1960
|
}
|
|
1962
1961
|
return {
|
|
1963
|
-
paginationInfo:
|
|
1964
|
-
requestPagination:
|
|
1965
|
-
setPagination:
|
|
1962
|
+
paginationInfo: n,
|
|
1963
|
+
requestPagination: l,
|
|
1964
|
+
setPagination: u
|
|
1966
1965
|
};
|
|
1967
1966
|
}
|
|
1968
|
-
function
|
|
1967
|
+
function ja(e) {
|
|
1969
1968
|
if (typeof e != "object" || e === null)
|
|
1970
1969
|
return !1;
|
|
1971
1970
|
const a = Object.keys(e);
|
|
1972
1971
|
return a.length === 2 && a.includes("pageNum") && a.includes("pageSize");
|
|
1973
1972
|
}
|
|
1974
|
-
function
|
|
1975
|
-
const l =
|
|
1976
|
-
|
|
1973
|
+
function Na(e, a) {
|
|
1974
|
+
const l = P([]), n = P([]);
|
|
1975
|
+
N(() => a.value?.selectedRows, (r) => {
|
|
1977
1976
|
n.value = Z(r || []);
|
|
1978
1977
|
}, {
|
|
1979
1978
|
deep: !0,
|
|
1980
1979
|
immediate: !0
|
|
1981
|
-
}),
|
|
1982
|
-
l.value =
|
|
1980
|
+
}), N(() => a.value?.selectedRowKeys, (r) => {
|
|
1981
|
+
l.value = Il([...r || []]);
|
|
1983
1982
|
}, {
|
|
1984
1983
|
deep: !0,
|
|
1985
1984
|
immediate: !0
|
|
1986
1985
|
});
|
|
1987
|
-
const
|
|
1988
|
-
const
|
|
1989
|
-
e.value && (C ? r?.[e.value] &&
|
|
1990
|
-
},
|
|
1986
|
+
const u = (r, C) => {
|
|
1987
|
+
const d = a.value?.type || "checkbox";
|
|
1988
|
+
e.value && (C ? r?.[e.value] && d === "checkbox" ? (l.value.push(r[e.value]), n.value.push(r)) : (l.value = [r[e.value]], n.value = [r]) : (l.value = l.value.filter((m) => m !== r[e.value]), n.value = n.value.filter((m) => m[e.value] !== r[e.value])));
|
|
1989
|
+
}, o = () => {
|
|
1991
1990
|
a.value && a.value?.onChange?.(l.value, n.value);
|
|
1992
1991
|
};
|
|
1993
1992
|
return {
|
|
1994
1993
|
selectedKeys: l,
|
|
1995
1994
|
selectedItems: n,
|
|
1996
|
-
selectRowKey:
|
|
1997
|
-
selectAllRowKey: (r, C,
|
|
1998
|
-
e.value && (r ? C.map((
|
|
1995
|
+
selectRowKey: u,
|
|
1996
|
+
selectAllRowKey: (r, C, d) => {
|
|
1997
|
+
e.value && (r ? C.map((m) => (l.value.every((b) => b !== m?.[e.value]) && m?.[e.value] && (l.value.push(m[e.value]), n.value.push(m)), m)) : d.map((m) => (l.value.includes(m?.[e.value]) && (l.value = l.value.filter((b) => b !== m[e.value]), n.value = n.value.filter((b) => b[e.value] !== m[e.value])), m)));
|
|
1999
1998
|
},
|
|
2000
1999
|
removeRowKeys: (r) => {
|
|
2001
|
-
l.value = l.value.filter((C) => !r.includes(C)), n.value = n.value.filter((C) => !r.includes(C?.[e.value || ""])),
|
|
2000
|
+
l.value = l.value.filter((C) => !r.includes(C)), n.value = n.value.filter((C) => !r.includes(C?.[e.value || ""])), o();
|
|
2002
2001
|
},
|
|
2003
|
-
changeRowKey:
|
|
2002
|
+
changeRowKey: o,
|
|
2004
2003
|
syncSelectedRows: (r) => {
|
|
2005
2004
|
if (e.value && l.value.length !== n.value.length) {
|
|
2006
|
-
const C = n.value.map((
|
|
2007
|
-
r.forEach((
|
|
2008
|
-
|
|
2005
|
+
const C = n.value.map((m) => m[e.value]), d = l.value.filter((m) => !C.includes(m));
|
|
2006
|
+
r.forEach((m) => {
|
|
2007
|
+
d.includes(m[e.value]) && n.value.push(Z(m));
|
|
2009
2008
|
});
|
|
2010
2009
|
}
|
|
2011
2010
|
},
|
|
2012
2011
|
clearAllRowKeys: () => {
|
|
2013
|
-
l.value = [], n.value = [],
|
|
2012
|
+
l.value = [], n.value = [], o();
|
|
2014
2013
|
}
|
|
2015
2014
|
};
|
|
2016
2015
|
}
|
|
2017
|
-
function
|
|
2016
|
+
function Ea(e) {
|
|
2018
2017
|
const a = {};
|
|
2019
2018
|
return e.forEach((l) => {
|
|
2020
2019
|
let n = l.initialValue;
|
|
2021
|
-
const
|
|
2022
|
-
l.valueType ? !n &&
|
|
2020
|
+
const u = ["select", "number"], o = ["date", "time", "dateRange"], c = ["treeSelect", "numberRange"];
|
|
2021
|
+
l.valueType ? !n && u.includes(l.valueType) ? n = void 0 : !n && o.includes(l.valueType) ? n = null : !n && c.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);
|
|
2023
2022
|
}), a;
|
|
2024
2023
|
}
|
|
2025
|
-
function
|
|
2026
|
-
const
|
|
2027
|
-
function
|
|
2024
|
+
function Ma({ searchMap: e, params: a, columns: l, setPagination: n }) {
|
|
2025
|
+
const u = be({}), o = be({}), c = P([]);
|
|
2026
|
+
function h(r) {
|
|
2028
2027
|
r.forEach((C) => {
|
|
2029
|
-
|
|
2030
|
-
...
|
|
2028
|
+
c.value.some((d) => d.name === C.name) ? c.value = c.value.map((d) => d.name === C.name ? {
|
|
2029
|
+
...d,
|
|
2031
2030
|
...C
|
|
2032
|
-
} :
|
|
2031
|
+
} : d) : c.value.push(C);
|
|
2033
2032
|
});
|
|
2034
2033
|
}
|
|
2035
|
-
const
|
|
2034
|
+
const x = (r) => {
|
|
2036
2035
|
const C = [];
|
|
2037
|
-
if ((r === "all" || r === "searchMap") && (e.value?.forEach((
|
|
2038
|
-
|
|
2039
|
-
}),
|
|
2036
|
+
if ((r === "all" || r === "searchMap") && (e.value?.forEach((d) => C.push(d)), h(C)), (r === "all" || r === "columns") && l.value?.length && (l.value && l.value.forEach((d) => {
|
|
2037
|
+
d.searchConfig && C.push(d.searchConfig);
|
|
2038
|
+
}), h(C)), r === "all" || r === "searchMap" || r === "columns") {
|
|
2040
2039
|
n({ current: 1 });
|
|
2041
|
-
const
|
|
2042
|
-
Object.assign(
|
|
2043
|
-
for (const
|
|
2044
|
-
|
|
2040
|
+
const d = Ea(C);
|
|
2041
|
+
Object.assign(o, { ...d });
|
|
2042
|
+
for (const m in d)
|
|
2043
|
+
u[m] || (u[m] = d[m]);
|
|
2045
2044
|
}
|
|
2046
|
-
(r === "all" || r === "params") && (n({ current: 1 }), Object.assign(
|
|
2045
|
+
(r === "all" || r === "params") && (n({ current: 1 }), Object.assign(u, a.value));
|
|
2047
2046
|
};
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
}),
|
|
2051
|
-
|
|
2052
|
-
}, { deep: !0 }),
|
|
2053
|
-
|
|
2054
|
-
}, { deep: !0 }),
|
|
2055
|
-
|
|
2047
|
+
dl(() => {
|
|
2048
|
+
x("all");
|
|
2049
|
+
}), N(() => a.value, () => {
|
|
2050
|
+
x("params");
|
|
2051
|
+
}, { deep: !0 }), N(() => e.value, () => {
|
|
2052
|
+
x("searchMap");
|
|
2053
|
+
}, { deep: !0 }), N(() => l.value, () => {
|
|
2054
|
+
x("columns");
|
|
2056
2055
|
}, { deep: !0 });
|
|
2057
|
-
function
|
|
2058
|
-
n({ current: 1 }), Object.assign(
|
|
2056
|
+
function y(r) {
|
|
2057
|
+
n({ current: 1 }), Object.assign(u, r);
|
|
2059
2058
|
}
|
|
2060
|
-
return { formDataRef:
|
|
2059
|
+
return { formDataRef: c, formParamsRef: u, defaultParamsRef: o, setFormParams: y };
|
|
2061
2060
|
}
|
|
2062
|
-
function
|
|
2063
|
-
const a = S(() => e.scroll), l = S(() => e.autoScroll), n = S(() => e.modalScroll),
|
|
2061
|
+
function za(e) {
|
|
2062
|
+
const a = S(() => e.scroll), l = S(() => e.autoScroll), n = S(() => e.modalScroll), u = S(() => e.neverScroll), o = S(() => e.rowSelection), c = S(() => e.scrollBreakpoint);
|
|
2064
2063
|
return {
|
|
2065
2064
|
scroll: a,
|
|
2066
|
-
neverScroll:
|
|
2067
|
-
rowSelection:
|
|
2065
|
+
neverScroll: u,
|
|
2066
|
+
rowSelection: o,
|
|
2068
2067
|
autoScroll: l,
|
|
2069
2068
|
modalScroll: n,
|
|
2070
|
-
scrollBreakpoint:
|
|
2069
|
+
scrollBreakpoint: c
|
|
2071
2070
|
};
|
|
2072
2071
|
}
|
|
2073
|
-
function
|
|
2074
|
-
const
|
|
2075
|
-
let
|
|
2076
|
-
const
|
|
2072
|
+
function Ka({ scroll: e, columns: a, autoScroll: l, modalScroll: n, neverScroll: u, rowSelection: o, screens: c, innerWidth: h, scrollBreakpoint: x }) {
|
|
2073
|
+
const y = S(() => p(x) ? De(p(x)) ? h.value > p(x) : kt(p(x)) ? c.value?.[p(x)] : c.value?.xl : c.value?.xl), r = S(() => {
|
|
2074
|
+
let d = 0;
|
|
2075
|
+
const m = p(o) ? 60 : 0, b = 150, v = Z(p(a));
|
|
2077
2076
|
v.forEach((k) => {
|
|
2078
|
-
|
|
2077
|
+
d += Number.parseInt(String(k.width)) || 0;
|
|
2079
2078
|
});
|
|
2080
|
-
const
|
|
2081
|
-
return
|
|
2079
|
+
const I = v.filter((k) => !Reflect.has(k, "width")).length;
|
|
2080
|
+
return I !== 0 && (d += I * b), m && (d += m), d;
|
|
2082
2081
|
});
|
|
2083
|
-
return { proScroll: S(() =>
|
|
2084
|
-
y:
|
|
2085
|
-
} :
|
|
2082
|
+
return { proScroll: S(() => p(u) ? {} : p(e) && Object.keys(p(e)).length ? p(e) : p(n) ? {
|
|
2083
|
+
y: p(e)?.y || (c.value?.xl ? 400 : 235)
|
|
2084
|
+
} : p(l) ? y.value ? {} : le(y.value) ? { x: p(r) } : {} : {}), breakpoint: y };
|
|
2086
2085
|
}
|
|
2087
|
-
function
|
|
2088
|
-
const l =
|
|
2089
|
-
|
|
2086
|
+
function Ya({ size: e, emit: a }) {
|
|
2087
|
+
const l = P("middle");
|
|
2088
|
+
Ne(() => {
|
|
2090
2089
|
l.value = e.value;
|
|
2091
2090
|
});
|
|
2092
|
-
function n(
|
|
2093
|
-
l.value =
|
|
2091
|
+
function n(u) {
|
|
2092
|
+
l.value = u, a("sizeChange", u);
|
|
2094
2093
|
}
|
|
2095
2094
|
return { sizeRef: l, setTableSize: n };
|
|
2096
2095
|
}
|
|
2097
|
-
const
|
|
2096
|
+
const Ze = {
|
|
2098
2097
|
"&::-webkit-scrollbar": {
|
|
2099
2098
|
width: 4,
|
|
2100
2099
|
height: 4
|
|
@@ -2107,7 +2106,7 @@ const et = {
|
|
|
2107
2106
|
backgroundColor: "transparent",
|
|
2108
2107
|
borderRadius: 2
|
|
2109
2108
|
}
|
|
2110
|
-
},
|
|
2109
|
+
}, La = (e) => {
|
|
2111
2110
|
const a = `${e.antCls}-table`;
|
|
2112
2111
|
return {
|
|
2113
2112
|
[e.componentCls]: {
|
|
@@ -2302,70 +2301,70 @@ const et = {
|
|
|
2302
2301
|
}
|
|
2303
2302
|
},
|
|
2304
2303
|
[`&${e.componentCls}-beautify-scroll`]: {
|
|
2305
|
-
[`${e.antCls}-table-content`]:
|
|
2306
|
-
[`${e.antCls}-table-body`]:
|
|
2304
|
+
[`${e.antCls}-table-content`]: Ze,
|
|
2305
|
+
[`${e.antCls}-table-body`]: Ze,
|
|
2307
2306
|
[`${e.antCls}-table-empty`]: {
|
|
2308
|
-
[`${e.antCls}-table-content`]:
|
|
2307
|
+
[`${e.antCls}-table-content`]: Ze
|
|
2309
2308
|
}
|
|
2310
2309
|
}
|
|
2311
2310
|
}
|
|
2312
2311
|
};
|
|
2313
2312
|
};
|
|
2314
|
-
function
|
|
2313
|
+
function Wa(e) {
|
|
2315
2314
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !U(e);
|
|
2316
2315
|
}
|
|
2317
|
-
function
|
|
2316
|
+
function Va(e, a, l, n) {
|
|
2318
2317
|
if (!a) return e;
|
|
2319
|
-
let
|
|
2318
|
+
let u = e;
|
|
2320
2319
|
if (q(a)) {
|
|
2321
|
-
const
|
|
2322
|
-
return
|
|
2320
|
+
const o = a.node === "a" ? "span" : a.node;
|
|
2321
|
+
return i(o, M(a?.attr || {}, {
|
|
2323
2322
|
class: [a.class, a.node === "a" ? `${l}-a` : ""],
|
|
2324
2323
|
onClick: a.click
|
|
2325
|
-
}),
|
|
2324
|
+
}), Wa(e) ? e : {
|
|
2326
2325
|
default: () => [e]
|
|
2327
2326
|
});
|
|
2328
2327
|
}
|
|
2329
2328
|
switch (a) {
|
|
2330
2329
|
case "link":
|
|
2331
|
-
|
|
2330
|
+
u = i("span", {
|
|
2332
2331
|
class: [`${l}-a`, n]
|
|
2333
2332
|
}, [e]);
|
|
2334
2333
|
break;
|
|
2335
2334
|
case "time":
|
|
2336
|
-
|
|
2335
|
+
u = H(e).format("HH:mm:ss");
|
|
2337
2336
|
break;
|
|
2338
2337
|
case "dateMonth":
|
|
2339
|
-
|
|
2338
|
+
u = `${H(e).month() + 1}月`;
|
|
2340
2339
|
break;
|
|
2341
2340
|
case "date":
|
|
2342
|
-
|
|
2341
|
+
u = H(e).format("YYYY-MM-DD");
|
|
2343
2342
|
break;
|
|
2344
2343
|
case "dateTime":
|
|
2345
|
-
|
|
2344
|
+
u = H(e).format("YYYY-MM-DD HH:mm:ss");
|
|
2346
2345
|
break;
|
|
2347
2346
|
}
|
|
2348
|
-
return
|
|
2347
|
+
return u;
|
|
2349
2348
|
}
|
|
2350
2349
|
function Ha(e, a) {
|
|
2351
2350
|
const l = a && a.current || 1, n = a && a.pageSize || 10;
|
|
2352
|
-
return e.filter((
|
|
2351
|
+
return e.filter((u, o) => o < l * n && o >= n * (l - 1));
|
|
2353
2352
|
}
|
|
2354
|
-
function
|
|
2353
|
+
function qa(e) {
|
|
2355
2354
|
const a = document.createElement("textarea");
|
|
2356
2355
|
a.style.position = "absolute", a.style.opacity = "0", a.value = e, document.body.appendChild(a), a.select(), document.execCommand("copy"), document.body.removeChild(a);
|
|
2357
2356
|
}
|
|
2358
|
-
function
|
|
2357
|
+
function Ga(e) {
|
|
2359
2358
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !U(e);
|
|
2360
2359
|
}
|
|
2361
2360
|
const {
|
|
2362
|
-
useBreakpoint:
|
|
2363
|
-
} =
|
|
2361
|
+
useBreakpoint: _a
|
|
2362
|
+
} = at, Qa = {
|
|
2364
2363
|
reload: !0,
|
|
2365
2364
|
density: !0,
|
|
2366
2365
|
setting: !0,
|
|
2367
2366
|
fullScreen: !0
|
|
2368
|
-
},
|
|
2367
|
+
}, Xa = ql.useToken, et = /* @__PURE__ */ ne({
|
|
2369
2368
|
name: "GProTable",
|
|
2370
2369
|
inheritAttrs: !1,
|
|
2371
2370
|
props: ce,
|
|
@@ -2375,35 +2374,35 @@ const {
|
|
|
2375
2374
|
emit: a,
|
|
2376
2375
|
slots: l,
|
|
2377
2376
|
attrs: n,
|
|
2378
|
-
expose:
|
|
2377
|
+
expose: u
|
|
2379
2378
|
}) {
|
|
2380
|
-
const
|
|
2379
|
+
const o = lt({
|
|
2381
2380
|
suffixCls: "table",
|
|
2382
2381
|
isPor: !0
|
|
2383
2382
|
}), {
|
|
2384
|
-
wrapSSR:
|
|
2385
|
-
hashId:
|
|
2386
|
-
} =
|
|
2387
|
-
token:
|
|
2388
|
-
} =
|
|
2383
|
+
wrapSSR: c,
|
|
2384
|
+
hashId: h
|
|
2385
|
+
} = He("ProBaseTable", [La], o), {
|
|
2386
|
+
token: x
|
|
2387
|
+
} = Xa(), y = $l(), r = _a(), {
|
|
2389
2388
|
width: C
|
|
2390
|
-
} =
|
|
2391
|
-
|
|
2389
|
+
} = El(), d = P(!1), m = Rt(), b = P(), v = P(), F = P(e.waitRequest);
|
|
2390
|
+
Ne(() => F.value = e.waitRequest);
|
|
2392
2391
|
const {
|
|
2393
|
-
toggle:
|
|
2392
|
+
toggle: I,
|
|
2394
2393
|
isFullscreen: k
|
|
2395
|
-
} =
|
|
2394
|
+
} = At(b), E = S(() => ({
|
|
2396
2395
|
...e
|
|
2397
|
-
})), L = S(() => !r.value.xl), W = S(() => (e.virtualScroll &&
|
|
2396
|
+
})), L = S(() => !r.value.xl), W = S(() => (e.virtualScroll && Le(!e.scroll?.y, "参数scroll的Y值不能为空!"), !!(e.scroll?.y && e.virtualScroll))), O = S(() => e.search === !1 ? !1 : q(e.search) ? e.search : {
|
|
2398
2397
|
type: "auto",
|
|
2399
2398
|
resetText: "重置",
|
|
2400
2399
|
searchText: "查询"
|
|
2401
|
-
}),
|
|
2402
|
-
const
|
|
2403
|
-
const B =
|
|
2404
|
-
return
|
|
2400
|
+
}), j = S(() => O.value === !1 ? {} : O.value), D = S(() => j.value?.manualRequest ?? !1), ee = S(() => j.value?.actions), oe = S(() => {
|
|
2401
|
+
const g = (e.columns || []).filter((w) => w.key || w.dataIndex).map((w) => {
|
|
2402
|
+
const B = w.key || w.dataIndex;
|
|
2403
|
+
return w.key = B, w.dataIndex = B, w.align = w.align || e.align, w.uuid = w.uuid || tt().uuid(15), w;
|
|
2405
2404
|
});
|
|
2406
|
-
return
|
|
2405
|
+
return kl(g, {
|
|
2407
2406
|
align: e.align ?? "left",
|
|
2408
2407
|
showIndex: e.showIndex ?? !1
|
|
2409
2408
|
});
|
|
@@ -2411,246 +2410,262 @@ const {
|
|
|
2411
2410
|
loadingComputed: ie,
|
|
2412
2411
|
loading: ae,
|
|
2413
2412
|
setLoading: pe
|
|
2414
|
-
} =
|
|
2413
|
+
} = Oa({
|
|
2415
2414
|
emit: a,
|
|
2416
2415
|
loading: se(e, "loading")
|
|
2417
2416
|
}), {
|
|
2418
|
-
sizeRef:
|
|
2419
|
-
setTableSize:
|
|
2420
|
-
} =
|
|
2417
|
+
sizeRef: he,
|
|
2418
|
+
setTableSize: Te
|
|
2419
|
+
} = Ya({
|
|
2421
2420
|
emit: a,
|
|
2422
2421
|
size: se(e, "size")
|
|
2423
2422
|
}), {
|
|
2424
2423
|
paginationInfo: t,
|
|
2425
2424
|
requestPagination: f,
|
|
2426
2425
|
setPagination: R
|
|
2427
|
-
} =
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2426
|
+
} = Da({
|
|
2427
|
+
pagination: se(e, "pagination"),
|
|
2428
|
+
pageItemRender: bt({
|
|
2429
|
+
slots: l,
|
|
2430
|
+
props: e,
|
|
2431
|
+
key: "pageItemRender"
|
|
2432
|
+
})
|
|
2433
|
+
}), $ = za(e), {
|
|
2434
|
+
proScroll: T,
|
|
2433
2435
|
breakpoint: s
|
|
2434
|
-
} =
|
|
2436
|
+
} = Ka({
|
|
2435
2437
|
...$,
|
|
2436
2438
|
innerWidth: C,
|
|
2437
2439
|
columns: oe,
|
|
2438
2440
|
screens: r
|
|
2439
|
-
}),
|
|
2441
|
+
}), z = Fa(e), {
|
|
2440
2442
|
proColumns: G,
|
|
2441
2443
|
cacheProColumns: te,
|
|
2442
2444
|
setColumns: Ce,
|
|
2443
2445
|
changeColumns: Y,
|
|
2444
|
-
resizeColumnWidth:
|
|
2445
|
-
} =
|
|
2446
|
-
...
|
|
2446
|
+
resizeColumnWidth: Ee
|
|
2447
|
+
} = Ba({
|
|
2448
|
+
...z,
|
|
2447
2449
|
breakpoint: s,
|
|
2448
|
-
scroll:
|
|
2450
|
+
scroll: T,
|
|
2449
2451
|
columns: oe
|
|
2450
2452
|
}), {
|
|
2451
|
-
columnsMap:
|
|
2453
|
+
columnsMap: $e,
|
|
2452
2454
|
operationType: ue,
|
|
2453
2455
|
setColumnsMap: xe,
|
|
2454
2456
|
sortKeyColumns: _,
|
|
2455
2457
|
cacheColumnsMap: ye,
|
|
2456
2458
|
setSortKeyColumns: J
|
|
2457
|
-
} =
|
|
2459
|
+
} = Pa({
|
|
2458
2460
|
columns: te,
|
|
2459
2461
|
columnsState: se(e, "columnsState"),
|
|
2460
2462
|
changeColumns: Y
|
|
2461
2463
|
}), {
|
|
2462
|
-
formDataRef:
|
|
2463
|
-
formParamsRef:
|
|
2464
|
-
defaultParamsRef:
|
|
2465
|
-
setFormParams:
|
|
2466
|
-
} =
|
|
2464
|
+
formDataRef: nt,
|
|
2465
|
+
formParamsRef: ot,
|
|
2466
|
+
defaultParamsRef: Kt,
|
|
2467
|
+
setFormParams: qe
|
|
2468
|
+
} = Ma({
|
|
2467
2469
|
searchMap: se(e, "searchMap"),
|
|
2468
2470
|
params: se(e, "params"),
|
|
2469
2471
|
columns: oe,
|
|
2470
2472
|
setPagination: R
|
|
2471
2473
|
}), {
|
|
2472
|
-
selectedKeys:
|
|
2473
|
-
selectedItems:
|
|
2474
|
-
changeRowKey:
|
|
2475
|
-
selectRowKey:
|
|
2476
|
-
selectAllRowKey:
|
|
2477
|
-
syncSelectedRows:
|
|
2478
|
-
removeRowKeys:
|
|
2479
|
-
clearAllRowKeys:
|
|
2480
|
-
} =
|
|
2481
|
-
reload:
|
|
2482
|
-
reSetDataList:
|
|
2483
|
-
changeDataValue:
|
|
2484
|
-
isTreeDataRef:
|
|
2485
|
-
dataSource:
|
|
2486
|
-
handleTableChange:
|
|
2487
|
-
} =
|
|
2474
|
+
selectedKeys: it,
|
|
2475
|
+
selectedItems: Yt,
|
|
2476
|
+
changeRowKey: Lt,
|
|
2477
|
+
selectRowKey: ut,
|
|
2478
|
+
selectAllRowKey: st,
|
|
2479
|
+
syncSelectedRows: rt,
|
|
2480
|
+
removeRowKeys: ct,
|
|
2481
|
+
clearAllRowKeys: Wt
|
|
2482
|
+
} = Na(se(e, "rowKey"), se(e, "rowSelection")), Vt = ka(e), {
|
|
2483
|
+
reload: Re,
|
|
2484
|
+
reSetDataList: Ht,
|
|
2485
|
+
changeDataValue: qt,
|
|
2486
|
+
isTreeDataRef: Gt,
|
|
2487
|
+
dataSource: Fe,
|
|
2488
|
+
handleTableChange: dt
|
|
2489
|
+
} = Aa({
|
|
2488
2490
|
...Vt,
|
|
2489
2491
|
waitRequest: F
|
|
2490
2492
|
}, {
|
|
2491
2493
|
loading: ie,
|
|
2492
2494
|
paginationInfo: t,
|
|
2493
2495
|
setPagination: R,
|
|
2494
|
-
removeRowKeys:
|
|
2495
|
-
syncSelectedRows:
|
|
2496
|
+
removeRowKeys: ct,
|
|
2497
|
+
syncSelectedRows: rt,
|
|
2496
2498
|
setLoading: pe,
|
|
2497
2499
|
setColumns: Ce,
|
|
2498
2500
|
search: O,
|
|
2499
2501
|
columns: G,
|
|
2500
|
-
formParamsRef:
|
|
2502
|
+
formParamsRef: ot,
|
|
2501
2503
|
onBeforeSearchSubmit: e.onBeforeSearchSubmit,
|
|
2502
|
-
hasCustomRender: S(() =>
|
|
2503
|
-
}, a),
|
|
2504
|
-
...
|
|
2504
|
+
hasCustomRender: S(() => we(e.customRender || l?.customRender))
|
|
2505
|
+
}, a), Be = S(() => e.options ? {
|
|
2506
|
+
...Qa,
|
|
2505
2507
|
...q(e.options) ? e.options : {}
|
|
2506
|
-
} : !1),
|
|
2507
|
-
size:
|
|
2508
|
-
scroll:
|
|
2509
|
-
dataSource:
|
|
2510
|
-
pagination:
|
|
2508
|
+
} : !1), _t = S(() => ({
|
|
2509
|
+
size: p(he),
|
|
2510
|
+
scroll: p(T),
|
|
2511
|
+
dataSource: p(Fe),
|
|
2512
|
+
pagination: p(t),
|
|
2511
2513
|
virtualScroll: W.value,
|
|
2512
|
-
columns:
|
|
2513
|
-
})),
|
|
2514
|
-
const
|
|
2515
|
-
return !
|
|
2516
|
-
spinning: e.showLoading ?
|
|
2517
|
-
...
|
|
2514
|
+
columns: p(G).filter((g) => g.show || g.show === void 0)
|
|
2515
|
+
})), ft = S(() => {
|
|
2516
|
+
const g = q(e.loading) ? je(e.loading, "spinning") : {};
|
|
2517
|
+
return !g.indicator && m?.indicator?.value && (g.indicator = m?.indicator?.value), {
|
|
2518
|
+
spinning: e.showLoading ? we(ae.value) : !1,
|
|
2519
|
+
...g
|
|
2518
2520
|
};
|
|
2519
2521
|
}), ht = S(() => {
|
|
2520
|
-
let
|
|
2521
|
-
const
|
|
2522
|
+
let g;
|
|
2523
|
+
const w = p(E).direction === "rtl" ? "bottomLeft" : "right", B = p(t)?.position;
|
|
2522
2524
|
if (B !== null && Array.isArray(B)) {
|
|
2523
|
-
const
|
|
2524
|
-
!
|
|
2525
|
+
const K = B.find((X) => X.includes("top")), Q = B.find((X) => X.includes("bottom")), A = B.every((X) => `${X}` == "none");
|
|
2526
|
+
!K && !Q && !A && (g = w), K && (g = K.toLowerCase().replace("top", "")), Q && (g = Q.toLowerCase().replace("bottom", ""));
|
|
2525
2527
|
} else
|
|
2526
|
-
|
|
2527
|
-
return
|
|
2528
|
+
g = w;
|
|
2529
|
+
return g;
|
|
2528
2530
|
});
|
|
2529
|
-
|
|
2530
|
-
|
|
2531
|
+
Ra(() => {
|
|
2532
|
+
d.value && e.keepAliveReload ? Re() : d.value = !0;
|
|
2531
2533
|
});
|
|
2532
|
-
const
|
|
2533
|
-
D.value ? ee.value?.reload &&
|
|
2534
|
+
const mt = async (g, w) => {
|
|
2535
|
+
D.value ? ee.value?.reload && w ? (qe(g), await Re()) : qe(g) : (qe({
|
|
2534
2536
|
...e.params || {},
|
|
2535
|
-
...
|
|
2536
|
-
}), await
|
|
2537
|
-
},
|
|
2538
|
-
|
|
2539
|
-
},
|
|
2540
|
-
R(xt(
|
|
2541
|
-
},
|
|
2537
|
+
...g
|
|
2538
|
+
}), await Re());
|
|
2539
|
+
}, Qt = async (g, w) => {
|
|
2540
|
+
w === "reset" ? (a("reset", g), e.request && await mt(g, w)) : e.request ? (a("submit", g), await mt(g, w)) : a("submit", g);
|
|
2541
|
+
}, vt = (g, w, B, K) => {
|
|
2542
|
+
R(xt(g, ["current", "pageSize"])), dt(g, w, B, K);
|
|
2543
|
+
}, Xt = (g, w) => {
|
|
2542
2544
|
R({
|
|
2543
|
-
current:
|
|
2544
|
-
pageSize:
|
|
2545
|
-
}),
|
|
2546
|
-
current:
|
|
2547
|
-
pageSize:
|
|
2545
|
+
current: g,
|
|
2546
|
+
pageSize: w
|
|
2547
|
+
}), dt({
|
|
2548
|
+
current: g,
|
|
2549
|
+
pageSize: w,
|
|
2548
2550
|
total: t.value && t.value?.total || 0
|
|
2549
2551
|
}, {}, {});
|
|
2550
|
-
},
|
|
2551
|
-
a("expandedRowsChange",
|
|
2552
|
-
},
|
|
2553
|
-
a("expand",
|
|
2554
|
-
},
|
|
2555
|
-
let
|
|
2556
|
-
if (
|
|
2557
|
-
const Q =
|
|
2552
|
+
}, Ut = (g) => {
|
|
2553
|
+
a("expandedRowsChange", g);
|
|
2554
|
+
}, Jt = (g, w) => {
|
|
2555
|
+
a("expand", g, w);
|
|
2556
|
+
}, Zt = (g, w) => Ee(g, w), el = (g, w, B) => {
|
|
2557
|
+
let K = g;
|
|
2558
|
+
if (w) {
|
|
2559
|
+
const Q = V(g) ? typeof g?.[0]?.children == "string" ? g?.[0]?.children : "" : g ? g.toString() : "", A = B.tooltip === !1 ? {} : B.tooltip, X = B.tooltip === !1 ? 1 : De(A?.hiddenLine) && A?.hiddenLine > 0 ? A?.hiddenLine : 1, Se = B.tooltip === !1 ? 0 : De(A?.width) ? A?.width : 0, al = B.tooltip !== !1 && kt(Q) && Se > 0 ? Dl(Q, {
|
|
2558
2560
|
cssObject: {
|
|
2559
2561
|
fontSize: "14px",
|
|
2560
2562
|
lineHeight: "22px",
|
|
2561
|
-
fontFamily:
|
|
2563
|
+
fontFamily: y?.token?.value?.fontFamily || x?.value?.fontFamily,
|
|
2562
2564
|
...A?.targetStyle || {}
|
|
2563
2565
|
}
|
|
2564
|
-
}) : 0,
|
|
2565
|
-
class: `${
|
|
2566
|
-
}, [
|
|
2567
|
-
title:
|
|
2568
|
-
getPopupContainer: (
|
|
2566
|
+
}) : 0, nl = document.querySelector(`.${o} .ant-table-tbody`), Me = i("div", {
|
|
2567
|
+
class: `${o}-ellipsis-text`
|
|
2568
|
+
}, [g]), pt = () => B.tooltip === !1 || q(B.tooltip) && al < Se && Se > 0 ? Me : i(de, M({
|
|
2569
|
+
title: g,
|
|
2570
|
+
getPopupContainer: (Ge) => nl ?? Ge?.parentNode?.parentNode
|
|
2569
2571
|
}, q(B.tooltip) ? B.tooltip : {}, {
|
|
2570
2572
|
destroyTooltipOnHide: !0
|
|
2571
|
-
}),
|
|
2572
|
-
default: () => [
|
|
2573
|
+
}), Ga(Me) ? Me : {
|
|
2574
|
+
default: () => [Me]
|
|
2573
2575
|
});
|
|
2574
|
-
if (
|
|
2575
|
-
class: `${
|
|
2576
|
+
if (K = i("div", {
|
|
2577
|
+
class: `${o}-ellipsis ${A?.class ?? ""}`,
|
|
2576
2578
|
style: {
|
|
2577
2579
|
"-webkit-line-clamp": X
|
|
2578
2580
|
}
|
|
2579
|
-
}, [
|
|
2580
|
-
const
|
|
2581
|
-
|
|
2582
|
-
class: `${
|
|
2583
|
-
}, [
|
|
2584
|
-
class: `${
|
|
2581
|
+
}, [pt()]), B.copyable) {
|
|
2582
|
+
const Ge = typeof B.copyText == "function" ? B.copyText?.(B) : B.copyText || Q;
|
|
2583
|
+
K = i("div", {
|
|
2584
|
+
class: `${o}-copyable`
|
|
2585
|
+
}, [i("div", {
|
|
2586
|
+
class: `${o}-ellipsis ${A?.class ?? ""}`,
|
|
2585
2587
|
style: {
|
|
2586
2588
|
"-webkit-line-clamp": X
|
|
2587
2589
|
}
|
|
2588
|
-
}, [
|
|
2589
|
-
class: `${
|
|
2590
|
+
}, [pt()]), i(wl, {
|
|
2591
|
+
class: `${o}-copyable-icon`,
|
|
2590
2592
|
onClick: () => {
|
|
2591
|
-
|
|
2593
|
+
qa(Ge), Ql.success("复制成功");
|
|
2592
2594
|
}
|
|
2593
2595
|
}, null)]);
|
|
2594
2596
|
}
|
|
2595
2597
|
}
|
|
2596
|
-
return
|
|
2598
|
+
return K;
|
|
2597
2599
|
};
|
|
2598
|
-
function
|
|
2599
|
-
const
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
-
|
|
2600
|
+
function gt() {
|
|
2601
|
+
const g = jl({
|
|
2602
|
+
slots: l,
|
|
2603
|
+
props: e,
|
|
2604
|
+
key: "emptyText"
|
|
2605
|
+
});
|
|
2606
|
+
if (g !== !1 && m?.emptyText?.value !== !1) {
|
|
2607
|
+
const B = e.emptyTextProps?.extraProps || {}, K = g || m?.emptyText?.value, Q = U(K), A = Q ? Tt(K, B) : Bt(V(K) ? K : [K]);
|
|
2608
|
+
return i("div", {
|
|
2609
|
+
class: re(`${o}-empty-text`, h.value, e.emptyTextProps?.class),
|
|
2604
2610
|
style: e.emptyTextProps?.style
|
|
2605
|
-
}, [Q ? A :
|
|
2611
|
+
}, [Q ? A : V(A) ? A.map((X) => Ve(X, B)) : i(Xl, null, null)]);
|
|
2606
2612
|
}
|
|
2607
2613
|
return null;
|
|
2608
2614
|
}
|
|
2609
|
-
const
|
|
2610
|
-
const
|
|
2611
|
-
|
|
2612
|
-
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
|
|
2615
|
+
const tl = () => {
|
|
2616
|
+
const g = bt({
|
|
2617
|
+
slots: l,
|
|
2618
|
+
props: e,
|
|
2619
|
+
key: "customRender"
|
|
2620
|
+
});
|
|
2621
|
+
if (g) {
|
|
2622
|
+
if (Fe.value?.length) {
|
|
2623
|
+
const w = Z(p(Fe));
|
|
2624
|
+
return g?.({
|
|
2625
|
+
dataSource: w,
|
|
2626
|
+
currentData: Ha(w, t.value)
|
|
2617
2627
|
});
|
|
2618
2628
|
}
|
|
2619
|
-
return
|
|
2629
|
+
return gt();
|
|
2620
2630
|
}
|
|
2621
|
-
return
|
|
2622
|
-
},
|
|
2623
|
-
const
|
|
2624
|
-
|
|
2625
|
-
|
|
2626
|
-
|
|
2631
|
+
return i(ke, null, null);
|
|
2632
|
+
}, ll = (g) => {
|
|
2633
|
+
const w = Ol({
|
|
2634
|
+
slots: l,
|
|
2635
|
+
props: e,
|
|
2636
|
+
keys: ["headerTitle", "titleTip", "toolBarBtn", "settingExtra", "optionsExtra"],
|
|
2637
|
+
render: !0
|
|
2638
|
+
});
|
|
2639
|
+
return i(Ta, {
|
|
2627
2640
|
titleTipText: e.titleTipText,
|
|
2628
|
-
options: le(
|
|
2629
|
-
...
|
|
2630
|
-
setting:
|
|
2631
|
-
density:
|
|
2641
|
+
options: le(Be.value) ? Be.value : {
|
|
2642
|
+
...Be.value,
|
|
2643
|
+
setting: g ? !1 : Be.value?.setting,
|
|
2644
|
+
density: g ? !1 : Be.value?.density
|
|
2632
2645
|
},
|
|
2633
|
-
|
|
2634
|
-
|
|
2635
|
-
|
|
2646
|
+
headerTitle: w.headerTitle,
|
|
2647
|
+
titleTip: w.titleTip,
|
|
2648
|
+
settingExtra: w.settingExtra,
|
|
2649
|
+
optionsExtra: w.optionsExtra,
|
|
2650
|
+
toolBarBtn: w.toolBarBtn
|
|
2636
2651
|
}, null);
|
|
2637
2652
|
};
|
|
2638
|
-
return
|
|
2639
|
-
tableSize:
|
|
2653
|
+
return ea({
|
|
2654
|
+
tableSize: he,
|
|
2640
2655
|
columns: G,
|
|
2641
2656
|
cacheColumns: oe,
|
|
2642
2657
|
isMobile: L,
|
|
2643
|
-
searchConfig:
|
|
2658
|
+
searchConfig: j,
|
|
2644
2659
|
manualSearch: D,
|
|
2645
2660
|
searchActions: ee,
|
|
2646
2661
|
action: {
|
|
2647
|
-
setTableSize:
|
|
2648
|
-
reload: (
|
|
2649
|
-
toggle:
|
|
2662
|
+
setTableSize: Te,
|
|
2663
|
+
reload: (g) => Re(g),
|
|
2664
|
+
toggle: I
|
|
2650
2665
|
},
|
|
2651
2666
|
settingsAction: {
|
|
2652
2667
|
autoScroll: se(e, "autoScroll"),
|
|
2653
|
-
columnsMap:
|
|
2668
|
+
columnsMap: $e,
|
|
2654
2669
|
operationType: ue,
|
|
2655
2670
|
setColumnsMap: xe,
|
|
2656
2671
|
sortKeyColumns: _,
|
|
@@ -2660,134 +2675,134 @@ const {
|
|
|
2660
2675
|
setPagination: R,
|
|
2661
2676
|
changeColumns: Y,
|
|
2662
2677
|
slots: l
|
|
2663
|
-
}),
|
|
2678
|
+
}), u({
|
|
2664
2679
|
formRef: () => ({
|
|
2665
|
-
getFormState: () =>
|
|
2680
|
+
getFormState: () => p(ot),
|
|
2666
2681
|
getFormInnerState: () => v.value?.getFormState() || {},
|
|
2667
|
-
restFormState: (
|
|
2668
|
-
F.value = !0,
|
|
2682
|
+
restFormState: (g) => {
|
|
2683
|
+
F.value = !0, g && g?.(), v.value?.resetForm(!1), F.value = !1;
|
|
2669
2684
|
}
|
|
2670
2685
|
}),
|
|
2671
2686
|
actionRef: () => ({
|
|
2672
2687
|
loading: ae,
|
|
2673
|
-
dataSource:
|
|
2688
|
+
dataSource: Fe,
|
|
2674
2689
|
pageState: f,
|
|
2675
2690
|
pagination: t.value,
|
|
2676
|
-
selectedKeys: S(() =>
|
|
2677
|
-
selectedItems: S(() =>
|
|
2691
|
+
selectedKeys: S(() => it.value),
|
|
2692
|
+
selectedItems: S(() => Yt.value),
|
|
2678
2693
|
rowsSelection: {
|
|
2679
|
-
clear:
|
|
2680
|
-
select:
|
|
2681
|
-
remove:
|
|
2682
|
-
sync:
|
|
2683
|
-
selectAll:
|
|
2694
|
+
clear: Wt,
|
|
2695
|
+
select: ut,
|
|
2696
|
+
remove: ct,
|
|
2697
|
+
sync: rt,
|
|
2698
|
+
selectAll: st
|
|
2684
2699
|
},
|
|
2685
|
-
reload:
|
|
2686
|
-
getLoadingStatus: () =>
|
|
2687
|
-
reloadAndReset: async (
|
|
2700
|
+
reload: Re,
|
|
2701
|
+
getLoadingStatus: () => p(ie),
|
|
2702
|
+
reloadAndReset: async (g) => {
|
|
2688
2703
|
F.value = !0, R({
|
|
2689
2704
|
current: 1,
|
|
2690
2705
|
pageSize: f?.pageSize || 10
|
|
2691
|
-
}),
|
|
2706
|
+
}), g?.callBack && (g?.wait ? await g?.callBack?.() : g?.callBack?.()), v.value?.resetForm(!1), F.value = !1;
|
|
2692
2707
|
},
|
|
2693
|
-
reSetDataList:
|
|
2694
|
-
setPageAndReload:
|
|
2708
|
+
reSetDataList: Ht,
|
|
2709
|
+
setPageAndReload: vt,
|
|
2695
2710
|
setPagination: R,
|
|
2696
|
-
setDataValue:
|
|
2711
|
+
setDataValue: qt,
|
|
2697
2712
|
setLoading: pe
|
|
2698
2713
|
})
|
|
2699
2714
|
}), () => {
|
|
2700
|
-
const
|
|
2701
|
-
return
|
|
2702
|
-
ref:
|
|
2715
|
+
const g = we(e.customRender || l.customRender);
|
|
2716
|
+
return c(i("div", {
|
|
2717
|
+
ref: b,
|
|
2703
2718
|
class: re([{
|
|
2704
|
-
[`${
|
|
2705
|
-
[`${
|
|
2719
|
+
[`${h.value}`]: !0,
|
|
2720
|
+
[`${o}`]: !0,
|
|
2706
2721
|
[`${n.class}`]: n.class,
|
|
2707
|
-
[`${
|
|
2708
|
-
[`${
|
|
2709
|
-
[`${
|
|
2710
|
-
[`${
|
|
2722
|
+
[`${o}-beautify-scroll`]: le(e.useDefaultScrollStyle) ? !e.useDefaultScrollStyle : !0,
|
|
2723
|
+
[`${o}-no-scroll`]: !Object.keys(p(T) || {}).length,
|
|
2724
|
+
[`${o}-table-tree`]: Gt.value,
|
|
2725
|
+
[`${o}-full-screen`]: k.value
|
|
2711
2726
|
}]),
|
|
2712
2727
|
style: n.style
|
|
2713
|
-
}, [
|
|
2714
|
-
class: [`${
|
|
2715
|
-
}, [(
|
|
2728
|
+
}, [i("div", {
|
|
2729
|
+
class: [`${o}-content`, h.value]
|
|
2730
|
+
}, [(nt.value.length > 0 || we(l.search)) && e.search !== !1 && i(Et, {
|
|
2716
2731
|
ref: v,
|
|
2717
2732
|
modal: e.modalScroll,
|
|
2718
2733
|
cardBordered: e.cardBordered,
|
|
2719
|
-
searchMap:
|
|
2720
|
-
prefixCls:
|
|
2721
|
-
loading: !!
|
|
2722
|
-
onSearch:
|
|
2723
|
-
defaultParams:
|
|
2734
|
+
searchMap: nt.value,
|
|
2735
|
+
prefixCls: o,
|
|
2736
|
+
loading: !!p(ie),
|
|
2737
|
+
onSearch: Qt,
|
|
2738
|
+
defaultParams: Kt
|
|
2724
2739
|
}, {
|
|
2725
2740
|
default: l.search ? () => l.search?.() : null
|
|
2726
|
-
}),
|
|
2727
|
-
class: re(
|
|
2728
|
-
}, [
|
|
2729
|
-
default: () => [
|
|
2730
|
-
class: `${
|
|
2731
|
-
}, [
|
|
2732
|
-
class: re(`${
|
|
2741
|
+
}), i("div", {
|
|
2742
|
+
class: re(h.value, `${o}-card`, e.cardBordered && `${o}-card-border`)
|
|
2743
|
+
}, [ll(g), g ? i(Dt, ft.value, {
|
|
2744
|
+
default: () => [i("div", {
|
|
2745
|
+
class: `${o}-wrapper ${h.value}`
|
|
2746
|
+
}, [i("div", {
|
|
2747
|
+
class: re(`${o}-list`, h.value, e.tableProps?.class),
|
|
2733
2748
|
style: e.tableProps?.style
|
|
2734
|
-
}, [
|
|
2749
|
+
}, [tl()]), e.pagination !== !1 && Fe.value?.length > 0 && i(Gl, M({
|
|
2735
2750
|
class: {
|
|
2736
|
-
[`${
|
|
2737
|
-
[`${
|
|
2751
|
+
[`${o}-pagination ${h.value}`]: !0,
|
|
2752
|
+
[`${o}-pagination-${ht.value} ${h.value}`]: !!ht.value
|
|
2738
2753
|
}
|
|
2739
|
-
}, ve(
|
|
2740
|
-
onChange:
|
|
2754
|
+
}, ve(p(t)), {
|
|
2755
|
+
onChange: Xt
|
|
2741
2756
|
}), null)])]
|
|
2742
|
-
}) :
|
|
2757
|
+
}) : i(_l, M(xt(e, Object.keys(Nt)), _t.value, {
|
|
2743
2758
|
style: e.tableProps?.style,
|
|
2744
2759
|
class: e.tableProps?.class,
|
|
2745
|
-
loading:
|
|
2746
|
-
rowKey: (
|
|
2747
|
-
transformCellText: (
|
|
2748
|
-
e.transformCellText && typeof e.transformCellText && e.transformCellText?.(
|
|
2760
|
+
loading: ft.value,
|
|
2761
|
+
rowKey: (w) => w[e.rowKey],
|
|
2762
|
+
transformCellText: (w) => {
|
|
2763
|
+
e.transformCellText && typeof e.transformCellText && e.transformCellText?.(w);
|
|
2749
2764
|
const {
|
|
2750
2765
|
column: B
|
|
2751
|
-
} =
|
|
2752
|
-
if (!B) return
|
|
2753
|
-
const
|
|
2754
|
-
let Q = !0, A =
|
|
2755
|
-
if (
|
|
2766
|
+
} = w;
|
|
2767
|
+
if (!B) return w.text;
|
|
2768
|
+
const K = B?.key || B?.dataIndex;
|
|
2769
|
+
let Q = !0, A = w.text;
|
|
2770
|
+
if (V(A))
|
|
2756
2771
|
if (A.length === 0 || A.length === 1 && !U(A[0])) {
|
|
2757
2772
|
A = A?.[0];
|
|
2758
|
-
const X =
|
|
2759
|
-
Q = X.success, A =
|
|
2773
|
+
const X = Al(A, B?.columnEmptyText || e?.columnEmptyText || "");
|
|
2774
|
+
Q = X.success, A = Va(X.value, B?.valueType || e.columns?.find((Se) => (Se.key || Se.dataIndex) === K)?.valueType, o, h.value);
|
|
2760
2775
|
} else A[0]?.type === "template" && (A = A[0]?.children);
|
|
2761
|
-
return B?.ellipsis ?
|
|
2776
|
+
return B?.ellipsis ? el(A, Q, B) : A;
|
|
2762
2777
|
},
|
|
2763
2778
|
rowSelection: e.rowSelection ? {
|
|
2764
|
-
...
|
|
2765
|
-
selectedRowKeys:
|
|
2766
|
-
onSelect:
|
|
2767
|
-
onSelectAll:
|
|
2768
|
-
onChange:
|
|
2779
|
+
...je(e.rowSelection, ["onSelect", "onSelectAll", "onChange", "selectedRowKeys"]),
|
|
2780
|
+
selectedRowKeys: it.value || [],
|
|
2781
|
+
onSelect: ut,
|
|
2782
|
+
onSelectAll: st,
|
|
2783
|
+
onChange: Lt
|
|
2769
2784
|
} : void 0,
|
|
2770
|
-
onChange:
|
|
2771
|
-
onExpandedRowsChange:
|
|
2772
|
-
onExpand:
|
|
2773
|
-
onResizeColumn: (
|
|
2785
|
+
onChange: vt,
|
|
2786
|
+
onExpandedRowsChange: Ut,
|
|
2787
|
+
onExpand: Jt,
|
|
2788
|
+
onResizeColumn: (w, B) => Zt(w, B)
|
|
2774
2789
|
}), {
|
|
2775
2790
|
...l,
|
|
2776
|
-
emptyText: () =>
|
|
2791
|
+
emptyText: () => gt()
|
|
2777
2792
|
})])])]));
|
|
2778
2793
|
};
|
|
2779
2794
|
}
|
|
2780
2795
|
});
|
|
2781
|
-
|
|
2782
|
-
function
|
|
2796
|
+
et.install = (e) => (e.component(et.name, et), e);
|
|
2797
|
+
function dn(e, a) {
|
|
2783
2798
|
function l() {
|
|
2784
2799
|
if (a?.state) {
|
|
2785
|
-
if (
|
|
2800
|
+
if (_e(a.state) && q(a.state.value))
|
|
2786
2801
|
return Z({
|
|
2787
2802
|
...a.state.value,
|
|
2788
2803
|
params: a.state.value?.params || {}
|
|
2789
2804
|
});
|
|
2790
|
-
if (q(a.state) && !
|
|
2805
|
+
if (q(a.state) && !_e(a.state))
|
|
2791
2806
|
return Z({
|
|
2792
2807
|
...ve(a.state),
|
|
2793
2808
|
params: a.state?.params || {}
|
|
@@ -2795,51 +2810,51 @@ function cn(e, a) {
|
|
|
2795
2810
|
}
|
|
2796
2811
|
return {};
|
|
2797
2812
|
}
|
|
2798
|
-
const n =
|
|
2813
|
+
const n = P({
|
|
2799
2814
|
...l(),
|
|
2800
2815
|
request: a?.request
|
|
2801
2816
|
});
|
|
2802
|
-
a?.state && (
|
|
2803
|
-
|
|
2804
|
-
}, { deep: !0 }) :
|
|
2805
|
-
|
|
2817
|
+
a?.state && (_e(a.state) ? N(() => a.state.value, () => {
|
|
2818
|
+
x();
|
|
2819
|
+
}, { deep: !0 }) : fl(a.state) && N(() => a?.state, () => {
|
|
2820
|
+
x();
|
|
2806
2821
|
}, { deep: !0 }));
|
|
2807
|
-
const
|
|
2808
|
-
...
|
|
2809
|
-
...
|
|
2810
|
-
})),
|
|
2811
|
-
|
|
2812
|
-
|
|
2813
|
-
}),
|
|
2814
|
-
|
|
2822
|
+
const u = S(() => e?.value?.actionRef?.()), o = S(() => e?.value?.formRef?.()), c = S(() => ({
|
|
2823
|
+
...u.value?.pageState || {},
|
|
2824
|
+
...o.value?.getFormState?.() || {}
|
|
2825
|
+
})), h = P(!!u.value?.loading?.value);
|
|
2826
|
+
N(() => u.value?.loading?.value, (y) => {
|
|
2827
|
+
h.value = !!y;
|
|
2828
|
+
}), N(h, (y) => {
|
|
2829
|
+
u.value?.setLoading?.(!!y);
|
|
2815
2830
|
});
|
|
2816
|
-
function
|
|
2817
|
-
n.value =
|
|
2831
|
+
function x() {
|
|
2832
|
+
n.value = It(n.value, l(), {
|
|
2818
2833
|
omitNil: !0,
|
|
2819
2834
|
omitEmpty: !0
|
|
2820
2835
|
});
|
|
2821
2836
|
}
|
|
2822
2837
|
return {
|
|
2823
|
-
formRef:
|
|
2824
|
-
actionRef:
|
|
2825
|
-
tableState:
|
|
2826
|
-
requestSearch:
|
|
2827
|
-
loading:
|
|
2828
|
-
dataSource: S(() =>
|
|
2829
|
-
selectedKeys: S(() =>
|
|
2830
|
-
selectedItems: S(() =>
|
|
2831
|
-
rowsSelection:
|
|
2832
|
-
mutate: (
|
|
2833
|
-
reloadAndReset: (
|
|
2834
|
-
setPageAndReload: (
|
|
2835
|
-
setPagination: (
|
|
2836
|
-
setLoading: (
|
|
2837
|
-
setDataValue: (
|
|
2838
|
-
reload: (
|
|
2838
|
+
formRef: o,
|
|
2839
|
+
actionRef: u,
|
|
2840
|
+
tableState: Ml(n),
|
|
2841
|
+
requestSearch: c,
|
|
2842
|
+
loading: h,
|
|
2843
|
+
dataSource: S(() => u?.value?.dataSource?.value || []),
|
|
2844
|
+
selectedKeys: S(() => u?.value?.selectedKeys?.value || []),
|
|
2845
|
+
selectedItems: S(() => u?.value?.selectedItems?.value || []),
|
|
2846
|
+
rowsSelection: u?.value?.rowsSelection,
|
|
2847
|
+
mutate: (y) => u.value?.reSetDataList?.(y),
|
|
2848
|
+
reloadAndReset: (y) => u.value?.reloadAndReset?.(y),
|
|
2849
|
+
setPageAndReload: (y, r, C, d) => u.value?.setPageAndReload?.(y, r, C, d),
|
|
2850
|
+
setPagination: (y) => u.value?.setPagination?.(y),
|
|
2851
|
+
setLoading: (y) => h.value = y,
|
|
2852
|
+
setDataValue: (y) => u.value?.setDataValue?.(y),
|
|
2853
|
+
reload: (y) => u.value?.reload?.(y)
|
|
2839
2854
|
};
|
|
2840
2855
|
}
|
|
2841
2856
|
export {
|
|
2842
|
-
|
|
2857
|
+
et as GProTable,
|
|
2843
2858
|
ce as proTableProps,
|
|
2844
|
-
|
|
2859
|
+
dn as useTable
|
|
2845
2860
|
};
|