@gx-design-vue/pro-table 0.2.0-beta.144 → 0.2.0-beta.146

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,31 +1,31 @@
1
1
  /*!
2
2
  * Gx Design Pro
3
- * Version: 0.2.0-beta.143
3
+ * Version: 0.2.0-beta.145
4
4
  * Author: gx12358
5
5
  * Copyright (C) 2024 gx12358
6
6
  * License: MIT License
7
7
  * Description: Gx Design Pro Table
8
- * Date Created: 2025-12-25
8
+ * Date Created: 2025-12-26
9
9
  * Homepage:
10
10
  * Contact: gx12358@gmail.com
11
11
  */
12
- import { defineComponent as ge, ref as w, watch as q, cloneVNode as lt, reactive as at, toRaw as ce, computed as T, createVNode as d, Fragment as we, isVNode as ae, mergeProps as Q, h as pt, onBeforeUnmount as Qt, onMounted as nt, nextTick as ot, watchEffect as yt, unref as R, onActivated as Ct, getCurrentInstance as Ut, onUnmounted as St, onDeactivated as xt, onUpdated as Jt, toRef as V, Teleport as Zt, isRef as Ge } from "vue";
13
- import { UpOutlined as el, DownOutlined as tl, InfoCircleOutlined as ll, FullscreenExitOutlined as al, FullscreenOutlined as nl, ReloadOutlined as ol, CopyOutlined as il } from "@ant-design/icons-vue";
14
- import { useProAppContext as Tt } from "@gx-design-vue/pro-app";
15
- import { useBreakpoint as it, useMemo as Ne, tryOnUnmounted as rl, onMountedOrActivated as sl } from "@gx-design-vue/pro-hooks";
16
- import { useProStyle as rt, unit as pe, useProConfigContext as ul } from "@gx-design-vue/pro-provider";
17
- import { isArray as J, cloneDeep as ee, isObject as ne, isBoolean as De, classNames as D, isNumber as Ce, filterEmpty as wt, getPrefixCls as $t, keysOf as Rt, isDeepEqualReact as qe, compareArray as cl, runFunction as dl, getSortIndex as fl, isFunction as Me, handleCurrentPage as vl, getRandomNumber as Pt, deepMerge as ye, forInObject as ml, arrayRepeat as hl, isString as Ft, handleShowIndex as gl, getSlot as vt, convertValueBoolean as Qe, getSlotsProps as bl, handleEmptyField as pl, getTextWidth as yl, getSlotVNode as Cl, useDeepMerge as Sl } from "@gx-design-vue/pro-utils";
18
- import { useDebounceFn as xl, useEventListener as mt, isClient as Tl, useElementBounding as wl, useFullscreen as It, useElementSize as He, useScroll as $l, useResizeObserver as Rl, useWindowSize as Pl } from "@vueuse/core";
19
- import { DatePicker as At, Input as We, TimePicker as Fl, TreeSelect as Il, Select as Al, InputNumber as Ue, Button as ht, Spin as Bt, Tooltip as $e, Empty as Nt, theme as Bl, Pagination as Nl, Table as zl, message as Dl } from "ant-design-vue";
20
- import { omit as ze, cloneDeep as zt, pick as Ol } from "lodash-es";
21
- import { tableProps as El } from "ant-design-vue/es/table/Table";
12
+ import { defineComponent as ge, ref as T, watch as Y, cloneVNode as lt, reactive as at, toRaw as ce, computed as x, createVNode as d, Fragment as we, isVNode as ae, mergeProps as Q, h as bt, onBeforeUnmount as Gt, onMounted as nt, nextTick as ot, watchEffect as pt, unref as P, onActivated as yt, getCurrentInstance as Qt, onUnmounted as Ct, onDeactivated as St, onUpdated as Ut, toRef as V, Teleport as Jt, isRef as Ge } from "vue";
13
+ import { UpOutlined as Zt, DownOutlined as el, InfoCircleOutlined as tl, FullscreenExitOutlined as ll, FullscreenOutlined as al, ReloadOutlined as nl, CopyOutlined as ol } from "@ant-design/icons-vue";
14
+ import { useProAppContext as xt } from "@gx-design-vue/pro-app";
15
+ import { useBreakpoint as it, useMemo as Ne, tryOnUnmounted as il, onMountedOrActivated as sl } from "@gx-design-vue/pro-hooks";
16
+ import { useProStyle as Tt, unit as pe, useProConfigContext as rl } from "@gx-design-vue/pro-provider";
17
+ import { isArray as J, cloneDeep as ee, isObject as ne, isBoolean as Oe, classNames as O, isNumber as Ce, filterEmpty as wt, getPrefixCls as $t, keysOf as Rt, isFunction as ze, isDeepEqualReact as qe, compareArray as ul, runFunction as cl, getSortIndex as dl, handleCurrentPage as fl, getRandomNumber as Pt, deepMerge as ye, forInObject as vl, arrayRepeat as ml, isString as Ft, handleShowIndex as hl, getSlot as ft, convertValueBoolean as Qe, getSlotsProps as gl, handleEmptyField as bl, getTextWidth as pl, getSlotVNode as yl, useDeepMerge as Cl } from "@gx-design-vue/pro-utils";
18
+ import { useDebounceFn as Sl, useEventListener as vt, isClient as xl, useElementBounding as Tl, useFullscreen as It, useElementSize as We, useScroll as wl, useResizeObserver as $l, useWindowSize as Rl } from "@vueuse/core";
19
+ import { DatePicker as Bt, Input as Ye, TimePicker as Pl, TreeSelect as Fl, Select as Il, InputNumber as Ue, Button as mt, Spin as At, Tooltip as $e, Empty as Nt, theme as Bl, Pagination as Al, Table as Nl, message as zl } from "ant-design-vue";
20
+ import { omit as De, cloneDeep as zt, pick as Dl } from "lodash-es";
21
+ import { tableProps as Ol } from "ant-design-vue/es/table/Table";
22
22
  import "ant-design-vue/es/_util/props-util";
23
- import { warning as Ll } from "ant-design-vue/es/vc-util/warning";
23
+ import { warning as El } from "ant-design-vue/es/vc-util/warning";
24
24
  import Z from "dayjs";
25
25
  import { useContext as Dt } from "@gx-design-vue/context";
