@gx-design-vue/pro-table 0.2.0-beta.68 → 0.2.0-beta.69

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