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