26
- import { TinyColor as gt } from "@ctrl/tinycolor";
27
- const jl = ["rowKey", "rowSelection", "columns", "pagination", "size", "bordered", "loading"], Ot = {
28
- ...ze(El(), jl),
26
+ import { TinyColor as ht } from "@ctrl/tinycolor";
27
+ const Ll = ["rowKey", "rowSelection", "columns", "pagination", "size", "bordered", "loading"], Ot = {
28
+ ...De(Ol(), Ll),
29
29
  direction: {
30
30
  type: String,
31
31
  default: "ltr"
@@ -49,7 +49,7 @@ const jl = ["rowKey", "rowSelection", "columns", "pagination", "size", "bordered
49
49
  type: Object,
50
50
  default: void 0
51
51
  }
52
- }, { provideContext: Hl, useInjectContext: Ke } = Dt("pro-table"), he = {
52
+ }, { provideContext: jl, useInjectContext: Ke } = Dt("pro-table"), he = {
53
53
  ...Ot,
54
54
  id: {
55
55
  type: String,
@@ -129,7 +129,9 @@ const jl = ["rowKey", "rowSelection", "columns", "pagination", "size", "bordered
129
129
  * @description 是否显示搜索表单,传入对象时为搜索表单的配置
130
130
  */
131
131
  form: {
132
- type: [Object, Boolean]
132
+ type: [Object, Boolean],
133
+ default: () => {
134
+ }
133
135
  },
134
136
  searchMap: {
135
137
  type: Array,
@@ -313,7 +315,7 @@ const jl = ["rowKey", "rowSelection", "columns", "pagination", "size", "bordered
313
315
  onLoadingChange: Function,
314
316
  onRequestError: Function,
315
317
  onBeforeSearchSubmit: Function
316
- }, Wl = /* @__PURE__ */ ge({
318
+ }, Hl = /* @__PURE__ */ ge({
317
319
  name: "RequestSelect",
318
320
  props: {
319
321
  fetch: Function,
@@ -332,53 +334,53 @@ const jl = ["rowKey", "rowSelection", "columns", "pagination", "size", "bordered
332
334
  }
333
335
  },
334
336
  setup(e, {
335
- slots: a
337
+ slots: n
336
338
  }) {
337
- const l = w([]), n = w(e.loading ?? !1), o = w("init"), s = xl(e.fetch, e.debounceTime || 10);
338
- return q([() => e.fetch, () => e.manual], () => {
339
- if (o.value !== "init" && n.value) return;
340
- const u = e.manual ?? !1;
341
- e.fetch && !u && (n.value = !0, s().then((b) => {
342
- l.value = zt(b), o.value = "success";
343
- }).catch((b) => {
344
- console.error(b), o.value = "error";
339
+ const l = T([]), a = T(e.loading ?? !1), o = T("init"), r = Sl(e.fetch, e.debounceTime || 10);
340
+ return Y([() => e.fetch, () => e.manual], () => {
341
+ if (o.value !== "init" && a.value) return;
342
+ const s = e.manual ?? !1;
343
+ e.fetch && !s && (a.value = !0, r().then((h) => {
344
+ l.value = zt(h), o.value = "success";
345
+ }).catch((h) => {
346
+ console.error(h), o.value = "error";
345
347
  }).finally(() => {
346
- n.value = !1;
348
+ a.value = !1;
347
349
  }));
348
350
  }, {
349
351
  immediate: !0
350
352
  }), () => {
351
- const u = a.default?.();
352
- return lt(J(u) ? u[0] : u, {
353
+ const s = n.default?.();
354
+ return lt(J(s) ? s[0] : s, {
353
355
  options: l.value,
354
- notFoundContent: e.notFoundContent?.(n.value)
356
+ notFoundContent: e.notFoundContent?.(a.value)
355
357
  });
356
358
  };
357
359
  }
358
360
  });
359
- function Yl(e, a) {
361
+ function Wl(e, n) {
360
362
  const l = at({});
361
- function n() {
363
+ function a() {
362
364
  Object.assign(l, ee(ce(e)));
363
- const s = a.find((u) => u.valueType === "dateRange");
364
- s && o(s.name || "", e[s.rangeStartName || "start"] ? [
365
- e[s.rangeStartName || "start"],
366
- e[s.rangeEndName || "end"]
365
+ const r = n.find((s) => s.valueType === "dateRange");
366
+ r && o(r.name || "", e[r.rangeStartName || "start"] ? [
367
+ e[r.rangeStartName || "start"],
368
+ e[r.rangeEndName || "end"]
367
369
  ] : []);
368
370
  }
369
- q(() => e, () => {
370
- n();
371
+ Y(() => e, () => {
372
+ a();
371
373
  }, { deep: !0, immediate: !0 });
372
- function o(s, u) {
373
- l[s] = u;
374
+ function o(r, s) {
375
+ l[r] = s;
374
376
  }
375
377
  return {
376
378
  formState: l,
377
- resetFormState: n,
379
+ resetFormState: a,
378
380
  changeFormState: o
379
381
  };
380
382
  }
381
- const Ml = (e) => ({
383
+ const Yl = (e) => ({
382
384
  [`${e.componentCls}-search`]: {
383
385
  position: "relative",
384
386
  display: "flex",
@@ -493,40 +495,40 @@ const Ml = (e) => ({
493
495
  { value: "sm", span: 2 },
494
496
  { value: "xs", span: 1 }
495
497
  ];
496
- function me(e, a) {
497
- return typeof a == "function" ? a(Z(e)) : Z(e).format(a);
498
+ function me(e, n) {
499
+ return typeof n == "function" ? n(Z(e)) : Z(e).format(n);
498
500
  }
499
- function Ae(e, a) {
500
- return a ? "YYYY-MM-DD HH:mm:ss" : e ?? "YYYY-MM-DD";
501
+ function Be(e, n) {
502
+ return n ? "YYYY-MM-DD HH:mm:ss" : e ?? "YYYY-MM-DD";
501
503
  }
502
- const bt = (e, a, l = "string") => {
504
+ const gt = (e, n, l = "string") => {
503
505
  if (J(e)) {
504
- const [n, o] = e;
505
- let s, u;
506
- if (Array.isArray(a) ? (s = a[0], u = a[1]) : typeof a == "object" && a.type === "mask" ? (s = a.format, u = a.format) : (s = a, u = a), l === "string") {
507
- const b = n ? me(n, s) : "", f = o ? me(o, u) : "";
508
- return [b, f];
506
+ const [a, o] = e;
507
+ let r, s;
508
+ if (Array.isArray(n) ? (r = n[0], s = n[1]) : typeof n == "object" && n.type === "mask" ? (r = n.format, s = n.format) : (r = n, s = n), l === "string") {
509
+ const h = a ? me(a, r) : "", f = o ? me(o, s) : "";
510
+ return [h, f];
509
511
  }
510
- return [Z(n), Z(o)];
512
+ return [Z(a), Z(o)];
511
513
  }
512
514
  };
513
- function ql(e) {
515
+ function Ml(e) {
514
516
  return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !ae(e);
515
517
  }
516
518
  const {
517
- MonthPicker: Kl,
518
- RangePicker: kl,
519
- YearPicker: Vl,
520
- WeekPicker: Xl,
521
- QuarterPicker: _l
522
- } = At;
523
- function Gl(e) {
524
- let a = e.reduce((l, n) => n.order !== void 0 ? Math.max(l, n.order) : l, 0);
519
+ MonthPicker: ql,
520
+ RangePicker: Kl,
521
+ YearPicker: kl,
522
+ WeekPicker: Vl,
523
+ QuarterPicker: Xl
524
+ } = Bt;
525
+ function _l(e) {
526
+ let n = e.reduce((l, a) => a.order !== void 0 ? Math.max(l, a.order) : l, 0);
525
527
  return e.forEach((l) => {
526
- l.order === void 0 && (a += 1, l.order = a);
527
- }), e.sort((l, n) => l.order - n.order), e;
528
+ l.order === void 0 && (n += 1, l.order = n);
529
+ }), e.sort((l, a) => l.order - a.order), e;
528
530
  }
529
- const Ql = {
531
+ const Gl = {
530
532
  modalScroll: he.modalScroll,
531
533
  formCols: {
532
534
  type: Array,
@@ -540,217 +542,217 @@ const Ql = {
540
542
  default: () => ({})
541
543
  },
542
544
  onSearch: Function
543
- }, Ul = /* @__PURE__ */ ge({
545
+ }, Ql = /* @__PURE__ */ ge({
544
546
  name: "ProTableForm",
545
547
  inheritAttrs: !1,
546
- props: Ql,
548
+ props: Gl,
547
549
  setup(e, {
548
- slots: a,
550
+ slots: n,
549
551
  expose: l
550
552
  }) {
551
553
  const {
552
- wrapSSR: n,
554
+ wrapSSR: a,
553
555
  hashId: o
554
- } = rt("ProTableForm", [Ml], e.prefixCls), s = Tt(), u = it(), {
555
- formAutoRequest: b,
556
+ } = Tt("ProTableForm", [Yl], e.prefixCls), r = xt(), s = it(), {
557
+ formAutoRequest: h,
556
558
  formConfig: f,
557
559
  formActions: $,
558
560
  screenWidth: m,
559
- styles: S,
561
+ styles: w,
560
562
  classNames: v
561
563
  } = Ke(), {
562
- formState: i,
563
- resetFormState: x,
564
- changeFormState: h
565
- } = Yl(e.defaultFormSearch, e.formCols), E = w(pe(f.value?.gap || 16)), A = T(() => {
564
+ formState: u,
565
+ resetFormState: S,
566
+ changeFormState: g
567
+ } = Wl(e.defaultFormSearch, e.formCols), B = T(pe(f.value?.gap || 16)), N = x(() => {
566
568
  if (f.value?.breakpoint && ne(f.value.breakpoint) && Object.keys(f.value.breakpoint).length)
567
569
  return f.value?.breakpoint;
568
- }), I = w(f.value?.collapsed ?? f.value?.defaultCollapsed), N = T(() => De($.value?.reset) ? $.value?.reset : !b.value), L = T(() => A.value ? k(A.value, m.value) : H(f.value?.span, u.value)), K = T(() => f.value?.label);
569
- q(() => f.value?.collapsed, (t) => {
570
- I.value = t;
570
+ }), R = T(f.value?.collapsed ?? f.value?.defaultCollapsed), X = x(() => Oe($.value?.reset) ? $.value?.reset : !h.value), M = x(() => N.value ? k(N.value, m.value) : E(f.value?.span, s.value)), K = x(() => f.value?.label);
571
+ Y(() => f.value?.collapsed, (t) => {
572
+ R.value = t;
571
573
  });
572
- function k(t, r) {
574
+ function k(t, i) {
573
575
  let y = 4;
574
- const g = Object.keys(t).map((C) => Number(C)).filter((C) => !Number.isNaN(C)).sort((C, c) => c - C);
575
- for (let C = 0; C < g.length; C += 1) {
576
- const c = g[C];
577
- if (t[c] && r >= c) {
576
+ const b = Object.keys(t).map((C) => Number(C)).filter((C) => !Number.isNaN(C)).sort((C, c) => c - C);
577
+ for (let C = 0; C < b.length; C += 1) {
578
+ const c = b[C];
579
+ if (t[c] && i >= c) {
578
580
  y = t[c];
579
581
  break;
580
582
  }
581
583
  }
582
584
  return y;
583
585
  }
584
- function H(t, r) {
586
+ function E(t, i) {
585
587
  let y = 4;
586
- for (let g = 0; g < Je.length; g += 1) {
587
- const C = Je[g].value;
588
- if (r[C]) {
589
- y = t?.[C] || (e.modalScroll ? 3 : Je[g].span);
588
+ for (let b = 0; b < Je.length; b += 1) {
589
+ const C = Je[b].value;
590
+ if (i[C]) {
591
+ y = t?.[C] || (e.modalScroll ? 3 : Je[b].span);
590
592
  break;
591
593
  }
592
594
  }
593
595
  return y;
594
596
  }
595
- const B = (t) => {
596
- I.value = t;
597
- }, X = (t, r, y) => (t + 1) % r === 0 ? {
597
+ const A = (t) => {
598
+ R.value = t;
599
+ }, q = (t, i, y) => (t + 1) % i === 0 ? {
598
600
  ...y,
599
601
  marginRight: pe(0)
600
602
  } : {
601
603
  ...y,
602
- marginRight: E.value
603
- }, O = () => {
604
- const t = zt(i), r = e.formCols.find((C) => C.valueType === "text") || "", y = e.formCols.find((C) => C.valueType === "dateRange") || "", g = e.formCols.find((C) => C.valueType === "treeSelect");
605
- return r && (t[r.name] = i[r.name] || r.initialValue || ""), y && (t[y.rangeStartName || "start"] = t[y.name] ? t[y.name][0] : "", t[y.rangeEndName || "end"] = t[y.name] ? t[y.name][1] : "", delete t[y.name]), g && (g?.name && J(i[g?.name]) && (t[g.name] = i[g.name].length ? i[g.name].map((C) => C[g.valueKey === "text" ? "label" : "value"]).join() : ""), g?.name && J(t[g?.name]) && (t[g.name] = t[g.name].length ? t[g.name].map((C) => C[g.valueKey === "text" ? "label" : "value"]) : "")), t;
606
- }, W = (t = !1, r) => {
607
- (b.value || t) && e.onSearch?.(O(), t ? r ? "reset" : "submit" : void 0);
608
- }, Y = (t, r, y) => {
609
- const g = i[r.name || ""];
610
- switch (r.valueType) {
604
+ marginRight: B.value
605
+ }, z = () => {
606
+ const t = zt(u), i = e.formCols.find((C) => C.valueType === "text") || "", y = e.formCols.find((C) => C.valueType === "dateRange") || "", b = e.formCols.find((C) => C.valueType === "treeSelect");
607
+ return i && (t[i.name] = u[i.name] || i.initialValue || ""), y && (t[y.rangeStartName || "start"] = t[y.name] ? t[y.name][0] : "", t[y.rangeEndName || "end"] = t[y.name] ? t[y.name][1] : "", delete t[y.name]), b && (b?.name && J(u[b?.name]) && (t[b.name] = u[b.name].length ? u[b.name].map((C) => C[b.valueKey === "text" ? "label" : "value"]).join() : ""), b?.name && J(t[b?.name]) && (t[b.name] = t[b.name].length ? t[b.name].map((C) => C[b.valueKey === "text" ? "label" : "value"]) : "")), t;
608
+ }, L = (t = !1, i) => {
609
+ (h.value || t) && e.onSearch?.(z(), t ? i ? "reset" : "submit" : void 0);
610
+ }, H = (t, i, y) => {
611
+ const b = u[i.name || ""];
612
+ switch (i.valueType) {
611
613
  case "text":
612
- h(r.name || "", t || "");
614
+ g(i.name || "", t || "");
613
615
  break;
614
616
  case "number":
615
- h(r.name || "", t || void 0);
617
+ g(i.name || "", t || void 0);
616
618
  break;
617
619
  case "numberRange":
618
- Ce(y?.key) && g && (g[y.key] = t, h(r.name || "", g || []));
620
+ Ce(y?.key) && b && (b[y.key] = t, g(i.name || "", b || []));
619
621
  break;
620
622
  case "select":
621
- h(r.name || "", t ?? void 0);
623
+ g(i.name || "", t ?? void 0);
622
624
  break;
623
625
  case "treeSelect":
624
- h(r.name || "", t ?? (r.field?.treeCheckable || r.field?.multiple ? [] : null));
626
+ g(i.name || "", t ?? (i.field?.treeCheckable || i.field?.multiple ? [] : null));
625
627
  break;
626
628
  case "date":
627
- h(r.name || "", t ? me(t, Ae(r.valueFormat, r.showTime)) : null);
629
+ g(i.name || "", t ? me(t, Be(i.valueFormat, i.showTime)) : null);
628
630
  break;
629
631
  case "dateWeek":
630
- h(r.name || "", t ? me(t, "YYYY-wo") : null);
632
+ g(i.name || "", t ? me(t, "YYYY-wo") : null);
631
633
  break;
632
634
  case "dateMonth":
633
- h(r.name || "", t ? me(t, "YYYY-MM") : null);
635
+ g(i.name || "", t ? me(t, "YYYY-MM") : null);
634
636
  break;
635
637
  case "dateQuarter":
636
- h(r.name || "", t ? me(t, "YYYY-QQ") : null);
638
+ g(i.name || "", t ? me(t, "YYYY-QQ") : null);
637
639
  break;
638
640
  case "dateYear":
639
- h(r.name || "", t ? me(t, "YYYY") : null);
641
+ g(i.name || "", t ? me(t, "YYYY") : null);
640
642
  break;
641
643
  case "dateRange":
642
- h(r.name || "", t && J(t) && t.length === 2 ? bt(t, Ae(r.valueFormat, r.showTime)) : null);
644
+ g(i.name || "", t && J(t) && t.length === 2 ? gt(t, Be(i.valueFormat, i.showTime)) : null);
643
645
  break;
644
646
  case "time":
645
- h(r.name || "", t ? me(t, r.valueFormat || "HH:mm:ss") : null);
647
+ g(i.name || "", t ? me(t, i.valueFormat || "HH:mm:ss") : null);
646
648
  break;
647
649
  }
648
- r.valueType === "treeSelect" || r.valueType, W();
649
- }, M = (t = !0) => {
650
- x(), W(!0, t);
650
+ i.valueType === "treeSelect" || i.valueType, L();
651
+ }, W = (t = !0) => {
652
+ S(), L(!0, t);
651
653
  };
652
654
  l({
653
- getFormSearch: () => O(),
654
- resetForm: M
655
+ getFormSearch: () => z(),
656
+ resetForm: W
655
657
  });
656
658
  const te = () => {
657
- const t = s?.emptyText?.value;
659
+ const t = r?.emptyText?.value;
658
660
  if (t) {
659
- const r = ae(t), y = r ? pt(t) : wt(t || []);
661
+ const i = ae(t), y = i ? bt(t) : wt(t || []);
660
662
  return d("div", {
661
- class: D(`${e.prefixCls}-search-empty-text`, o.value)
662
- }, [r ? y : J(y) ? y.map((g) => lt(g)) : void 0]);
663
+ class: O(`${e.prefixCls}-search-empty-text`, o.value)
664
+ }, [i ? y : J(y) ? y.map((b) => lt(b)) : void 0]);
663
665
  }
664
- }, re = () => (!b.value || N.value) && d("div", {
665
- class: D(`${e.prefixCls}-search-buttons ${o.value}`, v.value?.searchButtons),
666
- style: S.value?.searchButtons
667
- }, [N.value && d(ht, {
666
+ }, se = () => (!h.value || X.value) && d("div", {
667
+ class: O(`${e.prefixCls}-search-buttons ${o.value}`, v.value?.searchButtons),
668
+ style: w.value?.searchButtons
669
+ }, [X.value && d(mt, {
668
670
  key: "reset",
669
- onClick: () => M()
671
+ onClick: () => W()
670
672
  }, {
671
673
  default: () => [$.value?.resetText || "重置"]
672
- }), !b.value && d(ht, {
674
+ }), !h.value && d(mt, {
673
675
  key: "submit",
674
676
  loading: e.loading,
675
677
  type: "primary",
676
- onClick: () => W(!0)
678
+ onClick: () => L(!0)
677
679
  }, {
678
680
  default: () => [$.value?.searchText || "查询"]
679
- })]), se = ({
681
+ })]), re = ({
680
682
  formItemStyle: t = {},
681
- collapsed: r,
683
+ collapsed: i,
682
684
  collapseRender: y = !0
683
685
  }) => d("div", {
684
686
  style: {
685
687
  ...t,
686
- ...S.value?.searchControl
688
+ ...w.value?.searchControl
687
689
  },
688
- class: D(`${e.prefixCls}-search-control ${o.value}`, v.value?.searchControl)
690
+ class: O(`${e.prefixCls}-search-control ${o.value}`, v.value?.searchControl)
689
691
  }, [d("div", {
690
- class: D(`${e.prefixCls}-search-control-content ${o.value}`, v.value?.searchContent)
691
- }, [re(), f.value?.collapseRender !== !1 && y && d(we, null, [typeof f.value?.collapseRender == "function" ? f.value?.collapseRender(r) : d("span", {
692
- class: D(`${e.prefixCls}-search-control-text ${o.value}`, v.value?.searchText),
693
- style: S.value?.searchText,
694
- onClick: () => B(!r)
695
- }, [r ? "收起" : "展开", r ? d(el, null, null) : d(tl, null, null)])])])]);
692
+ class: O(`${e.prefixCls}-search-control-content ${o.value}`, v.value?.searchContent)
693
+ }, [se(), f.value?.collapseRender !== !1 && y && d(we, null, [typeof f.value?.collapseRender == "function" ? f.value?.collapseRender(i) : d("span", {
694
+ class: O(`${e.prefixCls}-search-control-text ${o.value}`, v.value?.searchText),
695
+ style: w.value?.searchText,
696
+ onClick: () => A(!i)
697
+ }, [i ? "收起" : "展开", i ? d(Zt, null, null) : d(el, null, null)])])])]);
696
698
  function be(t) {
697
- return t === void 0 ? void 0 : t ? d(Bt, {
699
+ return t === void 0 ? void 0 : t ? d(At, {
698
700
  size: "small",
699
- indicator: s?.indicator?.value
701
+ indicator: r?.indicator?.value
700
702
  }, null) : te();
701
703
  }
702
- function de(t, r) {
703
- return d(Wl, Q(t.request, {
704
+ function de(t, i) {
705
+ return d(Hl, Q(t.request, {
704
706
  loading: t.loading,
705
707
  notFoundContent: be
706
- }), ql(r) ? r : {
707
- default: () => [r]
708
+ }), Ml(i) ? i : {
709
+ default: () => [i]
708
710
  });
709
711
  }
710
712
  const Re = (t) => {
711
- let r;
712
- const y = b.value ? We.Search : We, g = ze(t.field || {}, "rules");
713
+ let i;
714
+ const y = h.value ? Ye.Search : Ye, b = De(t.field || {}, "rules");
713
715
  let C = null;
714
716
  switch (t.valueType) {
715
717
  case "text":
716
- r = d(y, Q({
718
+ i = d(y, Q({
717
719
  style: {
718
720
  width: "100%"
719
721
  },
720
- value: i[t.name],
722
+ value: u[t.name],
721
723
  placeholder: t.placeholder || "请输入",
722
724
  allowClear: t.allowClear ?? !0,
723
- onChange: (c) => Y(c.target.value, t),
724
- onSearch: (c) => W()
725
- }, g), null);
725
+ onChange: (c) => H(c.target.value, t),
726
+ onSearch: (c) => L()
727
+ }, b), null);
726
728
  break;
727
729
  case "number":
728
- r = d(Ue, Q({
730
+ i = d(Ue, Q({
729
731
  style: {
730
732
  width: "100%"
731
733
  },
732
- value: i[t.name],
734
+ value: u[t.name],
733
735
  placeholder: t.placeholder || "请输入",
734
- onChange: (c) => Y(c, t)
735
- }, g), null);
736
+ onChange: (c) => H(c, t)
737
+ }, b), null);
736
738
  break;
737
739
  case "numberRange":
738
- r = d(We.Group, {
740
+ i = d(Ye.Group, {
739
741
  compact: !0,
740
- class: D(o.value, `${e.prefixCls}-search-input-compact`)
742
+ class: O(o.value, `${e.prefixCls}-search-input-compact`)
741
743
  }, {
742
744
  default: () => [d(Ue, {
743
- value: i[t.name]?.[0],
744
- onChange: (c) => Y(c, t, {
745
+ value: u[t.name]?.[0],
746
+ onChange: (c) => H(c, t, {
745
747
  key: 0
746
748
  }),
747
749
  placeholder: J(t.placeholder) && t.placeholder?.[0] || "请输入"
748
- }, null), d(We, {
750
+ }, null), d(Ye, {
749
751
  disabled: !0,
750
752
  placeholder: "~"
751
753
  }, null), d(Ue, {
752
- value: i[t.name]?.[1],
753
- onChange: (c) => Y(c, t, {
754
+ value: u[t.name]?.[1],
755
+ onChange: (c) => H(c, t, {
754
756
  key: 1
755
757
  }),
756
758
  placeholder: J(t.placeholder) && t.placeholder?.[1] || "请输入"
@@ -758,192 +760,267 @@ const Ql = {
758
760
  });
759
761
  break;
760
762
  case "select":
761
- C = d(Al, Q({
763
+ C = d(Il, Q({
762
764
  style: {
763
765
  width: "100%"
764
766
  },
765
- value: t.loading ? void 0 : i[t.name],
767
+ value: t.loading ? void 0 : u[t.name],
766
768
  optionFilterProp: "label",
767
769
  placeholder: t.placeholder || "请选择",
768
770
  showSearch: t.showSearch,
769
771
  allowClear: t.allowClear ?? !0,
770
772
  getPopupContainer: (c) => c && c.parentNode ? c.parentNode : c,
771
773
  notFoundContent: be(t.loading),
772
- onChange: (c) => Y(c, t),
774
+ onChange: (c) => H(c, t),
773
775
  options: t.loading ? [] : t?.valueEnum || []
774
- }, g), null);
776
+ }, b), null);
775
777
  break;
776
778
  case "treeSelect":
777
- C = d(Il, Q({
779
+ C = d(Fl, Q({
778
780
  style: {
779
781
  width: "100%"
780
782
  },
781
- value: i[t.name],
783
+ value: u[t.name],
782
784
  placeholder: t.placeholder || "请选择",
783
785
  allowClear: t.allowClear ?? !0,
784
786
  treeData: t.loading ? [] : t.valueEnum || [],
785
787
  getPopupContainer: (c) => c && c.parentNode ? c.parentNode : c,
786
788
  notFoundContent: be(t.loading),
787
- onChange: (c) => Y(c, t)
788
- }, g), null);
789
+ onChange: (c) => H(c, t)
790
+ }, b), null);
789
791
  break;
790
792
  case "date":
791
- r = d(At, Q({
793
+ i = d(Bt, Q({
792
794
  style: {
793
795
  width: "100%"
794
796
  },
795
- value: i[t.name] ? Z(i[t.name]) : void 0,
797
+ value: u[t.name] ? Z(u[t.name]) : void 0,
796
798
  getPopupContainer: (c) => c && c.parentNode ? c.parentNode : c,
797
799
  placeholder: t.placeholder || "请选择",
798
800
  allowClear: t.allowClear ?? !0,
799
- format: Ae(t.valueFormat, t.showTime),
801
+ format: Be(t.valueFormat, t.showTime),
800
802
  showTime: t.showTime,
801
803
  showToday: t.showToday || !0,
802
- onChange: (c) => Y(c, t)
803
- }, g), null);
804
+ onChange: (c) => H(c, t)
805
+ }, b), null);
804
806
  break;
805
807
  case "dateWeek":
806
- r = d(Xl, Q({
808
+ i = d(Vl, Q({
807
809
  style: {
808
810
  width: "100%"
809
811
  },
810
- value: i[t.name] ? Z(i[t.name], t.valueFormat || "YYYY-wo") : void 0,
812
+ value: u[t.name] ? Z(u[t.name], t.valueFormat || "YYYY-wo") : void 0,
811
813
  getPopupContainer: (c) => c && c.parentNode ? c.parentNode : c,
812
814
  allowClear: t.allowClear ?? !0,
813
815
  placeholder: t.placeholder || "请选择",
814
- onChange: (c) => Y(c, t)
815
- }, g), null);
816
+ onChange: (c) => H(c, t)
817
+ }, b), null);
816
818
  break;
817
819
  case "dateMonth":
818
- r = d(Kl, Q({
820
+ i = d(ql, Q({
819
821
  style: {
820
822
  width: "100%"
821
823
  },
822
- value: i[t.name] ? Z(i[t.name], t.valueFormat || "YYYY-MM") : void 0,
824
+ value: u[t.name] ? Z(u[t.name], t.valueFormat || "YYYY-MM") : void 0,
823
825
  getPopupContainer: (c) => c && c.parentNode ? c.parentNode : c,
824
826
  allowClear: t.allowClear ?? !0,
825
827
  placeholder: t.placeholder || "请选择",
826
- onChange: (c) => Y(c, t)
827
- }, g), null);
828
+ onChange: (c) => H(c, t)
829
+ }, b), null);
828
830
  break;
829
831
  case "dateQuarter":
830
- r = d(_l, Q({
832
+ i = d(Xl, Q({
831
833
  style: {
832
834
  width: "100%"
833
835
  },
834
- value: i[t.name] ? Z(i[t.name], t.valueFormat || "YYYY-QQ") : void 0,
836
+ value: u[t.name] ? Z(u[t.name], t.valueFormat || "YYYY-QQ") : void 0,
835
837
  getPopupContainer: (c) => c && c.parentNode ? c.parentNode : c,
836
838
  allowClear: t.allowClear ?? !0,
837
839
  placeholder: t.placeholder || "请选择",
838
- onChange: (c) => Y(c, t)
839
- }, g), null);
840
+ onChange: (c) => H(c, t)
841
+ }, b), null);
840
842
  break;
841
843
  case "dateYear":
842
- r = d(Vl, Q({
844
+ i = d(kl, Q({
843
845
  style: {
844
846
  width: "100%"
845
847
  },
846
- value: i[t.name] ? Z(i[t.name], t.valueFormat || "YYYY") : void 0,
848
+ value: u[t.name] ? Z(u[t.name], t.valueFormat || "YYYY") : void 0,
847
849
  getPopupContainer: (c) => c && c.parentNode ? c.parentNode : c,
848
850
  allowClear: t.allowClear ?? !0,
849
851
  placeholder: t.placeholder || "请选择",
850
- onChange: (c) => Y(c, t)
851
- }, g), null);
852
+ onChange: (c) => H(c, t)
853
+ }, b), null);
852
854
  break;
853
855
  case "dateRange":
854
- r = d(kl, Q({
856
+ i = d(Kl, Q({
855
857
  style: {
856
858
  width: "100%"
857
859
  },
858
- value: i[t.name] && J(i[t.name]) && i[t.name]?.length === 2 ? bt(i[t.name], Ae(t.valueFormat, t.showTime), "dayjs") : void 0,
860
+ value: u[t.name] && J(u[t.name]) && u[t.name]?.length === 2 ? gt(u[t.name], Be(t.valueFormat, t.showTime), "dayjs") : void 0,
859
861
  getPopupContainer: (c) => c && c.parentNode ? c.parentNode : c,
860
862
  placeholder: t.placeholder || ["开始日期", "结束日期"],
861
- format: Ae(t.valueFormat, t.showTime),
863
+ format: Be(t.valueFormat, t.showTime),
862
864
  showTime: t.showTime,
863
- onChange: (c) => Y(c, t)
864
- }, g), null);
865
+ onChange: (c) => H(c, t)
866
+ }, b), null);
865
867
  break;
866
868
  case "time":
867
- r = d(Fl, Q({
869
+ i = d(Pl, Q({
868
870
  style: {
869
871
  width: "100%"
870
872
  },
871
- value: i[t.name] ? Z(i[t.name], t.valueFormat || "HH:mm:ss") : void 0,
873
+ value: u[t.name] ? Z(u[t.name], t.valueFormat || "HH:mm:ss") : void 0,
872
874
  getPopupContainer: (c) => c && c.parentNode ? c.parentNode : c,
873
875
  placeholder: t.placeholder || "请选择",
874
876
  allowClear: t.allowClear || t.allowClear === !1 ? t.allowClear : !0,
875
877
  use12Hours: t.use12Hours,
876
878
  format: t.valueFormat || "HH:mm:ss",
877
- onChange: (c) => Y(c, t)
878
- }, g), null);
879
+ onChange: (c) => H(c, t)
880
+ }, b), null);
879
881
  break;
880
882
  }
881
- return t.valueType && ["select", "treeSelect"].includes(t.valueType) && (r = t.request ? de(t, C) : C), r;
883
+ return t.valueType && ["select", "treeSelect"].includes(t.valueType) && (i = t.request ? de(t, C) : C), i;
882
884
  }, oe = ({
883
885
  formItemStyle: t = {},
884
- item: r
886
+ item: i
885
887
  }) => {
886
- const y = ae(r) ? r.props?.label : r.label, g = (ae(r) ? r.props?.labelWidth : r.labelWidth) || K.value?.width, C = (ae(r) ? r.props?.labelAlign : r.labelAlign) || K.value?.align;
888
+ const y = ae(i) ? i.props?.label : i.label, b = (ae(i) ? i.props?.labelWidth : i.labelWidth) || K.value?.width, C = (ae(i) ? i.props?.labelAlign : i.labelAlign) || K.value?.align;
887
889
  return d("div", {
888
- class: D(`${e.prefixCls}-search-item`, o.value, v.value?.searchItem),
890
+ class: O(`${e.prefixCls}-search-item`, o.value, v.value?.searchItem),
889
891
  style: {
890
892
  ...t,
891
893
  gap: K.value?.gap ? pe(K.value?.gap) : void 0,
892
- ...S.value?.searchItem || {}
894
+ ...w.value?.searchItem || {}
893
895
  }
894
896
  }, [y && d("div", {
895
- class: D(`${e.prefixCls}-search-item-label`, K.value?.colon === !1 && `${e.prefixCls}-search-item-label-no-colon`, C && `${e.prefixCls}-search-item-label-${C}`),
897
+ class: O(`${e.prefixCls}-search-item-label`, K.value?.colon === !1 && `${e.prefixCls}-search-item-label-no-colon`, C && `${e.prefixCls}-search-item-label-${C}`),
896
898
  style: {
897
- width: g ? pe(g) : void 0
899
+ width: b ? pe(b) : void 0
898
900
  }
899
901
  }, [y]), d("div", {
900
- class: D(`${e.prefixCls}-search-item-children`)
901
- }, [ae(r) ? r : Re(r)])]);
902
+ class: O(`${e.prefixCls}-search-item-children`)
903
+ }, [ae(i) ? i : Re(i)])]);
902
904
  }, Pe = () => {
903
- let t = a.default?.() || [];
905
+ let t = n.default?.() || [];
904
906
  t.length === 1 && t[0].type === "template" && (t = t[0]?.children || []);
905
- const r = Gl([...e.formCols, ...t.map((g) => ({
906
- ...g,
907
- order: g.props?.order || void 0
907
+ const i = _l([...e.formCols, ...t.map((b) => ({
908
+ ...b,
909
+ order: b.props?.order || void 0
908
910
  }))]), y = {
909
- width: `calc((100% - (${L.value - 1} * ${E.value})) / ${L.value})`
911
+ width: `calc((100% - (${M.value - 1} * ${B.value})) / ${M.value})`
910
912
  };
911
- return r.map((g, C) => {
912
- const c = X(C, L.value, y);
913
- return r.length < L.value || I.value ? d(we, null, [oe({
913
+ return i.map((b, C) => {
914
+ const c = q(C, M.value, y);
915
+ return i.length < M.value || R.value ? d(we, null, [oe({
914
916
  formItemStyle: c,
915
- item: g
916
- }), C === r.length - 1 && se({
917
+ item: b
918
+ }), C === i.length - 1 && re({
917
919
  formItemStyle: {
918
920
  flex: 1,
919
921
  justifyContent: "flex-end"
920
922
  },
921
- collapsed: I.value,
922
- collapseRender: !!I.value
923
- })]) : d(we, null, [C < L.value - 1 && oe({
923
+ collapsed: R.value,
924
+ collapseRender: !!R.value
925
+ })]) : d(we, null, [C < M.value - 1 && oe({
924
926
  formItemStyle: c,
925
- item: g
926
- }), C === L.value - 1 && (L.value - 1 === 0 || r.length === L.value) && oe({
927
+ item: b
928
+ }), C === M.value - 1 && (M.value - 1 === 0 || i.length === M.value) && oe({
927
929
  formItemStyle: c,
928
- item: g
929
- }), C === L.value - 1 && r.length >= L.value && se({
930
+ item: b
931
+ }), C === M.value - 1 && i.length >= M.value && re({
930
932
  formItemStyle: {
931
933
  flex: 1,
932
934
  justifyContent: "flex-end"
933
935
  },
934
936
  collapsed: !1,
935
- collapseRender: r.length !== L.value
937
+ collapseRender: i.length !== M.value
936
938
  })]);
937
939
  });
938
940
  };
939
941
  return () => {
940
942
  const t = e.cardBordered && `${e.prefixCls}-search-border`;
941
- return n(d("div", {
942
- class: D(v.value?.search, o.value, `${e.prefixCls}-search`, t, o.value, f.value?.className),
943
- style: S.value?.search
943
+ return a(d("div", {
944
+ class: O(v.value?.search, o.value, `${e.prefixCls}-search`, t, o.value, f.value?.className),
945
+ style: w.value?.search
944
946
  }, [Pe()]));
945
947
  };
946
948
  }
949
+ }), Ul = (e) => ({
950
+ [`${e.componentCls}-list-toolbar`]: {
951
+ lineHeight: 1,
952
+ "&-with-after": {
953
+ paddingBottom: e.margin
954
+ },
955
+ "&-container": {
956
+ display: "flex",
957
+ alignItems: "center",
958
+ justifyContent: "space-between",
959
+ gap: e.padding,
960
+ paddingBottom: e.padding,
961
+ "&-mobile": {
962
+ flexDirection: "column",
963
+ flexWrap: "wrap",
964
+ alignItems: "flex-start",
965
+ [`${e.componentCls}-left`]: {
966
+ flexWrap: "wrap",
967
+ maxWidth: "100%"
968
+ },
969
+ [`${e.componentCls}-right`]: {
970
+ width: "100%"
971
+ }
972
+ }
973
+ },
974
+ "&-title": {
975
+ display: "flex",
976
+ alignItems: "center",
977
+ justifyContent: "flex-start",
978
+ color: e.colorTextHeading,
979
+ fontWeight: "500",
980
+ fontSize: e.fontSizeLG
981
+ },
982
+ "&-left": {
983
+ display: "flex",
984
+ flexWrap: "wrap",
985
+ alignItems: "center",
986
+ gap: e.marginXS,
987
+ justifyContent: "flex-start",
988
+ [`${e.antCls}-tabs`]: {
989
+ width: "100%"
990
+ },
991
+ "&-has-tabs": {
992
+ overflow: "hidden"
993
+ }
994
+ },
995
+ "&-right": {
996
+ flex: 1,
997
+ display: "flex",
998
+ flexWrap: "wrap",
999
+ justifyContent: "flex-end",
1000
+ gap: e.marginSM,
1001
+ [`${e.componentCls}-actions`]: {
1002
+ display: "flex",
1003
+ alignItems: "center",
1004
+ gap: e.marginXS
1005
+ }
1006
+ },
1007
+ "&-setting-items": {
1008
+ display: "flex",
1009
+ gap: e.marginSM,
1010
+ lineHeight: "32px",
1011
+ alignItems: "center"
1012
+ },
1013
+ "&-setting-item": {
1014
+ color: e.colorIconHover,
1015
+ fontSize: e.fontSizeLG,
1016
+ cursor: "pointer",
1017
+ transition: `all ${e.motionDurationMid} ${e.motionEaseInOut}`,
1018
+ "> span": { display: "block", width: "100%", height: "100%" },
1019
+ "&:hover": {
1020
+ color: e.colorPrimary
1021
+ }
1022
+ }
1023
+ }
947
1024
  }), { useInjectContext: Et, provideContext: Jl } = Dt("scrollbar"), Te = 4, Zl = {
948
1025
  vertical: {
949
1026
  offset: "offsetHeight",
@@ -965,8 +1042,8 @@ const Ql = {
965
1042
  client: "clientX",
966
1043
  direction: "left"
967
1044
  }
968
- }, ea = ({ move: e, size: a, bar: l }) => ({
969
- [l.size]: a,
1045
+ }, ea = ({ move: e, size: n, bar: l }) => ({
1046
+ [l.size]: n,
970
1047
  transform: `translate${l.axis}(${e}%)`
971
1048
  }), ta = {
972
1049
  vertical: Boolean,
@@ -985,74 +1062,74 @@ const Ql = {
985
1062
  props: ta,
986
1063
  setup(e) {
987
1064
  const {
988
- tableHeaderHeight: a,
1065
+ tableHeaderHeight: n,
989
1066
  hashId: l,
990
- wrapElement: n,
1067
+ wrapElement: a,
991
1068
  scrollbarElement: o,
992
- className: s
993
- } = Et(), u = w(), b = w(), f = w({}), $ = w(!1);
994
- let m = !1, S = !1, v = 0, i = 0, x = Tl ? document.onselectstart : null;
995
- const h = T(() => Zl[e.vertical ? "vertical" : "horizontal"]), E = T(() => ea({
1069
+ className: r
1070
+ } = Et(), s = T(), h = T(), f = T({}), $ = T(!1);
1071
+ let m = !1, w = !1, v = 0, u = 0, S = xl ? document.onselectstart : null;
1072
+ const g = x(() => Zl[e.vertical ? "vertical" : "horizontal"]), B = x(() => ea({
996
1073
  size: e.size,
997
1074
  move: e.move,
998
- bar: h.value
999
- })), A = T(() => (
1075
+ bar: g.value
1076
+ })), N = x(() => (
1000
1077
  // offsetRatioX = original width of thumb / current width of thumb / ratioX
1001
1078
  // offsetRatioY = original height of thumb / current height of thumb / ratioY
1002
1079
  // instance height = wrap height - GAP
1003
- u.value[h.value.offset] ** 2 / n.value[h.value.scrollSize] / e.ratio / b.value[h.value.offset]
1004
- )), I = (O) => {
1005
- if (O.stopPropagation(), O.ctrlKey || [1, 2].includes(O.button)) return;
1006
- window.getSelection()?.removeAllRanges(), L(O);
1007
- const W = O.currentTarget;
1008
- W && (f.value[h.value.axis] = W[h.value.offset] - (O[h.value.client] - W.getBoundingClientRect()[h.value.direction]));
1009
- }, N = (O) => {
1010
- if (!b.value || !u.value || !n.value) return;
1011
- const W = Math.abs(O.target.getBoundingClientRect()[h.value.direction] - O[h.value.client]), Y = b.value[h.value.offset] / 2, M = (W - Y) * 100 * A.value / u.value[h.value.offset];
1012
- n.value[h.value.scroll] = M * n.value[h.value.scrollSize] / 100;
1080
+ s.value[g.value.offset] ** 2 / a.value[g.value.scrollSize] / e.ratio / h.value[g.value.offset]
1081
+ )), R = (z) => {
1082
+ if (z.stopPropagation(), z.ctrlKey || [1, 2].includes(z.button)) return;
1083
+ window.getSelection()?.removeAllRanges(), M(z);
1084
+ const L = z.currentTarget;
1085
+ L && (f.value[g.value.axis] = L[g.value.offset] - (z[g.value.client] - L.getBoundingClientRect()[g.value.direction]));
1086
+ }, X = (z) => {
1087
+ if (!h.value || !s.value || !a.value) return;
1088
+ const L = Math.abs(z.target.getBoundingClientRect()[g.value.direction] - z[g.value.client]), H = h.value[g.value.offset] / 2, W = (L - H) * 100 * N.value / s.value[g.value.offset];
1089
+ a.value[g.value.scroll] = W * a.value[g.value.scrollSize] / 100;
1013
1090
  };
1014
- function L(O) {
1015
- n.value && (O.stopImmediatePropagation(), m = !0, v = n.value.scrollHeight, i = n.value.scrollWidth, document.addEventListener("mousemove", K), document.addEventListener("mouseup", k), x = document.onselectstart, document.onselectstart = () => !1);
1091
+ function M(z) {
1092
+ a.value && (z.stopImmediatePropagation(), m = !0, v = a.value.scrollHeight, u = a.value.scrollWidth, document.addEventListener("mousemove", K), document.addEventListener("mouseup", k), S = document.onselectstart, document.onselectstart = () => !1);
1016
1093
  }
1017
- function K(O) {
1018
- if (!n.value || !u.value || !b.value || m === !1) return;
1019
- const W = f.value[h.value.axis];
1020
- if (!W) return;
1021
- const Y = (u.value.getBoundingClientRect()[h.value.direction] - O[h.value.client]) * -1, M = b.value[h.value.offset] - W, te = (Y - M) * 100 * A.value / u.value[h.value.offset];
1022
- h.value.scroll === "scrollLeft" ? n.value[h.value.scroll] = te * i / 100 : n.value[h.value.scroll] = te * v / 100;
1094
+ function K(z) {
1095
+ if (!a.value || !s.value || !h.value || m === !1) return;
1096
+ const L = f.value[g.value.axis];
1097
+ if (!L) return;
1098
+ const H = (s.value.getBoundingClientRect()[g.value.direction] - z[g.value.client]) * -1, W = h.value[g.value.offset] - L, te = (H - W) * 100 * N.value / s.value[g.value.offset];
1099
+ g.value.scroll === "scrollLeft" ? a.value[g.value.scroll] = te * u / 100 : a.value[g.value.scroll] = te * v / 100;
1023
1100
  }
1024
1101
  function k() {
1025
- m = !1, f.value[h.value.axis] = 0, document.removeEventListener("mousemove", K), document.removeEventListener("mouseup", k), X(), S && ($.value = !1);
1102
+ m = !1, f.value[g.value.axis] = 0, document.removeEventListener("mousemove", K), document.removeEventListener("mouseup", k), q(), w && ($.value = !1);
1026
1103
  }
1027
- const H = () => {
1028
- S = !1, $.value = !!e.size;
1029
- }, B = () => {
1030
- S = !0, $.value = m;
1104
+ const E = () => {
1105
+ w = !1, $.value = !!e.size;
1106
+ }, A = () => {
1107
+ w = !0, $.value = m;
1031
1108
  };
1032
- Qt(() => {
1033
- X(), document.removeEventListener("mouseup", k);
1109
+ Gt(() => {
1110
+ q(), document.removeEventListener("mouseup", k);
1034
1111
  });
1035
- function X() {
1036
- document.onselectstart !== x && (document.onselectstart = x);
1112
+ function q() {
1113
+ document.onselectstart !== S && (document.onselectstart = S);
1037
1114
  }
1038
- return mt(o, "mousemove", H), mt(o, "mouseleave", B), () => {
1039
- const O = h.value.key === "vertical" ? {
1040
- height: `calc(100% - ${pe(a.value + 1)})`,
1041
- top: pe(a.value + 1)
1115
+ return vt(o, "mousemove", E), vt(o, "mouseleave", A), () => {
1116
+ const z = g.value.key === "vertical" ? {
1117
+ height: `calc(100% - ${pe(n.value + 1)})`,
1118
+ top: pe(n.value + 1)
1042
1119
  } : {};
1043
1120
  return d("div", {
1044
- ref: u,
1121
+ ref: s,
1045
1122
  style: {
1046
1123
  ...e.barStyle,
1047
- ...O
1124
+ ...z
1048
1125
  },
1049
- class: [`${s}-bar`, "is-" + h.value.key, l.value],
1050
- onMousedown: N
1126
+ class: [`${r}-bar`, "is-" + g.value.key, l.value],
1127
+ onMousedown: X
1051
1128
  }, [d("div", {
1052
- ref: b,
1053
- class: `${s}-thumb ${l.value}`,
1054
- style: E.value,
1055
- onMousedown: I
1129
+ ref: h,
1130
+ class: `${r}-thumb ${l.value}`,
1131
+ style: B.value,
1132
+ onMousedown: R
1056
1133
  }, null)]);
1057
1134
  };
1058
1135
  }
@@ -1078,136 +1155,62 @@ const la = {
1078
1155
  inheritAttrs: !1,
1079
1156
  props: la,
1080
1157
  setup(e, {
1081
- expose: a
1158
+ expose: n
1082
1159
  }) {
1083
1160
  const {
1084
1161
  tableScrollState: l
1085
- } = Ke(), n = Et(), o = w(0), s = w(0), u = w(""), b = w(""), f = w(1), $ = w(1), m = (v) => {
1162
+ } = Ke(), a = Et(), o = T(0), r = T(0), s = T(""), h = T(""), f = T(1), $ = T(1), m = (v) => {
1086
1163
  if (v) {
1087
- const i = v.offsetHeight - Te, x = v.offsetWidth - Te;
1088
- s.value = v.scrollTop * 100 / i * f.value, o.value = v.scrollLeft * 100 / x * $.value;
1164
+ const u = v.offsetHeight - Te, S = v.offsetWidth - Te;
1165
+ r.value = v.scrollTop * 100 / u * f.value, o.value = v.scrollLeft * 100 / S * $.value;
1089
1166
  }
1090
- }, S = () => {
1091
- const v = n?.wrapElement;
1167
+ }, w = () => {
1168
+ const v = a?.wrapElement;
1092
1169
  if (!v?.value) return;
1093
- const i = v.value.offsetHeight - Te, x = v.value.offsetWidth - Te, h = i ** 2 / v.value.scrollHeight, E = x ** 2 / v.value.scrollWidth, A = Math.max(h, e.minSize), I = Math.max(E, e.minSize);
1094
- f.value = h / (i - h) / (A / (i - A)), $.value = E / (x - E) / (I / (x - I)), b.value = A + Te < i ? `${A}px` : "", u.value = I + Te < x ? `${I}px` : "";
1170
+ const u = v.value.offsetHeight - Te, S = v.value.offsetWidth - Te, g = u ** 2 / v.value.scrollHeight, B = S ** 2 / v.value.scrollWidth, N = Math.max(g, e.minSize), R = Math.max(B, e.minSize);
1171
+ f.value = g / (u - g) / (N / (u - N)), $.value = B / (S - B) / (R / (S - R)), h.value = N + Te < u ? `${N}px` : "", s.value = R + Te < S ? `${R}px` : "";
1095
1172
  };
1096
1173
  return nt(() => {
1097
1174
  ot(() => {
1098
- S();
1175
+ w();
1099
1176
  });
1100
- }), a({
1101
- update: S,
1177
+ }), n({
1178
+ update: w,
1102
1179
  handleScroll: m
1103
1180
  }), () => d(we, null, [d(tt, {
1104
1181
  move: o.value,
1105
1182
  barStyle: e.barStyle.x,
1106
1183
  ratio: $.value,
1107
- size: u.value,
1184
+ size: s.value,
1108
1185
  always: e.always
1109
1186
  }, null), !!l.value.y && d(tt, {
1110
- move: s.value,
1187
+ move: r.value,
1111
1188
  barStyle: e.barStyle.y,
1112
1189
  ratio: f.value,
1113
- size: b.value,
1190
+ size: h.value,
1114
1191
  vertical: !0,
1115
1192
  always: e.always
1116
1193
  }, null)]);
1117
1194
  }
1118
- }), na = (e) => ({
1119
- [`${e.componentCls}`]: {
1120
- lineHeight: 1,
1121
- "&-with-after": {
1122
- paddingBottom: e.margin
1123
- },
1124
- "&-container": {
1125
- display: "flex",
1126
- alignItems: "center",
1127
- justifyContent: "space-between",
1128
- gap: e.padding,
1129
- paddingBottom: e.padding,
1130
- "&-mobile": {
1131
- flexDirection: "column",
1132
- flexWrap: "wrap",
1133
- alignItems: "flex-start",
1134
- [`${e.componentCls}-left`]: {
1135
- flexWrap: "wrap",
1136
- maxWidth: "100%"
1137
- },
1138
- [`${e.componentCls}-right`]: {
1139
- width: "100%"
1140
- }
1141
- }
1142
- },
1143
- "&-title": {
1144
- display: "flex",
1145
- alignItems: "center",
1146
- justifyContent: "flex-start",
1147
- color: e.colorTextHeading,
1148
- fontWeight: "500",
1149
- fontSize: e.fontSizeLG
1150
- },
1151
- "&-left": {
1152
- display: "flex",
1153
- flexWrap: "wrap",
1154
- alignItems: "center",
1155
- gap: e.marginXS,
1156
- justifyContent: "flex-start",
1157
- [`${e.antCls}-tabs`]: {
1158
- width: "100%"
1159
- },
1160
- "&-has-tabs": {
1161
- overflow: "hidden"
1162
- }
1163
- },
1164
- "&-right": {
1165
- flex: 1,
1166
- display: "flex",
1167
- flexWrap: "wrap",
1168
- justifyContent: "flex-end",
1169
- gap: e.marginSM,
1170
- [`${e.componentCls}-actions`]: {
1171
- display: "flex",
1172
- alignItems: "center",
1173
- gap: e.marginXS
1174
- }
1175
- },
1176
- "&-setting-items": {
1177
- display: "flex",
1178
- gap: e.marginSM,
1179
- lineHeight: "32px",
1180
- alignItems: "center"
1181
- },
1182
- "&-setting-item": {
1183
- color: e.colorIconHover,
1184
- fontSize: e.fontSizeLG,
1185
- cursor: "pointer",
1186
- "> span": { display: "block", width: "100%", height: "100%" },
1187
- "&:hover": {
1188
- color: e.colorPrimary
1189
- }
1190
- }
1191
- }
1192
1195
  });
1193
- function oa(e) {
1196
+ function na(e) {
1194
1197
  if (ae(e))
1195
1198
  return e;
1196
1199
  if (e) {
1197
- const a = e, {
1200
+ const n = e, {
1198
1201
  icon: l,
1199
- tooltip: n,
1202
+ tooltip: a,
1200
1203
  onClick: o,
1201
- key: s
1202
- } = a;
1203
- return l && n ? d($e, {
1204
- title: n,
1205
- key: s
1204
+ key: r
1205
+ } = n;
1206
+ return l && a ? d($e, {
1207
+ title: a,
1208
+ key: r
1206
1209
  }, {
1207
1210
  default: () => [d("span", {
1208
- key: s,
1211
+ key: r,
1209
1212
  onClick: () => {
1210
- o && o(s);
1213
+ o && o(r);
1211
1214
  }
1212
1215
  }, [l])]
1213
1216
  }) : l;
@@ -1226,96 +1229,94 @@ const Lt = /* @__PURE__ */ ge({
1226
1229
  actionsPlacement: String
1227
1230
  },
1228
1231
  setup(e) {
1229
- const {
1230
- wrapSSR: a,
1231
- hashId: l
1232
- } = rt("ListToolBar", [na], e.prefixCls), n = w(), {
1233
- height: o
1234
- } = wl(n), s = it(), {
1235
- isMobile: u,
1236
- tableListToolsHeight: b,
1237
- classNames: f,
1238
- styles: $
1232
+ const n = T(), {
1233
+ height: l
1234
+ } = Tl(n), a = it(), {
1235
+ isMobile: o,
1236
+ tableListToolsHeight: r,
1237
+ classNames: s,
1238
+ styles: h,
1239
+ hashId: f
1239
1240
  } = Ke();
1240
- yt(() => {
1241
- b.value = o.value || 0;
1241
+ pt(() => {
1242
+ r.value = l.value || 0;
1242
1243
  });
1243
- const m = T(() => !!(e.headerTitleTip || e.headerTitle)), S = Ne(() => {
1244
+ const $ = x(() => !!(e.headerTitleTip || e.headerTitle)), m = Ne(() => {
1244
1245
  if (!Array.isArray(e.actions) || e.actions?.length < 1)
1245
1246
  return {
1246
1247
  left: null,
1247
1248
  right: null
1248
1249
  };
1249
- const A = e.actions.filter((N) => ae(N)).filter((N) => (N?.props?.placement || e.actionsPlacement) === "left"), I = e.actions.filter((N) => ae(N)).filter((N) => (N?.props?.placement || e.actionsPlacement) === "right");
1250
+ const B = e.actions.filter((R) => ae(R)).filter((R) => (R?.props?.placement || e.actionsPlacement) === "left"), N = e.actions.filter((R) => ae(R)).filter((R) => (R?.props?.placement || e.actionsPlacement) === "right");
1250
1251
  return {
1251
- left: A.length ? d("div", {
1252
- class: `${e.prefixCls}-actions ${l.value}`
1253
- }, [A]) : null,
1254
- right: I.length ? d("div", {
1255
- class: `${e.prefixCls}-actions ${l.value}`
1256
- }, [I]) : null
1252
+ left: B.length ? d("div", {
1253
+ class: `${e.prefixCls}-actions ${f.value}`
1254
+ }, [B]) : null,
1255
+ right: N.length ? d("div", {
1256
+ class: `${e.prefixCls}-actions ${f.value}`
1257
+ }, [N]) : null
1257
1258
  };
1258
- }, [() => e.actions, () => e.actionsPlacement]), v = T(() => !!(e.headerTitleTip || e.headerTitle || S.value.left)), i = T(() => !!(e.settings?.length || S.value.right)), x = Ne(() => {
1259
- if (!v.value && i.value)
1259
+ }, [() => e.actions, () => e.actionsPlacement]), w = x(() => !!(e.headerTitleTip || e.headerTitle || m.value.left)), v = x(() => !!(e.settings?.length || m.value.right)), u = Ne(() => {
1260
+ if (!w.value && v.value)
1260
1261
  return d("div", {
1261
- class: `${e.prefixCls}-left ${l.value}`
1262
+ class: `${e.prefixCls}-left ${f.value}`
1262
1263
  }, null);
1263
- const A = S.value.left, I = D(`${e.prefixCls}-left ${l.value}`, f.value?.toolbarLeft), N = $.value?.toolbarLeft;
1264
- return m.value ? d("div", {
1265
- class: I,
1266
- style: N
1264
+ const B = m.value.left, N = O(`${e.prefixCls}-left ${f.value}`, s.value?.toolbarLeft), R = h.value?.toolbarLeft;
1265
+ return $.value ? d("div", {
1266
+ class: N,
1267
+ style: R
1267
1268
  }, [d("div", {
1268
- class: `${e.prefixCls}-title ${l.value}`
1269
+ class: `${e.prefixCls}-title ${f.value}`
1269
1270
  }, [e.headerTitle, e.headerTitleTip && d($e, {
1270
1271
  title: e.titleTipText
1271
1272
  }, {
1272
- default: () => [De(e.headerTitleTip) && e.headerTitleTip ? d(ll, null, null) : e.headerTitleTip]
1273
- })]), A]) : d("div", {
1274
- class: I,
1275
- style: N
1276
- }, [A]);
1277
- }, [() => v.value, () => i.value, () => m.value, () => e.prefixCls, () => e.headerTitle, () => e.titleTipText, () => e.headerTitleTip]), h = Ne(() => {
1278
- if (!i.value) return null;
1279
- const A = S.value.right;
1273
+ default: () => [Oe(e.headerTitleTip) && e.headerTitleTip ? d(tl, null, null) : e.headerTitleTip]
1274
+ })]), B]) : d("div", {
1275
+ class: N,
1276
+ style: R
1277
+ }, [B]);
1278
+ }, [() => w.value, () => v.value, () => $.value, () => e.prefixCls, () => e.headerTitle, () => e.titleTipText, () => e.headerTitleTip]), S = Ne(() => {
1279
+ if (!v.value) return null;
1280
+ const B = m.value.right;
1280
1281
  return d("div", {
1281
- class: D(`${e.prefixCls}-right ${l.value}`, f.value?.toolbarRight),
1282
+ class: O(`${e.prefixCls}-right ${f.value}`, s.value?.toolbarRight),
1282
1283
  style: {
1283
- alignItems: s.value.lg ? "center" : "flex-end",
1284
- flexDirection: s.value.lg ? "row" : "column",
1285
- ...$.value?.toolbarRight || {}
1284
+ alignItems: a.value.lg ? "center" : "flex-end",
1285
+ flexDirection: a.value.lg ? "row" : "column",
1286
+ ...h.value?.toolbarRight || {}
1286
1287
  }
1287
- }, [A, e.settings?.length ? d("div", {
1288
- class: D(`${e.prefixCls}-setting-items`, l.value)
1289
- }, [e.settings.map((I, N) => {
1290
- const L = oa(I);
1288
+ }, [B, e.settings?.length ? d("div", {
1289
+ class: O(`${e.prefixCls}-setting-items`, f.value)
1290
+ }, [e.settings.map((N, R) => {
1291
+ const X = na(N);
1291
1292
  return d("div", {
1292
- key: N,
1293
- class: D(`${e.prefixCls}-setting-item`, l.value)
1294
- }, [L]);
1293
+ key: R,
1294
+ class: O(`${e.prefixCls}-setting-item`, f.value)
1295
+ }, [X]);
1295
1296
  })]) : null]);
1296
- }, [() => s.value, () => i.value, () => e.prefixCls, () => m.value, () => S.value, () => e.settings]), E = Ne(() => {
1297
- if (!i.value && !v.value) return null;
1298
- const A = {
1299
- [`${l.value}`]: !0,
1297
+ }, [() => a.value, () => v.value, () => e.prefixCls, () => $.value, () => m.value, () => e.settings]), g = Ne(() => {
1298
+ if (!v.value && !w.value) return null;
1299
+ const B = {
1300
+ [`${f.value}`]: !0,
1300
1301
  [`${e.prefixCls}-container`]: !0,
1301
- [`${e.prefixCls}-container-mobile`]: u.value
1302
+ [`${e.prefixCls}-container-mobile`]: o.value
1302
1303
  };
1303
1304
  return d("div", {
1304
- class: A
1305
- }, [x.value, h.value]);
1306
- }, [() => u.value, () => v.value, () => i.value, () => x.value, () => e.prefixCls, () => h.value]);
1307
- return () => a(d("div", {
1305
+ class: B
1306
+ }, [u.value, S.value]);
1307
+ }, [() => o.value, () => w.value, () => v.value, () => u.value, () => e.prefixCls, () => S.value]);
1308
+ return () => d("div", {
1308
1309
  ref: n,
1309
- class: D(`${e.prefixCls} ${l.value}`, e.listToolAfter && `${e.prefixCls}-with-after`, f.value?.toolbar),
1310
- style: $.value?.toolbar
1311
- }, [E.value, e.listToolAfter && d("div", {
1312
- class: D(`${e.prefixCls}-after ${l.value}`, f.value?.toolbarAfter),
1313
- style: $.value?.toolbarAfter
1314
- }, [e.listToolAfter])]));
1310
+ class: O(`${e.prefixCls} ${f.value}`, e.listToolAfter && `${e.prefixCls}-with-after`, s.value?.toolbar),
1311
+ style: h.value?.toolbar
1312
+ }, [g.value, e.listToolAfter && d("div", {
1313
+ class: O(`${e.prefixCls}-after ${f.value}`, s.value?.toolbarAfter),
1314
+ style: h.value?.toolbarAfter
1315
+ }, [e.listToolAfter])]);
1315
1316
  }
1316
1317
  });
1317
1318
  Lt.inheritAttrs = !1;
1318
- const jt = /* @__PURE__ */ ge({
1319
+ const oa = /* @__PURE__ */ ge({
1319
1320
  setup() {
1320
1321
  const {
1321
1322
  isFullscreen: e
@@ -1323,11 +1324,11 @@ const jt = /* @__PURE__ */ ge({
1323
1324
  return () => e.value ? d($e, {
1324
1325
  title: "退出全屏"
1325
1326
  }, {
1326
- default: () => [d(al, null, null)]
1327
+ default: () => [d(ll, null, null)]
1327
1328
  }) : d($e, {
1328
1329
  title: "全屏"
1329
1330
  }, {
1330
- default: () => [d(nl, null, null)]
1331
+ default: () => [d(al, null, null)]
1331
1332
  });
1332
1333
  }
1333
1334
  });
@@ -1335,38 +1336,32 @@ function ia() {
1335
1336
  return {
1336
1337
  reload: {
1337
1338
  text: "刷新",
1338
- icon: d(ol, null, null)
1339
+ icon: d(nl, null, null)
1339
1340
  },
1340
1341
  fullScreen: {
1341
1342
  text: "全屏",
1342
- icon: d(jt, null, null)
1343
+ icon: d(oa, null, null)
1343
1344
  }
1344
1345
  };
1345
1346
  }
1346
- function ra(e, a) {
1347
+ function sa(e, n) {
1347
1348
  return Rt(e).filter((l) => l).map((l) => {
1348
- const n = e[l];
1349
- if (!n)
1349
+ const a = e[l];
1350
+ if (!a)
1350
1351
  return null;
1351
- let o = n === !0 ? a[l] : () => n?.();
1352
- if (typeof o != "function" && (o = () => {
1353
- }), l === "fullScreen")
1354
- return d("span", {
1355
- key: l,
1356
- onClick: o
1357
- }, [d(jt, null, null)]);
1358
- const s = ia()[l];
1359
- return s ? d("span", {
1352
+ const o = a ? n[l] : () => () => {
1353
+ }, r = ia()[l];
1354
+ return r ? typeof a == "boolean" || !ze(a) ? d("span", {
1360
1355
  key: l,
1361
1356
  onClick: o
1362
1357
  }, [d($e, {
1363
- title: s.text
1358
+ title: r.text
1364
1359
  }, {
1365
- default: () => [s.icon]
1366
- })]) : null;
1360
+ default: () => [r.icon]
1361
+ })]) : a?.(o) : null;
1367
1362
  }).filter((l) => l);
1368
1363
  }
1369
- const sa = {
1364
+ const ra = {
1370
1365
  options: [Boolean, Object, Array],
1371
1366
  actionsPlacement: [String],
1372
1367
  headerTitle: [Function, Boolean, Object, Array, String],
@@ -1375,25 +1370,25 @@ const sa = {
1375
1370
  titleTipText: [String],
1376
1371
  actionsRender: [Array]
1377
1372
  }, ua = /* @__PURE__ */ ge({
1378
- props: sa,
1373
+ props: ra,
1379
1374
  inheritAttrs: !1,
1380
1375
  setup(e) {
1381
- const a = $t({
1376
+ const n = $t({
1382
1377
  suffixCls: "table-list-toolbar",
1383
1378
  isPor: !0
1384
1379
  }), {
1385
1380
  action: l
1386
- } = Ke(), n = Ne(() => e.options === !1 ? [] : ra({
1387
- reload: () => l?.reload(),
1388
- fullScreen: () => l?.toggle()
1389
- }, ne(e.options) ? e.options : {}), [() => e.options]);
1381
+ } = Ke(), a = Ne(() => e.options === !1 ? [] : sa(ne(e.options) ? e.options : {}, {
1382
+ reload: () => l.reload(),
1383
+ fullScreen: () => l.toggle()
1384
+ }), [() => e.options]);
1390
1385
  return () => {
1391
1386
  const o = e.actionsRender || [];
1392
1387
  return d(Lt, {
1393
- prefixCls: a,
1388
+ prefixCls: n,
1394
1389
  actions: o,
1395
1390
  actionsPlacement: e.actionsPlacement,
1396
- settings: R(n),
1391
+ settings: P(a),
1397
1392
  headerTitle: e.headerTitle,
1398
1393
  listToolAfter: e.listToolAfter,
1399
1394
  headerTitleTip: e.headerTitleTip,
@@ -1403,104 +1398,104 @@ const sa = {
1403
1398
  }
1404
1399
  });
1405
1400
  function ca(e) {
1406
- return Ut();
1401
+ return Qt();
1407
1402
  }
1408
- function da(e, a = !0, l) {
1409
- ca() ? Ct(e, l) : a ? e() : ot(e);
1403
+ function da(e, n = !0, l) {
1404
+ ca() ? yt(e, l) : n ? e() : ot(e);
1410
1405
  }
1411
- function fa({ scroll: e, columns: a, breakpoint: l, draggable: n, autoScroll: o, neverScroll: s }) {
1412
- const u = w([]);
1413
- q([
1406
+ function fa({ scroll: e, columns: n, breakpoint: l, draggable: a, autoScroll: o, neverScroll: r }) {
1407
+ const s = T([]);
1408
+ Y([
1414
1409
  () => e.value,
1415
- () => a.value,
1416
- () => l.value,
1417
1410
  () => n.value,
1418
1411
  () => l.value,
1412
+ () => a.value,
1413
+ () => l.value,
1419
1414
  () => o.value,
1420
- () => s.value
1415
+ () => r.value
1421
1416
  ], () => {
1422
- const v = $(ce(a.value));
1423
- qe(v, ce(u.value)) || (u.value = ee(v));
1417
+ const v = $(ce(n.value));
1418
+ qe(v, ce(s.value)) || (s.value = ee(v));
1424
1419
  }, {
1425
1420
  deep: !0,
1426
1421
  immediate: !0
1427
1422
  });
1428
- const b = T(() => f(R(u)));
1423
+ const h = x(() => f(P(s)));
1429
1424
  function f(v) {
1430
- return v.sort((i, x) => cl(i, x, "order", 0));
1425
+ return v.sort((u, S) => ul(u, S, "order", 0));
1431
1426
  }
1432
1427
  function $(v) {
1433
- return ee(v).map((i, x) => {
1434
- if (i.dataIndex === "action" || x === v.length - 1 ? i.resizable = !1 : i.resizable = De(i.resizable) ? i.resizable : !!(Ce(i.width) && R(n)), !i.width || R(s))
1435
- return i;
1436
- if (i.dataIndex === "action" && R(o))
1437
- if (R(e)?.x || !R(l))
1438
- i.width = i.width || 100, i.fixed = "right";
1428
+ return ee(v).map((u, S) => {
1429
+ if (u.dataIndex === "action" || S === v.length - 1 ? u.resizable = !1 : u.resizable = Oe(u.resizable) ? u.resizable : !!(Ce(u.width) && P(a)), !u.width || P(r))
1430
+ return u;
1431
+ if (u.dataIndex === "action" && P(o))
1432
+ if (P(e)?.x || !P(l))
1433
+ u.width = u.width || 100, u.fixed = "right";
1439
1434
  else {
1440
- const h = R(a).find((E) => E.dataIndex === i.dataIndex);
1441
- i.width = h?.width || "", i.fixed = h?.fixed;
1435
+ const g = P(n).find((B) => B.dataIndex === u.dataIndex);
1436
+ u.width = g?.width || "", u.fixed = g?.fixed;
1442
1437
  }
1443
- return i;
1438
+ return u;
1444
1439
  });
1445
1440
  }
1446
- function m(v, i) {
1447
- u.value = u.value.map((x) => (x.uuid === i.uuid && (x.width = v), x));
1441
+ function m(v, u) {
1442
+ s.value = s.value.map((S) => (S.uuid === u.uuid && (S.width = v), S));
1448
1443
  }
1449
- function S(v) {
1444
+ function w(v) {
1450
1445
  if (v.length <= 0) {
1451
- u.value = [];
1446
+ s.value = [];
1452
1447
  return;
1453
1448
  }
1454
- qe($(v), ce(u.value)) || (u.value = $(v));
1449
+ qe($(v), ce(s.value)) || (s.value = $(v));
1455
1450
  }
1456
1451
  return {
1457
1452
  breakpoint: l,
1458
- proColumns: b,
1459
- setColumns: S,
1453
+ proColumns: h,
1454
+ setColumns: w,
1460
1455
  resizeColumnWidth: m
1461
1456
  };
1462
1457
  }
1463
- function va(e, a) {
1464
- const l = T(() => a), n = w(), o = w(e);
1465
- function s() {
1466
- n.value && (clearTimeout(n.value), n.value = null);
1458
+ function va(e, n) {
1459
+ const l = x(() => n), a = T(), o = T(e);
1460
+ function r() {
1461
+ a.value && (clearTimeout(a.value), a.value = null);
1467
1462
  }
1468
- async function u(...b) {
1469
- return l.value === 0 || l.value === void 0 ? o.value(...b) : (s(), new Promise(async (f) => {
1470
- b[0]?.immediate ? f(await o.value(...b)) : n.value = setTimeout(async () => {
1471
- f(await o.value(...b));
1463
+ async function s(...h) {
1464
+ return l.value === 0 || l.value === void 0 ? o.value(...h) : (r(), new Promise(async (f) => {
1465
+ h[0]?.immediate ? f(await o.value(...h)) : a.value = setTimeout(async () => {
1466
+ f(await o.value(...h));
1472
1467
  }, l.value);
1473
1468
  }));
1474
1469
  }
1475
- return rl(s), {
1476
- cancel: s,
1477
- run: u
1470
+ return il(r), {
1471
+ cancel: r,
1472
+ run: s
1478
1473
  };
1479
1474
  }
1480
1475
  function ma(e) {
1481
- const a = T(() => e.rowKey), l = T(() => e.polling), n = T(() => e.debounceTime), o = T(() => e.dataSource), s = T(() => e.autoRequest);
1476
+ const n = x(() => e.rowKey), l = x(() => e.polling), a = x(() => e.debounceTime), o = x(() => e.dataSource), r = x(() => e.autoRequest);
1482
1477
  return {
1483
- rowKey: a,
1478
+ rowKey: n,
1484
1479
  polling: l,
1485
1480
  request: e.request,
1486
1481
  postData: e.postData,
1487
- debounceTime: n,
1482
+ debounceTime: a,
1488
1483
  dataSource: o,
1489
- autoRequest: s
1484
+ autoRequest: r
1490
1485
  };
1491
1486
  }
1492
- function ha({ rowKey: e, autoRequest: a, polling: l, request: n, postData: o, dataSource: s, waitRequest: u, debounceTime: b }, { params: f, columns: $, setLoading: m, setColumns: S, removeRowKeys: v, syncSelectedRows: i, defaultFormSearch: x, setPagination: h, pageInfo: E, onRequestError: A, onBeforeSearchSubmit: I, hasCustomRender: N }, L) {
1493
- const K = w(""), k = w(!1), H = w(!1), B = w([]), X = w(), O = w(null), W = (t = !1) => {
1487
+ function ha({ rowKey: e, autoRequest: n, polling: l, request: a, postData: o, dataSource: r, waitRequest: s, debounceTime: h }, { params: f, columns: $, setLoading: m, setColumns: w, removeRowKeys: v, syncSelectedRows: u, defaultFormSearch: S, setPagination: g, pageInfo: B, onRequestError: N, onBeforeSearchSubmit: R, hasCustomRender: X }, M) {
1488
+ const K = T(""), k = T(!1), E = T(!1), A = T([]), q = T(), z = T(null), L = (t = !1) => {
1494
1489
  (k.value || t) && m(!1), de(!1);
1495
- }, Y = async (t = {}) => {
1496
- const { pagination: r = {}, filters: y = {}, sorter: g = {}, removeKeys: C = [], isPolling: c = !1, extra: fe } = t;
1497
- if (!n || !Me(n))
1498
- return s.value || [];
1499
- c ? de(!0) : m(!0), r && h(r);
1490
+ }, H = async (t = {}) => {
1491
+ const { pagination: i = {}, filters: y = {}, sorter: b = {}, removeKeys: C = [], isPolling: c = !1, extra: fe } = t;
1492
+ if (!a || !ze(a))
1493
+ return r.value || [];
1494
+ c ? de(!0) : m(!0), i && g(i);
1500
1495
  try {
1501
1496
  C.length && v(C);
1502
- const U = ne(g) ? Object.keys(g).length ? [g] : [] : g;
1503
- S(R($).map((Se) => {
1497
+ const U = ne(b) ? Object.keys(b).length ? [b] : [] : b;
1498
+ w(P($).map((Se) => {
1504
1499
  const xe = U.find((ie) => (ie?.columnKey || ie?.field) === Se.dataIndex);
1505
1500
  return {
1506
1501
  ...Se,
@@ -1508,13 +1503,13 @@ function ha({ rowKey: e, autoRequest: a, polling: l, request: n, postData: o, da
1508
1503
  };
1509
1504
  }));
1510
1505
  let Fe = {
1511
- ...ce(E),
1512
- current: vl(ce(E), C.length),
1513
- ...R(x),
1514
- ...R(f),
1506
+ ...ce(B),
1507
+ current: fl(ce(B), C.length),
1508
+ ...P(S),
1509
+ ...P(f),
1515
1510
  ...t.params
1516
1511
  };
1517
- I && Me(I) && (Fe = await I({
1512
+ R && ze(R) && (Fe = await R({
1518
1513
  params: Fe,
1519
1514
  sorter: U,
1520
1515
  filter: y,
@@ -1523,7 +1518,7 @@ function ha({ rowKey: e, autoRequest: a, polling: l, request: n, postData: o, da
1523
1518
  let ve = [];
1524
1519
  const ue = `table_request_${Pt().uuid(10)}`;
1525
1520
  K.value = ue;
1526
- const Ie = await n?.({
1521
+ const Ie = await a?.({
1527
1522
  params: ee(ce(Fe)),
1528
1523
  sorter: U,
1529
1524
  filter: y,
@@ -1535,135 +1530,135 @@ function ha({ rowKey: e, autoRequest: a, polling: l, request: n, postData: o, da
1535
1530
  const { success: Se = !0, data: xe = [] } = Ie;
1536
1531
  if (!Se)
1537
1532
  return [];
1538
- ve = typeof o == "function" ? await o?.(xe) : xe, i(ve);
1533
+ ve = typeof o == "function" ? await o?.(xe) : xe, u(ve);
1539
1534
  const ie = Ie.total || ve?.length || 0;
1540
- ie !== E.total && h({
1535
+ ie !== B.total && g({
1541
1536
  total: ie
1542
1537
  });
1543
- const ke = R(B).map((Ve) => ze(Ve, "sortIndex"));
1544
- return qe(ve, ke) ? R(B) : (oe(ve), ve);
1538
+ const ke = P(A).map((Ve) => De(Ve, "sortIndex"));
1539
+ return qe(ve, ke) ? P(A) : (oe(ve), ve);
1545
1540
  } else
1546
1541
  return [];
1547
1542
  } catch (U) {
1548
- if (A === void 0)
1543
+ if (N === void 0)
1549
1544
  throw new Error(U);
1550
- B.value === void 0 && oe([]), A(U);
1545
+ A.value === void 0 && oe([]), N(U);
1551
1546
  } finally {
1552
- W(!0);
1547
+ L(!0);
1553
1548
  }
1554
1549
  return [];
1555
- }, M = va(async (t = {}) => {
1556
- if (X.value && clearTimeout(X.value), !n)
1550
+ }, W = va(async (t = {}) => {
1551
+ if (q.value && clearTimeout(q.value), !a)
1557
1552
  return;
1558
- const r = new AbortController();
1559
- O.value = r;
1553
+ const i = new AbortController();
1554
+ z.value = i;
1560
1555
  try {
1561
1556
  const y = await Promise.race([
1562
- Y(t),
1557
+ H(t),
1563
1558
  new Promise((C, c) => {
1564
- O.value?.signal?.addEventListener?.("abort", () => {
1565
- c("aborted"), M.cancel(), W();
1559
+ z.value?.signal?.addEventListener?.("abort", () => {
1560
+ c("aborted"), W.cancel(), L();
1566
1561
  });
1567
1562
  })
1568
1563
  ]);
1569
- if (r.signal.aborted)
1564
+ if (i.signal.aborted)
1570
1565
  return;
1571
- const g = dl(l.value, y);
1572
- return g && !k.value && (X.value = setTimeout(() => {
1573
- M.run({ ...t, isPolling: g });
1574
- }, Math.max(g, 2e3))), y;
1566
+ const b = cl(l.value, y);
1567
+ return b && !k.value && (q.value = setTimeout(() => {
1568
+ W.run({ ...t, isPolling: b });
1569
+ }, Math.max(b, 2e3))), y;
1575
1570
  } catch (y) {
1576
1571
  if (y === "aborted")
1577
1572
  return;
1578
1573
  throw y;
1579
1574
  }
1580
- }, b.value || 30), te = () => {
1581
- O.value?.abort(), M.cancel(), W();
1575
+ }, h.value || 30), te = () => {
1576
+ z.value?.abort(), W.cancel(), L();
1582
1577
  };
1583
1578
  nt(() => {
1584
1579
  k.value = !1;
1585
- }), Ct(() => {
1580
+ }), yt(() => {
1586
1581
  k.value = !1;
1582
+ }), Ct(() => {
1583
+ te(), k.value = !0, clearTimeout(q.value);
1587
1584
  }), St(() => {
1588
- te(), k.value = !0, clearTimeout(X.value);
1589
- }), xt(() => {
1590
- te(), k.value = !0, clearTimeout(X.value);
1591
- }), q(() => l.value, () => {
1592
- u.value || (l.value ? M.run({ isPolling: !0 }) : clearTimeout(X.value));
1593
- }, { immediate: !0 }), q(() => u.value, () => {
1594
- u.value ? m(!0) : M.run({ isPolling: !1 });
1595
- }, { immediate: !0 }), q(() => s.value, () => {
1596
- s.value && oe(s.value || []);
1597
- }, { deep: !0, immediate: !0 }), q(() => f.value, () => {
1598
- u.value || a.value && (h({ current: 1 }), re());
1599
- }, { deep: !0, immediate: !0 }), q(() => x.value, (t, r) => {
1600
- u.value || qe(t, r) || (h({ current: 1 }), re());
1585
+ te(), k.value = !0, clearTimeout(q.value);
1586
+ }), Y(() => l.value, () => {
1587
+ s.value || (l.value ? W.run({ isPolling: !0 }) : clearTimeout(q.value));
1588
+ }, { immediate: !0 }), Y(() => s.value, () => {
1589
+ s.value ? m(!0) : W.run({ isPolling: !1 });
1590
+ }, { immediate: !0 }), Y(() => r.value, () => {
1591
+ r.value && oe(r.value || []);
1592
+ }, { deep: !0, immediate: !0 }), Y(() => f.value, () => {
1593
+ s.value || n.value && (g({ current: 1 }), se());
1594
+ }, { deep: !0, immediate: !0 }), Y(() => S.value, (t, i) => {
1595
+ s.value || qe(t, i) || (g({ current: 1 }), se());
1601
1596
  }, { deep: !0, immediate: !0 });
1602
- function re() {
1603
- n ? l.value || (te(), M.run({ isPolling: !1 })) : oe(s.value || []);
1597
+ function se() {
1598
+ a ? l.value || (te(), W.run({ isPolling: !1 })) : oe(r.value || []);
1604
1599
  }
1605
- const se = T(() => {
1606
- if (N.value)
1607
- return R(B);
1608
- const t = $.value.filter((r) => r.show || r.show === void 0);
1609
- return !R(B) || !t || t.length === 0 ? [] : R(B);
1610
- }), be = T(() => R(B).some((t) => J(t.children) && t.children.length > 0));
1600
+ const re = x(() => {
1601
+ if (X.value)
1602
+ return P(A);
1603
+ const t = $.value.filter((i) => i.show || i.show === void 0);
1604
+ return !P(A) || !t || t.length === 0 ? [] : P(A);
1605
+ }), be = x(() => P(A).some((t) => J(t.children) && t.children.length > 0));
1611
1606
  function de(t) {
1612
- H.value = t;
1607
+ E.value = t;
1613
1608
  }
1614
- function Re(t, r = {}, y = {}, g) {
1615
- te(), M.run({ pagination: t, filters: r, sorter: y, extra: g, isPolling: !1 });
1609
+ function Re(t, i = {}, y = {}, b) {
1610
+ te(), W.run({ pagination: t, filters: i, sorter: y, extra: b, isPolling: !1 });
1616
1611
  }
1617
1612
  function oe(t) {
1618
- const r = fl(ee(t), ce(E));
1619
- if (B.value = r, !n || !Me(n)) {
1620
- const y = r.length || 0;
1621
- y !== E.total && h({
1613
+ const i = dl(ee(t), ce(B));
1614
+ if (A.value = i, !a || !ze(a)) {
1615
+ const y = i.length || 0;
1616
+ y !== B.total && g({
1622
1617
  total: y
1623
1618
  });
1624
1619
  }
1625
1620
  }
1626
1621
  return {
1627
- dataSource: se,
1622
+ dataSource: re,
1628
1623
  isTreeDataRef: be,
1629
1624
  setTableDataList: oe,
1630
1625
  operateTableDataRow: (t) => {
1631
- const { key: r, row: y, value: g, type: C = "update" } = t, c = r ?? e.value, fe = y?.[c] ?? g;
1626
+ const { key: i, row: y, value: b, type: C = "update" } = t, c = i ?? e.value, fe = y?.[c] ?? b;
1632
1627
  switch (!y && C !== "delete" && console.warn("row is required"), C) {
1633
1628
  case "update":
1634
- c && fe && y && (B.value = B.value.map((U) => fe === U[c] ? ye(U, y) : U));
1629
+ c && fe && y && (A.value = A.value.map((U) => fe === U[c] ? ye(U, y) : U));
1635
1630
  break;
1636
1631
  case "push":
1637
- y && B.value.push(y);
1632
+ y && A.value.push(y);
1638
1633
  break;
1639
1634
  case "unshift":
1640
- y && B.value.unshift(y);
1635
+ y && A.value.unshift(y);
1641
1636
  break;
1642
1637
  case "delete":
1643
- c && (B.value = B.value.filter((U) => g !== U[c]));
1638
+ c && (A.value = A.value.filter((U) => b !== U[c]));
1644
1639
  break;
1645
1640
  }
1646
1641
  },
1647
1642
  handleTableChange: Re,
1648
1643
  run: async (t) => {
1649
- u.value || (n ? await M.run({ ...t, isPolling: !1 }) : L("reload"));
1644
+ s.value || (a ? await W.run({ ...t, isPolling: !1 }) : M("reload"));
1650
1645
  }
1651
1646
  };
1652
1647
  }
1653
1648
  function ga(e) {
1654
- const a = w(l(e.loading.value));
1655
- q(() => e.loading.value, (o) => {
1656
- a.value = l(o, a.value);
1649
+ const n = T(l(e.loading.value));
1650
+ Y(() => e.loading.value, (o) => {
1651
+ n.value = l(o, n.value);
1657
1652
  });
1658
- function l(o, s = !1) {
1659
- return De(o) ? o : ne(o) ? o?.spinning ?? s : s;
1653
+ function l(o, r = !1) {
1654
+ return Oe(o) ? o : ne(o) ? o?.spinning ?? r : r;
1660
1655
  }
1661
- function n(o) {
1662
- a.value = o;
1656
+ function a(o) {
1657
+ n.value = o;
1663
1658
  }
1664
- return [a, n];
1659
+ return [n, a];
1665
1660
  }
1666
- const Ye = {
1661
+ const Me = {
1667
1662
  current: 1,
1668
1663
  pageSize: 10,
1669
1664
  size: "default",
@@ -1673,115 +1668,115 @@ const Ye = {
1673
1668
  };
1674
1669
  function ba({
1675
1670
  pagination: e,
1676
- pageItemRender: a
1671
+ pageItemRender: n
1677
1672
  }) {
1678
- const l = w({
1679
- ...Ye
1680
- }), n = at({
1681
- current: Ye.current,
1682
- pageSize: Ye.pageSize,
1673
+ const l = T({
1674
+ ...Me
1675
+ }), a = at({
1676
+ current: Me.current,
1677
+ pageSize: Me.pageSize,
1683
1678
  total: 0
1684
1679
  });
1685
- q(() => e.value, () => {
1680
+ Y(() => e.value, () => {
1686
1681
  if (e.value === !1) {
1687
1682
  l.value = !1;
1688
1683
  return;
1689
1684
  }
1690
- const s = Me(a) ? {
1685
+ const r = ze(n) ? {
1691
1686
  itemRender: ({
1692
- page: b,
1687
+ page: h,
1693
1688
  type: f,
1694
1689
  originalElement: $
1695
- }) => a ? a({
1696
- page: b,
1690
+ }) => n ? n({
1691
+ page: h,
1697
1692
  type: f,
1698
1693
  originalElement: $
1699
1694
  }) : null
1700
- } : null, u = {
1701
- ...Ye,
1695
+ } : null, s = {
1696
+ ...Me,
1702
1697
  ...e.value || {},
1703
- ...s || {}
1698
+ ...r || {}
1704
1699
  };
1705
- e.value?.showTotal || (u.showTotal = (b) => `共${b < u.pageSize ? 1 : Math.ceil(b / (u.pageSize || 10))}页 ${b}条记录`), l.value = ee(u), ml(n, (b) => {
1706
- Ce(u[b]) && (n[b] = u[b]);
1700
+ e.value?.showTotal || (s.showTotal = (h) => `共${h < s.pageSize ? 1 : Math.ceil(h / (s.pageSize || 10))}页 ${h}条记录`), l.value = ee(s), vl(a, (h) => {
1701
+ Ce(s[h]) && (a[h] = s[h]);
1707
1702
  });
1708
1703
  }, {
1709
1704
  deep: 1,
1710
1705
  immediate: !0
1711
1706
  });
1712
- function o(s) {
1713
- l.value = ye(R(l), s);
1714
- for (const u in n)
1715
- s[u] && Ce(s[u]) && (n[u] = s[u]);
1707
+ function o(r) {
1708
+ l.value = ye(P(l), r);
1709
+ for (const s in a)
1710
+ r[s] && Ce(r[s]) && (a[s] = r[s]);
1716
1711
  }
1717
1712
  return {
1718
1713
  paginationInfo: l,
1719
- requestPagination: n,
1714
+ requestPagination: a,
1720
1715
  setPagination: o
1721
1716
  };
1722
1717
  }
1723
- function pa(e, a) {
1724
- const l = w([]), n = w([]);
1725
- q(() => a.value?.selectedRows, (m) => {
1726
- n.value = ee(m || []);
1718
+ function pa(e, n) {
1719
+ const l = T([]), a = T([]);
1720
+ Y(() => n.value?.selectedRows, (m) => {
1721
+ a.value = ee(m || []);
1727
1722
  }, {
1728
1723
  deep: !0,
1729
1724
  immediate: !0
1730
- }), q(() => a.value?.selectedRowKeys, (m) => {
1731
- l.value = hl([...m || []]);
1725
+ }), Y(() => n.value?.selectedRowKeys, (m) => {
1726
+ l.value = ml([...m || []]);
1732
1727
  }, {
1733
1728
  deep: !0,
1734
1729
  immediate: !0
1735
1730
  });
1736
- const o = (m, S) => {
1737
- const v = a.value?.type || "checkbox";
1738
- e.value && (S ? m?.[e.value] && v === "checkbox" ? (l.value.push(m[e.value]), n.value.push(m)) : (l.value = [m[e.value]], n.value = [m]) : (l.value = l.value.filter((i) => i !== m[e.value]), n.value = n.value.filter((i) => i[e.value] !== m[e.value])));
1739
- }, s = () => {
1740
- a.value && a.value?.onChange?.(l.value, n.value);
1731
+ const o = (m, w) => {
1732
+ const v = n.value?.type || "checkbox";
1733
+ e.value && (w ? m?.[e.value] && v === "checkbox" ? (l.value.push(m[e.value]), a.value.push(m)) : (l.value = [m[e.value]], a.value = [m]) : (l.value = l.value.filter((u) => u !== m[e.value]), a.value = a.value.filter((u) => u[e.value] !== m[e.value])));
1734
+ }, r = () => {
1735
+ n.value && n.value?.onChange?.(l.value, a.value);
1741
1736
  };
1742
1737
  return {
1743
1738
  selectedKeys: l,
1744
- selectedItems: n,
1739
+ selectedItems: a,
1745
1740
  selectRowKey: o,
1746
- selectAllRowKey: (m, S, v) => {
1747
- e.value && (m ? S.map((i) => (l.value.every((x) => x !== i?.[e.value]) && i?.[e.value] && (l.value.push(i[e.value]), n.value.push(i)), i)) : v.map((i) => (l.value.includes(i?.[e.value]) && (l.value = l.value.filter((x) => x !== i[e.value]), n.value = n.value.filter((x) => x[e.value] !== i[e.value])), i)));
1741
+ selectAllRowKey: (m, w, v) => {
1742
+ e.value && (m ? w.map((u) => (l.value.every((S) => S !== u?.[e.value]) && u?.[e.value] && (l.value.push(u[e.value]), a.value.push(u)), u)) : v.map((u) => (l.value.includes(u?.[e.value]) && (l.value = l.value.filter((S) => S !== u[e.value]), a.value = a.value.filter((S) => S[e.value] !== u[e.value])), u)));
1748
1743
  },
1749
1744
  removeRowKeys: (m) => {
1750
- l.value = l.value.filter((S) => !m.includes(S)), n.value = n.value.filter((S) => !m.includes(S?.[e.value || ""])), s();
1745
+ l.value = l.value.filter((w) => !m.includes(w)), a.value = a.value.filter((w) => !m.includes(w?.[e.value || ""])), r();
1751
1746
  },
1752
- changeRowKey: s,
1747
+ changeRowKey: r,
1753
1748
  syncSelectedRows: (m) => {
1754
- if (e.value && l.value.length !== n.value.length) {
1755
- const S = n.value.map((i) => i[e.value]), v = l.value.filter((i) => !S.includes(i));
1756
- m.forEach((i) => {
1757
- v.includes(i[e.value]) && n.value.push(ee(i));
1749
+ if (e.value && l.value.length !== a.value.length) {
1750
+ const w = a.value.map((u) => u[e.value]), v = l.value.filter((u) => !w.includes(u));
1751
+ m.forEach((u) => {
1752
+ v.includes(u[e.value]) && a.value.push(ee(u));
1758
1753
  });
1759
1754
  }
1760
1755
  },
1761
1756
  clearAllRowKeys: () => {
1762
- l.value = [], n.value = [], s();
1757
+ l.value = [], a.value = [], r();
1763
1758
  }
1764
1759
  };
1765
1760
  }
1766
1761
  function ya(e) {
1767
1762
  return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !ae(e);
1768
1763
  }
1769
- function Ca(e, a, l, n) {
1770
- if (!a) return e;
1764
+ function Ca(e, n, l, a) {
1765
+ if (!n) return e;
1771
1766
  let o = e;
1772
- if (ne(a)) {
1773
- const s = a.node === "a" ? "span" : a.node;
1774
- return d(s, Q(a?.attr || {}, {
1775
- class: a.class,
1776
- onClick: a.click
1767
+ if (ne(n)) {
1768
+ const r = n.node === "a" ? "span" : n.node;
1769
+ return d(r, Q(n?.attr || {}, {
1770
+ class: n.class,
1771
+ onClick: n.click
1777
1772
  }), ya(e) ? e : {
1778
1773
  default: () => [e]
1779
1774
  });
1780
1775
  }
1781
- switch (a) {
1776
+ switch (n) {
1782
1777
  case "link":
1783
1778
  o = d("span", {
1784
- class: [`${l}-a`, n]
1779
+ class: [`${l}-a`, a]
1785
1780
  }, [e]);
1786
1781
  break;
1787
1782
  case "time":
@@ -1799,61 +1794,70 @@ function Ca(e, a, l, n) {
1799
1794
  }
1800
1795
  return o;
1801
1796
  }
1802
- function Sa(e, a) {
1803
- const l = a && a.current || 1, n = a && a.pageSize || 10;
1804
- return e.filter((o, s) => s < l * n && s >= n * (l - 1));
1797
+ function Sa(e, n) {
1798
+ const l = n && n.current || 1, a = n && n.pageSize || 10;
1799
+ return e.filter((o, r) => r < l * a && r >= a * (l - 1));
1805
1800
  }
1806
1801
  function xa(e) {
1807
- const a = document.createElement("textarea");
1808
- a.style.position = "absolute", a.style.opacity = "0", a.value = e, document.body.appendChild(a), a.select(), document.execCommand("copy"), document.body.removeChild(a);
1802
+ const n = document.createElement("textarea");
1803
+ n.style.position = "absolute", n.style.opacity = "0", n.value = e, document.body.appendChild(n), n.select(), document.execCommand("copy"), document.body.removeChild(n);
1809
1804
  }
1810
- function Be(e, a) {
1811
- let l = null, n = null;
1805
+ function Ae(e, n) {
1806
+ let l = null, a = null;
1812
1807
  function o() {
1813
- l && l.disconnect(), n && n.disconnect();
1808
+ l && l.disconnect(), a && a.disconnect();
1814
1809
  }
1815
- function s(f) {
1810
+ function r(f) {
1816
1811
  f && (l = new ResizeObserver(() => {
1817
- a(f);
1818
- }), l.observe(f), a(f));
1812
+ n(f);
1813
+ }), l.observe(f), n(f));
1819
1814
  }
1820
- function u() {
1815
+ function s() {
1821
1816
  return typeof e == "string" ? document.querySelector(e) : e();
1822
1817
  }
1823
- const b = u();
1824
- return b ? (s(b), o) : (n = new MutationObserver(() => {
1825
- const f = u();
1826
- f && (n.disconnect(), s(f));
1827
- }), n.observe(document.body, {
1818
+ const h = s();
1819
+ return h ? (r(h), o) : (a = new MutationObserver(() => {
1820
+ const f = s();
1821
+ f && (a.disconnect(), r(f));
1822
+ }), a.observe(document.body, {
1828
1823
  childList: !0,
1829
1824
  subtree: !0
1830
1825
  }), o);
1831
1826
  }
1832
- function Ta({ fitPage: e, hashId: a, scroll: l, baseClassName: n }) {
1833
- const o = w(), s = w(), u = w(), b = w(), f = w(), $ = w(), m = w(0);
1834
- let S, v, i, x;
1827
+ function Ta({ fitPage: e, hashId: n, scroll: l, baseClassName: a }) {
1828
+ const o = T(), r = T(), s = T(), h = T(), f = T(), $ = T(), m = T(0);
1829
+ let w, v, u, S;
1835
1830
  sl(() => {
1836
- S = Be(() => s.value?.querySelector(".ant-pagination"), (H) => {
1837
- H && (u.value = H);
1838
- }), i = Be(() => s.value?.querySelector(".ant-table-header"), (H) => {
1839
- H && (b.value = H);
1840
- }), x = Be(() => s.value?.querySelector(".ant-table-body>table"), (H) => {
1841
- H && ($.value = H);
1831
+ w = Ae(() => r.value?.querySelector(".ant-pagination"), (E) => {
1832
+ E && (s.value = E);
1833
+ }), u = Ae(() => r.value?.querySelector(".ant-table-header"), (E) => {
1834
+ E && (h.value = E);
1835
+ }), S = Ae(() => r.value?.querySelector(".ant-table-body>table"), (E) => {
1836
+ E && ($.value = E);
1842
1837
  });
1843
- }), q(() => l.value, (H) => {
1844
- v && v(), H.y || e.value ? v = Be(() => s.value?.querySelector(".ant-table-body"), (B) => {
1845
- B && (f.value = B);
1846
- }) : H.x && (v = Be(() => s.value?.querySelector(".ant-table-content"), (B) => {
1847
- B && (f.value = B);
1838
+ }), Y(() => l.value, (E) => {
1839
+ v && v(), E.y || e.value ? v = Ae(() => r.value?.querySelector(".ant-table-body"), (A) => {
1840
+ A && (f.value = A);
1841
+ }) : E.x && (v = Ae(() => r.value?.querySelector(".ant-table-content"), (A) => {
1842
+ A && (f.value = A);
1848
1843
  }));
1849
1844
  }, { immediate: !0 });
1850
- const { height: h } = He(s), { height: E } = He(b), { height: A } = He($), { height: I } = He(u), N = T(() => !s.value || !e.value ? 0 : h.value - E.value - m.value - I.value - 16), L = T(() => N.value && e.value ? A.value <= N.value : !1);
1851
- q([
1845
+ const { height: g } = We(r), { height: B } = We(h), { height: N } = We($), { height: R } = We(s), X = x(() => {
1846
+ if (!r.value || !e.value)
1847
+ return 0;
1848
+ let E = 0;
1849
+ if (s.value) {
1850
+ const q = getComputedStyle(s.value), z = Number.parseFloat(q.marginTop) || 0, L = Number.parseFloat(q.marginBottom) || 0;
1851
+ E = z + L;
1852
+ }
1853
+ return g.value - B.value - m.value - (R.value + E);
1854
+ }), M = x(() => X.value && e.value ? N.value <= X.value : !1);
1855
+ Y([
1852
1856
  () => f.value,
1853
- () => N.value
1857
+ () => X.value
1854
1858
  ], () => {
1855
- f.value && e.value && f.value.setAttribute("style", `height: ${N.value}px;`);
1856
- }), $l(f, {
1859
+ f.value && e.value && f.value.setAttribute("style", `height: ${X.value}px;`);
1860
+ }), wl(f, {
1857
1861
  onScroll: () => {
1858
1862
  f.value && o.value?.handleScroll(f.value);
1859
1863
  }
@@ -1861,82 +1865,82 @@ function Ta({ fitPage: e, hashId: a, scroll: l, baseClassName: n }) {
1861
1865
  const K = () => {
1862
1866
  o.value?.update();
1863
1867
  };
1864
- Rl(f, K), nt(() => {
1868
+ $l(f, K), nt(() => {
1865
1869
  ot(() => {
1866
1870
  K();
1867
1871
  });
1868
- }), Jt(() => K());
1872
+ }), Ut(() => K());
1869
1873
  function k() {
1870
- S && S(), v && v(), i && i(), x && x();
1874
+ w && w(), v && v(), u && u(), S && S();
1871
1875
  }
1872
- return St(() => {
1876
+ return Ct(() => {
1873
1877
  k();
1874
- }), xt(() => {
1878
+ }), St(() => {
1875
1879
  k && k();
1876
1880
  }), Jl({
1877
- className: `${n}-scroll`,
1878
- hashId: a,
1879
- tableScrollYHeight: N,
1880
- tableHeaderHeight: E,
1881
- scrollbarElement: s,
1881
+ className: `${a}-scroll`,
1882
+ hashId: n,
1883
+ tableScrollYHeight: X,
1884
+ tableHeaderHeight: B,
1885
+ scrollbarElement: r,
1882
1886
  wrapElement: f
1883
1887
  }), {
1884
1888
  barRef: o,
1885
- tableCardEl: s,
1889
+ tableCardEl: r,
1886
1890
  tableScrollEl: f,
1887
- tableOverHidden: L,
1888
- tableScrollYHeight: N,
1891
+ tableOverHidden: M,
1892
+ tableScrollYHeight: X,
1889
1893
  tableListToolsHeight: m
1890
1894
  };
1891
1895
  }
1892
1896
  function wa(e) {
1893
- const a = {};
1897
+ const n = {};
1894
1898
  return e.forEach((l) => {
1895
- let n = l.initialValue;
1896
- const o = ["select", "number"], s = ["date", "time", "dateRange"], u = ["treeSelect", "numberRange"];
1897
- l.valueType ? !n && o.includes(l.valueType) ? n = void 0 : !n && s.includes(l.valueType) ? n = null : !n && u.includes(l.valueType) ? n = [] : n || (n = "") : n || (n = ""), l.name === "dateRange" ? (a[l.rangeStartName || "start"] = n ? n[0] : null, a[l.rangeEndName || "end"] = n ? n[1] : null) : l.name && (a[l.name] = n);
1898
- }), a;
1899
+ let a = l.initialValue;
1900
+ const o = ["select", "number"], r = ["date", "time", "dateRange"], s = ["treeSelect", "numberRange"];
1901
+ l.valueType ? !a && o.includes(l.valueType) ? a = void 0 : !a && r.includes(l.valueType) ? a = null : !a && s.includes(l.valueType) ? a = [] : a || (a = "") : a || (a = ""), l.name === "dateRange" ? (n[l.rangeStartName || "start"] = a ? a[0] : null, n[l.rangeEndName || "end"] = a ? a[1] : null) : l.name && (n[l.name] = a);
1902
+ }), n;
1899
1903
  }
1900
- function $a({ searchMap: e, columns: a }) {
1901
- const l = w([]), n = w({});
1902
- function o(s) {
1903
- s.forEach((b) => {
1904
- l.value.some((f) => f.name === b.name) ? l.value = l.value.map((f) => f.name === b.name ? { ...f, ...b } : f) : l.value.push(b);
1904
+ function $a({ searchMap: e, columns: n }) {
1905
+ const l = T([]), a = T({});
1906
+ function o(r) {
1907
+ r.forEach((h) => {
1908
+ l.value.some((f) => f.name === h.name) ? l.value = l.value.map((f) => f.name === h.name ? { ...f, ...h } : f) : l.value.push(h);
1905
1909
  });
1906
- const u = wa(s);
1907
- n.value = { ...n.value, ...u };
1910
+ const s = wa(r);
1911
+ a.value = { ...a.value, ...s };
1908
1912
  }
1909
- return q(() => e.value, () => {
1910
- const s = [];
1911
- e.value?.forEach((u) => s.push(u)), o(s);
1912
- }, { deep: !0, immediate: !0 }), q(() => a.value, () => {
1913
- const s = [];
1914
- a.value && a.value?.length && a.value.forEach((u) => {
1915
- u.searchConfig && s.push(u.searchConfig);
1916
- }), o(s);
1917
- }, { deep: !0, immediate: !0 }), { formCols: l, defaultFormSearch: n };
1913
+ return Y(() => e.value, () => {
1914
+ const r = [];
1915
+ e.value?.forEach((s) => r.push(s)), o(r);
1916
+ }, { deep: !0, immediate: !0 }), Y(() => n.value, () => {
1917
+ const r = [];
1918
+ n.value && n.value?.length && n.value.forEach((s) => {
1919
+ s.searchConfig && r.push(s.searchConfig);
1920
+ }), o(r);
1921
+ }, { deep: !0, immediate: !0 }), { formCols: l, defaultFormSearch: a };
1918
1922
  }
1919
- function Ra({ scroll: e, columns: a, autoScroll: l, modalScroll: n, neverScroll: o, rowSelection: s, screens: u, innerWidth: b, scrollBreakpoint: f }) {
1920
- const $ = T(() => f.value ? Ce(f.value) ? b.value > f.value : Ft(f.value) ? u.value?.[f.value] : u.value?.xl : u.value?.xl), m = T(() => {
1923
+ function Ra({ scroll: e, columns: n, autoScroll: l, modalScroll: a, neverScroll: o, rowSelection: r, screens: s, innerWidth: h, scrollBreakpoint: f }) {
1924
+ const $ = x(() => f.value ? Ce(f.value) ? h.value > f.value : Ft(f.value) ? s.value?.[f.value] : s.value?.xl : s.value?.xl), m = x(() => {
1921
1925
  let v = 0;
1922
- const i = R(s) ? 60 : 0, x = 150, h = ee(R(a));
1923
- h.forEach((I) => {
1924
- v += Number.parseInt(String(I.width)) || 0;
1926
+ const u = P(r) ? 60 : 0, S = 150, g = ee(P(n));
1927
+ g.forEach((R) => {
1928
+ v += Number.parseInt(String(R.width)) || 0;
1925
1929
  });
1926
- const A = h.filter((I) => !Reflect.has(I, "width")).length;
1927
- return A !== 0 && (v += A * x), i && (v += i), v;
1930
+ const N = g.filter((R) => !Reflect.has(R, "width")).length;
1931
+ return N !== 0 && (v += N * S), u && (v += u), v;
1928
1932
  });
1929
- return { proScroll: T(() => o.value ? {} : e.value && Rt(e.value).length ? R(e) : n.value ? {
1930
- y: e.value?.y || (u.value?.xl ? 400 : 235)
1931
- } : l.value ? $.value ? {} : De($.value) ? { x: m.value } : {} : {}), breakpoint: $ };
1933
+ return { proScroll: x(() => o.value ? {} : e.value && Rt(e.value).length ? P(e) : a.value ? {
1934
+ y: e.value?.y || (s.value?.xl ? 400 : 235)
1935
+ } : l.value ? $.value ? {} : Oe($.value) ? { x: m.value } : {} : {}), breakpoint: $ };
1932
1936
  }
1933
1937
  function Pa(e) {
1934
- const a = w(e.size.value || "middle");
1935
- q(() => e.size.value, (n) => a.value = n);
1936
- function l(n) {
1937
- a.value = n || a.value;
1938
+ const n = T(e.size.value || "middle");
1939
+ Y(() => e.size.value, (a) => n.value = a);
1940
+ function l(a) {
1941
+ n.value = a || n.value;
1938
1942
  }
1939
- return [a, l];
1943
+ return [n, l];
1940
1944
  }
1941
1945
  const Fa = (e) => ({
1942
1946
  [e.componentCls]: {
@@ -1972,7 +1976,7 @@ const Fa = (e) => ({
1972
1976
  height: 0
1973
1977
  }
1974
1978
  }), Ia = (e) => {
1975
- const a = new gt(e.colorText).setAlpha(0.2).toRgbString(), l = new gt(e.colorText).setAlpha(0.4).toRgbString();
1979
+ const n = new ht(e.colorText).setAlpha(0.2).toRgbString(), l = new ht(e.colorText).setAlpha(0.4).toRgbString();
1976
1980
  return {
1977
1981
  [e.componentCls]: {
1978
1982
  [`${e.antCls}-table-container`]: {
@@ -2007,7 +2011,7 @@ const Fa = (e) => ({
2007
2011
  height: 0,
2008
2012
  cursor: "pointer",
2009
2013
  opacity: 1,
2010
- backgroundColor: a,
2014
+ backgroundColor: n,
2011
2015
  borderRadius: "inherit",
2012
2016
  transition: ".3s background-color",
2013
2017
  "&:hover": {
@@ -2023,8 +2027,8 @@ const Fa = (e) => ({
2023
2027
  }
2024
2028
  }
2025
2029
  };
2026
- }, Aa = (e) => {
2027
- const a = `${e.lineWidth}px ${e.lineType} ${e.colorBorderSecondary}`;
2030
+ }, Ba = (e) => {
2031
+ const n = `${e.lineWidth}px ${e.lineType} ${e.colorBorderSecondary}`;
2028
2032
  return {
2029
2033
  [e.componentCls]: {
2030
2034
  [`&${e.componentCls}-full-page`]: {
@@ -2042,9 +2046,9 @@ const Fa = (e) => ({
2042
2046
  overflow: "hidden",
2043
2047
  [`${e.componentCls}-overflow-hidden`]: {
2044
2048
  [`${e.antCls}-table${e.antCls}-table-bordered>${e.antCls}-table-container`]: {
2045
- borderBlockEnd: a,
2049
+ borderBlockEnd: n,
2046
2050
  [`${e.antCls}-table-body`]: {
2047
- borderInlineEnd: a
2051
+ borderInlineEnd: n
2048
2052
  },
2049
2053
  [`${e.antCls}-table-row`]: {
2050
2054
  [`${e.antCls}-table-cell`]: {
@@ -2063,7 +2067,7 @@ const Fa = (e) => ({
2063
2067
  }
2064
2068
  }
2065
2069
  };
2066
- }, Ba = (e) => ({
2070
+ }, Aa = (e) => ({
2067
2071
  [e.componentCls]: {
2068
2072
  [`${e.componentCls}-card`]: {
2069
2073
  [`${e.antCls}-table-pagination${e.antCls}-pagination`]: {
@@ -2235,71 +2239,74 @@ const Fa = (e) => ({
2235
2239
  function Na(e) {
2236
2240
  return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !ae(e);
2237
2241
  }
2238
- const za = Nt.PRESENTED_IMAGE_SIMPLE, Da = {
2239
- reload: !0,
2240
- fullScreen: !0
2241
- }, Oa = Bl.useToken, et = /* @__PURE__ */ ge({
2242
+ const za = Nt.PRESENTED_IMAGE_SIMPLE, Da = Bl.useToken, et = /* @__PURE__ */ ge({
2242
2243
  name: "GProTable",
2243
2244
  inheritAttrs: !1,
2244
2245
  props: he,
2245
2246
  emits: ["reset", "reload", "submit", "sizeChange", "expandedRowsChange", "expand", "change", "requestError", "columnsStateChange", "loadingChange"],
2246
2247
  slots: Object,
2247
2248
  setup(e, {
2248
- emit: a,
2249
+ emit: n,
2249
2250
  slots: l,
2250
- expose: n
2251
+ expose: a
2251
2252
  }) {
2252
2253
  const o = $t({
2253
2254
  suffixCls: "table",
2254
2255
  isPor: !0
2255
2256
  }), {
2256
- wrapSSR: s,
2257
- hashId: u
2258
- } = rt("ProBaseTable", [Ba, Ia, Aa, Fa], o), {
2259
- token: b
2260
- } = Oa(), f = ul(), $ = it(), {
2257
+ wrapSSR: r,
2258
+ hashId: s
2259
+ } = Tt("ProBaseTable", [Aa, Ia, Ba, Fa, Ul], o), {
2260
+ token: h
2261
+ } = Da(), f = rl(), $ = it(), {
2261
2262
  width: m
2262
- } = Pl(), S = w(!1), v = Tt(), i = w(), x = w(), h = w(e.waitRequest);
2263
- yt(() => h.value = e.waitRequest);
2263
+ } = Rl(), w = T(!1), v = xt(), u = T(), S = T(), g = T(e.waitRequest);
2264
+ pt(() => g.value = e.waitRequest);
2264
2265
  const {
2265
- toggle: E,
2266
- isFullscreen: A
2267
- } = It(i), I = T(() => !$.value.xl), N = T(() => (e.virtualScroll && Ll(!e.scroll?.y, "参数scroll的Y值不能为空!"), !!(e.scroll?.y && e.virtualScroll))), L = T(() => {
2266
+ toggle: B,
2267
+ isFullscreen: N
2268
+ } = It(u), R = x(() => !$.value.xl), X = x(() => (e.virtualScroll && El(!e.scroll?.y, "参数scroll的Y值不能为空!"), !!(e.scroll?.y && e.virtualScroll))), M = x(() => {
2268
2269
  if (e.form === !1) return !1;
2269
2270
  const p = {
2270
2271
  actions: {
2271
2272
  resetReload: !0
2272
2273
  },
2274
+ autoRequest: !1,
2275
+ span: {
2276
+ xxl: 5,
2277
+ xl: 5,
2278
+ lg: 3
2279
+ },
2273
2280
  resetText: "重置",
2274
2281
  searchText: "查询"
2275
2282
  };
2276
2283
  return ne(e.form) ? ye(p, e.form) : p;
2277
- }), K = T(() => L.value === !1 ? {} : L.value), k = T(() => K.value?.autoRequest ?? e.autoRequest), H = T(() => K.value?.actions), B = T(() => {
2278
- const p = ee(e.columns || []).filter((P) => P.key || P.dataIndex).filter((P) => P.show ?? !0).map((P) => {
2279
- const F = P.key || P.dataIndex;
2280
- return P.key = F, P.dataIndex = F, P.align = P.align || e.align, P.uuid = P.uuid || Pt().uuid(15), P;
2284
+ }), K = x(() => M.value === !1 ? {} : M.value), k = x(() => K.value?.autoRequest ?? e.autoRequest), E = x(() => K.value?.actions), A = x(() => {
2285
+ const p = ee(e.columns || []).filter((F) => F.key || F.dataIndex).filter((F) => F.show ?? !0).map((F) => {
2286
+ const I = F.key || F.dataIndex;
2287
+ return F.key = I, F.dataIndex = I, F.align = F.align || e.align, F.uuid = F.uuid || Pt().uuid(15), F;
2281
2288
  });
2282
- return gl(p, {
2289
+ return hl(p, {
2283
2290
  align: e.align || "left",
2284
2291
  showIndex: e.showIndex ?? !1
2285
2292
  });
2286
- }), [X, O] = ga({
2293
+ }), [q, z] = ga({
2287
2294
  loading: V(e, "loading")
2288
- }), [W, Y] = Pa({
2295
+ }), [L, H] = Pa({
2289
2296
  size: V(e, "size")
2290
2297
  }), {
2291
- paginationInfo: M,
2298
+ paginationInfo: W,
2292
2299
  requestPagination: te,
2293
- setPagination: re
2300
+ setPagination: se
2294
2301
  } = ba({
2295
2302
  pagination: V(e, "pagination"),
2296
- pageItemRender: vt({
2303
+ pageItemRender: ft({
2297
2304
  slots: l,
2298
2305
  props: e,
2299
2306
  key: "pageItemRender"
2300
2307
  })
2301
2308
  }), {
2302
- proScroll: se,
2309
+ proScroll: re,
2303
2310
  breakpoint: be
2304
2311
  } = Ra({
2305
2312
  scroll: V(e, "scroll"),
@@ -2309,7 +2316,7 @@ const za = Nt.PRESENTED_IMAGE_SIMPLE, Da = {
2309
2316
  rowSelection: V(e, "rowSelection"),
2310
2317
  scrollBreakpoint: V(e, "scrollBreakpoint"),
2311
2318
  innerWidth: m,
2312
- columns: B,
2319
+ columns: A,
2313
2320
  screens: $
2314
2321
  }), {
2315
2322
  proColumns: de,
@@ -2320,18 +2327,18 @@ const za = Nt.PRESENTED_IMAGE_SIMPLE, Da = {
2320
2327
  neverScroll: V(e, "neverScroll"),
2321
2328
  autoScroll: V(e, "autoScroll"),
2322
2329
  breakpoint: be,
2323
- scroll: se,
2324
- columns: B
2330
+ scroll: re,
2331
+ columns: A
2325
2332
  }), {
2326
2333
  formCols: Pe,
2327
2334
  defaultFormSearch: t
2328
2335
  } = $a({
2329
2336
  searchMap: V(e, "searchMap"),
2330
- columns: B
2337
+ columns: A
2331
2338
  }), {
2332
- selectedKeys: r,
2339
+ selectedKeys: i,
2333
2340
  selectedItems: y,
2334
- changeRowKey: g,
2341
+ changeRowKey: b,
2335
2342
  selectRowKey: C,
2336
2343
  selectAllRowKey: c,
2337
2344
  syncSelectedRows: fe,
@@ -2346,204 +2353,205 @@ const za = Nt.PRESENTED_IMAGE_SIMPLE, Da = {
2346
2353
  handleTableChange: ke
2347
2354
  } = ha({
2348
2355
  ...ve,
2349
- waitRequest: h
2356
+ waitRequest: g
2350
2357
  }, {
2351
- loading: X,
2358
+ loading: q,
2352
2359
  pageInfo: te,
2353
- setPagination: re,
2360
+ setPagination: se,
2354
2361
  removeRowKeys: U,
2355
2362
  syncSelectedRows: fe,
2356
- setLoading: O,
2363
+ setLoading: z,
2357
2364
  setColumns: Re,
2358
2365
  columns: de,
2359
2366
  defaultFormSearch: t,
2360
2367
  params: V(e, "params"),
2361
2368
  onRequestError: e.onRequestError,
2362
2369
  onBeforeSearchSubmit: e.onBeforeSearchSubmit,
2363
- hasCustomRender: T(() => Qe(e.customRender || l?.customRender))
2364
- }, a), {
2370
+ hasCustomRender: x(() => Qe(e.customRender || l?.customRender))
2371
+ }, n), {
2365
2372
  tableCardEl: Ve,
2366
- tableScrollYHeight: Oe,
2367
- tableListToolsHeight: Ht,
2373
+ tableScrollYHeight: Ee,
2374
+ tableListToolsHeight: jt,
2368
2375
  tableScrollEl: st,
2369
- tableOverHidden: Wt,
2370
- barRef: Yt
2376
+ tableOverHidden: Ht,
2377
+ barRef: Wt
2371
2378
  } = Ta({
2372
- hashId: u,
2373
- scroll: se,
2379
+ hashId: s,
2380
+ scroll: re,
2374
2381
  baseClassName: o,
2375
2382
  fitPage: V(e, "fitPage")
2376
- }), ut = T(() => {
2377
- const p = Oe.value && e.fitPage ? {
2378
- y: Oe.value
2383
+ }), rt = x(() => {
2384
+ const p = Ee.value && e.fitPage ? {
2385
+ y: Ee.value
2379
2386
  } : {};
2380
2387
  return {
2381
- ...R(se),
2388
+ ...P(re),
2382
2389
  ...p
2383
2390
  };
2384
- }), Mt = T(() => ({
2385
- size: R(W),
2386
- scroll: R(ut),
2387
- dataSource: R(ie),
2388
- pagination: R(M),
2389
- virtualScroll: N.value,
2390
- columns: R(de).filter((p) => p.show || p.show === void 0)
2391
- })), ct = T(() => {
2392
- const p = ne(e.loading) ? ze(e.loading, "spinning") : {};
2391
+ }), Yt = x(() => ({
2392
+ size: P(L),
2393
+ scroll: P(rt),
2394
+ dataSource: P(ie),
2395
+ pagination: P(W),
2396
+ virtualScroll: X.value,
2397
+ columns: P(de).filter((p) => p.show || p.show === void 0)
2398
+ })), ut = x(() => {
2399
+ const p = ne(e.loading) ? De(e.loading, "spinning") : {};
2393
2400
  return !p.indicator && v?.indicator?.value && (p.indicator = v?.indicator?.value), {
2394
- spinning: e.showLoading ? Qe(X.value) : !1,
2401
+ spinning: e.showLoading ? Qe(q.value) : !1,
2395
2402
  ...p
2396
2403
  };
2397
- }), qt = T(() => {
2404
+ }), Mt = x(() => {
2398
2405
  let p;
2399
- const P = e.direction === "rtl" ? "bottomLeft" : "right", F = R(M)?.position;
2400
- if (F !== null && Array.isArray(F)) {
2401
- const z = F.find((le) => le.includes("top")), j = F.find((le) => le.includes("bottom")), _ = F.every((le) => `${le}` == "none");
2402
- !z && !j && !_ && (p = P), z && (p = z.toLowerCase().replace("top", "")), j && (p = j.toLowerCase().replace("bottom", ""));
2406
+ const F = e.direction === "rtl" ? "bottomLeft" : "right", I = P(W)?.position;
2407
+ if (I !== null && Array.isArray(I)) {
2408
+ const D = I.find((le) => le.includes("top")), j = I.find((le) => le.includes("bottom")), _ = I.every((le) => `${le}` == "none");
2409
+ !D && !j && !_ && (p = F), D && (p = D.toLowerCase().replace("top", "")), j && (p = j.toLowerCase().replace("bottom", ""));
2403
2410
  } else
2404
- p = P;
2411
+ p = F;
2405
2412
  return p;
2406
2413
  });
2407
2414
  da(() => {
2408
- S.value ? e.keepAliveReload && ue({
2415
+ w.value ? e.keepAliveReload && ue({
2409
2416
  params: e.params
2410
- }) : S.value = !0;
2417
+ }) : w.value = !0;
2411
2418
  });
2412
- const Kt = async (p, P) => {
2419
+ const qt = async (p, F) => {
2413
2420
  if (k.value) {
2414
2421
  ue({
2415
2422
  params: p
2416
2423
  });
2417
2424
  return;
2418
2425
  }
2419
- P === "reset" ? (a("reset", p), e.request && H.value?.resetReload && ue({
2426
+ F === "reset" ? (n("reset", p), e.request && E.value?.resetReload && ue({
2420
2427
  params: p
2421
- })) : e.request && (a("submit", p), ue({
2428
+ })) : e.request && (n("submit", p), ue({
2422
2429
  params: p
2423
2430
  }));
2424
- }, Xe = (p, P, F, z) => {
2425
- ke(p, P, F, z), a("change", p, P, F, z);
2426
- }, kt = (p) => {
2427
- a("expandedRowsChange", p);
2428
- }, Vt = (p, P) => {
2429
- a("expand", p, P);
2430
- }, Xt = (p, P) => oe(p, P), _t = (p, P, F) => {
2431
- let z = p;
2432
- if (P) {
2433
- const j = J(p) ? typeof p?.[0]?.children == "string" ? p?.[0]?.children : "" : p ? p.toString() : "", _ = F.tooltip === !1 ? {} : F.tooltip, le = F.tooltip === !1 ? 1 : Ce(_?.hiddenLine) && _?.hiddenLine > 0 ? _?.hiddenLine : 1, G = F.tooltip === !1 ? 0 : Ce(_?.width) ? _?.width : 0, Ee = F.tooltip !== !1 && Ft(j) && G > 0 ? yl(j, {
2431
+ }, Xe = (p, F, I, D) => {
2432
+ ke(p, F, I, D), n("change", p, F, I, D);
2433
+ }, Kt = (p) => {
2434
+ n("expandedRowsChange", p);
2435
+ }, kt = (p, F) => {
2436
+ n("expand", p, F);
2437
+ }, Vt = (p, F) => oe(p, F), Xt = (p, F, I) => {
2438
+ let D = p;
2439
+ if (F) {
2440
+ const j = J(p) ? typeof p?.[0]?.children == "string" ? p?.[0]?.children : "" : p ? p.toString() : "", _ = I.tooltip === !1 ? {} : I.tooltip, le = I.tooltip === !1 ? 1 : Ce(_?.hiddenLine) && _?.hiddenLine > 0 ? _?.hiddenLine : 1, G = I.tooltip === !1 ? 0 : Ce(_?.width) ? _?.width : 0, Le = I.tooltip !== !1 && Ft(j) && G > 0 ? pl(j, {
2434
2441
  cssObject: {
2435
2442
  fontSize: "14px",
2436
2443
  lineHeight: "22px",
2437
- fontFamily: f?.token?.value?.fontFamily || b?.value?.fontFamily,
2444
+ fontFamily: f?.token?.value?.fontFamily || h?.value?.fontFamily,
2438
2445
  ..._?.targetStyle || {}
2439
2446
  }
2440
- }) : 0, Le = document.querySelector(`.${o} .ant-table-tbody`), je = d("div", {
2447
+ }) : 0, je = document.querySelector(`.${o} .ant-table-tbody`), He = d("div", {
2441
2448
  class: `${o}-ellipsis-text`
2442
- }, [p]), ft = () => F.tooltip === !1 || ne(F.tooltip) && Ee < G && G > 0 ? je : d($e, Q({
2449
+ }, [p]), dt = () => I.tooltip === !1 || ne(I.tooltip) && Le < G && G > 0 ? He : d($e, Q({
2443
2450
  title: p,
2444
- getPopupContainer: (_e) => Le ?? _e?.parentNode?.parentNode
2445
- }, ne(F.tooltip) ? F.tooltip : {}, {
2451
+ getPopupContainer: (_e) => je ?? _e?.parentNode?.parentNode
2452
+ }, ne(I.tooltip) ? I.tooltip : {}, {
2446
2453
  destroyTooltipOnHide: !0
2447
- }), Na(je) ? je : {
2448
- default: () => [je]
2454
+ }), Na(He) ? He : {
2455
+ default: () => [He]
2449
2456
  });
2450
- if (z = d("div", {
2451
- class: D(`${o}-ellipsis`, _?.class),
2457
+ if (D = d("div", {
2458
+ class: O(`${o}-ellipsis`, _?.class),
2452
2459
  style: {
2453
2460
  "-webkit-line-clamp": le
2454
2461
  }
2455
- }, [ft()]), F.copyable) {
2456
- const _e = typeof F.copyText == "function" ? F.copyText?.(F) : F.copyText || j;
2457
- z = d("div", {
2462
+ }, [dt()]), I.copyable) {
2463
+ const _e = typeof I.copyText == "function" ? I.copyText?.(I) : I.copyText || j;
2464
+ D = d("div", {
2458
2465
  class: `${o}-copyable`
2459
2466
  }, [d("div", {
2460
- class: D(`${o}-ellipsis`, _?.class),
2467
+ class: O(`${o}-ellipsis`, _?.class),
2461
2468
  style: {
2462
2469
  "-webkit-line-clamp": le
2463
2470
  }
2464
- }, [ft()]), d(il, {
2471
+ }, [dt()]), d(ol, {
2465
2472
  class: `${o}-copyable-icon`,
2466
2473
  onClick: () => {
2467
- xa(_e), Dl.success("复制成功");
2474
+ xa(_e), zl.success("复制成功");
2468
2475
  }
2469
2476
  }, null)]);
2470
2477
  }
2471
2478
  }
2472
- return z;
2479
+ return D;
2473
2480
  };
2474
- function dt() {
2475
- const p = Cl({
2481
+ function ct() {
2482
+ const p = yl({
2476
2483
  slots: l,
2477
2484
  props: e,
2478
2485
  key: "emptyText"
2479
2486
  });
2480
2487
  if (p !== !1 && v?.emptyText?.value !== !1) {
2481
- const F = e.emptyTextProps?.extraProps || {}, z = p || v?.emptyText?.value, j = ae(z), _ = j ? pt(z, F) : wt(J(z) ? z : [z]);
2488
+ const I = e.emptyTextProps?.extraProps || {}, D = p || v?.emptyText?.value, j = ae(D), _ = j ? bt(D, I) : wt(J(D) ? D : [D]);
2482
2489
  return d("div", {
2483
- class: D(`${o}-empty-text`, u.value, e.emptyTextProps?.class),
2490
+ class: O(`${o}-empty-text`, s.value, e.emptyTextProps?.class),
2484
2491
  style: e.emptyTextProps?.style
2485
- }, [j ? _ : J(_) && _.length ? _.map((le) => lt(le, F)) : d(Nt, {
2492
+ }, [j ? _ : J(_) && _.length ? _.map((le) => lt(le, I)) : d(Nt, {
2486
2493
  image: za
2487
2494
  }, null)]);
2488
2495
  }
2489
2496
  return null;
2490
2497
  }
2491
- const Gt = () => {
2492
- const p = vt({
2498
+ const _t = () => {
2499
+ const p = ft({
2493
2500
  slots: l,
2494
2501
  props: e,
2495
2502
  key: "customRender"
2496
2503
  });
2497
2504
  if (p) {
2498
2505
  if (ie.value?.length) {
2499
- const P = ee(R(ie));
2506
+ const F = ee(P(ie));
2500
2507
  return p?.({
2501
- dataSource: P,
2502
- currentData: Sa(P, M.value)
2508
+ dataSource: F,
2509
+ currentData: Sa(F, W.value)
2503
2510
  });
2504
2511
  }
2505
- return dt();
2512
+ return ct();
2506
2513
  }
2507
2514
  return d(we, null, null);
2508
2515
  };
2509
- return Hl({
2510
- tableScrollState: ut,
2511
- tableSize: W,
2516
+ return jl({
2517
+ hashId: s,
2518
+ tableScrollState: rt,
2519
+ tableSize: L,
2512
2520
  columns: de,
2513
- cacheColumns: B,
2514
- isMobile: I,
2521
+ cacheColumns: A,
2522
+ isMobile: R,
2515
2523
  formConfig: K,
2516
2524
  formAutoRequest: k,
2517
- formActions: H,
2525
+ formActions: E,
2518
2526
  screenWidth: m,
2519
- tableListToolsHeight: Ht,
2527
+ tableListToolsHeight: jt,
2520
2528
  styles: V(e, "styles"),
2521
2529
  classNames: V(e, "classNames"),
2522
2530
  action: {
2523
- setTableSize: Y,
2531
+ setTableSize: H,
2524
2532
  reload: (p) => ue(p),
2525
- toggle: E
2533
+ toggle: B
2526
2534
  },
2527
- setPagination: re
2528
- }), n({
2535
+ setPagination: se
2536
+ }), a({
2529
2537
  formRef: () => ({
2530
2538
  getFormSearch: () => ({
2531
- ...R(t),
2532
- ...x.value?.getFormSearch(),
2539
+ ...P(t),
2540
+ ...S.value?.getFormSearch(),
2533
2541
  ...e.params
2534
2542
  }),
2535
- getFormInnerState: () => x.value?.getFormSearch() || {},
2543
+ getFormInnerState: () => S.value?.getFormSearch() || {},
2536
2544
  restFormState: (p) => {
2537
- h.value = !0, p && p?.(), x.value?.resetForm(!1), h.value = !1;
2545
+ g.value = !0, p && p?.(), S.value?.resetForm(!1), g.value = !1;
2538
2546
  }
2539
2547
  }),
2540
2548
  actionRef: () => ({
2541
- loading: X,
2549
+ loading: q,
2542
2550
  dataSource: ie,
2543
2551
  pageInfo: te,
2544
- pagination: M.value,
2545
- selectedKeys: T(() => r.value),
2546
- selectedItems: T(() => y.value),
2552
+ pagination: W.value,
2553
+ selectedKeys: x(() => i.value),
2554
+ selectedItems: x(() => y.value),
2547
2555
  rowsSelection: {
2548
2556
  clear: Fe,
2549
2557
  select: C,
@@ -2552,181 +2560,180 @@ const za = Nt.PRESENTED_IMAGE_SIMPLE, Da = {
2552
2560
  selectAll: c
2553
2561
  },
2554
2562
  reload: ue,
2555
- getLoadingStatus: () => R(X),
2563
+ getLoadingStatus: () => P(q),
2556
2564
  reloadAndReset: async (p) => {
2557
- h.value = !0, re({
2565
+ g.value = !0, se({
2558
2566
  current: 1,
2559
2567
  pageSize: te?.pageSize || 10
2560
- }), p && p?.callBack && (p.wait ? await p.callBack() : p.callBack()), x.value?.resetForm(!0), h.value = !1;
2568
+ }), p && p?.callBack && (p.wait ? await p.callBack() : p.callBack()), S.value?.resetForm(!0), g.value = !1;
2561
2569
  },
2562
2570
  setPageInfo: Xe,
2563
2571
  setTableDataList: Ie,
2564
- setPagination: re,
2572
+ setPagination: se,
2565
2573
  operateTableDataRow: Se,
2566
- setLoading: O
2574
+ setLoading: z
2567
2575
  })
2568
2576
  }), () => {
2569
- const p = Qe(e.customRender || l.customRender), P = l.actions?.() || e.actionProps?.actions, F = bl({
2577
+ const p = Qe(e.customRender || l.customRender), F = l.actions?.() || e.actionProps?.actions, I = gl({
2570
2578
  slots: l,
2571
2579
  props: e,
2572
2580
  keys: ["headerTitle", "headerTitleTip", "listToolAfter"],
2573
2581
  render: !0
2574
2582
  });
2575
- return s(d("div", {
2576
- ref: i,
2577
- class: D(o, u.value, e.class, e.classNames?.root, [{
2578
- [`${o}-no-scroll`]: !Object.keys(R(se) || {}).length,
2583
+ return r(d("div", {
2584
+ ref: u,
2585
+ class: O(o, s.value, e.class, e.classNames?.root, [{
2586
+ [`${o}-no-scroll`]: !Object.keys(P(re) || {}).length,
2579
2587
  [`${o}-table-tree`]: xe.value,
2580
2588
  [`${o}-full-page`]: e.fitPage,
2581
- [`${o}-full-screen`]: A.value
2589
+ [`${o}-full-screen`]: N.value
2582
2590
  }]),
2583
2591
  style: {
2584
2592
  ...e.style,
2585
2593
  ...e.styles?.root || {}
2586
2594
  }
2587
2595
  }, [d("div", {
2588
- class: D(`${o}-content`, u.value, e.classNames?.content),
2596
+ class: O(`${o}-content`, s.value, e.classNames?.content),
2589
2597
  style: e.styles?.content
2590
- }, [(Pe.value.length > 0 || !!l.form) && e.form !== !1 && d(Ul, {
2591
- ref: x,
2598
+ }, [(Pe.value.length > 0 || !!l.form) && e.form !== !1 && d(Ql, {
2599
+ ref: S,
2592
2600
  modalScroll: e.modalScroll,
2593
2601
  cardBordered: e.cardBordered,
2594
2602
  formCols: Pe.value,
2595
2603
  prefixCls: o,
2596
- loading: R(X),
2597
- onSearch: Kt,
2604
+ loading: P(q),
2605
+ onSearch: qt,
2598
2606
  defaultFormSearch: t.value
2599
2607
  }, {
2600
2608
  default: l.form ? () => l.form?.() : null
2601
2609
  }), d("div", {
2602
2610
  ref: Ve,
2603
- class: D(e.classNames?.card, u.value, `${o}-card`, e.cardBordered && `${o}-card-border`),
2611
+ class: O(e.classNames?.card, s.value, `${o}-card`, e.cardBordered && `${o}-card-border`),
2604
2612
  style: e.styles?.card
2605
2613
  }, [d(ua, {
2606
2614
  options: e.options ? {
2607
- ...Da,
2608
2615
  ...ne(e.options) ? e.options : {}
2609
2616
  } : !1,
2610
2617
  titleTipText: e.titleTipText,
2611
2618
  actionsPlacement: e.actionProps?.placement,
2612
- actionsRender: P,
2613
- headerTitle: F.headerTitle,
2614
- listToolAfter: F.listToolAfter,
2615
- headerTitleTip: F.headerTitleTip
2616
- }, null), p ? d(Bt, ct.value, {
2619
+ actionsRender: F,
2620
+ headerTitle: I.headerTitle,
2621
+ listToolAfter: I.listToolAfter,
2622
+ headerTitleTip: I.headerTitleTip
2623
+ }, null), p ? d(At, ut.value, {
2617
2624
  default: () => [d("div", {
2618
- class: D(`${o}-list ${u.value}`, e.classNames?.list),
2625
+ class: O(`${o}-list ${s.value}`, e.classNames?.list),
2619
2626
  style: e.styles?.list
2620
2627
  }, [d("div", {
2621
- class: D(`${o}-list-content`, u.value, e.classNames?.listContent),
2628
+ class: O(`${o}-list-content`, s.value, e.classNames?.listContent),
2622
2629
  style: {
2623
2630
  ...e.styles?.listContent || {},
2624
- height: Oe.value ? pe(Oe.value) : e.styles?.listContent?.height
2631
+ height: Ee.value ? pe(Ee.value) : e.styles?.listContent?.height
2625
2632
  }
2626
- }, [Gt()]), e.pagination !== !1 && ie.value?.length > 0 && d(Nl, Q(ce(R(M)), {
2627
- class: D(u.value, `${o}-pagination`, `${o}-pagination-${qt.value}`, e.classNames?.pagination),
2633
+ }, [_t()]), e.pagination !== !1 && ie.value?.length > 0 && d(Al, Q(ce(P(W)), {
2634
+ class: O(s.value, `${o}-pagination`, `${o}-pagination-${Mt.value}`, e.classNames?.pagination),
2628
2635
  style: e.styles?.pagination,
2629
- onChange: (z, j) => Xe({
2630
- current: z,
2636
+ onChange: (D, j) => Xe({
2637
+ current: D,
2631
2638
  pageSize: j
2632
2639
  })
2633
2640
  }), null)])]
2634
- }) : d(we, null, [d(zl, Q(Ol(e, Object.keys(Ot)), R(Mt), {
2641
+ }) : d(we, null, [d(Nl, Q(Dl(e, Object.keys(Ot)), P(Yt), {
2635
2642
  style: e.styles?.table,
2636
- class: D(e.classNames?.table, u.value, Wt.value && `${o}-overflow-hidden`),
2637
- loading: ct.value,
2638
- rowKey: (z) => z[e.rowKey],
2639
- transformCellText: (z) => {
2640
- e.transformCellText && typeof e.transformCellText && e.transformCellText?.(z);
2643
+ class: O(e.classNames?.table, s.value, Ht.value && `${o}-overflow-hidden`),
2644
+ loading: ut.value,
2645
+ rowKey: (D) => D[e.rowKey],
2646
+ transformCellText: (D) => {
2647
+ e.transformCellText && typeof e.transformCellText && e.transformCellText?.(D);
2641
2648
  const {
2642
2649
  column: j
2643
- } = z;
2644
- if (!j) return z.text;
2650
+ } = D;
2651
+ if (!j) return D.text;
2645
2652
  const _ = j?.key || j?.dataIndex;
2646
- let le = !0, G = z.text;
2653
+ let le = !0, G = D.text;
2647
2654
  if (J(G))
2648
2655
  if (G.length === 0 || G.length === 1 && !ae(G[0])) {
2649
2656
  G = G?.[0];
2650
- const Ee = pl(G, j?.columnEmptyText || e?.columnEmptyText || "");
2651
- le = Ee.success, G = Ca(Ee.value, j?.valueType || e.columns?.find((Le) => (Le.key || Le.dataIndex) === _)?.valueType, o, u.value);
2657
+ const Le = bl(G, j?.columnEmptyText || e?.columnEmptyText || "");
2658
+ le = Le.success, G = Ca(Le.value, j?.valueType || e.columns?.find((je) => (je.key || je.dataIndex) === _)?.valueType, o, s.value);
2652
2659
  } else G[0]?.type === "template" && (G = G[0]?.children);
2653
- return j?.ellipsis ? _t(G, le, j) : G;
2660
+ return j?.ellipsis ? Xt(G, le, j) : G;
2654
2661
  },
2655
2662
  rowSelection: e.rowSelection ? {
2656
- ...ze(e.rowSelection, ["onSelect", "onSelectAll", "onChange", "selectedRowKeys"]),
2657
- selectedRowKeys: r.value || [],
2663
+ ...De(e.rowSelection, ["onSelect", "onSelectAll", "onChange", "selectedRowKeys"]),
2664
+ selectedRowKeys: i.value || [],
2658
2665
  onSelect: C,
2659
2666
  onSelectAll: c,
2660
- onChange: g
2667
+ onChange: b
2661
2668
  } : void 0,
2662
2669
  onChange: Xe,
2663
- onExpandedRowsChange: kt,
2664
- onExpand: Vt,
2665
- onResizeColumn: (z, j) => Xt(z, j)
2670
+ onExpandedRowsChange: Kt,
2671
+ onExpand: kt,
2672
+ onResizeColumn: (D, j) => Vt(D, j)
2666
2673
  }), {
2667
2674
  ...l,
2668
- emptyText: () => dt()
2669
- }), st.value && !p && d(Zt, {
2675
+ emptyText: () => ct()
2676
+ }), st.value && !p && d(Jt, {
2670
2677
  to: st.value
2671
2678
  }, {
2672
2679
  default: () => [d(aa, {
2673
- ref: Yt
2680
+ ref: Wt
2674
2681
  }, null)]
2675
2682
  })])])])]));
2676
2683
  };
2677
2684
  }
2678
2685
  });
2679
2686
  et.install = (e) => (e.component(et.name, et), e);
2680
- function Ua(e, a) {
2687
+ function Qa(e, n) {
2681
2688
  function l() {
2682
2689
  const m = {
2683
2690
  params: {},
2684
2691
  searchMap: []
2685
2692
  };
2686
- if (a?.state) {
2687
- if (Ge(a.state) && ne(a.state.value))
2688
- return ye(m, ee(a.state.value));
2689
- if (ne(a.state) && !Ge(a.state))
2690
- return ye(m, ee(a.state));
2693
+ if (n?.state) {
2694
+ if (Ge(n.state) && ne(n.state.value))
2695
+ return ye(m, ee(n.state.value));
2696
+ if (ne(n.state) && !Ge(n.state))
2697
+ return ye(m, ee(n.state));
2691
2698
  }
2692
2699
  return m;
2693
2700
  }
2694
- const n = at(ye(l(), {
2695
- request: a?.request
2701
+ const a = at(ye(l(), {
2702
+ request: n?.request
2696
2703
  }));
2697
- a?.state && q(() => a.state && Ge(a.state) ? a.state.value : a.state, () => {
2704
+ n?.state && Y(() => n.state && Ge(n.state) ? n.state.value : n.state, () => {
2698
2705
  f();
2699
2706
  }, { deep: !0 });
2700
- const o = T(() => e.value ? e.value.actionRef() : {}), s = T(() => e.value ? e.value.formRef() : {}), u = T(() => ({
2707
+ const o = x(() => e.value ? e.value.actionRef() : {}), r = x(() => e.value ? e.value.formRef() : {}), s = x(() => ({
2701
2708
  ...o.value.pageInfo || {},
2702
- ...s.value.getFormSearch?.() || {}
2703
- })), b = w(!!o.value.loading?.value);
2704
- q(() => o.value.loading?.value, (m) => {
2705
- b.value = !!m;
2706
- }), q(b, (m) => {
2709
+ ...r.value.getFormSearch?.() || {}
2710
+ })), h = T(!!o.value.loading?.value);
2711
+ Y(() => o.value.loading?.value, (m) => {
2712
+ h.value = !!m;
2713
+ }), Y(h, (m) => {
2707
2714
  o.value?.setLoading?.(!!m);
2708
2715
  });
2709
2716
  function f() {
2710
- Sl(n, l());
2717
+ Cl(a, l());
2711
2718
  }
2712
- function $(m, S) {
2713
- n.searchMap && (n.searchMap = ee(n.searchMap).map((v) => v.name === m ? ye(v, S) : v));
2719
+ function $(m, w) {
2720
+ a.searchMap && (a.searchMap = ee(a.searchMap).map((v) => v.name === m ? ye(v, w) : v));
2714
2721
  }
2715
2722
  return {
2716
- formRef: s,
2723
+ formRef: r,
2717
2724
  actionRef: o,
2718
- tableState: n,
2719
- requestSearch: u,
2720
- loading: b,
2721
- dataSource: T(() => o?.value?.dataSource?.value || []),
2722
- selectedKeys: T(() => o?.value?.selectedKeys?.value || []),
2723
- selectedItems: T(() => o?.value?.selectedItems?.value || []),
2725
+ tableState: a,
2726
+ requestSearch: s,
2727
+ loading: h,
2728
+ dataSource: x(() => o?.value?.dataSource?.value || []),
2729
+ selectedKeys: x(() => o?.value?.selectedKeys?.value || []),
2730
+ selectedItems: x(() => o?.value?.selectedItems?.value || []),
2724
2731
  rowsSelection: o?.value?.rowsSelection,
2725
2732
  setTableDataList: (m) => o.value?.setTableDataList?.(m),
2726
2733
  reloadAndReset: (m) => o.value?.reloadAndReset?.(m),
2727
- setPageInfo: (m, S, v, i) => o.value?.setPageInfo?.(m, S, v, i),
2734
+ setPageInfo: (m, w, v, u) => o.value?.setPageInfo?.(m, w, v, u),
2728
2735
  setPagination: (m) => o.value?.setPagination?.(m),
2729
- setLoading: (m) => b.value = m,
2736
+ setLoading: (m) => h.value = m,
2730
2737
  operateTableDataRow: (m) => o.value?.operateTableDataRow?.(m),
2731
2738
  reload: (m) => o.value?.reload?.(m),
2732
2739
  updateSearchMap: $
@@ -2735,5 +2742,5 @@ function Ua(e, a) {
2735
2742
  export {
2736
2743
  et as GProTable,
2737
2744
  he as proTableProps,
2738
- Ua as useTable
2745
+ Qa as useTable
2739
2746
  };