@gx-design-vue/pro-table 0.2.0-beta.53 → 0.2.0-beta.55

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/pro-table.js CHANGED
@@ -1,87 +1,103 @@
1
- import { computed as x, createVNode as s, mergeProps as _, isVNode as Ce, ref as D, watch as q, unref as f, watchEffect as fe, reactive as re, onUnmounted as Pt, onDeactivated as Dt, onMounted as Ot, defineComponent as Z, Fragment as Ie, nextTick as Mt, createTextVNode as be, renderSlot as Nt, cloneVNode as Et, toRef as U, toRaw as Me } from "vue";
2
- import { pick as tt, cloneDeep as G, omit as $e } from "lodash-es";
3
- import { isBoolean as Q, isObject as ue, getSlot as lt, isFunction as ye, arrayRepeat as kt, runFunction as jt, getSortIndex as zt, isDeepEqualReact as at, handleCurrentPage as Kt, genColumnKey as nt, compareArray as At, isNumber as ut, isString as Yt, isArray as Ke, getPrefixCls as Ve, getRandomNumber as Ae, handleShowIndex as Lt, convertValueBoolean as Ne, classNames as Vt, hanndleField as Ht, getSlotVNode as ge } from "@gx-design-vue/pro-utils";
4
- import { useFullscreen as ot, useWindowSize as Wt } from "@vueuse/core";
5
- import { Form as Je, Grid as He, Space as ne, Button as Qe, Input as Ze, TimePicker as _t, DatePicker as it, TreeSelect as Gt, Spin as Ye, Select as qt, Popover as Ut, Checkbox as Xt, Tooltip as X, Tree as Jt, Dropdown as Qt, Menu as Re, Empty as st, Pagination as Zt, Table as el, Typography as tl } from "ant-design-vue";
6
- import { useProAppContext as ll } from "@gx-design-vue/pro-app";
7
- import { useContext as al, useProStyle as Be } from "@gx-design-vue/pro-provider";
8
- import H from "dayjs";
9
- import { tryOnUnmounted as nl, useMemo as Fe } from "@gx-design-vue/pro-hooks";
10
- import { UpOutlined as ul, DownOutlined as ol, SettingOutlined as rt, VerticalAlignTopOutlined as il, VerticalAlignMiddleOutlined as sl, VerticalAlignBottomOutlined as rl, FullscreenExitOutlined as cl, FullscreenOutlined as dl, ColumnHeightOutlined as fl, InfoCircleOutlined as hl, ReloadOutlined as vl } from "@ant-design/icons-vue";
11
- function ha(e) {
12
- const n = x(() => {
13
- var o;
14
- return (o = e.value) == null ? void 0 : o.actionRef();
15
- }), t = x(() => {
16
- var o;
17
- return (o = e.value) == null ? void 0 : o.formRef();
18
- }), u = x(() => {
19
- var a, i, r, w;
20
- const o = Q((a = n.value) == null ? void 0 : a.pageParams) ? {} : ((i = n.value) == null ? void 0 : i.pageParams) || {};
1
+ import { reactive as re, isReactive as Ot, watch as _, computed as T, createVNode as s, mergeProps as U, isVNode as xe, ref as D, unref as y, watchEffect as he, onUnmounted as Dt, onDeactivated as kt, onMounted as Mt, defineComponent as te, Fragment as Ie, nextTick as Nt, createTextVNode as pe, renderSlot as Et, cloneVNode as jt, toRef as J, toRaw as De } from "vue";
2
+ import { pick as tt, cloneDeep as q, omit as $e } from "lodash-es";
3
+ import { isBoolean as Q, convertValueBoolean as fe, isObject as ee, getSlot as lt, isFunction as be, arrayRepeat as zt, runFunction as Kt, getSortIndex as At, isDeepEqualReact as at, handleCurrentPage as Yt, genColumnKey as nt, compareArray as Lt, isNumber as ut, isString as Vt, isArray as je, getPrefixCls as Ye, getRandomNumber as ze, handleShowIndex as Ht, classNames as Wt, hanndleField as _t, getSlotVNode as Ce } from "@gx-design-vue/pro-utils";
4
+ import { useFullscreen as ot, useWindowSize as Gt } from "@vueuse/core";
5
+ import { Form as Je, Grid as Le, Space as se, Button as Qe, Input as Ze, TimePicker as Ut, DatePicker as it, TreeSelect as qt, Spin as Ke, Select as Xt, Popover as Jt, Checkbox as Qt, Tooltip as Z, Tree as Zt, Dropdown as el, Menu as Fe, Empty as st, Pagination as tl, Table as ll, Typography as al } from "ant-design-vue";
6
+ import { useProAppContext as nl } from "@gx-design-vue/pro-app";
7
+ import { useContext as ul, useProStyle as Be } from "@gx-design-vue/pro-provider";
8
+ import W from "dayjs";
9
+ import { tryOnUnmounted as ol, useMemo as Re } from "@gx-design-vue/pro-hooks";
10
+ import { UpOutlined as il, DownOutlined as sl, SettingOutlined as rt, VerticalAlignTopOutlined as rl, VerticalAlignMiddleOutlined as cl, VerticalAlignBottomOutlined as dl, FullscreenExitOutlined as fl, FullscreenOutlined as hl, ColumnHeightOutlined as vl, InfoCircleOutlined as ml, ReloadOutlined as gl } from "@ant-design/icons-vue";
11
+ function ma(e, a) {
12
+ function t() {
13
+ return a != null && a.defaultValue && ee(a == null ? void 0 : a.defaultValue) ? a == null ? void 0 : a.defaultValue : {};
14
+ }
15
+ const n = re({
16
+ align: "center",
17
+ bordered: !0,
18
+ ...t(),
19
+ request: async (...u) => {
20
+ var m;
21
+ return a != null && a.request ? await ((m = a == null ? void 0 : a.request) == null ? void 0 : m.call(a, ...u)) : void 0;
22
+ }
23
+ });
24
+ a != null && a.defaultValue && Ot(a.defaultValue) && _(() => a == null ? void 0 : a.defaultValue, () => {
25
+ Object.assign(n, t());
26
+ }, { deep: !0 });
27
+ const i = T(() => {
28
+ var u;
29
+ return (u = e == null ? void 0 : e.value) == null ? void 0 : u.actionRef();
30
+ }), o = T(() => {
31
+ var u;
32
+ return (u = e == null ? void 0 : e.value) == null ? void 0 : u.formRef();
33
+ }), f = T(() => {
34
+ var m, c, h, g;
35
+ const u = Q((m = i.value) == null ? void 0 : m.pageParams) ? {} : ((c = i.value) == null ? void 0 : c.pageParams) || {};
21
36
  return {
22
- ...tt(o, ["current", "pageSize"]),
23
- ...((w = (r = t.value) == null ? void 0 : r.getTableFormState) == null ? void 0 : w.call(r)) || {}
37
+ ...tt(u, ["current", "pageSize"]),
38
+ ...((g = (h = o.value) == null ? void 0 : h.getTableFormState) == null ? void 0 : g.call(h)) || {}
24
39
  };
25
40
  });
26
41
  return {
27
- formRef: t,
28
- actionRef: n,
29
- params: u,
30
- loading: x(() => {
31
- var o;
32
- return (o = e.value) == null ? void 0 : o.loading;
42
+ formRef: o,
43
+ actionRef: i,
44
+ params: f,
45
+ tableState: n,
46
+ loading: T(() => {
47
+ var u, m;
48
+ return fe((m = (u = e == null ? void 0 : e.value) == null ? void 0 : u.loading) == null ? void 0 : m.value);
33
49
  }),
34
- dataSource: x(() => {
35
- var o;
36
- return (o = n == null ? void 0 : n.value) == null ? void 0 : o.dataSource;
50
+ dataSource: T(() => {
51
+ var u;
52
+ return ((u = i == null ? void 0 : i.value) == null ? void 0 : u.dataSource) || [];
37
53
  }),
38
- selectedKey: x(() => {
39
- var o;
40
- return (o = n == null ? void 0 : n.value) == null ? void 0 : o.selectedKey;
54
+ selectedKey: T(() => {
55
+ var u;
56
+ return ((u = i == null ? void 0 : i.value) == null ? void 0 : u.selectedKey) || [];
41
57
  }),
42
- selectedItem: x(() => {
43
- var o;
44
- return (o = n == null ? void 0 : n.value) == null ? void 0 : o.selectedItem;
58
+ selectedItem: T(() => {
59
+ var u;
60
+ return ((u = i == null ? void 0 : i.value) == null ? void 0 : u.selectedItem) || [];
45
61
  }),
46
- setPageAndReload: (o, a, i, r) => {
47
- var w, v;
48
- return (v = (w = n.value) == null ? void 0 : w.setPageAndReload) == null ? void 0 : v.call(w, o, a, i, r);
62
+ mutate: (u) => {
63
+ var m, c;
64
+ return (c = (m = i.value) == null ? void 0 : m.reSetDataList) == null ? void 0 : c.call(m, u);
49
65
  },
50
- setPagination: (o) => {
51
- var a, i;
52
- return (i = (a = n.value) == null ? void 0 : a.setPagination) == null ? void 0 : i.call(a, o);
66
+ setPageAndReload: (u, m, c, h) => {
67
+ var g, r;
68
+ return (r = (g = i.value) == null ? void 0 : g.setPageAndReload) == null ? void 0 : r.call(g, u, m, c, h);
53
69
  },
54
- mutate: (o) => {
55
- var a, i;
56
- return (i = (a = n.value) == null ? void 0 : a.reSetDataList) == null ? void 0 : i.call(a, o);
70
+ setPagination: (u) => {
71
+ var m, c;
72
+ return (c = (m = i.value) == null ? void 0 : m.setPagination) == null ? void 0 : c.call(m, u);
57
73
  },
58
- changeLoading: (o) => {
59
- var a, i;
60
- return (i = (a = n.value) == null ? void 0 : a.loadingOperation) == null ? void 0 : i.call(a, o);
74
+ setLoading: (u) => {
75
+ var m, c;
76
+ return (c = (m = i.value) == null ? void 0 : m.loadingOperation) == null ? void 0 : c.call(m, u);
61
77
  },
62
- changeDataValue: (o) => {
63
- var a, i;
64
- return (i = (a = n.value) == null ? void 0 : a.changeDataValue) == null ? void 0 : i.call(a, o);
78
+ setData: (u) => {
79
+ var m, c;
80
+ return (c = (m = i.value) == null ? void 0 : m.changeDataValue) == null ? void 0 : c.call(m, u);
65
81
  },
66
- reload: (o) => {
67
- var a, i;
68
- return (i = (a = n.value) == null ? void 0 : a.reload) == null ? void 0 : i.call(a, o);
82
+ reload: (u) => {
83
+ var m, c;
84
+ return (c = (m = i.value) == null ? void 0 : m.reload) == null ? void 0 : c.call(m, u);
69
85
  }
70
86
  };
71
87
  }
72
- function Le() {
73
- return Le = Object.assign ? Object.assign.bind() : function(e) {
74
- for (var n = 1; n < arguments.length; n++) {
75
- var t = arguments[n];
76
- for (var u in t) ({}).hasOwnProperty.call(t, u) && (e[u] = t[u]);
88
+ function Ae() {
89
+ return Ae = Object.assign ? Object.assign.bind() : function(e) {
90
+ for (var a = 1; a < arguments.length; a++) {
91
+ var t = arguments[a];
92
+ for (var n in t) ({}).hasOwnProperty.call(t, n) && (e[n] = t[n]);
77
93
  }
78
94
  return e;
79
- }, Le.apply(null, arguments);
95
+ }, Ae.apply(null, arguments);
80
96
  }
81
- function ml(e, n) {
82
- process.env.NODE_ENV !== "production" && !e && console !== void 0 && console.error(`Warning: ${n}`);
97
+ function yl(e, a) {
98
+ process.env.NODE_ENV !== "production" && !e && console !== void 0 && console.error(`Warning: ${a}`);
83
99
  }
84
- const gl = () => ({
100
+ const Cl = () => ({
85
101
  prefixCls: {
86
102
  type: String,
87
103
  default: void 0
@@ -255,8 +271,8 @@ const gl = () => ({
255
271
  type: Function,
256
272
  default: void 0
257
273
  }
258
- }), se = {
259
- ...gl(),
274
+ }), de = {
275
+ ...Cl(),
260
276
  rowSelection: {
261
277
  type: Object,
262
278
  default: void 0
@@ -519,95 +535,95 @@ const gl = () => ({
519
535
  onBeforeSearchSubmit: Function,
520
536
  onColumnsStateChange: Function
521
537
  };
522
- function yl(e) {
523
- return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !Ce(e);
538
+ function bl(e) {
539
+ return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !xe(e);
524
540
  }
525
- function bl(e, n, t, u) {
526
- if (!n) return e;
527
- let o = e;
528
- if (ue(n)) {
529
- const a = n.node === "a" ? "span" : n.node;
530
- return s(a, _((n == null ? void 0 : n.attr) || {}, {
531
- class: [n.class, n.node === "a" ? `${t}-a` : ""],
532
- onClick: n.click
533
- }), yl(e) ? e : {
541
+ function pl(e, a, t, n) {
542
+ if (!a) return e;
543
+ let i = e;
544
+ if (ee(a)) {
545
+ const o = a.node === "a" ? "span" : a.node;
546
+ return s(o, U((a == null ? void 0 : a.attr) || {}, {
547
+ class: [a.class, a.node === "a" ? `${t}-a` : ""],
548
+ onClick: a.click
549
+ }), bl(e) ? e : {
534
550
  default: () => [e]
535
551
  });
536
552
  }
537
- switch (n) {
553
+ switch (a) {
538
554
  case "link":
539
- o = s("span", {
540
- class: [`${t}-a`, u]
555
+ i = s("span", {
556
+ class: [`${t}-a`, n]
541
557
  }, [e]);
542
558
  break;
543
559
  case "time":
544
- o = H(e).format("HH:mm:ss");
560
+ i = W(e).format("HH:mm:ss");
545
561
  break;
546
562
  case "dateMonth":
547
- o = `${H(e).month() + 1}月`;
563
+ i = `${W(e).month() + 1}月`;
548
564
  break;
549
565
  case "dateTime":
550
- o = H(e).format("YYYY-MM-DD HH:mm:ss");
566
+ i = W(e).format("YYYY-MM-DD HH:mm:ss");
551
567
  break;
552
568
  }
553
- return o;
569
+ return i;
554
570
  }
555
- function pl(e, n) {
556
- const t = n && n.current || 1, u = n && n.pageSize || 10;
557
- return e.filter((o, a) => a < t * u && a >= u * (t - 1));
571
+ function Sl(e, a) {
572
+ const t = a && a.current || 1, n = a && a.pageSize || 10;
573
+ return e.filter((i, o) => o < t * n && o >= n * (t - 1));
558
574
  }
559
- function Cl({ emit: e, loading: n }) {
560
- var a;
561
- const t = D(Q(n.value) ? n.value : ue(n.value) ? (a = n.value) == null ? void 0 : a.spinning : !1);
562
- q(() => n.value, (i) => {
563
- t.value = Q(i) ? i : ue(i) ? i == null ? void 0 : i.spinning : t.value;
575
+ function xl({ emit: e, loading: a }) {
576
+ var o;
577
+ const t = D(Q(a.value) ? a.value : ee(a.value) ? (o = a.value) == null ? void 0 : o.spinning : !1);
578
+ _(() => a.value, (f) => {
579
+ t.value = Q(f) ? f : ee(f) ? f == null ? void 0 : f.spinning : t.value;
564
580
  });
565
- const u = x(() => f(t) || !1);
566
- function o(i) {
567
- t.value = i, e("loadingChange", !0);
581
+ const n = T(() => y(t) || !1);
582
+ function i(f) {
583
+ t.value = f, e("loadingChange", !0);
568
584
  }
569
- return { loadingStatus: u, setLoading: o };
585
+ return { loadingStatus: n, setLoading: i };
570
586
  }
571
- function Sl({ size: e, emit: n }) {
587
+ function wl({ size: e, emit: a }) {
572
588
  const t = D("middle");
573
- fe(() => {
589
+ he(() => {
574
590
  t.value = e.value;
575
591
  });
576
- function u(o) {
577
- t.value = o, n("sizeChange", !0);
592
+ function n(i) {
593
+ t.value = i, a("sizeChange", !0);
578
594
  }
579
- return { sizeRef: t, setTableSize: u };
595
+ return { sizeRef: t, setTableSize: n };
580
596
  }
581
- function xl({
597
+ function Tl({
582
598
  slots: e,
583
- props: n,
599
+ props: a,
584
600
  pagination: t
585
601
  }) {
586
- const u = re({});
587
- fe(() => {
602
+ const n = re({});
603
+ he(() => {
588
604
  if (t.value || t.value === void 0)
589
- Object.assign(u, {
605
+ Object.assign(n, {
590
606
  ...t.value ?? {}
591
607
  });
592
608
  else
593
- for (const i in u)
594
- delete u[i];
609
+ for (const f in n)
610
+ delete n[f];
595
611
  });
596
- const o = x(() => {
597
- var v;
612
+ const i = T(() => {
613
+ var c;
598
614
  if (Q(t.value) && !t.value)
599
615
  return !1;
600
- const i = lt(e, f(n), "pageItemRender"), r = ye(i) ? {
616
+ const f = lt(e, y(a), "pageItemRender"), u = be(f) ? {
601
617
  itemRender: ({
602
- page: g,
603
- type: b,
604
- originalElement: c
605
- }) => i ? i({
606
- page: g,
607
- type: b,
608
- originalElement: c
618
+ page: h,
619
+ type: g,
620
+ originalElement: r
621
+ }) => f ? f({
622
+ page: h,
623
+ type: g,
624
+ originalElement: r
609
625
  }) : null
610
- } : null, w = {
626
+ } : null, m = {
611
627
  current: 1,
612
628
  pageSize: 10,
613
629
  size: "default",
@@ -615,434 +631,433 @@ function xl({
615
631
  showSizeChanger: !0,
616
632
  pageSizeOptions: ["10", "20", "50", "100"],
617
633
  ...t.value || {},
618
- ...f(u),
619
- ...r || {}
634
+ ...y(n),
635
+ ...u || {}
620
636
  };
621
- return (v = t.value) != null && v.showTotal || (w.showTotal = (g) => `共${g < w.pageSize ? 1 : Math.ceil(g / (w.pageSize || 10))}页 ${g}条记录`), w;
637
+ return (c = t.value) != null && c.showTotal || (m.showTotal = (h) => `共${h < m.pageSize ? 1 : Math.ceil(h / (m.pageSize || 10))}页 ${h}条记录`), m;
622
638
  });
623
- function a(i) {
624
- const r = f(o);
625
- Object.assign(u, {
626
- ...r || {},
627
- ...i
639
+ function o(f) {
640
+ const u = y(i);
641
+ Object.assign(n, {
642
+ ...u || {},
643
+ ...f
628
644
  });
629
645
  }
630
646
  return {
631
- getPaginationInfo: o,
632
- setPagination: a
647
+ getPaginationInfo: i,
648
+ setPagination: o
633
649
  };
634
650
  }
635
- function wl(e, n) {
636
- const t = D([]), u = D([]);
637
- q(() => {
638
- var v;
639
- return (v = n.value) == null ? void 0 : v.selectedRowKeys;
640
- }, (v) => {
641
- t.value = kt([...v || []]);
651
+ function $l(e, a) {
652
+ const t = D([]), n = D([]);
653
+ _(() => {
654
+ var c;
655
+ return (c = a.value) == null ? void 0 : c.selectedRowKeys;
656
+ }, (c) => {
657
+ t.value = zt([...c || []]);
642
658
  }, {
643
659
  deep: !0,
644
660
  immediate: !0
645
661
  });
646
- const o = (v, g) => {
647
- e.value && (g ? v != null && v[e.value] && (t.value.push(v[e.value]), u.value.push(v)) : (t.value = t.value.filter((b) => b !== v[e.value]), u.value = u.value.filter((b) => b[e.value] !== v[e.value])));
648
- }, a = () => {
649
- var v, g;
650
- n.value && ((g = (v = n.value) == null ? void 0 : v.onChange) == null || g.call(v, t.value, u.value));
662
+ const i = (c, h) => {
663
+ e.value && (h ? c != null && c[e.value] && (t.value.push(c[e.value]), n.value.push(c)) : (t.value = t.value.filter((g) => g !== c[e.value]), n.value = n.value.filter((g) => g[e.value] !== c[e.value])));
664
+ }, o = () => {
665
+ var c, h;
666
+ a.value && ((h = (c = a.value) == null ? void 0 : c.onChange) == null || h.call(c, t.value, n.value));
651
667
  };
652
668
  return {
653
669
  selectedKey: t,
654
- selectedItem: u,
655
- selectRowKey: o,
656
- selectAllRowKey: (v, g, b) => {
657
- e.value && (v ? g.map((c) => (t.value.every((C) => C !== (c == null ? void 0 : c[e.value])) && c != null && c[e.value] && (t.value.push(c[e.value]), u.value.push(c)), c)) : b.map((c) => (t.value.includes(c == null ? void 0 : c[e.value]) && (t.value = t.value.filter((C) => C !== c[e.value]), u.value = u.value.filter((C) => C[e.value] !== c[e.value])), c)));
670
+ selectedItem: n,
671
+ selectRowKey: i,
672
+ selectAllRowKey: (c, h, g) => {
673
+ e.value && (c ? h.map((r) => (t.value.every((S) => S !== (r == null ? void 0 : r[e.value])) && r != null && r[e.value] && (t.value.push(r[e.value]), n.value.push(r)), r)) : g.map((r) => (t.value.includes(r == null ? void 0 : r[e.value]) && (t.value = t.value.filter((S) => S !== r[e.value]), n.value = n.value.filter((S) => S[e.value] !== r[e.value])), r)));
658
674
  },
659
- removeRowKeys: (v) => {
660
- t.value = t.value.filter((g) => !v.includes(g)), u.value = u.value.filter((g) => !v.includes(g == null ? void 0 : g[e.value || ""])), a();
675
+ removeRowKeys: (c) => {
676
+ t.value = t.value.filter((h) => !c.includes(h)), n.value = n.value.filter((h) => !c.includes(h == null ? void 0 : h[e.value || ""])), o();
661
677
  },
662
- changeRowKey: a,
663
- syncSelectedRows: (v) => {
664
- if (e.value && t.value.length !== u.value.length) {
665
- const g = u.value.map((c) => c[e.value]), b = t.value.filter((c) => !g.includes(c));
666
- v.forEach((c) => {
667
- b.includes(c[e.value]) && u.value.push(G(c));
678
+ changeRowKey: o,
679
+ syncSelectedRows: (c) => {
680
+ if (e.value && t.value.length !== n.value.length) {
681
+ const h = n.value.map((r) => r[e.value]), g = t.value.filter((r) => !h.includes(r));
682
+ c.forEach((r) => {
683
+ g.includes(r[e.value]) && n.value.push(q(r));
668
684
  });
669
685
  }
670
686
  }
671
687
  };
672
688
  }
673
- function Tl(e, n) {
674
- const t = x(() => n || 0), u = D(), o = D(e);
675
- function a() {
676
- u.value && clearTimeout(u.value);
689
+ function Fl(e, a) {
690
+ const t = T(() => a || 0), n = D(), i = D(e);
691
+ function o() {
692
+ n.value && clearTimeout(n.value);
677
693
  }
678
- async function i(...r) {
679
- return t.value === 0 || t.value === void 0 ? o.value(...r) : (a(), new Promise(async (w) => {
680
- var v;
681
- (v = r[0]) != null && v.immediate ? w(await o.value(...r)) : u.value = setTimeout(async () => {
682
- w(await o.value(...r));
694
+ async function f(...u) {
695
+ return t.value === 0 || t.value === void 0 ? i.value(...u) : (o(), new Promise(async (m) => {
696
+ var c;
697
+ (c = u[0]) != null && c.immediate ? m(await i.value(...u)) : n.value = setTimeout(async () => {
698
+ m(await i.value(...u));
683
699
  }, t.value);
684
700
  }));
685
701
  }
686
- return nl(a), {
687
- cancel: a,
688
- run: i
702
+ return ol(o), {
703
+ cancel: o,
704
+ run: f
689
705
  };
690
706
  }
691
- function $l(e) {
692
- const n = x(() => e.polling), t = x(() => e.request), u = x(() => e.postData), o = x(() => e.debounceTime), a = x(() => e.dataSource);
707
+ function Rl(e) {
708
+ const a = T(() => e.polling), t = T(() => e.debounceTime), n = T(() => e.dataSource);
693
709
  return {
694
- polling: n,
695
- request: t,
696
- postData: u,
697
- debounceTime: o,
698
- dataSource: a
710
+ polling: a,
711
+ request: e.request,
712
+ postData: e.postData,
713
+ debounceTime: t,
714
+ dataSource: n
699
715
  };
700
716
  }
701
- function Rl({ polling: e, request: n, postData: t, dataSource: u, waitRequest: o, debounceTime: a }, { columns: i, loadingStatus: r, setLoading: w, setColumns: v, removeRowKeys: g, syncSelectedRows: b, formParamsRef: c, setPagination: C, getPaginationInfo: y, onBeforeSearchSubmit: d, hasCustomRender: S }, R) {
702
- const $ = D(), I = D(!0), O = D(!1), A = D(!1), k = D([]), Y = D(), ee = async (h = {}) => {
703
- var Se, xe, we;
704
- const { pagination: N, filters: K = {}, sorter: z = {}, removeKeys: he = [], isPolling: Pe = !1 } = h;
705
- if (!f(n) || !ye(f(n)) || f(o) && r.value || O.value)
706
- return u.value || [];
707
- if (O.value = !0, !Pe || f(o) || I.value ? w(!0) : p(!0), f(o)) {
708
- I.value = !1, O.value = !1;
717
+ function Il({ polling: e, request: a, postData: t, dataSource: n, waitRequest: i, debounceTime: o }, { columns: f, loadingStatus: u, setLoading: m, setColumns: c, removeRowKeys: h, syncSelectedRows: g, formParamsRef: r, setPagination: S, getPaginationInfo: C, onBeforeSearchSubmit: d, hasCustomRender: x }, F) {
718
+ const $ = D(), I = D(!0), k = D(!1), A = D(!1), E = D([]), Y = D(), le = async (v = {}) => {
719
+ var we;
720
+ const { pagination: N, filters: K = {}, sorter: j = {}, removeKeys: ve = [], isPolling: Pe = !1 } = v;
721
+ if (!a || !be(a) || y(i) && u.value || k.value)
722
+ return n.value || [];
723
+ if (k.value = !0, !Pe || y(i) || I.value ? m(!0) : b(!0), y(i)) {
724
+ I.value = !1, k.value = !1;
709
725
  return;
710
726
  }
711
- N && C(N);
727
+ N && S(N);
712
728
  try {
713
- let te = {};
714
- if (Q(N) && !N || Q(y))
715
- te = {};
729
+ let ae = {};
730
+ if (Q(N) && !N || Q(C))
731
+ ae = {};
716
732
  else {
717
- const { current: j = 1, pageSize: ie = 10, total: W } = f(y) || {};
718
- te.pageNum = Kt({ current: j, pageSize: ie, total: W }, he.length), he.length && g(he), te.pageSize = ie;
733
+ const { current: z = 1, pageSize: ne = 10, total: H } = y(C) || {};
734
+ ae.pageNum = Yt({ current: z, pageSize: ne, total: H }, ve.length), ve.length && h(ve), ae.pageSize = ne;
719
735
  }
720
- (ue(z) ? [z] : z).forEach((j) => {
721
- const ie = (j == null ? void 0 : j.columnKey) || (j == null ? void 0 : j.field);
722
- j && (j != null && j.order) ? v(f(i).map((W) => (W.dataIndex === ie ? W.sortOrder = j == null ? void 0 : j.order : W.sortOrder = null, W))) : j && v(f(i).map((W) => (W.dataIndex === ie && (W.sortOrder = null), W)));
736
+ (ee(j) ? [j] : j).forEach((z) => {
737
+ const ne = (z == null ? void 0 : z.columnKey) || (z == null ? void 0 : z.field);
738
+ z && (z != null && z.order) ? c(y(f).map((H) => (H.dataIndex === ne ? H.sortOrder = z == null ? void 0 : z.order : H.sortOrder = null, H))) : z && c(y(f).map((H) => (H.dataIndex === ne && (H.sortOrder = null), H)));
723
739
  });
724
- let ce = {
725
- ...te || {},
726
- ...h.params,
727
- ...c
740
+ let me = {
741
+ ...ae || {},
742
+ ...v.params,
743
+ ...r
728
744
  };
729
- d && ye(d) && (ce = await d(ce, z, K));
745
+ d && be(d) && (me = await d(me, j, K));
730
746
  let L = [];
731
- const le = await ((Se = f(n)) == null ? void 0 : Se(ce, z, K));
732
- return O.value = !1, le && le.success ? (L = le.data || [], f(t) && ye(f(t)) && (L = await ((xe = f(t)) == null ? void 0 : xe(L))), b(L), (le.total || (L == null ? void 0 : L.length) || 0) !== ((we = f(y)) == null ? void 0 : we.total) && C({
733
- total: le.total || (L == null ? void 0 : L.length) || 0
734
- }), F(L), L) : [];
735
- } catch (te) {
736
- k.value === void 0 && F([]), R("requestError", te);
747
+ const X = await (a == null ? void 0 : a(me, j, K));
748
+ return k.value = !1, X && (X != null && X.success) ? (L = X.data || [], t && be(t) && (L = await (t == null ? void 0 : t(L))), g(L), (X.total || (L == null ? void 0 : L.length) || 0) !== ((we = y(C)) == null ? void 0 : we.total) && S({
749
+ total: X.total || (L == null ? void 0 : L.length) || 0
750
+ }), R(L), L) : [];
751
+ } catch (ae) {
752
+ E.value === void 0 && R([]), F("requestError", ae);
737
753
  } finally {
738
- I.value = !1, w(!1);
754
+ I.value = !1, m(!1);
739
755
  }
740
756
  return [];
741
- }, P = Tl(async (h) => {
757
+ }, O = Fl(async (v) => {
742
758
  Y.value && clearTimeout(Y.value);
743
- const N = await ee(h), K = jt(e.value, N);
759
+ const N = await le(v), K = Kt(e.value, N);
744
760
  return K && !$.value && (Y.value = setTimeout(() => {
745
- P.run({ ...h, isPolling: K });
761
+ O.run({ ...v, isPolling: K });
746
762
  }, Math.max(K, 2e3))), N;
747
- }, a.value || 10);
748
- Pt(() => {
763
+ }, o.value || 10);
764
+ Dt(() => {
749
765
  $.value = !0, clearTimeout(Y.value);
750
- }), Dt(() => {
766
+ }), kt(() => {
751
767
  $.value = !0, clearTimeout(Y.value);
752
- }), q(() => e.value, () => {
753
- e.value ? P.run({ isPolling: !0 }) : clearTimeout(Y.value);
754
- }, { immediate: !0 }), q([
755
- () => o.value,
756
- () => u.value,
757
- () => c
758
- ], () => {
759
- n.value ? (!I.value || !e.value) && P.run({ isPolling: !1 }) : F(u.value || []);
768
+ }), _(() => e.value, () => {
769
+ e.value ? O.run({ isPolling: !0 }) : clearTimeout(Y.value);
770
+ }, { immediate: !0 }), _([() => i.value, () => n.value, () => r], () => {
771
+ fe(a) ? (!I.value || !e.value) && O.run({ isPolling: !1 }) : R(n.value || []);
760
772
  }, {
761
773
  deep: !0,
762
774
  immediate: !0
763
775
  });
764
- const V = x(() => {
765
- if (S.value)
766
- return f(k);
767
- const h = f(i).filter((N) => N.show || N.show === void 0);
768
- return !f(k) || !h || h.length === 0 ? [] : f(k);
769
- }), l = x(() => f(k).some((h) => h.children && h.children.length > 0));
770
- function p(h) {
771
- A.value = h;
776
+ const V = T(() => {
777
+ if (x.value)
778
+ return y(E);
779
+ const v = f.value.filter((N) => N.show || N.show === void 0);
780
+ return !y(E) || !v || v.length === 0 ? [] : y(E);
781
+ }), l = T(() => y(E).some((v) => v.children && v.children.length > 0));
782
+ function b(v) {
783
+ A.value = v;
772
784
  }
773
- function B(h, N, K, z) {
774
- P.run({ pagination: h, filters: N, sorter: K, extra: z, isPolling: !1 }), R("change", h, N, K, z);
785
+ function B(v, N, K, j) {
786
+ O.run({ pagination: v, filters: N, sorter: K, extra: j, isPolling: !1 }), F("change", v, N, K, j);
775
787
  }
776
- function F(h) {
788
+ function R(v) {
777
789
  var K;
778
- const N = zt(G(h), f(y.value));
779
- if (!at(N, k.value) && (k.value = N, !f(n) || !ye(f(n)))) {
780
- const z = N.length || 0;
781
- z !== ((K = f(y)) == null ? void 0 : K.total) && C({
782
- total: z
790
+ const N = At(q(v), y(C.value));
791
+ if (!at(N, E.value) && (E.value = N, !a || !be(a))) {
792
+ const j = N.length || 0;
793
+ j !== ((K = y(C)) == null ? void 0 : K.total) && S({
794
+ total: j
783
795
  });
784
796
  }
785
797
  }
786
- function M({ key: h, params: N, type: K = "update" }) {
798
+ function M({ key: v, params: N, type: K = "update" }) {
787
799
  switch (K) {
788
800
  case "update":
789
- k.value = k.value.map((z) => h && N[h] === z[h] ? { ...z, ...N } : z);
801
+ E.value = E.value.map((j) => v && N[v] === j[v] ? { ...j, ...N } : j);
802
+ break;
803
+ case "push":
804
+ E.value.push(N);
790
805
  break;
791
- case "add":
792
- k.value.push(N);
806
+ case "unshift":
807
+ E.value.unshift(N);
793
808
  break;
794
809
  case "delete":
795
- k.value = k.value.filter((z) => h ? h && N[h] !== z[h] : !0);
810
+ E.value = E.value.filter((j) => v ? v && N[v] !== j[v] : !0);
796
811
  break;
797
812
  }
798
813
  }
799
814
  return {
800
815
  getDataSourceRef: V,
801
816
  isTreeDataRef: l,
802
- reSetDataList: F,
817
+ reSetDataList: R,
803
818
  changeDataValue: M,
804
819
  handleTableChange: B,
805
- reload: async (h) => {
806
- f(n) ? await P.run({ ...h, isPolling: !1 }) : R("reload");
820
+ reload: async (v) => {
821
+ fe(a) ? await O.run({ ...v, isPolling: !1 }) : F("reload");
807
822
  }
808
823
  };
809
824
  }
810
- function Fl(e) {
811
- const n = {};
825
+ function Bl(e) {
826
+ const a = {};
812
827
  return e.forEach((t) => {
813
- let u = t.initialValue;
814
- const o = ["select"], a = ["date", "time", "dateRange"];
815
- !u && o.includes(t.valueType) ? u = void 0 : !u && a.includes(t.valueType) ? u = null : u || (u = ""), t.name === "dateRange" ? (n[t.rangeStartName || "start"] = u ? u[0] : null, n[t.rangeEndName || "end"] = u ? u[1] : null) : t.name && (n[t.name] = u);
816
- }), n;
828
+ let n = t.initialValue;
829
+ const i = ["select"], o = ["date", "time", "dateRange"];
830
+ !n && i.includes(t.valueType) ? n = void 0 : !n && o.includes(t.valueType) ? n = null : n || (n = ""), t.name === "dateRange" ? (a[t.rangeStartName || "start"] = n ? n[0] : null, a[t.rangeEndName || "end"] = n ? n[1] : null) : t.name && (a[t.name] = n);
831
+ }), a;
817
832
  }
818
- function Il({ search: e, searchMap: n, params: t, columns: u, setPagination: o }) {
819
- const a = re({}), i = re({}), r = D([]), w = x(() => {
820
- var b;
821
- return ue(e.value) ? !!((b = e.value) != null && b.showSearch) : !!e.value;
822
- }), v = (b) => {
823
- var C, y;
824
- const c = [];
825
- if ((b === "all" || b === "searchMap") && ((C = n.value) == null || C.forEach((d) => c.push(d)), c.forEach((d) => {
826
- r.value.some((S) => S.name === d.name) ? r.value = r.value.map((S) => S.name === d.name ? {
827
- ...S,
833
+ function Pl({ search: e, searchMap: a, params: t, columns: n, setPagination: i }) {
834
+ const o = re({}), f = re({}), u = D([]), m = T(() => {
835
+ var g;
836
+ return ee(e.value) ? !!((g = e.value) != null && g.showSearch) : !!e.value;
837
+ }), c = (g) => {
838
+ var S, C;
839
+ const r = [];
840
+ if ((g === "all" || g === "searchMap") && ((S = a.value) == null || S.forEach((d) => r.push(d)), r.forEach((d) => {
841
+ u.value.some((x) => x.name === d.name) ? u.value = u.value.map((x) => x.name === d.name ? {
842
+ ...x,
828
843
  ...d
829
- } : S) : r.value.push(d);
830
- })), (b === "all" || b === "columns") && ((y = u.value) != null && y.length) && (u.value && u.value.forEach((d) => {
831
- d.searchConfig && c.push(d.searchConfig);
832
- }), c.forEach((d) => {
833
- r.value.some((S) => S.name === d.name) ? r.value = r.value.map((S) => S.name === d.name ? {
834
- ...S,
844
+ } : x) : u.value.push(d);
845
+ })), (g === "all" || g === "columns") && ((C = n.value) != null && C.length) && (n.value && n.value.forEach((d) => {
846
+ d.searchConfig && r.push(d.searchConfig);
847
+ }), r.forEach((d) => {
848
+ u.value.some((x) => x.name === d.name) ? u.value = u.value.map((x) => x.name === d.name ? {
849
+ ...x,
835
850
  ...d
836
- } : S) : r.value.push(d);
837
- })), b === "all" || b === "searchMap" || b === "columns") {
838
- o({ current: 1 });
839
- const d = Fl(c);
840
- Object.assign(i, { ...d });
841
- for (const S in d)
842
- a[S] || (a[S] = d[S]);
851
+ } : x) : u.value.push(d);
852
+ })), g === "all" || g === "searchMap" || g === "columns") {
853
+ i({ current: 1 });
854
+ const d = Bl(r);
855
+ Object.assign(f, { ...d });
856
+ for (const x in d)
857
+ o[x] || (o[x] = d[x]);
843
858
  }
844
- (b === "all" || b === "params") && !w.value && (o({ current: 1 }), Object.assign(a, t.value));
859
+ (g === "all" || g === "params") && !m.value && (i({ current: 1 }), Object.assign(o, t.value));
845
860
  };
846
- Ot(() => {
847
- v("all");
848
- }), q(() => t.value, () => {
849
- v("params");
861
+ Mt(() => {
862
+ c("all");
863
+ }), _(() => t.value, () => {
864
+ c("params");
850
865
  }, {
851
866
  deep: !0
852
- }), q(() => n.value, () => {
853
- v("searchMap");
867
+ }), _(() => a.value, () => {
868
+ c("searchMap");
854
869
  }, {
855
870
  deep: !0
856
- }), q(() => u.value, () => {
857
- v("columns");
871
+ }), _(() => n.value, () => {
872
+ c("columns");
858
873
  }, {
859
874
  deep: !0
860
875
  });
861
- function g(b) {
862
- o({ current: 1 }), Object.assign(a, b);
876
+ function h(g) {
877
+ i({ current: 1 }), Object.assign(o, g);
863
878
  }
864
- return { formDataRef: r, formParamsRef: a, defaultParamsRef: i, setFormParams: g };
879
+ return { formDataRef: u, formParamsRef: o, defaultParamsRef: f, setFormParams: h };
865
880
  }
866
- function Bl({ columns: e, columnsState: n, changeColumns: t }) {
867
- const u = D(void 0), o = re({}), a = re({}), i = re({}), r = D([]);
868
- q(() => e.value, () => {
869
- var g;
870
- (g = f(e)) == null || g.forEach(({ show: b, key: c, fixed: C }, y) => {
871
- const d = nt(c, y);
872
- d && (i[d] = { show: b === void 0 ? !0 : b, fixed: C });
881
+ function Ol({ columns: e, columnsState: a, changeColumns: t }) {
882
+ const n = D(void 0), i = re({}), o = re({}), f = re({}), u = D([]);
883
+ _(() => e.value, () => {
884
+ var h;
885
+ (h = y(e)) == null || h.forEach(({ show: g, key: r, fixed: S }, C) => {
886
+ const d = nt(r, C);
887
+ d && (f[d] = { show: g === void 0 ? !0 : g, fixed: S });
873
888
  });
874
889
  }, {
875
890
  deep: !0,
876
891
  immediate: !0
877
- }), q(() => e.value, () => {
878
- const g = f(e).map((b) => b.key);
879
- v(g);
892
+ }), _(() => e.value, () => {
893
+ const h = y(e).map((g) => g.key);
894
+ c(h);
880
895
  }, {
881
896
  deep: !0,
882
897
  immediate: !0
883
- }), fe(() => {
884
- var b;
885
- const g = {
886
- ...(b = f(n)) == null ? void 0 : b.value,
887
- ...f(i)
898
+ }), he(() => {
899
+ var g;
900
+ const h = {
901
+ ...(g = y(a)) == null ? void 0 : g.value,
902
+ ...y(f)
888
903
  };
889
- Object.assign(o, g), Object.assign(a, g);
904
+ Object.assign(i, h), Object.assign(o, h);
890
905
  });
891
- function w(g, b) {
892
- u.value = b, Object.assign(o, g), t == null || t(o, b === "fixed");
906
+ function m(h, g) {
907
+ n.value = g, Object.assign(i, h), t == null || t(i, g === "fixed");
893
908
  }
894
- function v(g) {
895
- r.value = g;
909
+ function c(h) {
910
+ u.value = h;
896
911
  }
897
912
  return {
898
- columnsMap: o,
899
- operationType: u,
900
- setColumnsMap: w,
901
- sortKeyColumns: r,
902
- cacheColumnsMap: a,
903
- setSortKeyColumns: v
913
+ columnsMap: i,
914
+ operationType: n,
915
+ setColumnsMap: m,
916
+ sortKeyColumns: u,
917
+ cacheColumnsMap: o,
918
+ setSortKeyColumns: c
904
919
  };
905
920
  }
906
- function Pl(e) {
907
- const n = x(() => e.draggabled), t = x(() => e.neverScroll), u = x(() => e.autoScroll);
921
+ function Dl(e) {
922
+ const a = T(() => e.draggabled), t = T(() => e.neverScroll), n = T(() => e.autoScroll);
908
923
  return {
909
- draggabled: n,
924
+ draggabled: a,
910
925
  neverScroll: t,
911
- autoScroll: u
926
+ autoScroll: n
912
927
  };
913
928
  }
914
- function Dl({ scroll: e, columns: n, breakpoint: t, draggabled: u, autoScroll: o, neverScroll: a }) {
915
- const i = D([]), r = D([]);
916
- q([
929
+ function kl({ scroll: e, columns: a, breakpoint: t, draggabled: n, autoScroll: i, neverScroll: o }) {
930
+ const f = D([]), u = D([]);
931
+ _([
917
932
  () => e.value,
918
- () => n.value,
933
+ () => a.value,
919
934
  () => t.value,
920
- () => u.value,
921
- () => o.value,
922
- () => a.value
935
+ () => n.value,
936
+ () => i.value,
937
+ () => o.value
923
938
  ], () => {
924
- i.value = G(g(f(n))), r.value = G(g(f(n)));
939
+ f.value = q(h(y(a))), u.value = q(h(y(a)));
925
940
  }, {
926
941
  deep: !0,
927
942
  immediate: !0
928
943
  });
929
- const w = x(() => {
930
- const y = v(f(i).filter((R) => R.fixed === "left")), d = v(f(i).filter((R) => R.fixed !== "left" && R.fixed !== "right")), S = v(f(i).filter((R) => R.fixed === "right"));
944
+ const m = T(() => {
945
+ const C = c(y(f).filter((F) => F.fixed === "left")), d = c(y(f).filter((F) => F.fixed !== "left" && F.fixed !== "right")), x = c(y(f).filter((F) => F.fixed === "right"));
931
946
  return [
932
- ...y,
947
+ ...C,
933
948
  ...d,
934
- ...S
949
+ ...x
935
950
  ];
936
951
  });
937
- function v(y) {
938
- return y.sort((d, S) => At(d, S, "order", 0));
952
+ function c(C) {
953
+ return C.sort((d, x) => Lt(d, x, "order", 0));
939
954
  }
940
- function g(y) {
941
- return G(y).map((d, S) => {
942
- var R;
943
- if (d.dataIndex === "action" || S === y.length - 1 ? d.resizable = !1 : d.resizable = Q(d.resizable) ? d.resizable : !!(ut(d.width) && f(u)), !d.width || f(a))
955
+ function h(C) {
956
+ return q(C).map((d, x) => {
957
+ var F;
958
+ if (d.dataIndex === "action" || x === C.length - 1 ? d.resizable = !1 : d.resizable = Q(d.resizable) ? d.resizable : !!(ut(d.width) && y(n)), !d.width || y(o))
944
959
  return d;
945
- if (d.dataIndex === "action" && f(o))
946
- if ((R = f(e)) != null && R.x || !f(t))
960
+ if (d.dataIndex === "action" && y(i))
961
+ if ((F = y(e)) != null && F.x || !y(t))
947
962
  d.width = d.width || 100, d.fixed = "right";
948
963
  else {
949
- const $ = f(n).find((I) => I.dataIndex === d.dataIndex);
964
+ const $ = y(a).find((I) => I.dataIndex === d.dataIndex);
950
965
  d.width = ($ == null ? void 0 : $.width) || "", d.fixed = $ == null ? void 0 : $.fixed;
951
966
  }
952
967
  return d;
953
968
  });
954
969
  }
955
- function b(y, d) {
956
- i.value = i.value.map((S) => (S.uuid === d.uuid && (S.width = y), S));
970
+ function g(C, d) {
971
+ f.value = f.value.map((x) => (x.uuid === d.uuid && (x.width = C), x));
957
972
  }
958
- function c(y) {
959
- if (y.length <= 0) {
960
- i.value = [];
973
+ function r(C) {
974
+ if (C.length <= 0) {
975
+ f.value = [];
961
976
  return;
962
977
  }
963
- at(g(G(y)), i.value) || (i.value = g(G(y)));
978
+ at(h(q(C)), f.value) || (f.value = h(q(C)));
964
979
  }
965
- function C(y) {
966
- let d = G(n.value);
967
- d = d.map((S) => {
968
- var $, I, O;
969
- const R = S.key ? {
970
- show: ($ = y[S.key]) == null ? void 0 : $.show,
971
- fixed: (I = y[S.key]) == null ? void 0 : I.fixed,
972
- order: (O = y[S.key]) == null ? void 0 : O.order
980
+ function S(C) {
981
+ let d = q(a.value);
982
+ d = d.map((x) => {
983
+ var $, I, k;
984
+ const F = x.key ? {
985
+ show: ($ = C[x.key]) == null ? void 0 : $.show,
986
+ fixed: (I = C[x.key]) == null ? void 0 : I.fixed,
987
+ order: (k = C[x.key]) == null ? void 0 : k.order
973
988
  } : {};
974
989
  return {
975
- ...S,
976
- ...R
990
+ ...x,
991
+ ...F
977
992
  };
978
- }), c(d);
993
+ }), r(d);
979
994
  }
980
995
  return {
981
996
  breakpoint: t,
982
- getProColumns: w,
983
- cacheProColumns: r,
984
- setColumns: c,
985
- changeColumns: C,
986
- resizeColumnWidth: b
997
+ getProColumns: m,
998
+ cacheProColumns: u,
999
+ setColumns: r,
1000
+ changeColumns: S,
1001
+ resizeColumnWidth: g
987
1002
  };
988
1003
  }
989
- function Ol(e) {
990
- const n = x(() => e.scroll), t = x(() => e.autoScroll), u = x(() => e.modalScroll), o = x(() => e.neverScroll), a = x(() => e.rowSelection), i = x(() => e.scrollBreakpoint);
1004
+ function Ml(e) {
1005
+ const a = T(() => e.scroll), t = T(() => e.autoScroll), n = T(() => e.modalScroll), i = T(() => e.neverScroll), o = T(() => e.rowSelection), f = T(() => e.scrollBreakpoint);
991
1006
  return {
992
- scroll: n,
993
- neverScroll: o,
994
- rowSelection: a,
1007
+ scroll: a,
1008
+ neverScroll: i,
1009
+ rowSelection: o,
995
1010
  autoScroll: t,
996
- modalScroll: u,
997
- scrollBreakpoint: i
1011
+ modalScroll: n,
1012
+ scrollBreakpoint: f
998
1013
  };
999
1014
  }
1000
- function Ml({ scroll: e, columns: n, autoScroll: t, modalScroll: u, neverScroll: o, rowSelection: a, screens: i, innerWidth: r, scrollBreakpoint: w }) {
1001
- const v = x(() => {
1002
- var c, C, y;
1003
- return f(w) ? ut(f(w)) ? r.value > f(w) : Yt(f(w)) ? (c = i.value) == null ? void 0 : c[f(w)] : (C = i.value) == null ? void 0 : C.xl : (y = i.value) == null ? void 0 : y.xl;
1004
- }), g = x(() => {
1005
- let c = 0;
1006
- const C = f(a) ? 60 : 0, y = 150, d = G(f(n));
1015
+ function Nl({ scroll: e, columns: a, autoScroll: t, modalScroll: n, neverScroll: i, rowSelection: o, screens: f, innerWidth: u, scrollBreakpoint: m }) {
1016
+ const c = T(() => {
1017
+ var r, S, C;
1018
+ return y(m) ? ut(y(m)) ? u.value > y(m) : Vt(y(m)) ? (r = f.value) == null ? void 0 : r[y(m)] : (S = f.value) == null ? void 0 : S.xl : (C = f.value) == null ? void 0 : C.xl;
1019
+ }), h = T(() => {
1020
+ let r = 0;
1021
+ const S = y(o) ? 60 : 0, C = 150, d = q(y(a));
1007
1022
  d.forEach(($) => {
1008
- c += Number.parseInt($.width) || 0;
1023
+ r += Number.parseInt($.width) || 0;
1009
1024
  });
1010
- const R = d.filter(($) => !Reflect.has($, "width")).length;
1011
- return R !== 0 && (c += R * y), C && (c += C), c;
1025
+ const F = d.filter(($) => !Reflect.has($, "width")).length;
1026
+ return F !== 0 && (r += F * C), S && (r += S), r;
1012
1027
  });
1013
- return { getScrollRef: x(() => {
1014
- var c, C;
1015
- return f(o) ? {} : f(e) && Object.keys(f(e)).length ? f(e) : f(u) ? {
1016
- y: ((c = f(e)) == null ? void 0 : c.y) || ((C = i.value) != null && C.xl ? 400 : 235)
1017
- } : f(t) ? v.value ? {} : Q(v.value) ? { x: f(g) } : {} : {};
1018
- }), breakpoint: v };
1028
+ return { getScrollRef: T(() => {
1029
+ var r, S;
1030
+ return y(i) ? {} : y(e) && Object.keys(y(e)).length ? y(e) : y(n) ? {
1031
+ y: ((r = y(e)) == null ? void 0 : r.y) || ((S = f.value) != null && S.xl ? 400 : 235)
1032
+ } : y(t) ? c.value ? {} : Q(c.value) ? { x: y(h) } : {} : {};
1033
+ }), breakpoint: c };
1019
1034
  }
1020
- const { provideContext: Nl, useInjectContext: oe } = al("pro-table");
1021
- function El(e, n) {
1035
+ const { provideContext: El, useInjectContext: ce } = ul("pro-table");
1036
+ function jl(e, a) {
1022
1037
  const t = re({});
1023
- function u() {
1024
- Object.keys(e).forEach((i) => {
1025
- o(i, e[i]);
1038
+ function n() {
1039
+ Object.keys(e).forEach((f) => {
1040
+ i(f, e[f]);
1026
1041
  });
1027
- const a = n.find((i) => i.valueType === "dateRange");
1028
- a && o(a.name || "", e[a.rangeStartName || "start"] ? [
1029
- e[a.rangeStartName || "start"],
1030
- e[a.rangeEndName || "end"]
1042
+ const o = a.find((f) => f.valueType === "dateRange");
1043
+ o && i(o.name || "", e[o.rangeStartName || "start"] ? [
1044
+ e[o.rangeStartName || "start"],
1045
+ e[o.rangeEndName || "end"]
1031
1046
  ] : []);
1032
1047
  }
1033
- fe(() => {
1034
- u();
1048
+ he(() => {
1049
+ n();
1035
1050
  });
1036
- function o(a, i) {
1037
- t[a] = i;
1051
+ function i(o, f) {
1052
+ t[o] = f;
1038
1053
  }
1039
1054
  return {
1040
1055
  formState: t,
1041
- resetFormState: u,
1042
- changeFormState: o
1056
+ resetFormState: n,
1057
+ changeFormState: i
1043
1058
  };
1044
1059
  }
1045
- const kl = (e) => ({
1060
+ const zl = (e) => ({
1046
1061
  [`${e.componentCls}-form`]: {
1047
1062
  "&-collapse-button": {
1048
1063
  display: "flex",
@@ -1070,11 +1085,11 @@ const kl = (e) => ({
1070
1085
  }
1071
1086
  }
1072
1087
  }), {
1073
- useBreakpoint: jl
1074
- } = He, {
1075
- MonthPicker: zl,
1076
- RangePicker: Kl
1077
- } = it, ct = /* @__PURE__ */ Z({
1088
+ useBreakpoint: Kl
1089
+ } = Le, {
1090
+ MonthPicker: Al,
1091
+ RangePicker: Yl
1092
+ } = it, ct = /* @__PURE__ */ te({
1078
1093
  name: "ProTableForm",
1079
1094
  props: {
1080
1095
  search: {
@@ -1084,7 +1099,7 @@ const kl = (e) => ({
1084
1099
  searchText: "查询"
1085
1100
  })
1086
1101
  },
1087
- modal: se.modalScroll,
1102
+ modal: de.modalScroll,
1088
1103
  searchMap: {
1089
1104
  type: Array,
1090
1105
  default: () => []
@@ -1095,24 +1110,24 @@ const kl = (e) => ({
1095
1110
  },
1096
1111
  emits: ["search"],
1097
1112
  setup(e, {
1098
- emit: n,
1113
+ emit: a,
1099
1114
  slots: t,
1100
- expose: u
1115
+ expose: n
1101
1116
  }) {
1102
1117
  const {
1103
- wrapSSR: o,
1104
- hashId: a
1105
- } = Be("ProTableForm", [kl], e.prefixCls), i = jl(), {
1106
- formState: r,
1107
- resetFormState: w,
1108
- changeFormState: v
1109
- } = El(e.defaultParams || {}, e.searchMap || []), g = D(!1), b = x(() => {
1118
+ wrapSSR: i,
1119
+ hashId: o
1120
+ } = Be("ProTableForm", [zl], e.prefixCls), f = Kl(), {
1121
+ formState: u,
1122
+ resetFormState: m,
1123
+ changeFormState: c
1124
+ } = jl(e.defaultParams || {}, e.searchMap || []), h = D(!1), g = T(() => {
1110
1125
  var l;
1111
1126
  return !!((l = e.search) != null && l.showSearch);
1112
- }), c = x(() => {
1113
- var l, p;
1114
- return ((l = e.search) == null ? void 0 : l.showReset) === void 0 ? b.value : (p = e.search) == null ? void 0 : p.showReset;
1115
- }), C = [{
1127
+ }), r = T(() => {
1128
+ var l, b;
1129
+ return ((l = e.search) == null ? void 0 : l.showReset) === void 0 ? g.value : (b = e.search) == null ? void 0 : b.showReset;
1130
+ }), S = [{
1116
1131
  value: "xxl",
1117
1132
  span: 4
1118
1133
  }, {
@@ -1130,83 +1145,83 @@ const kl = (e) => ({
1130
1145
  }, {
1131
1146
  value: "xs",
1132
1147
  span: 1
1133
- }], y = (l) => {
1134
- let p = 4;
1135
- for (let B = 0; B < C.length; B += 1) {
1136
- const F = C[B].value;
1137
- if (i.value[F]) {
1138
- p = (l == null ? void 0 : l[F]) || (e.modal ? 3 : C[B].span);
1148
+ }], C = (l) => {
1149
+ let b = 4;
1150
+ for (let B = 0; B < S.length; B += 1) {
1151
+ const R = S[B].value;
1152
+ if (f.value[R]) {
1153
+ b = (l == null ? void 0 : l[R]) || (e.modal ? 3 : S[B].span);
1139
1154
  break;
1140
1155
  }
1141
1156
  }
1142
- return p;
1143
- }, d = x(() => {
1157
+ return b;
1158
+ }, d = T(() => {
1144
1159
  var l;
1145
- return y((l = e.search) == null ? void 0 : l.span);
1160
+ return C((l = e.search) == null ? void 0 : l.span);
1146
1161
  });
1147
- q(() => {
1162
+ _(() => {
1148
1163
  var l;
1149
1164
  return (l = e.search) == null ? void 0 : l.defaultCollapsed;
1150
1165
  }, (l) => {
1151
- g.value = g.value || !!l;
1166
+ h.value = h.value || !!l;
1152
1167
  });
1153
- const S = (l) => {
1154
- g.value = l;
1155
- }, R = (l, p, B) => (l + 1) % p === 0 ? {
1168
+ const x = (l) => {
1169
+ h.value = l;
1170
+ }, F = (l, b, B) => (l + 1) % b === 0 ? {
1156
1171
  ...B,
1157
1172
  marginRight: 0
1158
1173
  } : {
1159
1174
  ...B,
1160
1175
  marginRight: "2%"
1161
1176
  }, $ = () => {
1162
- const l = G(r), p = e.searchMap.find((M) => M.valueType === "text") || "", B = e.searchMap.find((M) => M.valueType === "dateRange") || "", F = e.searchMap.find((M) => M.valueType === "treeSelect") || "";
1163
- return p && (l[p.name] = r[p.name] || p.initialValue || ""), B && (l[B.rangeStartName || "start"] = l[B.name] ? l[B.name][0] : "", l[B.rangeEndName || "end"] = l[B.name] ? l[B.name][1] : "", delete l[B.name]), F && (Ke(r[F.name]) && (l[F.name] = r[F.name].length ? r[F.name].map((M) => M[F.valueKey === "text" ? "label" : "value"]).join() : ""), F && Ke(l[F.name]) && (l[F.name] = l[F.name].length ? l[F.name].map((M) => M[F.valueKey === "text" ? "label" : "value"]) : "")), l;
1164
- }, I = (l = !1, p) => {
1165
- Mt(() => {
1166
- (!b.value || l) && n("search", $(), !!p);
1177
+ const l = q(u), b = e.searchMap.find((M) => M.valueType === "text") || "", B = e.searchMap.find((M) => M.valueType === "dateRange") || "", R = e.searchMap.find((M) => M.valueType === "treeSelect") || "";
1178
+ return b && (l[b.name] = u[b.name] || b.initialValue || ""), B && (l[B.rangeStartName || "start"] = l[B.name] ? l[B.name][0] : "", l[B.rangeEndName || "end"] = l[B.name] ? l[B.name][1] : "", delete l[B.name]), R && (je(u[R.name]) && (l[R.name] = u[R.name].length ? u[R.name].map((M) => M[R.valueKey === "text" ? "label" : "value"]).join() : ""), R && je(l[R.name]) && (l[R.name] = l[R.name].length ? l[R.name].map((M) => M[R.valueKey === "text" ? "label" : "value"]) : "")), l;
1179
+ }, I = (l = !1, b) => {
1180
+ Nt(() => {
1181
+ (!g.value || l) && a("search", $(), !!b);
1167
1182
  });
1168
- }, O = (l, p) => {
1169
- var B, F, M;
1170
- switch (p.valueType) {
1183
+ }, k = (l, b) => {
1184
+ var B, R, M;
1185
+ switch (b.valueType) {
1171
1186
  case "text":
1172
- v(p.name || "", l || p.initialValue || "");
1187
+ c(b.name || "", l || b.initialValue || "");
1173
1188
  break;
1174
1189
  case "select":
1175
- v(p.name || "", l || l === 0 ? l : p.initialValue || void 0);
1190
+ c(b.name || "", l || l === 0 ? l : b.initialValue || void 0);
1176
1191
  break;
1177
1192
  case "treeSelect":
1178
- v(p.name || "", l || l === 0 ? l : p.initialValue || ((B = p.field) != null && B.treeCheckable || (F = p.field) != null && F.multiple ? [] : null));
1193
+ c(b.name || "", l || l === 0 ? l : b.initialValue || ((B = b.field) != null && B.treeCheckable || (R = b.field) != null && R.multiple ? [] : null));
1179
1194
  break;
1180
1195
  case "date":
1181
- v(p.name || "", l ? H(l).format(p.valueFormat || "YYYY-MM-DD") : p.initialValue || null);
1196
+ c(b.name || "", l ? W(l).format(b.valueFormat || "YYYY-MM-DD") : b.initialValue || null);
1182
1197
  break;
1183
1198
  case "dateMonth":
1184
- v(p.name || "", l ? H(l).format("YYYY-MM") : p.initialValue || null);
1199
+ c(b.name || "", l ? W(l).format("YYYY-MM") : b.initialValue || null);
1185
1200
  break;
1186
1201
  case "dateRange":
1187
- v(p.name || "", l && l.length > 0 ? [H(l[0]).format(p.valueFormat || "YYYY-MM-DD"), H(l[1]).format(p.valueFormat || "YYYY-MM-DD")] : p.initialValue || null);
1202
+ c(b.name || "", l && l.length > 0 ? [W(l[0]).format(b.valueFormat || "YYYY-MM-DD"), W(l[1]).format(b.valueFormat || "YYYY-MM-DD")] : b.initialValue || null);
1188
1203
  break;
1189
1204
  case "time":
1190
- v(p.name || "", l ? H(l).format(p.valueFormat || "HH:mm:ss") : p.initialValue || null);
1205
+ c(b.name || "", l ? W(l).format(b.valueFormat || "HH:mm:ss") : b.initialValue || null);
1191
1206
  break;
1192
1207
  }
1193
- (M = e.search) != null && M.showSearch || p.valueType === "text" || (p.valueType === "treeSelect" || p.valueType, I());
1208
+ (M = e.search) != null && M.showSearch || b.valueType === "text" || (b.valueType === "treeSelect" || b.valueType, I());
1194
1209
  }, A = (l = !0) => {
1195
- w(), I(!0, l);
1210
+ m(), I(!0, l);
1196
1211
  };
1197
- u({
1212
+ n({
1198
1213
  getFormState: () => $(),
1199
1214
  resetForm: A
1200
1215
  });
1201
- const k = () => (b.value || c.value) && s(ne, null, {
1202
- default: () => [c.value && s(Qe, {
1216
+ const E = () => (g.value || r.value) && s(se, null, {
1217
+ default: () => [r.value && s(Qe, {
1203
1218
  onClick: () => A()
1204
1219
  }, {
1205
1220
  default: () => {
1206
1221
  var l;
1207
1222
  return [((l = e.search) == null ? void 0 : l.resetText) || "重置"];
1208
1223
  }
1209
- }), b.value && s(Qe, {
1224
+ }), g.value && s(Qe, {
1210
1225
  loading: e.loading,
1211
1226
  type: "primary",
1212
1227
  onClick: () => I(!0)
@@ -1218,162 +1233,162 @@ const kl = (e) => ({
1218
1233
  })]
1219
1234
  }), Y = ({
1220
1235
  formItemStyle: l,
1221
- advanced: p,
1236
+ advanced: b,
1222
1237
  showAdvanced: B = !0
1223
1238
  }) => s("div", {
1224
1239
  style: l,
1225
- class: `${e.prefixCls}-form-collapse-button ${a.value}`
1226
- }, [s(ne, {
1240
+ class: `${e.prefixCls}-form-collapse-button ${o.value}`
1241
+ }, [s(se, {
1227
1242
  size: 16
1228
1243
  }, {
1229
1244
  default: () => {
1230
- var F, M;
1231
- return [k(), B && s("span", {
1232
- class: `${e.prefixCls}-a ${a.value}`,
1233
- onClick: () => S(!p)
1234
- }, [p ? "收起" : "展开", (F = e.search) != null && F.collapseRender ? (M = e.search) == null ? void 0 : M.collapseRender() : p ? s(ul, null, null) : s(ol, null, null)])];
1245
+ var R, M;
1246
+ return [E(), B && s("span", {
1247
+ class: `${e.prefixCls}-a ${o.value}`,
1248
+ onClick: () => x(!b)
1249
+ }, [b ? "收起" : "展开", (R = e.search) != null && R.collapseRender ? (M = e.search) == null ? void 0 : M.collapseRender() : b ? s(il, null, null) : s(sl, null, null)])];
1235
1250
  }
1236
- })]), ee = (l) => {
1237
- var F, M;
1238
- let p;
1239
- const B = b.value ? Ze : Ze.Search;
1251
+ })]), le = (l) => {
1252
+ var R, M;
1253
+ let b;
1254
+ const B = g.value ? Ze : Ze.Search;
1240
1255
  switch (l.valueType) {
1241
1256
  case "text":
1242
- p = s(B, _({
1257
+ b = s(B, U({
1243
1258
  style: {
1244
1259
  width: "100%"
1245
1260
  },
1246
- value: r[l.name],
1261
+ value: u[l.name],
1247
1262
  placeholder: l.placeholder || "请输入",
1248
1263
  allowClear: l.allowClear || l.allowClear === !1 ? l.allowClear : !0,
1249
- onChange: (h) => O(h.target.value, l),
1250
- onSearch: (h) => I()
1264
+ onChange: (v) => k(v.target.value, l),
1265
+ onSearch: (v) => I()
1251
1266
  }, l.field || {}), null);
1252
1267
  break;
1253
1268
  case "select":
1254
- p = s(qt, _({
1269
+ b = s(Xt, U({
1255
1270
  style: {
1256
1271
  width: "100%"
1257
1272
  },
1258
- value: l.loading ? void 0 : r[l.name],
1273
+ value: l.loading ? void 0 : u[l.name],
1259
1274
  optionFilterProp: "label",
1260
1275
  placeholder: l.placeholder || "请选择",
1261
1276
  showSearch: l.showSearch,
1262
1277
  allowClear: l.allowClear || l.allowClear === !1 ? l.allowClear : !0,
1263
- getPopupContainer: (h) => h && h.parentNode ? h.parentNode : h,
1264
- notFoundContent: l.loading === void 0 ? void 0 : l.loading ? s(Ye, {
1278
+ getPopupContainer: (v) => v && v.parentNode ? v.parentNode : v,
1279
+ notFoundContent: l.loading === void 0 ? void 0 : l.loading ? s(Ke, {
1265
1280
  size: "small"
1266
1281
  }, null) : void 0,
1267
- onChange: (h) => O(h, l),
1268
- options: (F = l == null ? void 0 : l.valueEnum) == null ? void 0 : F.map((h) => ({
1269
- label: h.text,
1270
- value: h.value
1282
+ onChange: (v) => k(v, l),
1283
+ options: (R = l == null ? void 0 : l.valueEnum) == null ? void 0 : R.map((v) => ({
1284
+ label: v.text,
1285
+ value: v.value
1271
1286
  }))
1272
1287
  }, l.field || {}), null);
1273
1288
  break;
1274
1289
  case "treeSelect":
1275
- p = s(Gt, _({
1290
+ b = s(qt, U({
1276
1291
  style: {
1277
1292
  width: "100%"
1278
1293
  },
1279
- value: r[l.name],
1294
+ value: u[l.name],
1280
1295
  placeholder: l.placeholder || "请选择",
1281
1296
  allowClear: l.allowClear || l.allowClear === !1 ? l.allowClear : !0,
1282
1297
  treeData: l.valueEnum,
1283
- getPopupContainer: (h) => h && h.parentNode ? h.parentNode : h,
1284
- notFoundContent: l.loading === void 0 ? void 0 : l.loading ? s(Ye, {
1298
+ getPopupContainer: (v) => v && v.parentNode ? v.parentNode : v,
1299
+ notFoundContent: l.loading === void 0 ? void 0 : l.loading ? s(Ke, {
1285
1300
  size: "small"
1286
1301
  }, null) : void 0,
1287
- onChange: (h) => O(h, l)
1302
+ onChange: (v) => k(v, l)
1288
1303
  }, l.field || {}), null);
1289
1304
  break;
1290
1305
  case "date":
1291
- p = s(it, _({
1306
+ b = s(it, U({
1292
1307
  style: {
1293
1308
  width: "100%"
1294
1309
  },
1295
- value: r[l.name] ? H(r[l.name], l.valueFormat || "YYYY-MM-DD") : void 0,
1296
- getPopupContainer: (h) => h && h.parentNode ? h.parentNode : h,
1310
+ value: u[l.name] ? W(u[l.name], l.valueFormat || "YYYY-MM-DD") : void 0,
1311
+ getPopupContainer: (v) => v && v.parentNode ? v.parentNode : v,
1297
1312
  placeholder: l.placeholder || "请选择",
1298
1313
  allowClear: l.allowClear || l.allowClear === !1 ? l.allowClear : !0,
1299
1314
  format: l.valueFormat || "YYYY-MM-DD",
1300
1315
  showTime: l.showTime,
1301
1316
  showToday: l.showToday || !0,
1302
- onChange: (h) => O(h, l)
1317
+ onChange: (v) => k(v, l)
1303
1318
  }, l.field || {}), null);
1304
1319
  break;
1305
1320
  case "dateMonth":
1306
- p = s(zl, _({
1321
+ b = s(Al, U({
1307
1322
  style: {
1308
1323
  width: "100%"
1309
1324
  },
1310
- value: r[l.name] ? H(r[l.name], l.valueFormat || "YYYY-MM") : void 0,
1311
- getPopupContainer: (h) => h && h.parentNode ? h.parentNode : h,
1325
+ value: u[l.name] ? W(u[l.name], l.valueFormat || "YYYY-MM") : void 0,
1326
+ getPopupContainer: (v) => v && v.parentNode ? v.parentNode : v,
1312
1327
  placeholder: l.placeholder || "请选择",
1313
- onChange: (h) => O(h, l)
1328
+ onChange: (v) => k(v, l)
1314
1329
  }, l.field || {}), null);
1315
1330
  break;
1316
1331
  case "dateRange":
1317
- p = s(Kl, _({
1332
+ b = s(Yl, U({
1318
1333
  style: {
1319
1334
  width: "100%"
1320
1335
  },
1321
- value: (M = r[l.name]) != null && M.length ? [H(r[l.name][0], l.valueFormat || "YYYY-MM-DD HH:mm:ss"), H(r[l.name][1], l.valueFormat || "YYYY-MM-DD HH:mm:ss")] : void 0,
1322
- getPopupContainer: (h) => h && h.parentNode ? h.parentNode : h,
1336
+ value: (M = u[l.name]) != null && M.length ? [W(u[l.name][0], l.valueFormat || "YYYY-MM-DD HH:mm:ss"), W(u[l.name][1], l.valueFormat || "YYYY-MM-DD HH:mm:ss")] : void 0,
1337
+ getPopupContainer: (v) => v && v.parentNode ? v.parentNode : v,
1323
1338
  placeholder: l.placeholder || ["开始日期", "结束日期"],
1324
1339
  format: l.valueFormat || "YYYY-MM-DD HH:mm:ss",
1325
1340
  showTime: l.showTime,
1326
- onChange: (h) => O(h, l)
1341
+ onChange: (v) => k(v, l)
1327
1342
  }, l.field || {}), null);
1328
1343
  break;
1329
1344
  case "time":
1330
- p = s(_t, _({
1345
+ b = s(Ut, U({
1331
1346
  style: {
1332
1347
  width: "100%"
1333
1348
  },
1334
- value: r[l.name] ? H(r[l.name], l.valueFormat || "HH:mm:ss") : void 0,
1335
- getPopupContainer: (h) => h && h.parentNode ? h.parentNode : h,
1349
+ value: u[l.name] ? W(u[l.name], l.valueFormat || "HH:mm:ss") : void 0,
1350
+ getPopupContainer: (v) => v && v.parentNode ? v.parentNode : v,
1336
1351
  placeholder: l.placeholder || "请选择",
1337
1352
  allowClear: l.allowClear || l.allowClear === !1 ? l.allowClear : !0,
1338
1353
  use12Hours: l.use12Hours,
1339
1354
  format: l.valueFormat || "HH:mm:ss",
1340
- onChange: (h) => O(h, l)
1355
+ onChange: (v) => k(v, l)
1341
1356
  }, l.field || {}), null);
1342
1357
  break;
1343
1358
  }
1344
- return p;
1345
- }, P = ({
1359
+ return b;
1360
+ }, O = ({
1346
1361
  formItemStyle: l,
1347
- item: p
1362
+ item: b
1348
1363
  }) => s("div", {
1349
1364
  class: `${e.prefixCls}-form-item`,
1350
1365
  style: l
1351
1366
  }, [s(Je.Item, null, {
1352
- default: () => [p.__v_isVNode ? p : ee(p)]
1367
+ default: () => [b.__v_isVNode ? b : le(b)]
1353
1368
  })]), V = () => {
1354
- var p;
1355
- const l = [...e.searchMap, ...((p = t.default) == null ? void 0 : p.call(t)) || []];
1356
- return l.map((B, F) => {
1369
+ var b;
1370
+ const l = [...e.searchMap, ...((b = t.default) == null ? void 0 : b.call(t)) || []];
1371
+ return l.map((B, R) => {
1357
1372
  const M = {
1358
1373
  width: `${(100 - (d.value - 1) * 2) / d.value}%`
1359
- }, h = R(F, d.value, M);
1360
- return l.length < d.value || g.value ? s(Ie, null, [P({
1361
- formItemStyle: h,
1374
+ }, v = F(R, d.value, M);
1375
+ return l.length < d.value || h.value ? s(Ie, null, [O({
1376
+ formItemStyle: v,
1362
1377
  item: B
1363
- }), F === l.length - 1 && Y({
1378
+ }), R === l.length - 1 && Y({
1364
1379
  formItemStyle: {
1365
1380
  flex: 1,
1366
1381
  justifyContent: "flex-end"
1367
1382
  },
1368
- advanced: g.value,
1369
- showAdvanced: g.value
1370
- })]) : s(Ie, null, [F < d.value - 1 && P({
1371
- formItemStyle: h,
1383
+ advanced: h.value,
1384
+ showAdvanced: h.value
1385
+ })]) : s(Ie, null, [R < d.value - 1 && O({
1386
+ formItemStyle: v,
1372
1387
  item: B
1373
- }), F === d.value - 1 && (d.value - 1 === 0 || l.length === d.value) && P({
1374
- formItemStyle: h,
1388
+ }), R === d.value - 1 && (d.value - 1 === 0 || l.length === d.value) && O({
1389
+ formItemStyle: v,
1375
1390
  item: B
1376
- }), F === d.value - 1 && l.length !== d.value && Y({
1391
+ }), R === d.value - 1 && l.length !== d.value && Y({
1377
1392
  formItemStyle: {
1378
1393
  flex: 1,
1379
1394
  justifyContent: "flex-end"
@@ -1384,40 +1399,40 @@ const kl = (e) => ({
1384
1399
  });
1385
1400
  };
1386
1401
  return () => {
1387
- var l, p;
1388
- return o(s("div", {
1402
+ var l, b;
1403
+ return i(s("div", {
1389
1404
  class: {
1390
- [`${a.value}`]: !0,
1391
- [`${f(e.prefixCls)}-search`]: !0,
1392
- [`${(l = e.search) == null ? void 0 : l.className}`]: (p = e.search) == null ? void 0 : p.className
1405
+ [`${o.value}`]: !0,
1406
+ [`${y(e.prefixCls)}-search`]: !0,
1407
+ [`${(l = e.search) == null ? void 0 : l.className}`]: (b = e.search) == null ? void 0 : b.className
1393
1408
  }
1394
1409
  }, [s(Je, {
1395
- class: `${f(e.prefixCls)}-form ${a.value}`,
1410
+ class: `${y(e.prefixCls)}-form ${o.value}`,
1396
1411
  layout: "horizontal"
1397
1412
  }, {
1398
1413
  default: () => [s("div", {
1399
- class: `${f(e.prefixCls)}-form-container ${a.value}`
1414
+ class: `${y(e.prefixCls)}-form-container ${o.value}`
1400
1415
  }, [V()])]
1401
1416
  })]));
1402
1417
  };
1403
1418
  }
1404
1419
  });
1405
1420
  ct.inheritAttrs = !1;
1406
- function Al(e, n) {
1407
- const t = Le({}, e);
1408
- for (let u = 0; u < n.length; u += 1) {
1409
- const o = n[u];
1410
- delete t[o];
1421
+ function Ll(e, a) {
1422
+ const t = Ae({}, e);
1423
+ for (let n = 0; n < a.length; n += 1) {
1424
+ const i = a[n];
1425
+ delete t[i];
1411
1426
  }
1412
1427
  return t;
1413
1428
  }
1414
- const pe = (e) => {
1415
- const n = D(null);
1416
- return n.value = e, (...t) => {
1417
- var u;
1418
- return (u = n.value) == null ? void 0 : u.call(n, ...t);
1429
+ const Se = (e) => {
1430
+ const a = D(null);
1431
+ return a.value = e, (...t) => {
1432
+ var n;
1433
+ return (n = a.value) == null ? void 0 : n.call(a, ...t);
1419
1434
  };
1420
- }, Yl = (e) => ({
1435
+ }, Vl = (e) => ({
1421
1436
  [`${e.componentCls}`]: {
1422
1437
  width: "auto",
1423
1438
  "&-title": {
@@ -1499,42 +1514,42 @@ const pe = (e) => {
1499
1514
  }
1500
1515
  }
1501
1516
  }
1502
- }), Ee = ({
1517
+ }), ke = ({
1503
1518
  title: e,
1504
- show: n,
1519
+ show: a,
1505
1520
  treeKey: t,
1506
- fixed: u
1521
+ fixed: n
1507
1522
  }, {
1508
- slots: o
1523
+ slots: i
1509
1524
  }) => {
1510
1525
  const {
1511
- cacheColumns: a,
1512
- settingsAction: i
1513
- } = oe();
1514
- return n ? s(X, {
1526
+ cacheColumns: o,
1527
+ settingsAction: f
1528
+ } = ce();
1529
+ return a ? s(Z, {
1515
1530
  title: e
1516
1531
  }, {
1517
1532
  default: () => {
1518
- var r;
1533
+ var u;
1519
1534
  return [s("span", {
1520
- onClick: (w) => {
1521
- var C, y, d;
1522
- w.stopPropagation(), w.preventDefault();
1523
- const v = ((y = (C = f(a)) == null ? void 0 : C.find((S) => S.uuid === t)) == null ? void 0 : y.key) || "", g = (i == null ? void 0 : i.columnsMap[v]) || {};
1524
- if (typeof g.disable == "boolean" ? g.disable : (d = g.disable) == null ? void 0 : d.icon) return;
1525
- const c = {
1526
- ...i == null ? void 0 : i.columnsMap,
1527
- [v]: {
1528
- ...g,
1529
- fixed: u
1535
+ onClick: (m) => {
1536
+ var S, C, d;
1537
+ m.stopPropagation(), m.preventDefault();
1538
+ const c = ((C = (S = y(o)) == null ? void 0 : S.find((x) => x.uuid === t)) == null ? void 0 : C.key) || "", h = (f == null ? void 0 : f.columnsMap[c]) || {};
1539
+ if (typeof h.disable == "boolean" ? h.disable : (d = h.disable) == null ? void 0 : d.icon) return;
1540
+ const r = {
1541
+ ...f == null ? void 0 : f.columnsMap,
1542
+ [c]: {
1543
+ ...h,
1544
+ fixed: n
1530
1545
  }
1531
1546
  };
1532
- i == null || i.setColumnsMap(c, "fixed");
1547
+ f == null || f.setColumnsMap(r, "fixed");
1533
1548
  }
1534
- }, [(r = o.default) == null ? void 0 : r.call(o)])];
1549
+ }, [(u = i.default) == null ? void 0 : u.call(i)])];
1535
1550
  }
1536
1551
  }) : null;
1537
- }, Ll = /* @__PURE__ */ Z({
1552
+ }, Hl = /* @__PURE__ */ te({
1538
1553
  props: {
1539
1554
  treeKey: String,
1540
1555
  hashId: String,
@@ -1545,45 +1560,45 @@ const pe = (e) => {
1545
1560
  },
1546
1561
  setup(e) {
1547
1562
  const {
1548
- cacheColumns: n
1549
- } = oe(), t = x(() => {
1550
- var o, a;
1551
- return ((a = (o = f(n)) == null ? void 0 : o.find((i) => i.uuid === e.treeKey)) == null ? void 0 : a.key) || "";
1552
- }), u = x(() => t.value === "action" && e.autoScroll);
1563
+ cacheColumns: a
1564
+ } = ce(), t = T(() => {
1565
+ var i, o;
1566
+ return ((o = (i = y(a)) == null ? void 0 : i.find((f) => f.uuid === e.treeKey)) == null ? void 0 : o.key) || "";
1567
+ }), n = T(() => t.value === "action" && e.autoScroll);
1553
1568
  return () => {
1554
- const o = s("span", {
1569
+ const i = s("span", {
1555
1570
  class: [`${e.className}-list-item-option`, e.hashId]
1556
- }, [s(Ee, {
1571
+ }, [s(ke, {
1557
1572
  treeKey: e.treeKey || "",
1558
1573
  fixed: "left",
1559
1574
  title: "固定在列首",
1560
- show: e.fixed !== "left" && !u.value
1575
+ show: e.fixed !== "left" && !n.value
1561
1576
  }, {
1562
- default: () => [s(il, null, null)]
1563
- }), s(Ee, {
1577
+ default: () => [s(rl, null, null)]
1578
+ }), s(ke, {
1564
1579
  treeKey: e.treeKey || "",
1565
1580
  fixed: void 0,
1566
1581
  title: "不固定",
1567
- show: !!e.fixed && !u.value
1582
+ show: !!e.fixed && !n.value
1568
1583
  }, {
1569
- default: () => [s(sl, null, null)]
1570
- }), s(Ee, {
1584
+ default: () => [s(cl, null, null)]
1585
+ }), s(ke, {
1571
1586
  treeKey: e.treeKey || "",
1572
1587
  fixed: "right",
1573
1588
  title: "固定在列尾",
1574
1589
  show: e.fixed !== "right"
1575
1590
  }, {
1576
- default: () => [s(rl, null, null)]
1591
+ default: () => [s(dl, null, null)]
1577
1592
  })]);
1578
1593
  return s("span", {
1579
1594
  class: [`${e.className}-list-item`, e.hashId],
1580
1595
  key: e.treeKey
1581
1596
  }, [s("div", {
1582
1597
  class: [`${e.className}-list-item-title`, e.hashId]
1583
- }, [e.title]), o]);
1598
+ }, [e.title]), i]);
1584
1599
  };
1585
1600
  }
1586
- }), ke = /* @__PURE__ */ Z({
1601
+ }), Me = /* @__PURE__ */ te({
1587
1602
  props: {
1588
1603
  list: Array,
1589
1604
  keys: Array,
@@ -1598,100 +1613,100 @@ const pe = (e) => {
1598
1613
  }
1599
1614
  },
1600
1615
  setup(e) {
1601
- const n = D(Ae().uuid(15)), t = x(() => e.list && e.list.length > 0), u = D([]), o = D([]), {
1602
- cacheColumns: a,
1603
- slots: i,
1604
- settingsAction: r
1605
- } = oe(), w = (c, C) => c.map(({
1606
- key: y,
1616
+ const a = D(ze().uuid(15)), t = T(() => e.list && e.list.length > 0), n = D([]), i = D([]), {
1617
+ cacheColumns: o,
1618
+ slots: f,
1619
+ settingsAction: u
1620
+ } = ce(), m = (r, S) => r.map(({
1621
+ key: C,
1607
1622
  children: d,
1608
- uuid: S,
1609
- ...R
1623
+ uuid: x,
1624
+ ...F
1610
1625
  }) => {
1611
1626
  var A;
1612
- const $ = (r == null ? void 0 : r.columnsMap[y || "null"]) || {
1627
+ const $ = (u == null ? void 0 : u.columnsMap[C || "null"]) || {
1613
1628
  show: !0
1614
1629
  };
1615
1630
  let I = !1;
1616
- $.show !== !1 && (C == null ? void 0 : C.show) !== !1 && !d && (I = !0);
1617
- const O = {
1618
- key: S || "",
1619
- ...Al(R, ["dataIndex"]),
1631
+ $.show !== !1 && (S == null ? void 0 : S.show) !== !1 && !d && (I = !0);
1632
+ const k = {
1633
+ key: x || "",
1634
+ ...Ll(F, ["dataIndex"]),
1620
1635
  checked: I,
1621
1636
  selectable: !1,
1622
1637
  disabled: $.disable === !0,
1623
1638
  disableCheckbox: typeof $.disable == "boolean" ? $.disable : (A = $.disable) == null ? void 0 : A.checkbox,
1624
1639
  isLeaf: !0
1625
1640
  };
1626
- return d && (O.children = w(d, $)), O;
1641
+ return d && (k.children = m(d, $)), k;
1627
1642
  });
1628
- fe(() => {
1629
- const c = w(e.list || []);
1630
- u.value = c, o.value = c.filter((C) => C.checked).map((C) => C.key), (r == null ? void 0 : r.operationType.value) === "fixed" && (n.value = Ae().uuid(15));
1643
+ he(() => {
1644
+ const r = m(e.list || []);
1645
+ n.value = r, i.value = r.filter((S) => S.checked).map((S) => S.key), (u == null ? void 0 : u.operationType.value) === "fixed" && (a.value = ze().uuid(15));
1631
1646
  });
1632
- const v = pe((c, C, y) => {
1633
- var Y, ee;
1634
- const d = ((Y = f(a).find((P) => P.uuid === c)) == null ? void 0 : Y.key) || "", S = ((ee = f(a).find((P) => P.uuid === C)) == null ? void 0 : ee.key) || "", R = {
1635
- ...r == null ? void 0 : r.columnsMap
1636
- }, $ = [...r.sortKeyColumns.value], I = $.findIndex((P) => P === d), O = $.findIndex((P) => P === S), A = y > I;
1647
+ const c = Se((r, S, C) => {
1648
+ var Y, le;
1649
+ const d = ((Y = y(o).find((O) => O.uuid === r)) == null ? void 0 : Y.key) || "", x = ((le = y(o).find((O) => O.uuid === S)) == null ? void 0 : le.key) || "", F = {
1650
+ ...u == null ? void 0 : u.columnsMap
1651
+ }, $ = [...u.sortKeyColumns.value], I = $.findIndex((O) => O === d), k = $.findIndex((O) => O === x), A = C > I;
1637
1652
  if (I < 0)
1638
1653
  return;
1639
- const k = $[I];
1640
- $.splice(I, 1), y === 0 ? $.unshift(k) : $.splice(A ? O : O + 1, 0, k), $.forEach((P, V) => {
1641
- R[P] = {
1642
- ...R[P] || {},
1654
+ const E = $[I];
1655
+ $.splice(I, 1), C === 0 ? $.unshift(E) : $.splice(A ? k : k + 1, 0, E), $.forEach((O, V) => {
1656
+ F[O] = {
1657
+ ...F[O] || {},
1643
1658
  order: V
1644
1659
  };
1645
- }), r == null || r.setColumnsMap(R, "drop"), r == null || r.setSortKeyColumns($);
1646
- }), g = pe((c) => {
1660
+ }), u == null || u.setColumnsMap(F, "drop"), u == null || u.setSortKeyColumns($);
1661
+ }), h = Se((r) => {
1647
1662
  var $;
1648
- const C = c.node.key, y = (($ = f(a).find((I) => I.uuid === C)) == null ? void 0 : $.key) || "", S = {
1649
- ...(r == null ? void 0 : r.columnsMap[y]) || {}
1663
+ const S = r.node.key, C = (($ = y(o).find((I) => I.uuid === S)) == null ? void 0 : $.key) || "", x = {
1664
+ ...(u == null ? void 0 : u.columnsMap[C]) || {}
1650
1665
  };
1651
- S.show = c.checked;
1652
- const R = {
1653
- ...r == null ? void 0 : r.columnsMap,
1654
- [y]: S
1666
+ x.show = r.checked;
1667
+ const F = {
1668
+ ...u == null ? void 0 : u.columnsMap,
1669
+ [C]: x
1655
1670
  };
1656
- r == null || r.setColumnsMap(R, "show");
1657
- }), b = (c) => {
1658
- const C = f(a).find((y) => y.uuid === c.key);
1659
- return c.title || Nt(i, "headerCell", {
1660
- title: C.title,
1661
- column: C
1662
- }, () => [C.title]);
1671
+ u == null || u.setColumnsMap(F, "show");
1672
+ }), g = (r) => {
1673
+ const S = y(o).find((C) => C.uuid === r.key);
1674
+ return r.title || Et(f, "headerCell", {
1675
+ title: S.title,
1676
+ column: S
1677
+ }, () => [S.title]);
1663
1678
  };
1664
1679
  return () => {
1665
- var c, C;
1680
+ var r, S;
1666
1681
  return t.value ? s(Ie, null, [e.showTitle && s("span", {
1667
1682
  class: [`${e.className}-list-title`, e.hashId]
1668
- }, [e.title]), s(Jt, {
1669
- key: n.value,
1670
- draggable: e.draggable && !!((c = u.value) != null && c.length) && ((C = u.value) == null ? void 0 : C.length) > 1,
1683
+ }, [e.title]), s(Zt, {
1684
+ key: a.value,
1685
+ draggable: e.draggable && !!((r = n.value) != null && r.length) && ((S = n.value) == null ? void 0 : S.length) > 1,
1671
1686
  checkable: e.checkable,
1672
1687
  blockNode: !0,
1673
1688
  showLine: !1,
1674
- checkedKeys: o.value,
1689
+ checkedKeys: i.value,
1675
1690
  height: 280,
1676
- onDrop: (y) => {
1677
- const d = y.node.key, S = y.dragNode.key, {
1678
- dropPosition: R,
1691
+ onDrop: (C) => {
1692
+ const d = C.node.key, x = C.dragNode.key, {
1693
+ dropPosition: F,
1679
1694
  dropToGap: $
1680
- } = y, I = R === -1 || !$ ? R + 1 : R;
1681
- v(S, d, I);
1695
+ } = C, I = F === -1 || !$ ? F + 1 : F;
1696
+ c(x, d, I);
1682
1697
  },
1683
- onCheck: (y, d) => g(d),
1684
- treeData: u.value
1698
+ onCheck: (C, d) => h(d),
1699
+ treeData: n.value
1685
1700
  }, {
1686
- title: (y) => {
1687
- var S;
1701
+ title: (C) => {
1702
+ var x;
1688
1703
  const d = {
1689
- ...y,
1704
+ ...C,
1690
1705
  children: void 0,
1691
- title: b(y),
1692
- autoScroll: (S = r == null ? void 0 : r.autoScroll) == null ? void 0 : S.value
1706
+ title: g(C),
1707
+ autoScroll: (x = u == null ? void 0 : u.autoScroll) == null ? void 0 : x.value
1693
1708
  };
1694
- return s(Ll, _({
1709
+ return s(Hl, U({
1695
1710
  hashId: e.hashId,
1696
1711
  className: e.className
1697
1712
  }, d, {
@@ -1701,7 +1716,7 @@ const pe = (e) => {
1701
1716
  })]) : null;
1702
1717
  };
1703
1718
  }
1704
- }), Vl = /* @__PURE__ */ Z({
1719
+ }), Wl = /* @__PURE__ */ te({
1705
1720
  props: {
1706
1721
  hashId: String,
1707
1722
  className: String,
@@ -1710,65 +1725,65 @@ const pe = (e) => {
1710
1725
  },
1711
1726
  setup(e) {
1712
1727
  const {
1713
- columns: n
1714
- } = oe(), t = D([]), u = D([]), o = D([]), a = D([]);
1715
- q(() => n.value, (w) => {
1716
- t.value = [], u.value = [], o.value = [], w.forEach((v) => {
1717
- if (v.hideInSetting)
1728
+ columns: a
1729
+ } = ce(), t = D([]), n = D([]), i = D([]), o = D([]);
1730
+ _(() => a.value, (m) => {
1731
+ t.value = [], n.value = [], i.value = [], m.forEach((c) => {
1732
+ if (c.hideInSetting)
1718
1733
  return;
1719
1734
  const {
1720
- fixed: g,
1721
- show: b,
1722
- uuid: c
1723
- } = v;
1724
- if ((b || b === void 0) && c && a.value.push(c), g === "left") {
1725
- u.value.push(v);
1735
+ fixed: h,
1736
+ show: g,
1737
+ uuid: r
1738
+ } = c;
1739
+ if ((g || g === void 0) && r && o.value.push(r), h === "left") {
1740
+ n.value.push(c);
1726
1741
  return;
1727
1742
  }
1728
- if (g === "right") {
1729
- t.value.push(v);
1743
+ if (h === "right") {
1744
+ t.value.push(c);
1730
1745
  return;
1731
1746
  }
1732
- o.value.push(v);
1747
+ i.value.push(c);
1733
1748
  });
1734
1749
  }, {
1735
1750
  immediate: !0
1736
1751
  });
1737
- const i = x(() => t.value && t.value.length > 0), r = x(() => u.value && u.value.length > 0);
1752
+ const f = T(() => t.value && t.value.length > 0), u = T(() => n.value && n.value.length > 0);
1738
1753
  return () => s("div", {
1739
1754
  class: {
1740
1755
  [`${e.hashId}`]: !0,
1741
1756
  [`${e.className}-list`]: !0,
1742
- [`${e.className}-list-group`]: i.value || r.value
1757
+ [`${e.className}-list-group`]: f.value || u.value
1743
1758
  }
1744
- }, [s(ke, {
1759
+ }, [s(Me, {
1745
1760
  title: "固定在左侧",
1746
- list: u.value,
1747
- keys: a.value,
1761
+ list: n.value,
1762
+ keys: o.value,
1748
1763
  hashId: e.hashId,
1749
1764
  draggable: e.draggable,
1750
1765
  checkable: e.checkable,
1751
1766
  className: e.className
1752
- }, null), s(ke, {
1753
- list: o.value,
1754
- keys: a.value,
1767
+ }, null), s(Me, {
1768
+ list: i.value,
1769
+ keys: o.value,
1755
1770
  hashId: e.hashId,
1756
1771
  draggable: e.draggable,
1757
1772
  checkable: e.checkable,
1758
1773
  title: "不固定",
1759
- showTitle: r.value || i.value,
1774
+ showTitle: u.value || f.value,
1760
1775
  className: e.className
1761
- }, null), s(ke, {
1776
+ }, null), s(Me, {
1762
1777
  title: "固定在右侧",
1763
1778
  list: t.value,
1764
- keys: a.value,
1779
+ keys: o.value,
1765
1780
  hashId: e.hashId,
1766
1781
  draggable: e.draggable,
1767
1782
  checkable: e.checkable,
1768
1783
  className: e.className
1769
1784
  }, null)]);
1770
1785
  }
1771
- }), Hl = /* @__PURE__ */ Z({
1786
+ }), _l = /* @__PURE__ */ te({
1772
1787
  props: {
1773
1788
  draggable: {
1774
1789
  type: Boolean,
@@ -1782,131 +1797,131 @@ const pe = (e) => {
1782
1797
  extra: [Function, Object, String, Boolean]
1783
1798
  },
1784
1799
  setup(e) {
1785
- const n = Ve({
1800
+ const a = Ye({
1786
1801
  suffixCls: "table-column-setting",
1787
1802
  isPor: !0
1788
1803
  }), {
1789
1804
  wrapSSR: t,
1790
- hashId: u
1791
- } = Be("ColumnSetting", [Yl], n), {
1792
- columns: o,
1793
- settingsAction: a
1794
- } = oe(), i = pe((b = !0) => {
1795
- const c = {}, C = (y) => {
1796
- y.forEach(({
1805
+ hashId: n
1806
+ } = Be("ColumnSetting", [Vl], a), {
1807
+ columns: i,
1808
+ settingsAction: o
1809
+ } = ce(), f = Se((g = !0) => {
1810
+ const r = {}, S = (C) => {
1811
+ C.forEach(({
1797
1812
  key: d,
1798
- fixed: S,
1799
- index: R,
1813
+ fixed: x,
1814
+ index: F,
1800
1815
  children: $
1801
1816
  }) => {
1802
- const I = nt(d, R);
1803
- I && (c[I] = {
1804
- show: b,
1805
- fixed: S
1806
- }), $ && C($);
1817
+ const I = nt(d, F);
1818
+ I && (r[I] = {
1819
+ show: g,
1820
+ fixed: x
1821
+ }), $ && S($);
1807
1822
  });
1808
1823
  };
1809
- C(o.value), a == null || a.setColumnsMap(c, "show");
1810
- }), r = pe((b) => {
1811
- b.target.checked ? i() : i(!1);
1812
- }), w = pe(() => {
1813
- a == null || a.setColumnsMap(a == null ? void 0 : a.cacheColumnsMap, "fixed");
1814
- }), v = x(() => (
1824
+ S(i.value), o == null || o.setColumnsMap(r, "show");
1825
+ }), u = Se((g) => {
1826
+ g.target.checked ? f() : f(!1);
1827
+ }), m = Se(() => {
1828
+ o == null || o.setColumnsMap(o == null ? void 0 : o.cacheColumnsMap, "fixed");
1829
+ }), c = T(() => (
1815
1830
  // @ts-ignore
1816
- Object.values(a == null ? void 0 : a.columnsMap).filter((b) => !b || b.show === !1)
1817
- )), g = x(() => f(v).length > 0 && f(v).length !== o.value.length);
1818
- return () => t(s(Ut, {
1831
+ Object.values(o == null ? void 0 : o.columnsMap).filter((g) => !g || g.show === !1)
1832
+ )), h = T(() => y(c).length > 0 && y(c).length !== i.value.length);
1833
+ return () => t(s(Jt, {
1819
1834
  arrowPointAtCenter: !0,
1820
1835
  title: s("div", {
1821
- class: [`${n}-title`, u.value]
1822
- }, [s(Xt, {
1823
- indeterminate: g.value,
1824
- checked: f(v).length === 0 && f(v).length !== o.value.length,
1825
- onChange: (b) => r(b)
1836
+ class: [`${a}-title`, n.value]
1837
+ }, [s(Qt, {
1838
+ indeterminate: h.value,
1839
+ checked: y(c).length === 0 && y(c).length !== i.value.length,
1840
+ onChange: (g) => u(g)
1826
1841
  }, {
1827
- default: () => [be("列展示")]
1842
+ default: () => [pe("列展示")]
1828
1843
  }), e.checkedReset ? s("a", {
1829
- onClick: w,
1830
- class: [`${n}-action-rest-button`, u.value]
1831
- }, [be("重置")]) : null, e != null && e.extra ? s(ne, {
1844
+ onClick: m,
1845
+ class: [`${a}-action-rest-button`, n.value]
1846
+ }, [pe("重置")]) : null, e != null && e.extra ? s(se, {
1832
1847
  size: 12,
1833
1848
  align: "center"
1834
1849
  }, {
1835
1850
  default: () => [e.extra]
1836
1851
  }) : null]),
1837
- overlayClassName: `${n}-overlay ${u.value}`,
1852
+ overlayClassName: `${a}-overlay ${n.value}`,
1838
1853
  trigger: "click",
1839
1854
  placement: "bottomRight",
1840
- content: s(Vl, {
1841
- hashId: u.value,
1855
+ content: s(Wl, {
1856
+ hashId: n.value,
1842
1857
  checkable: e.checkable ?? !0,
1843
1858
  draggable: e.draggable ?? !0,
1844
- className: n
1859
+ className: a
1845
1860
  }, null)
1846
1861
  }, {
1847
- default: () => [s(X, {
1862
+ default: () => [s(Z, {
1848
1863
  title: "列设置"
1849
1864
  }, {
1850
1865
  default: () => [s(rt, null, null)]
1851
1866
  })]
1852
1867
  }));
1853
1868
  }
1854
- }), dt = /* @__PURE__ */ Z({
1869
+ }), dt = /* @__PURE__ */ te({
1855
1870
  setup() {
1856
1871
  const {
1857
1872
  isFullscreen: e
1858
1873
  } = ot();
1859
- return () => e.value ? s(X, {
1874
+ return () => e.value ? s(Z, {
1860
1875
  title: "退出全屏"
1861
1876
  }, {
1862
- default: () => [s(cl, null, null)]
1863
- }) : s(X, {
1877
+ default: () => [s(fl, null, null)]
1878
+ }) : s(Z, {
1864
1879
  title: "全屏"
1865
1880
  }, {
1866
- default: () => [s(dl, null, null)]
1881
+ default: () => [s(hl, null, null)]
1867
1882
  });
1868
1883
  }
1869
- }), Wl = () => {
1884
+ }), Gl = () => {
1870
1885
  const {
1871
1886
  action: e,
1872
- tableSize: n
1873
- } = oe();
1874
- return s(Qt, {
1875
- overlay: s(Re, {
1876
- selectedKeys: [n.value],
1887
+ tableSize: a
1888
+ } = ce();
1889
+ return s(el, {
1890
+ overlay: s(Fe, {
1891
+ selectedKeys: [a.value],
1877
1892
  onClick: ({
1878
1893
  key: t
1879
1894
  }) => {
1880
- var u;
1881
- (u = e.setTableSize) == null || u.call(e, t);
1895
+ var n;
1896
+ (n = e.setTableSize) == null || n.call(e, t);
1882
1897
  },
1883
1898
  style: {
1884
1899
  width: 80
1885
1900
  }
1886
1901
  }, {
1887
- default: () => [s(Re.Item, {
1902
+ default: () => [s(Fe.Item, {
1888
1903
  key: "large"
1889
1904
  }, {
1890
- default: () => [be("默认")]
1891
- }), s(Re.Item, {
1905
+ default: () => [pe("默认")]
1906
+ }), s(Fe.Item, {
1892
1907
  key: "middle"
1893
1908
  }, {
1894
- default: () => [be("中等")]
1895
- }), s(Re.Item, {
1909
+ default: () => [pe("中等")]
1910
+ }), s(Fe.Item, {
1896
1911
  key: "small"
1897
1912
  }, {
1898
- default: () => [be("紧凑")]
1913
+ default: () => [pe("紧凑")]
1899
1914
  })]
1900
1915
  }),
1901
1916
  trigger: ["click"]
1902
1917
  }, {
1903
- default: () => [s(X, {
1918
+ default: () => [s(Z, {
1904
1919
  title: "表格密度"
1905
1920
  }, {
1906
- default: () => [s(fl, null, null)]
1921
+ default: () => [s(vl, null, null)]
1907
1922
  })]
1908
1923
  });
1909
- }, _l = (e) => ({
1924
+ }, Ul = (e) => ({
1910
1925
  [`${e.componentCls}`]: {
1911
1926
  lineHeight: 1,
1912
1927
  "&-container": {
@@ -1949,140 +1964,140 @@ const pe = (e) => {
1949
1964
  }
1950
1965
  });
1951
1966
  function et(e) {
1952
- return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !Ce(e);
1967
+ return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !xe(e);
1953
1968
  }
1954
1969
  const {
1955
- useBreakpoint: Gl
1956
- } = He;
1957
- function ql(e) {
1958
- if (Ce(e))
1970
+ useBreakpoint: ql
1971
+ } = Le;
1972
+ function Xl(e) {
1973
+ if (xe(e))
1959
1974
  return e;
1960
1975
  if (e) {
1961
- const n = e, {
1976
+ const a = e, {
1962
1977
  icon: t,
1963
- tooltip: u,
1964
- onClick: o,
1965
- key: a
1966
- } = n;
1967
- return t && u ? s(X, {
1968
- title: u
1978
+ tooltip: n,
1979
+ onClick: i,
1980
+ key: o
1981
+ } = a;
1982
+ return t && n ? s(Z, {
1983
+ title: n
1969
1984
  }, {
1970
1985
  default: () => [s("span", {
1971
- key: a,
1986
+ key: o,
1972
1987
  onClick: () => {
1973
- o && o(a);
1988
+ i && i(o);
1974
1989
  }
1975
1990
  }, [t])]
1976
1991
  }) : t;
1977
1992
  }
1978
1993
  return null;
1979
1994
  }
1980
- const ft = /* @__PURE__ */ Z({
1995
+ const ft = /* @__PURE__ */ te({
1981
1996
  props: {
1982
- actions: se.toolBarBtn,
1997
+ actions: de.toolBarBtn,
1983
1998
  settings: [Array],
1984
- titleTip: se.titleTip,
1999
+ titleTip: de.titleTip,
1985
2000
  prefixCls: String,
1986
- headerTitle: se.headerTitle,
1987
- titleTipText: se.titleTipText,
1988
- optionsExtra: se.optionsExtra
2001
+ headerTitle: de.headerTitle,
2002
+ titleTipText: de.titleTipText,
2003
+ optionsExtra: de.optionsExtra
1989
2004
  },
1990
2005
  setup(e) {
1991
2006
  const {
1992
- wrapSSR: n,
2007
+ wrapSSR: a,
1993
2008
  hashId: t
1994
- } = Be("ListToolBar", [_l], e.prefixCls), u = Gl(), {
1995
- isMobile: o
1996
- } = oe(), a = x(() => {
1997
- var c;
1998
- return !!(e.titleTip || e.headerTitle || (c = e.actions) != null && c.length);
1999
- }), i = x(() => {
2000
- var c;
2001
- return !!((c = e.settings) != null && c.length || e.optionsExtra);
2002
- }), r = x(() => !!(e.titleTip || e.headerTitle)), w = x(() => {
2003
- var C;
2004
- let c;
2005
- return Array.isArray(e.actions) ? ((C = e.actions) == null ? void 0 : C.length) < 1 ? null : s(ne, {
2009
+ } = Be("ListToolBar", [Ul], e.prefixCls), n = ql(), {
2010
+ isMobile: i
2011
+ } = ce(), o = T(() => {
2012
+ var r;
2013
+ return !!(e.titleTip || e.headerTitle || (r = e.actions) != null && r.length);
2014
+ }), f = T(() => {
2015
+ var r;
2016
+ return !!((r = e.settings) != null && r.length || e.optionsExtra);
2017
+ }), u = T(() => !!(e.titleTip || e.headerTitle)), m = T(() => {
2018
+ var S;
2019
+ let r;
2020
+ return Array.isArray(e.actions) ? ((S = e.actions) == null ? void 0 : S.length) < 1 ? null : s(se, {
2006
2021
  align: "center"
2007
- }, et(c = e.actions.map((y, d) => Ce(y) ? Et(y, {
2022
+ }, et(r = e.actions.map((C, d) => xe(C) ? jt(C, {
2008
2023
  key: d,
2009
- ...y == null ? void 0 : y.props
2024
+ ...C == null ? void 0 : C.props
2010
2025
  }) : s("template", {
2011
2026
  key: d
2012
- }, [y]))) ? c : {
2013
- default: () => [c]
2027
+ }, [C]))) ? r : {
2028
+ default: () => [r]
2014
2029
  }) : e.actions;
2015
- }), v = Fe(() => !a.value && i.value ? s("div", {
2030
+ }), c = Re(() => !o.value && f.value ? s("div", {
2016
2031
  class: `${e.prefixCls}-left ${t.value}`
2017
- }, null) : r.value ? s(ne, {
2032
+ }, null) : u.value ? s(se, {
2018
2033
  class: `${e.prefixCls}-left ${t.value}`
2019
2034
  }, {
2020
2035
  default: () => [s("div", {
2021
2036
  class: `${e.prefixCls}-title ${t.value}`
2022
- }, [e.headerTitle, e.titleTip && s(X, {
2037
+ }, [e.headerTitle, e.titleTip && s(Z, {
2023
2038
  title: e.titleTipText
2024
2039
  }, {
2025
- default: () => [Q(e.titleTip) && e.titleTip ? s(hl, null, null) : e.titleTip]
2026
- })]), w.value && s("div", {
2040
+ default: () => [Q(e.titleTip) && e.titleTip ? s(ml, null, null) : e.titleTip]
2041
+ })]), m.value && s("div", {
2027
2042
  class: `${e.prefixCls}-actions ${t.value}`
2028
- }, [w.value])]
2029
- }) : s(ne, {
2043
+ }, [m.value])]
2044
+ }) : s(se, {
2030
2045
  class: `${e.prefixCls}-left ${t.value}`
2031
2046
  }, {
2032
- default: () => [w.value && s("div", {
2047
+ default: () => [m.value && s("div", {
2033
2048
  class: `${e.prefixCls}-actions`
2034
- }, [w.value])]
2035
- }), [() => a.value, () => i.value, () => r.value, () => e.prefixCls, () => e.headerTitle, () => e.titleTipText, () => e.titleTip]), g = Fe(() => {
2036
- let c;
2037
- return i.value ? s(ne, {
2049
+ }, [m.value])]
2050
+ }), [() => o.value, () => f.value, () => u.value, () => e.prefixCls, () => e.headerTitle, () => e.titleTipText, () => e.titleTip]), h = Re(() => {
2051
+ let r;
2052
+ return f.value ? s(se, {
2038
2053
  size: 16,
2039
2054
  class: `${e.prefixCls}-right ${t.value}`,
2040
- align: u.value.lg ? "center" : "end",
2041
- direction: u.value.lg ? "horizontal" : "vertical"
2055
+ align: n.value.lg ? "center" : "end",
2056
+ direction: n.value.lg ? "horizontal" : "vertical"
2042
2057
  }, {
2043
2058
  default: () => {
2044
- var C;
2045
- return [e.optionsExtra, (C = e.settings) != null && C.length ? s(ne, {
2059
+ var S;
2060
+ return [e.optionsExtra, (S = e.settings) != null && S.length ? s(se, {
2046
2061
  size: 12,
2047
2062
  align: "center",
2048
2063
  class: `${e.prefixCls}-setting-items`
2049
- }, et(c = e.settings.map((y, d) => {
2050
- const S = ql(y);
2064
+ }, et(r = e.settings.map((C, d) => {
2065
+ const x = Xl(C);
2051
2066
  return s("div", {
2052
2067
  key: d,
2053
2068
  class: `${e.prefixCls}-setting-item`
2054
- }, [S]);
2055
- })) ? c : {
2056
- default: () => [c]
2069
+ }, [x]);
2070
+ })) ? r : {
2071
+ default: () => [r]
2057
2072
  }) : null];
2058
2073
  }
2059
2074
  }) : null;
2060
- }, [() => u.value, () => i.value, () => e.prefixCls, () => r.value, () => w.value, () => e.settings]), b = Fe(() => {
2061
- if (!i.value && !a.value) return null;
2062
- const c = {
2075
+ }, [() => n.value, () => f.value, () => e.prefixCls, () => u.value, () => m.value, () => e.settings]), g = Re(() => {
2076
+ if (!f.value && !o.value) return null;
2077
+ const r = {
2063
2078
  [`${t.value}`]: !0,
2064
2079
  [`${e.prefixCls}-container`]: !0,
2065
- [`${e.prefixCls}-container-mobile`]: o.value
2080
+ [`${e.prefixCls}-container-mobile`]: i.value
2066
2081
  };
2067
2082
  return s("div", {
2068
- class: c
2069
- }, [v.value, g.value]);
2070
- }, [() => o.value, () => a.value, () => i.value, () => v.value, () => e.prefixCls, () => g.value]);
2071
- return () => n(s("div", {
2083
+ class: r
2084
+ }, [c.value, h.value]);
2085
+ }, [() => i.value, () => o.value, () => f.value, () => c.value, () => e.prefixCls, () => h.value]);
2086
+ return () => a(s("div", {
2072
2087
  class: `${e.prefixCls} ${t.value}`
2073
- }, [b.value]));
2088
+ }, [g.value]));
2074
2089
  }
2075
2090
  });
2076
2091
  ft.inheritAttrs = !1;
2077
- function Ul() {
2092
+ function Jl() {
2078
2093
  return {
2079
2094
  reload: {
2080
2095
  text: "刷新",
2081
- icon: s(vl, null, null)
2096
+ icon: s(gl, null, null)
2082
2097
  },
2083
2098
  density: {
2084
2099
  text: "表格密度",
2085
- icon: s(Wl, null, null)
2100
+ icon: s(Gl, null, null)
2086
2101
  },
2087
2102
  setting: {
2088
2103
  text: "列设置",
@@ -2094,34 +2109,34 @@ function Ul() {
2094
2109
  }
2095
2110
  };
2096
2111
  }
2097
- function Xl(e, n) {
2112
+ function Ql(e, a) {
2098
2113
  return Object.keys(e).filter((t) => t).map((t) => {
2099
- const u = e[t];
2100
- if (!u)
2114
+ const n = e[t];
2115
+ if (!n)
2101
2116
  return null;
2102
- let o = u === !0 ? n[t] : () => u == null ? void 0 : u();
2103
- if (typeof o != "function" && (o = () => {
2117
+ let i = n === !0 ? a[t] : () => n == null ? void 0 : n();
2118
+ if (typeof i != "function" && (i = () => {
2104
2119
  }), t === "setting")
2105
- return s(Hl, _(e[t], {
2120
+ return s(_l, U(e[t], {
2106
2121
  key: t
2107
2122
  }), null);
2108
2123
  if (t === "fullScreen")
2109
2124
  return s("span", {
2110
2125
  key: t,
2111
- onClick: o
2126
+ onClick: i
2112
2127
  }, [s(dt, null, null)]);
2113
- const a = Ul()[t];
2114
- return a ? s("span", {
2128
+ const o = Jl()[t];
2129
+ return o ? s("span", {
2115
2130
  key: t,
2116
- onClick: o
2117
- }, [s(X, {
2118
- title: a.text
2131
+ onClick: i
2132
+ }, [s(Z, {
2133
+ title: o.text
2119
2134
  }, {
2120
- default: () => [a.icon]
2135
+ default: () => [o.icon]
2121
2136
  })]) : null;
2122
2137
  }).filter((t) => t);
2123
2138
  }
2124
- const Jl = {
2139
+ const Zl = {
2125
2140
  options: [Boolean, Object, Array],
2126
2141
  titleTip: [Function, Boolean, Object, String],
2127
2142
  settingExtra: [Function, Boolean, Object, Array],
@@ -2129,46 +2144,46 @@ const Jl = {
2129
2144
  titleTipText: [String],
2130
2145
  toolBarBtn: [Function, Boolean, Object, Array],
2131
2146
  headerTitle: [Function, Boolean, Object, Array, String]
2132
- }, Ql = /* @__PURE__ */ Z({
2133
- props: Jl,
2147
+ }, ea = /* @__PURE__ */ te({
2148
+ props: Zl,
2134
2149
  inheritAttrs: !1,
2135
2150
  setup(e) {
2136
- const n = Ve({
2151
+ const a = Ye({
2137
2152
  suffixCls: "table-list-toolbar",
2138
2153
  isPor: !0
2139
2154
  }), {
2140
2155
  action: t
2141
- } = oe(), u = Fe(() => {
2142
- var i;
2143
- const o = {
2156
+ } = ce(), n = Re(() => {
2157
+ var f;
2158
+ const i = {
2144
2159
  reload: () => t == null ? void 0 : t.reload(),
2145
2160
  density: !0,
2146
2161
  setting: !0,
2147
2162
  fullScreen: () => t == null ? void 0 : t.toggle()
2148
2163
  };
2149
- if (e.options === !1 || ((i = Object.keys(e.options)) == null ? void 0 : i.length) === 0) return [];
2150
- const a = {
2151
- ...o,
2164
+ if (e.options === !1 || ((f = Object.keys(e.options)) == null ? void 0 : f.length) === 0) return [];
2165
+ const o = {
2166
+ ...i,
2152
2167
  ...e.options
2153
2168
  };
2154
- return a.setting !== !1 && e.settingExtra && (a.setting = {}, a.setting.extra = e.settingExtra), Xl(a, {
2155
- ...o
2169
+ return o.setting !== !1 && e.settingExtra && (o.setting = {}, o.setting.extra = e.settingExtra), Ql(o, {
2170
+ ...i
2156
2171
  });
2157
2172
  }, [() => t, () => e.options]);
2158
2173
  return () => {
2159
- const o = e.toolBarBtn || [];
2174
+ const i = e.toolBarBtn || [];
2160
2175
  return s(ft, {
2161
- prefixCls: n,
2176
+ prefixCls: a,
2162
2177
  optionsExtra: e.optionsExtra,
2163
2178
  headerTitle: e.headerTitle,
2164
- actions: o,
2165
- settings: f(u),
2179
+ actions: i,
2180
+ settings: y(n),
2166
2181
  titleTip: e.titleTip,
2167
2182
  titleTipText: e.titleTipText
2168
2183
  }, null);
2169
2184
  };
2170
2185
  }
2171
- }), je = {
2186
+ }), Ne = {
2172
2187
  "&::-webkit-scrollbar": {
2173
2188
  width: 4,
2174
2189
  height: 4
@@ -2181,7 +2196,7 @@ const Jl = {
2181
2196
  backgroundColor: "transparent",
2182
2197
  borderRadius: 2
2183
2198
  }
2184
- }, Zl = (e) => ({
2199
+ }, ta = (e) => ({
2185
2200
  [e.componentCls]: {
2186
2201
  "&-a": {
2187
2202
  cursor: "pointer",
@@ -2357,210 +2372,210 @@ const Jl = {
2357
2372
  color: e.colorWhite
2358
2373
  }
2359
2374
  },
2360
- [`${e.antCls}-table-content`]: je,
2361
- [`${e.antCls}-table-body`]: je,
2375
+ [`${e.antCls}-table-content`]: Ne,
2376
+ [`${e.antCls}-table-body`]: Ne,
2362
2377
  [`${e.antCls}-table-empty`]: {
2363
- [`${e.antCls}-table-content`]: je
2378
+ [`${e.antCls}-table-content`]: Ne
2364
2379
  }
2365
2380
  }
2366
- }), ea = st.PRESENTED_IMAGE_SIMPLE, {
2367
- useBreakpoint: ta
2368
- } = He, la = {
2381
+ }), la = st.PRESENTED_IMAGE_SIMPLE, {
2382
+ useBreakpoint: aa
2383
+ } = Le, na = {
2369
2384
  reload: !0,
2370
2385
  density: !0,
2371
2386
  setting: !0,
2372
2387
  fullScreen: !0
2373
- }, ze = /* @__PURE__ */ Z({
2388
+ }, Ee = /* @__PURE__ */ te({
2374
2389
  name: "GProTable",
2375
2390
  inheritAttrs: !1,
2376
- props: se,
2391
+ props: de,
2377
2392
  emits: ["reset", "reload", "submit", "sizeChange", "expandedRowsChange", "expand", "change", "requestError", "beforeSearchSubmit", "columnsStateChange", "loadingChange"],
2378
2393
  slots: Object,
2379
2394
  setup(e, {
2380
- emit: n,
2395
+ emit: a,
2381
2396
  slots: t,
2382
- attrs: u,
2383
- expose: o
2397
+ attrs: n,
2398
+ expose: i
2384
2399
  }) {
2385
- const a = Ve({
2400
+ const o = Ye({
2386
2401
  suffixCls: "table",
2387
2402
  isPor: !0
2388
2403
  }), {
2389
- wrapSSR: i,
2390
- hashId: r
2391
- } = Be("ProBaseTable", [Zl], a), w = ta(), {
2392
- width: v
2393
- } = Wt(), {
2394
- emptyText: g,
2395
- indicator: b
2396
- } = ll(), c = D(), C = D(), y = D(e.waitRequest);
2397
- fe(() => y.value = e.waitRequest);
2404
+ wrapSSR: f,
2405
+ hashId: u
2406
+ } = Be("ProBaseTable", [ta], o), m = aa(), {
2407
+ width: c
2408
+ } = Gt(), {
2409
+ emptyText: h,
2410
+ indicator: g
2411
+ } = nl(), r = D(), S = D(), C = D(e.waitRequest);
2412
+ he(() => C.value = e.waitRequest);
2398
2413
  const {
2399
2414
  toggle: d,
2400
- isFullscreen: S
2401
- } = ot(c), R = x(() => ({
2415
+ isFullscreen: x
2416
+ } = ot(r), F = T(() => ({
2402
2417
  ...e
2403
- })), $ = x(() => !w.value.xl), I = x(() => {
2404
- var m, T;
2405
- return e.virtualScroll && ml(!((m = e.scroll) != null && m.y), "参数scroll的Y值不能为空!"), !!((T = e.scroll) != null && T.y && e.virtualScroll);
2406
- }), O = x(() => {
2407
- const m = (e.columns || []).filter((T) => T.key || T.dataIndex).map((T) => ({
2408
- ...T,
2409
- key: T.key || T.dataIndex,
2410
- align: T.align || e.align,
2411
- uuid: Ae().uuid(15)
2418
+ })), $ = T(() => !m.value.xl), I = T(() => {
2419
+ var p, w;
2420
+ return e.virtualScroll && yl(!((p = e.scroll) != null && p.y), "参数scroll的Y值不能为空!"), !!((w = e.scroll) != null && w.y && e.virtualScroll);
2421
+ }), k = T(() => {
2422
+ const p = (e.columns || []).filter((w) => w.key || w.dataIndex).map((w) => ({
2423
+ ...w,
2424
+ key: w.key || w.dataIndex,
2425
+ align: w.align || e.align,
2426
+ uuid: ze().uuid(15)
2412
2427
  }));
2413
- return Lt(m, {
2428
+ return Ht(p, {
2414
2429
  align: e.align || "left",
2415
2430
  showIndex: e.showIndex || !1
2416
2431
  });
2417
2432
  }), {
2418
2433
  loadingStatus: A,
2419
- setLoading: k
2420
- } = Cl({
2421
- emit: n,
2422
- loading: U(e, "loading")
2434
+ setLoading: E
2435
+ } = xl({
2436
+ emit: a,
2437
+ loading: J(e, "loading")
2423
2438
  }), {
2424
2439
  sizeRef: Y,
2425
- setTableSize: ee
2426
- } = Sl({
2427
- emit: n,
2428
- size: U(e, "size")
2440
+ setTableSize: le
2441
+ } = wl({
2442
+ emit: a,
2443
+ size: J(e, "size")
2429
2444
  }), {
2430
- getPaginationInfo: P,
2445
+ getPaginationInfo: O,
2431
2446
  setPagination: V
2432
- } = xl({
2447
+ } = Tl({
2433
2448
  slots: t,
2434
- props: R,
2435
- pagination: U(e, "pagination")
2436
- }), l = Ol(e), {
2437
- getScrollRef: p,
2449
+ props: F,
2450
+ pagination: J(e, "pagination")
2451
+ }), l = Ml(e), {
2452
+ getScrollRef: b,
2438
2453
  breakpoint: B
2439
- } = Ml({
2454
+ } = Nl({
2440
2455
  ...l,
2441
- innerWidth: v,
2442
- columns: O,
2443
- screens: w
2444
- }), F = Pl(e), {
2456
+ innerWidth: c,
2457
+ columns: k,
2458
+ screens: m
2459
+ }), R = Dl(e), {
2445
2460
  getProColumns: M,
2446
- cacheProColumns: h,
2461
+ cacheProColumns: v,
2447
2462
  setColumns: N,
2448
2463
  changeColumns: K,
2449
- resizeColumnWidth: z
2450
- } = Dl({
2451
- ...F,
2464
+ resizeColumnWidth: j
2465
+ } = kl({
2466
+ ...R,
2452
2467
  breakpoint: B,
2453
- scroll: p,
2454
- columns: O
2468
+ scroll: b,
2469
+ columns: k
2455
2470
  }), {
2456
- columnsMap: he,
2471
+ columnsMap: ve,
2457
2472
  operationType: Pe,
2458
- setColumnsMap: Se,
2459
- sortKeyColumns: xe,
2460
- cacheColumnsMap: we,
2461
- setSortKeyColumns: te
2462
- } = Bl({
2463
- columns: h,
2464
- columnsState: U(e, "columnsState"),
2473
+ setColumnsMap: we,
2474
+ sortKeyColumns: ae,
2475
+ cacheColumnsMap: Ve,
2476
+ setSortKeyColumns: me
2477
+ } = Ol({
2478
+ columns: v,
2479
+ columnsState: J(e, "columnsState"),
2465
2480
  changeColumns: K
2466
2481
  }), {
2467
- formDataRef: De,
2468
- formParamsRef: ce,
2469
- defaultParamsRef: L,
2470
- setFormParams: le
2471
- } = Il({
2472
- search: U(e, "search"),
2473
- searchMap: U(e, "searchMap"),
2474
- params: U(e, "params"),
2475
- columns: O,
2482
+ formDataRef: L,
2483
+ formParamsRef: X,
2484
+ defaultParamsRef: z,
2485
+ setFormParams: ne
2486
+ } = Pl({
2487
+ search: J(e, "search"),
2488
+ searchMap: J(e, "searchMap"),
2489
+ params: J(e, "params"),
2490
+ columns: k,
2476
2491
  setPagination: V
2477
2492
  }), {
2478
- selectedKey: j,
2479
- selectedItem: ie,
2480
- changeRowKey: W,
2481
- selectRowKey: ht,
2482
- selectAllRowKey: vt,
2483
- syncSelectedRows: mt,
2484
- removeRowKeys: gt
2485
- } = wl(U(e, "rowKey"), U(e, "rowSelection")), yt = $l(e), {
2493
+ selectedKey: H,
2494
+ selectedItem: ht,
2495
+ changeRowKey: vt,
2496
+ selectRowKey: mt,
2497
+ selectAllRowKey: gt,
2498
+ syncSelectedRows: yt,
2499
+ removeRowKeys: Ct
2500
+ } = $l(J(e, "rowKey"), J(e, "rowSelection")), bt = Rl(e), {
2486
2501
  reload: Oe,
2487
- reSetDataList: bt,
2488
- changeDataValue: pt,
2489
- isTreeDataRef: We,
2490
- getDataSourceRef: ve,
2491
- handleTableChange: _e
2492
- } = Rl({
2493
- ...yt,
2494
- waitRequest: y
2502
+ reSetDataList: pt,
2503
+ changeDataValue: St,
2504
+ isTreeDataRef: He,
2505
+ getDataSourceRef: ge,
2506
+ handleTableChange: We
2507
+ } = Il({
2508
+ ...bt,
2509
+ waitRequest: C
2495
2510
  }, {
2496
2511
  loadingStatus: A,
2497
- getPaginationInfo: P,
2512
+ getPaginationInfo: O,
2498
2513
  setPagination: V,
2499
- removeRowKeys: gt,
2500
- syncSelectedRows: mt,
2501
- setLoading: k,
2514
+ removeRowKeys: Ct,
2515
+ syncSelectedRows: yt,
2516
+ setLoading: E,
2502
2517
  setColumns: N,
2503
2518
  columns: M,
2504
- formParamsRef: ce,
2519
+ formParamsRef: X,
2505
2520
  onBeforeSearchSubmit: e.onBeforeSearchSubmit,
2506
- hasCustomRender: x(() => Ne(e.customRender || (t == null ? void 0 : t.customRender)))
2507
- }, n), Ct = x(() => e.options ? {
2508
- ...la,
2509
- ...G(ue(e.options) ? e.options : {})
2510
- } : !1), Ge = x(() => {
2511
- const m = ue(e.loading) ? $e(e.loading, "spinning") : {};
2512
- return !m.indicator && (b != null && b.value) && (m.indicator = b == null ? void 0 : b.value), $e({
2513
- ...($e(u), ["class", "style", "id"]),
2521
+ hasCustomRender: T(() => fe(e.customRender || (t == null ? void 0 : t.customRender)))
2522
+ }, a), ye = T(() => e.options ? {
2523
+ ...na,
2524
+ ...q(ee(e.options) ? e.options : {})
2525
+ } : !1), _e = T(() => {
2526
+ const p = ee(e.loading) ? $e(e.loading, "spinning") : {};
2527
+ return !p.indicator && (g != null && g.value) && (p.indicator = g == null ? void 0 : g.value), $e({
2528
+ ...($e(n), ["class", "style", "id"]),
2514
2529
  ...e,
2515
2530
  virtualScroll: I.value,
2516
- size: f(Y),
2517
- scroll: f(p),
2531
+ size: y(Y),
2532
+ scroll: y(b),
2518
2533
  loading: {
2519
- spinning: e.showLoading ? !!f(A) : !1,
2520
- ...m
2534
+ spinning: e.showLoading ? fe(A.value) : !1,
2535
+ ...p
2521
2536
  },
2522
- columns: Me(f(M).filter((T) => T.show || T.show === void 0)),
2523
- pagination: Me(f(P)),
2524
- dataSource: f(ve)
2537
+ columns: De(y(M).filter((w) => w.show || w.show === void 0)),
2538
+ pagination: De(y(O)),
2539
+ dataSource: y(ge)
2525
2540
  }, ["class", "onChange", "onExpand", "onExpandedRowsChange"]);
2526
- }), qe = x(() => {
2527
- var J;
2528
- let m;
2529
- const T = f(R).direction === "rtl" ? "bottomLeft" : "right", E = (J = f(P)) == null ? void 0 : J.position;
2530
- if (E !== null && Array.isArray(E)) {
2531
- const me = E.find((ae) => ae.includes("top")), de = E.find((ae) => ae.includes("bottom")), Te = E.every((ae) => `${ae}` == "none");
2532
- !me && !de && !Te && (m = T), me && (m = me.toLowerCase().replace("top", "")), de && (m = de.toLowerCase().replace("bottom", ""));
2541
+ }), Ge = T(() => {
2542
+ var G;
2543
+ let p;
2544
+ const w = y(F).direction === "rtl" ? "bottomLeft" : "right", P = (G = y(O)) == null ? void 0 : G.position;
2545
+ if (P !== null && Array.isArray(P)) {
2546
+ const ue = P.find((ie) => ie.includes("top")), oe = P.find((ie) => ie.includes("bottom")), Te = P.every((ie) => `${ie}` == "none");
2547
+ !ue && !oe && !Te && (p = w), ue && (p = ue.toLowerCase().replace("top", "")), oe && (p = oe.toLowerCase().replace("bottom", ""));
2533
2548
  } else
2534
- m = T;
2535
- return m;
2536
- }), Ue = async (m) => {
2537
- var T;
2538
- ue(e.search) && ((T = e.search) != null && T.showSearch) ? (le({
2539
- ...m,
2549
+ p = w;
2550
+ return p;
2551
+ }), Ue = async (p) => {
2552
+ var w;
2553
+ ee(e.search) && ((w = e.search) != null && w.showSearch) ? (ne({
2554
+ ...p,
2540
2555
  ...e.params || {}
2541
- }), await Oe()) : le(m);
2542
- }, St = async (m, T) => {
2543
- T ? (n("reset", m), e.request && await Ue(m)) : e.request ? (n("submit", m), await Ue(m)) : n("submit", m);
2544
- }, Xe = (m, T, E, J) => {
2545
- V(tt(m, ["current", "pageSize"])), _e(m, T, E, J);
2546
- }, xt = (m, T) => {
2547
- var E;
2556
+ }), await Oe()) : ne(p);
2557
+ }, xt = async (p, w) => {
2558
+ w ? (a("reset", p), e.request && await Ue(p)) : e.request ? (a("submit", p), await Ue(p)) : a("submit", p);
2559
+ }, qe = (p, w, P, G) => {
2560
+ V(tt(p, ["current", "pageSize"])), We(p, w, P, G);
2561
+ }, wt = (p, w) => {
2562
+ var P;
2548
2563
  V({
2549
- current: m,
2550
- pageSize: T
2551
- }), _e({
2552
- current: m,
2553
- pageSize: T,
2554
- total: P.value && ((E = P.value) == null ? void 0 : E.total) || 0
2564
+ current: p,
2565
+ pageSize: w
2566
+ }), We({
2567
+ current: p,
2568
+ pageSize: w,
2569
+ total: O.value && ((P = O.value) == null ? void 0 : P.total) || 0
2555
2570
  }, {}, {});
2556
- }, wt = (m) => {
2557
- n("expandedRowsChange", m);
2558
- }, Tt = (m, T) => {
2559
- n("expand", m, T);
2560
- }, $t = (m, T) => z(m, T), Rt = (m, T, E) => {
2561
- const J = E.align === "center" ? "top" : E.align === "left" || !E.align ? "topLeft" : "topRight";
2562
- return T && E.copyable ? s(tl.Paragraph, {
2563
- class: `${a}-copyable`,
2571
+ }, Tt = (p) => {
2572
+ a("expandedRowsChange", p);
2573
+ }, $t = (p, w) => {
2574
+ a("expand", p, w);
2575
+ }, Ft = (p, w) => j(p, w), Rt = (p, w, P) => {
2576
+ const G = P.align === "center" ? "top" : P.align === "left" || !P.align ? "topLeft" : "topRight";
2577
+ return w && P.copyable ? s(al.Paragraph, {
2578
+ class: `${o}-copyable`,
2564
2579
  style: {
2565
2580
  margin: "0",
2566
2581
  width: "100%",
@@ -2568,178 +2583,186 @@ const Jl = {
2568
2583
  },
2569
2584
  copyable: !0
2570
2585
  }, {
2571
- default: () => [s(X, {
2572
- title: m,
2573
- placement: J
2586
+ default: () => [s(Z, {
2587
+ title: p,
2588
+ placement: G
2574
2589
  }, {
2575
2590
  default: () => [s("div", {
2576
- class: `${a}-ellipsis`
2577
- }, [m])]
2591
+ class: `${o}-ellipsis`
2592
+ }, [p])]
2578
2593
  })]
2579
- }) : T && !E.copyable ? s(X, {
2580
- title: m,
2581
- placement: J
2594
+ }) : w && !P.copyable ? s(Z, {
2595
+ title: p,
2596
+ placement: G
2582
2597
  }, {
2583
- default: () => [We.value ? m : s("div", {
2584
- class: `${a}-ellipsis`
2585
- }, [m])]
2586
- }) : m;
2587
- }, Ft = () => {
2588
- var T;
2589
- const m = lt(t, e, "customRender");
2590
- if (m) {
2591
- if (!((T = ve.value) != null && T.length)) return (g == null ? void 0 : g.value) || s(st, {
2592
- image: ea
2598
+ default: () => [He.value ? p : s("div", {
2599
+ class: `${o}-ellipsis`
2600
+ }, [p])]
2601
+ }) : p;
2602
+ }, It = () => {
2603
+ var w;
2604
+ const p = lt(t, e, "customRender");
2605
+ if (p) {
2606
+ if (!((w = ge.value) != null && w.length)) return (h == null ? void 0 : h.value) || s(st, {
2607
+ image: la
2593
2608
  }, null);
2594
- const E = G(f(ve));
2595
- return m == null ? void 0 : m(E, pl(E, P.value));
2609
+ const P = q(y(ge));
2610
+ return p == null ? void 0 : p(Sl(P, O.value), P);
2596
2611
  }
2597
2612
  return s(Ie, null, null);
2598
- }, It = () => {
2599
- const m = ge(t, e, "headerTitle"), T = ge(t, e, "titleTip"), E = ge(t, e, "toolBarBtn");
2600
- return s(Ql, {
2601
- headerTitle: m,
2602
- titleTip: T,
2613
+ }, Bt = (p) => {
2614
+ var ue, oe;
2615
+ const w = Ce(t, e, "headerTitle"), P = Ce(t, e, "titleTip"), G = Ce(t, e, "toolBarBtn");
2616
+ return s(ea, {
2617
+ headerTitle: w,
2618
+ titleTip: P,
2603
2619
  titleTipText: e.titleTipText,
2604
- options: f(Ct),
2605
- settingExtra: ge(t, e, "settingExtra"),
2606
- optionsExtra: ge(t, e, "optionsExtra"),
2607
- toolBarBtn: E
2620
+ options: Q(ye.value) ? ye.value : {
2621
+ ...ye.value,
2622
+ setting: p ? !1 : (ue = ye.value) == null ? void 0 : ue.setting,
2623
+ density: p ? !1 : (oe = ye.value) == null ? void 0 : oe.density
2624
+ },
2625
+ settingExtra: Ce(t, e, "settingExtra"),
2626
+ optionsExtra: Ce(t, e, "optionsExtra"),
2627
+ toolBarBtn: G
2608
2628
  }, null);
2609
2629
  };
2610
- return Nl({
2630
+ return El({
2611
2631
  tableSize: Y,
2612
2632
  columns: M,
2613
- cacheColumns: O,
2633
+ cacheColumns: k,
2614
2634
  isMobile: $,
2615
2635
  action: {
2616
- setTableSize: ee,
2617
- reload: (m) => Oe(m),
2636
+ setTableSize: le,
2637
+ reload: (p) => Oe(p),
2618
2638
  toggle: d
2619
2639
  },
2620
2640
  settingsAction: {
2621
- autoScroll: U(e, "autoScroll"),
2622
- columnsMap: he,
2641
+ autoScroll: J(e, "autoScroll"),
2642
+ columnsMap: ve,
2623
2643
  operationType: Pe,
2624
- setColumnsMap: Se,
2625
- sortKeyColumns: xe,
2626
- cacheColumnsMap: we,
2627
- setSortKeyColumns: te
2644
+ setColumnsMap: we,
2645
+ sortKeyColumns: ae,
2646
+ cacheColumnsMap: Ve,
2647
+ setSortKeyColumns: me
2628
2648
  },
2629
2649
  setPagination: V,
2630
2650
  changeColumns: K,
2631
2651
  slots: t
2632
- }), o({
2652
+ }), i({
2633
2653
  loading: A,
2634
2654
  formRef: () => ({
2635
2655
  getFormState: () => {
2636
- var m;
2637
- return ((m = C.value) == null ? void 0 : m.getFormState()) || {};
2656
+ var p;
2657
+ return ((p = S.value) == null ? void 0 : p.getFormState()) || {};
2638
2658
  },
2639
- getTableFormState: () => f(ce),
2640
- restForm: (m) => {
2641
- var T;
2642
- y.value = !0, m && (m == null || m()), (T = C.value) == null || T.resetForm(!1), y.value = !1;
2659
+ getTableFormState: () => y(X),
2660
+ restForm: (p) => {
2661
+ var w;
2662
+ C.value = !0, p && (p == null || p()), (w = S.value) == null || w.resetForm(!1), C.value = !1;
2643
2663
  }
2644
2664
  }),
2645
2665
  actionRef: () => ({
2646
- dataSource: ve.value,
2647
- pageParams: P.value,
2648
- selectedKey: j.value,
2649
- selectedItem: ie.value,
2666
+ dataSource: ge.value,
2667
+ pageParams: O.value,
2668
+ selectedKey: H.value,
2669
+ selectedItem: ht.value,
2650
2670
  reload: Oe,
2651
- getLoadingStatus: () => f(A),
2652
- reloadAndRest: async (m) => {
2653
- y.value = !0, V({
2671
+ getLoadingStatus: () => y(A),
2672
+ reloadAndRest: async (p) => {
2673
+ C.value = !0, V({
2654
2674
  current: 1,
2655
2675
  pageSize: 10
2656
- }), m && (m == null || m()), y.value = !1;
2676
+ }), p && (p == null || p()), C.value = !1;
2657
2677
  },
2658
- reSetDataList: bt,
2659
- setPageAndReload: Xe,
2678
+ reSetDataList: pt,
2679
+ setPageAndReload: qe,
2660
2680
  setPagination: V,
2661
- changeDataValue: pt,
2662
- loadingOperation: k
2681
+ changeDataValue: St,
2682
+ loadingOperation: E
2663
2683
  })
2664
- }), () => i(s("div", {
2665
- ref: c,
2666
- class: Vt([{
2667
- [`${r.value}`]: !0,
2668
- [`${a}`]: !0,
2669
- [`${u.class}`]: u.class,
2670
- [`${a}-no-scroll`]: !Object.keys(f(p) || {}).length,
2671
- [`${a}-table-tree`]: We.value,
2672
- [`${a}-full-screen`]: S.value
2673
- }]),
2674
- style: u.style
2675
- }, [s("div", {
2676
- class: [`${a}-content`, r.value]
2677
- }, [(De.value.length > 0 || Ne(t.search)) && s(ct, {
2678
- ref: C,
2679
- search: e.search,
2680
- modal: e.modalScroll,
2681
- searchMap: De.value,
2682
- prefixCls: a,
2683
- loading: !!f(A),
2684
- onSearch: St,
2685
- defaultParams: L
2686
- }, {
2687
- default: t.search ? () => {
2688
- var m;
2689
- return (m = t.search) == null ? void 0 : m.call(t);
2690
- } : null
2691
- }), !I.value && It(), Ne(e.customRender || t.customRender) ? s(Ye, f(Ge).loading, {
2692
- default: () => {
2693
- var m;
2694
- return [s("div", {
2695
- class: `${a}-wrapper ${r.value}`
2696
- }, [Ft(), e.pagination !== !1 && ((m = ve.value) == null ? void 0 : m.length) > 0 && s(Zt, _({
2697
- class: {
2698
- [`${a}-pagination ${r.value}`]: !0,
2699
- [`${a}-pagination-${qe.value} ${r.value}`]: !!qe.value
2700
- }
2701
- }, Me(f(P)), {
2702
- onChange: xt
2703
- }), null)])];
2704
- }
2705
- }) : s(el, _(Ge.value, {
2706
- style: e.tableStyle || void 0,
2707
- class: e.tableClassName,
2708
- rowKey: (m) => m[e.rowKey || "sortIndex"],
2709
- transformCellText: ({
2710
- text: m,
2711
- column: T
2712
- }) => {
2713
- var Te, ae;
2714
- const E = Ke(m) ? m == null ? void 0 : m[0] : m;
2715
- if (Ce(E)) return m;
2716
- const {
2717
- value: J,
2718
- success: me
2719
- } = Ht(E, (T == null ? void 0 : T.columnEmptyText) || (e == null ? void 0 : e.columnEmptyText) || ""), de = bl(J, ((ae = (Te = e.columns) == null ? void 0 : Te.find((Bt) => Bt.key === T.key)) == null ? void 0 : ae.valueType) || T.valueType, a, r.value);
2720
- return T != null && T.ellipsis ? Rt(de, me, T) : de;
2721
- },
2722
- rowSelection: e.rowSelection ? {
2723
- ...$e(e.rowSelection, ["onSelect", "onSelectAll", "onChange", "selectedRowKeys"]),
2724
- selectedRowKeys: j.value,
2725
- onSelect: ht,
2726
- onSelectAll: vt,
2727
- onChange: W
2728
- } : void 0,
2729
- onChange: Xe,
2730
- onExpandedRowsChange: wt,
2731
- onExpand: Tt,
2732
- onResizeColumn: $t
2733
- }), {
2734
- ...t,
2735
- emptyText: g != null && g.value ? () => g == null ? void 0 : g.value : null
2736
- })])]));
2684
+ }), () => {
2685
+ const p = fe(e.customRender || t.customRender);
2686
+ return f(s("div", {
2687
+ ref: r,
2688
+ class: Wt([{
2689
+ [`${u.value}`]: !0,
2690
+ [`${o}`]: !0,
2691
+ [`${n.class}`]: n.class,
2692
+ [`${o}-no-scroll`]: !Object.keys(y(b) || {}).length,
2693
+ [`${o}-table-tree`]: He.value,
2694
+ [`${o}-full-screen`]: x.value
2695
+ }]),
2696
+ style: n.style
2697
+ }, [s("div", {
2698
+ class: [`${o}-content`, u.value]
2699
+ }, [(L.value.length > 0 || fe(t.search)) && s(ct, {
2700
+ ref: S,
2701
+ search: e.search,
2702
+ modal: e.modalScroll,
2703
+ searchMap: L.value,
2704
+ prefixCls: o,
2705
+ loading: !!y(A),
2706
+ onSearch: xt,
2707
+ defaultParams: z
2708
+ }, {
2709
+ default: t.search ? () => {
2710
+ var w;
2711
+ return (w = t.search) == null ? void 0 : w.call(t);
2712
+ } : null
2713
+ }), !I.value && Bt(p), p ? s(Ke, y(_e).loading, {
2714
+ default: () => {
2715
+ var w;
2716
+ return [s("div", {
2717
+ class: `${o}-wrapper ${u.value}`
2718
+ }, [It(), e.pagination !== !1 && ((w = ge.value) == null ? void 0 : w.length) > 0 && s(tl, U({
2719
+ class: {
2720
+ [`${o}-pagination ${u.value}`]: !0,
2721
+ [`${o}-pagination-${Ge.value} ${u.value}`]: !!Ge.value
2722
+ }
2723
+ }, De(y(O)), {
2724
+ onChange: wt
2725
+ }), null)])];
2726
+ }
2727
+ }) : s(ll, U(_e.value, {
2728
+ style: e.tableStyle || void 0,
2729
+ class: e.tableClassName,
2730
+ rowKey: (w) => w[e.rowKey || "sortIndex"],
2731
+ transformCellText: ({
2732
+ text: w,
2733
+ column: P
2734
+ }) => {
2735
+ var ie, Xe;
2736
+ const G = je(w) ? w == null ? void 0 : w[0] : w;
2737
+ if (xe(G)) return w;
2738
+ const {
2739
+ value: ue,
2740
+ success: oe
2741
+ } = _t(G, (P == null ? void 0 : P.columnEmptyText) || (e == null ? void 0 : e.columnEmptyText) || ""), Te = pl(ue, ((Xe = (ie = e.columns) == null ? void 0 : ie.find((Pt) => Pt.key === P.key)) == null ? void 0 : Xe.valueType) || P.valueType, o, u.value);
2742
+ return P != null && P.ellipsis ? Rt(Te, oe, P) : Te;
2743
+ },
2744
+ rowSelection: e.rowSelection ? {
2745
+ ...$e(e.rowSelection, ["onSelect", "onSelectAll", "onChange", "selectedRowKeys"]),
2746
+ selectedRowKeys: H.value,
2747
+ onSelect: mt,
2748
+ onSelectAll: gt,
2749
+ onChange: vt
2750
+ } : void 0,
2751
+ onChange: qe,
2752
+ onExpandedRowsChange: Tt,
2753
+ onExpand: $t,
2754
+ onResizeColumn: Ft
2755
+ }), {
2756
+ ...t,
2757
+ emptyText: h != null && h.value ? () => h == null ? void 0 : h.value : null
2758
+ })])]));
2759
+ };
2737
2760
  }
2738
2761
  });
2739
- ze.install = (e) => (e.component(ze.name, ze), e);
2762
+ Ee.install = (e) => (e.component(Ee.name, Ee), e);
2740
2763
  export {
2741
- ze as GProTable,
2742
- ze as default,
2743
- se as proTableProps,
2744
- ha as useTable
2764
+ Ee as GProTable,
2765
+ Ee as default,
2766
+ de as proTableProps,
2767
+ ma as useTable
2745
2768
  };