@gx-design-vue/pro-table 0.0.3-rc.2 → 0.0.3-rc.4

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.
@@ -1,25 +1,25 @@
1
- import { ref as E, watchEffect as ae, computed as T, unref as c, reactive as le, watch as X, onUnmounted as Ze, onDeactivated as Tt, provide as Rt, inject as kt, defineComponent as we, createVNode as o, Fragment as Ie, mergeProps as ce, isVNode as de, nextTick as Ft, renderSlot as Dt, createTextVNode as he, cloneVNode as Ot, toRef as G, onMounted as Pt, toRaw as Oe } from "vue";
2
- import { cloneDeep as H, omit as qe } from "lodash-es";
1
+ import { ref as j, watchEffect as ce, computed as w, unref as r, reactive as ae, watch as Q, onUnmounted as Ze, onDeactivated as Rt, provide as kt, inject as Ft, defineComponent as Te, createVNode as o, Fragment as Ee, mergeProps as se, isVNode as de, nextTick as Dt, renderSlot as Ot, createTextVNode as me, cloneVNode as Pt, toRef as U, onMounted as Mt, toRaw as De } from "vue";
2
+ import { cloneDeep as V, omit as qe } from "lodash-es";
3
3
  import { useFullscreen as et } from "@vueuse/core";
4
- import { Form as Ue, Grid as Be, Space as te, Button as Ge, Input as Je, TimePicker as Mt, DatePicker as tt, TreeSelect as Et, Spin as je, Select as Qe, Tree as It, Tooltip as J, Popover as jt, Checkbox as Nt, Dropdown as zt, Menu as Se, Pagination as $t, Table as Bt, Typography as Yt } from "ant-design-vue";
5
- import { isBoolean as re, isFunction as xe, arrayRepeat as Kt, runFunction as Lt, handleCurrentPage as Vt, getSortIndex as Ht, handleFormDefaultValue as At, genColumnKey as nt, compareToMax as Wt, isNumber as lt, isString as _t, isArray as Ne, getRandomNumber as ze, isObject as at, handleShowIndex as qt, hanndleField as Ut } from "@gx-design-vue/pro-utils";
6
- import { tryOnUnmounted as Gt, useMemo as pe } from "@gx-design-vue/pro-hooks";
7
- import V from "dayjs";
8
- import { UpOutlined as Jt, DownOutlined as Qt, VerticalAlignTopOutlined as Xt, VerticalAlignMiddleOutlined as Zt, VerticalAlignBottomOutlined as en, SettingOutlined as ot, FullscreenExitOutlined as tn, FullscreenOutlined as nn, ColumnHeightOutlined as ln, InfoCircleOutlined as an, ReloadOutlined as on } from "@ant-design/icons-vue";
9
- function $e() {
10
- return $e = Object.assign ? Object.assign.bind() : function(e) {
11
- for (var l = 1; l < arguments.length; l++) {
12
- var t = arguments[l];
13
- for (var n in t)
14
- Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]);
4
+ import { Form as Ue, Grid as $e, Space as ne, Button as Ge, Input as Je, TimePicker as Et, DatePicker as tt, TreeSelect as jt, Spin as je, Select as Qe, Tree as It, Tooltip as G, Popover as zt, Checkbox as Nt, Dropdown as $t, Menu as Se, Pagination as Bt, Table as Yt, Typography as Kt } from "ant-design-vue";
5
+ import { isBoolean as re, isFunction as we, arrayRepeat as Lt, runFunction as Vt, handleCurrentPage as Ht, getSortIndex as Wt, handleFormDefaultValue as At, genColumnKey as nt, compareToMax as _t, isNumber as lt, isString as qt, isArray as Ie, getRandomNumber as ze, isObject as at, handleShowIndex as Ut, hanndleField as Gt } from "@gx-design-vue/pro-utils";
6
+ import { tryOnUnmounted as Jt, useMemo as xe } from "@gx-design-vue/pro-hooks";
7
+ import L from "dayjs";
8
+ import { UpOutlined as Qt, DownOutlined as Xt, VerticalAlignTopOutlined as Zt, VerticalAlignMiddleOutlined as en, VerticalAlignBottomOutlined as tn, SettingOutlined as ot, FullscreenExitOutlined as nn, FullscreenOutlined as ln, ColumnHeightOutlined as an, InfoCircleOutlined as on, ReloadOutlined as un } from "@ant-design/icons-vue";
9
+ function Ne() {
10
+ return Ne = Object.assign ? Object.assign.bind() : function(e) {
11
+ for (var a = 1; a < arguments.length; a++) {
12
+ var t = arguments[a];
13
+ for (var l in t)
14
+ Object.prototype.hasOwnProperty.call(t, l) && (e[l] = t[l]);
15
15
  }
16
16
  return e;
17
- }, $e.apply(this, arguments);
17
+ }, Ne.apply(this, arguments);
18
18
  }
19
- function un(e, l) {
20
- process.env.NODE_ENV !== "production" && !e && console !== void 0 && console.error("Warning: ".concat(l));
19
+ function sn(e, a) {
20
+ process.env.NODE_ENV !== "production" && !e && console !== void 0 && console.error("Warning: ".concat(a));
21
21
  }
22
- const sn = {
22
+ const rn = {
23
23
  prefixCls: { type: String, default: void 0 },
24
24
  columns: { type: Array, default: void 0 },
25
25
  rowKey: { type: [String, Function], default: void 0 },
@@ -128,19 +128,19 @@ const sn = {
128
128
  transformCellText: {
129
129
  type: Function
130
130
  }
131
- }, Ye = ({ suffixCls: e, customizePrefixCls: l, isPor: t, className: n }) => {
132
- const u = n || (t ? "gx-pro" : "gx");
133
- return l || (e ? `${u}-${e}` : u);
131
+ }, Be = ({ suffixCls: e, customizePrefixCls: a, isPor: t, className: l }) => {
132
+ const u = l || (t ? "gx-pro" : "gx");
133
+ return a || (e ? `${u}-${e}` : u);
134
134
  };
135
- function cn(e, l, t = "default") {
136
- return l[t] === !1 ? !1 : l[t] || e[t];
135
+ function ut(e, a, t = "default") {
136
+ return a[t] === !1 ? !1 : a[t] || e[t];
137
137
  }
138
- function se(e, l, t = "default") {
139
- var n;
140
- return l[t] === !1 ? !1 : l[t] || ((n = e[t]) == null ? void 0 : n.call(e));
138
+ function ve(e, a, t = "default") {
139
+ var l;
140
+ return a[t] === !1 ? !1 : a[t] || ((l = e[t]) == null ? void 0 : l.call(e));
141
141
  }
142
- const ne = {
143
- ...sn,
142
+ const le = {
143
+ ...rn,
144
144
  rowSelection: {
145
145
  type: Object,
146
146
  default: void 0
@@ -176,29 +176,25 @@ const ne = {
176
176
  type: Array,
177
177
  default: () => []
178
178
  },
179
- customize: {
180
- type: [Object, Function],
181
- default: () => {
182
- }
183
- },
179
+ customize: [Function, Object],
184
180
  actionRef: Function,
185
- formRef: Function,
181
+ formRef: Object,
186
182
  tableClassName: String,
187
183
  tableStyle: {
188
184
  type: Object
189
185
  },
190
186
  toolBarBtn: {
191
- type: [Object, Array, Function],
187
+ type: [Object, Function],
192
188
  default: () => {
193
189
  }
194
190
  },
195
191
  headerTitle: {
196
- type: [String, Object, Array, Function],
192
+ type: [Object, Function],
197
193
  default: () => {
198
194
  }
199
195
  },
200
196
  titleTip: {
201
- type: [Boolean, String, Object, Array, Function],
197
+ type: [Object, Function],
202
198
  default: () => {
203
199
  }
204
200
  },
@@ -219,7 +215,7 @@ const ne = {
219
215
  }
220
216
  },
221
217
  settingExtra: {
222
- type: [String, Function],
218
+ type: [Object, Function],
223
219
  default: () => {
224
220
  }
225
221
  },
@@ -265,58 +261,58 @@ const ne = {
265
261
  onBeforeSearchSubmit: Function,
266
262
  onColumnsStateChange: Function
267
263
  };
268
- function rn({ emit: e, loading: l }) {
269
- const t = E(l.value);
270
- ae(() => {
271
- t.value = l.value;
264
+ function cn({ emit: e, loading: a }) {
265
+ const t = j(a.value);
266
+ ce(() => {
267
+ t.value = a.value;
272
268
  });
273
- const n = T(() => c(t) || !1);
274
- function u(v) {
275
- t.value = v, e("loadingChange", !0);
269
+ const l = w(() => r(t) || !1);
270
+ function u(c) {
271
+ t.value = c, e("loadingChange", !0);
276
272
  }
277
- return { getLoading: n, setLoading: u };
273
+ return { getLoading: l, setLoading: u };
278
274
  }
279
- function dn({ size: e, emit: l }) {
280
- const t = E("middle");
281
- ae(() => {
275
+ function dn({ size: e, emit: a }) {
276
+ const t = j("middle");
277
+ ce(() => {
282
278
  t.value = e.value;
283
279
  });
284
- function n(u) {
285
- t.value = u, l("sizeChange", !0);
280
+ function l(u) {
281
+ t.value = u, a("sizeChange", !0);
286
282
  }
287
- return { sizeRef: t, setTableSize: n };
283
+ return { sizeRef: t, setTableSize: l };
288
284
  }
289
285
  function fn({
290
286
  slots: e,
291
- props: l,
287
+ props: a,
292
288
  pagination: t
293
289
  }) {
294
- const n = le({});
295
- ae(() => {
296
- var s;
290
+ const l = ae({});
291
+ ce(() => {
292
+ var i;
297
293
  if (t.value || t.value === void 0)
298
- Object.assign(n, {
299
- ...(s = t.value) != null ? s : {}
294
+ Object.assign(l, {
295
+ ...(i = t.value) != null ? i : {}
300
296
  });
301
297
  else
302
- for (const d in n)
303
- delete n[d];
298
+ for (const h in l)
299
+ delete l[h];
304
300
  });
305
- const u = T(() => {
306
- var i;
301
+ const u = w(() => {
302
+ var s;
307
303
  if (re(t.value) && !t.value)
308
304
  return !1;
309
- const s = cn(e, c(l), "pageItemRender"), d = xe(s) ? {
305
+ const i = ut(e, r(a), "pageItemRender"), h = we(i) ? {
310
306
  itemRender: ({
311
- page: r,
312
- type: S,
307
+ page: d,
308
+ type: C,
313
309
  originalElement: f
314
- }) => s ? s({
315
- page: r,
316
- type: S,
310
+ }) => i ? i({
311
+ page: d,
312
+ type: C,
317
313
  originalElement: f
318
314
  }) : null
319
- } : null, p = {
315
+ } : null, g = {
320
316
  current: 1,
321
317
  pageSize: 10,
322
318
  size: "default",
@@ -324,386 +320,386 @@ function fn({
324
320
  showSizeChanger: !0,
325
321
  pageSizeOptions: ["10", "20", "50", "100"],
326
322
  ...t.value || {},
327
- ...c(n),
328
- ...d || {}
323
+ ...r(l),
324
+ ...h || {}
329
325
  };
330
- return (i = t.value) != null && i.showTotal || (p.showTotal = (r) => `\u5171${r < p.pageSize ? 1 : Math.ceil(r / p.pageSize)}\u9875 ${r}\u6761\u8BB0\u5F55`), p;
326
+ return (s = t.value) != null && s.showTotal || (g.showTotal = (d) => `\u5171${d < g.pageSize ? 1 : Math.ceil(d / g.pageSize)}\u9875 ${d}\u6761\u8BB0\u5F55`), g;
331
327
  });
332
- function v(s) {
333
- const d = c(u);
334
- Object.assign(n, {
335
- ...d || {},
336
- ...s
328
+ function c(i) {
329
+ const h = r(u);
330
+ Object.assign(l, {
331
+ ...h || {},
332
+ ...i
337
333
  });
338
334
  }
339
335
  return {
340
336
  getPaginationInfo: u,
341
- setPagination: v
337
+ setPagination: c
342
338
  };
343
339
  }
344
- function hn(e, l) {
345
- const t = E([]), n = E([]);
346
- X(() => {
347
- var i;
348
- return (i = l.value) == null ? void 0 : i.selectedRowKeys;
349
- }, (i) => {
350
- t.value = Kt([...i || []]);
340
+ function hn(e, a) {
341
+ const t = j([]), l = j([]);
342
+ Q(() => {
343
+ var s;
344
+ return (s = a.value) == null ? void 0 : s.selectedRowKeys;
345
+ }, (s) => {
346
+ t.value = Lt([...s || []]);
351
347
  }, {
352
348
  deep: !0,
353
349
  immediate: !0
354
- }), X(() => {
355
- var i;
356
- return (i = l.value) == null ? void 0 : i.defaultSelectRows;
357
- }, (i) => {
358
- i && e.value && i.forEach((r) => {
359
- n.value.every((S) => S[e.value] !== (r == null ? void 0 : r[e.value])) && n.value.push(H(r));
350
+ }), Q(() => {
351
+ var s;
352
+ return (s = a.value) == null ? void 0 : s.defaultSelectRows;
353
+ }, (s) => {
354
+ s && e.value && s.forEach((d) => {
355
+ l.value.every((C) => C[e.value] !== (d == null ? void 0 : d[e.value])) && l.value.push(V(d));
360
356
  });
361
357
  }, {
362
358
  deep: !0,
363
359
  immediate: !0
364
360
  });
365
- const u = (i, r) => {
366
- e.value && (r ? i != null && i[e.value] && (t.value.push(i[e.value]), n.value.push(i)) : (t.value = t.value.filter((S) => S !== i[e.value]), n.value = n.value.filter((S) => S[e.value] !== i[e.value])));
367
- }, v = () => {
368
- l.value && l.value.onChange(t.value, n.value);
361
+ const u = (s, d) => {
362
+ e.value && (d ? s != null && s[e.value] && (t.value.push(s[e.value]), l.value.push(s)) : (t.value = t.value.filter((C) => C !== s[e.value]), l.value = l.value.filter((C) => C[e.value] !== s[e.value])));
363
+ }, c = () => {
364
+ a.value && a.value.onChange(t.value, l.value);
369
365
  };
370
366
  return {
371
367
  selectedKey: t,
372
368
  selectRowKey: u,
373
- selectAllRowKey: (i, r, S) => {
374
- e.value && (i ? r.map((f) => (t.value.every((m) => m !== (f == null ? void 0 : f[e.value])) && f != null && f[e.value] && (t.value.push(f[e.value]), n.value.push(f)), f)) : S.map((f) => (t.value.some((m) => m === (f == null ? void 0 : f[e.value])) && (t.value = t.value.filter((m) => m !== f[e.value]), n.value = n.value.filter((m) => m[e.value] !== f[e.value])), f)));
369
+ selectAllRowKey: (s, d, C) => {
370
+ e.value && (s ? d.map((f) => (t.value.every((m) => m !== (f == null ? void 0 : f[e.value])) && f != null && f[e.value] && (t.value.push(f[e.value]), l.value.push(f)), f)) : C.map((f) => (t.value.some((m) => m === (f == null ? void 0 : f[e.value])) && (t.value = t.value.filter((m) => m !== f[e.value]), l.value = l.value.filter((m) => m[e.value] !== f[e.value])), f)));
375
371
  },
376
- removeRowKeys: (i) => {
377
- t.value = t.value.filter((r) => !i.includes(r)), n.value = n.value.filter((r) => !i.includes(r == null ? void 0 : r[e.value || ""])), v();
372
+ removeRowKeys: (s) => {
373
+ t.value = t.value.filter((d) => !s.includes(d)), l.value = l.value.filter((d) => !s.includes(d == null ? void 0 : d[e.value || ""])), c();
378
374
  },
379
- changeRowKey: v,
380
- syncSelectedRows: (i) => {
381
- if (e.value && t.value.length !== n.value.length) {
382
- const r = n.value.map((f) => f[e.value]), S = t.value.filter((f) => !r.includes(f));
383
- i.forEach((f) => {
384
- S.includes(f[e.value]) && n.value.push(H(f));
375
+ changeRowKey: c,
376
+ syncSelectedRows: (s) => {
377
+ if (e.value && t.value.length !== l.value.length) {
378
+ const d = l.value.map((f) => f[e.value]), C = t.value.filter((f) => !d.includes(f));
379
+ s.forEach((f) => {
380
+ C.includes(f[e.value]) && l.value.push(V(f));
385
381
  });
386
382
  }
387
383
  }
388
384
  };
389
385
  }
390
- function vn(e, l) {
391
- const t = l || 0, n = E(), u = E(e);
386
+ function vn(e, a) {
387
+ const t = a || 0, l = j(), u = j(e);
392
388
  u.value = e;
393
- function v() {
394
- n.value && clearTimeout(n.value);
389
+ function c() {
390
+ l.value && clearTimeout(l.value);
395
391
  }
396
- async function s(...d) {
397
- var p;
398
- v(), n.value = (p = d[0]) != null && p.immediate ? await u.value(...d) : setTimeout(async () => {
399
- await u.value(...d);
392
+ async function i(...h) {
393
+ var g;
394
+ c(), l.value = (g = h[0]) != null && g.immediate ? await u.value(...h) : setTimeout(async () => {
395
+ await u.value(...h);
400
396
  }, t);
401
397
  }
402
- return Gt(v), {
403
- cancel: v,
404
- run: s
398
+ return Jt(c), {
399
+ cancel: c,
400
+ run: i
405
401
  };
406
402
  }
407
403
  function mn(e) {
408
- const l = T(() => e.polling), t = T(() => e.request), n = T(() => e.postData), u = T(() => e.debounceTime), v = T(() => e.waitRequest), s = T(() => e.dataSource);
404
+ const a = w(() => e.polling), t = w(() => e.request), l = w(() => e.postData), u = w(() => e.debounceTime), c = w(() => e.waitRequest), i = w(() => e.dataSource);
409
405
  return {
410
- polling: l,
406
+ polling: a,
411
407
  request: t,
412
- postData: n,
408
+ postData: l,
413
409
  debounceTime: u,
414
- waitRequest: v,
415
- dataSource: s
410
+ waitRequest: c,
411
+ dataSource: i
416
412
  };
417
413
  }
418
- function gn({ polling: e, request: l, postData: t, dataSource: n, waitRequest: u, debounceTime: v }, { columns: s, getLoading: d, setLoading: p, setColumns: i, removeRowKeys: r, syncSelectedRows: S, formParamsRef: f, setPagination: m, getPaginationInfo: C, onBeforeSearchSubmit: y }, R) {
419
- const F = E(), x = E(!0), k = E(!1), I = E(!1), N = E([]), B = E(), L = vn(async (P) => {
420
- B.value && clearTimeout(B.value);
421
- const $ = await j(P), Y = Lt(e.value, $);
422
- Y && !F.value && (B.value = setTimeout(() => {
423
- L.run({ ...P, isPolling: Y });
414
+ function gn({ polling: e, request: a, postData: t, dataSource: l, waitRequest: u, debounceTime: c }, { columns: i, getLoading: h, setLoading: g, setColumns: s, removeRowKeys: d, syncSelectedRows: C, formParamsRef: f, setPagination: m, getPaginationInfo: b, onBeforeSearchSubmit: v }, T) {
415
+ const R = j(), D = j(!0), x = j(!1), E = j(!1), z = j([]), $ = j(), H = vn(async (P) => {
416
+ $.value && clearTimeout($.value);
417
+ const N = await O(P), Y = Vt(e.value, N);
418
+ Y && !R.value && ($.value = setTimeout(() => {
419
+ H.run({ ...P, isPolling: Y });
424
420
  }, Math.max(Y, 2e3)));
425
- }, v.value || 20);
421
+ }, c.value || 20);
426
422
  Ze(() => {
427
- F.value = !0, clearTimeout(B.value);
428
- }), Tt(() => {
429
- F.value = !0, clearTimeout(B.value);
430
- }), X(() => e.value, () => {
431
- e.value ? L.run({ isPolling: !0 }) : clearTimeout(B.value);
432
- }, { immediate: !0 }), X(() => [u.value, n.value, f], () => {
433
- l.value ? (!x.value || !e.value) && L.run({ isPolling: !1 }) : g(n.value || []);
423
+ R.value = !0, clearTimeout($.value);
424
+ }), Rt(() => {
425
+ R.value = !0, clearTimeout($.value);
426
+ }), Q(() => e.value, () => {
427
+ e.value ? H.run({ isPolling: !0 }) : clearTimeout($.value);
428
+ }, { immediate: !0 }), Q(() => [u.value, l.value, f], () => {
429
+ a.value ? (!D.value || !e.value) && H.run({ isPolling: !1 }) : I(l.value || []);
434
430
  }, {
435
431
  deep: !0,
436
432
  immediate: !0
437
433
  });
438
- const q = T(() => {
439
- const P = c(s).filter(($) => $.show || $.show === void 0);
440
- return !c(N) || c(N).length === 0 || !P || P.length === 0 ? [] : c(N);
441
- }), a = T(() => c(N).some((P) => P.children && P.children.length > 0));
442
- function h(P) {
443
- I.value = P;
434
+ const _ = w(() => {
435
+ const P = r(i).filter((N) => N.show || N.show === void 0);
436
+ return !r(z) || r(z).length === 0 || !P || P.length === 0 ? [] : r(z);
437
+ }), q = w(() => r(z).some((P) => P.children && P.children.length > 0));
438
+ function n(P) {
439
+ E.value = P;
444
440
  }
445
- function D(P, $, Y) {
446
- L.run({ pagination: P, filters: $, sorter: Y, isPolling: !1 }), R("change", P, $, Y);
441
+ function S(P, N, Y) {
442
+ H.run({ pagination: P, filters: N, sorter: Y, isPolling: !1 }), T("change", P, N, Y);
447
443
  }
448
- const M = (P, $) => {
449
- g(P), m($);
450
- }, j = async (P = {}) => {
451
- var ye, be;
452
- const { pagination: $, filters: Y, sorter: K, removeKeys: ue = [], isPolling: Re = !1 } = P;
453
- if (!c(l) || !xe(c(l)) || c(u) && d.value || k.value)
454
- return n.value || [];
455
- if (k.value = !0, !Re || c(u) || x.value ? p(!0) : h(!0), c(u)) {
456
- x.value = !1, k.value = !1;
444
+ const k = (P, N) => {
445
+ I(P), m(N);
446
+ }, O = async (P = {}) => {
447
+ var be, Ce;
448
+ const { pagination: N, filters: Y, sorter: K, removeKeys: ue = [], isPolling: ye = !1 } = P;
449
+ if (!r(a) || !we(r(a)) || r(u) && h.value || x.value)
450
+ return l.value || [];
451
+ if (x.value = !0, !ye || r(u) || D.value ? g(!0) : n(!0), r(u)) {
452
+ D.value = !1, x.value = !1;
457
453
  return;
458
454
  }
459
- const { current: me = 1, pageSize: ge = 10, total: ke } = c(C) || {};
455
+ const { current: Re = 1, pageSize: fe = 10, total: ke } = r(b) || {};
460
456
  try {
461
- let Z = {};
462
- if (re($) && !$ || re(C))
463
- Z = {};
457
+ let X = {};
458
+ if (re(N) && !N || re(b))
459
+ X = {};
464
460
  else {
465
- const A = $ || {
466
- current: me,
467
- pageSize: ge,
461
+ const W = N || {
462
+ current: Re,
463
+ pageSize: fe,
468
464
  total: ke
469
465
  };
470
- Z.pageNum = Vt(A, ue.length), ue.length && r(ue), Z.pageSize = ge;
466
+ X.pageNum = Ht(W, ue.length), ue.length && d(ue), X.pageSize = fe;
471
467
  }
472
- const Ce = (K == null ? void 0 : K.columnKey) || (K == null ? void 0 : K.field);
473
- K && K.order ? i(c(s).map((A) => (A.dataIndex === Ce ? A.sortOrder = K.order : A.sortOrder = null, A))) : K && i(c(s).map((A) => (A.dataIndex === Ce && (A.sortOrder = null), A)));
474
- let fe = {
475
- ...Z || {},
468
+ const pe = (K == null ? void 0 : K.columnKey) || (K == null ? void 0 : K.field);
469
+ K && K.order ? s(r(i).map((W) => (W.dataIndex === pe ? W.sortOrder = K.order : W.sortOrder = null, W))) : K && s(r(i).map((W) => (W.dataIndex === pe && (W.sortOrder = null), W)));
470
+ let he = {
471
+ ...X || {},
476
472
  ...P.params,
477
473
  ...f
478
474
  };
479
- y && xe(y) && (fe = await y(fe, K, Y));
480
- let _ = [];
481
- const ie = await ((ye = c(l)) == null ? void 0 : ye(fe, K, Y));
482
- return k.value = !1, ie && ie.success ? (_ = ie.data || [], c(t) && xe(c(t)) && (_ = await ((be = c(t)) == null ? void 0 : be(_))), S(_), M(_ || [], {
483
- total: ie.total || 0
484
- }), _) : [];
485
- } catch (Z) {
486
- N.value === void 0 && g([]), R("requestError", Z);
475
+ v && we(v) && (he = await v(he, K, Y));
476
+ let Z = [];
477
+ const J = await ((be = r(a)) == null ? void 0 : be(he, K, Y));
478
+ return x.value = !1, J && J.success ? (Z = J.data || [], r(t) && we(r(t)) && (Z = await ((Ce = r(t)) == null ? void 0 : Ce(Z))), C(Z), k(Z || [], {
479
+ total: J.total || 0
480
+ }), Z) : [];
481
+ } catch (X) {
482
+ z.value === void 0 && I([]), T("requestError", X);
487
483
  } finally {
488
- x.value = !1, p(!1);
484
+ D.value = !1, g(!1);
489
485
  }
490
486
  return [];
491
487
  };
492
- function g(P) {
493
- N.value = Ht(H(P), c(C.value));
488
+ function I(P) {
489
+ z.value = Wt(V(P), r(b.value));
494
490
  }
495
- function Te({ key: P, params: $ }) {
496
- N.value = N.value.map((Y) => P && $[P] === Y[P] ? { ...Y, ...$ } : Y);
491
+ function p({ key: P, params: N }) {
492
+ z.value = z.value.map((Y) => P && N[P] === Y[P] ? { ...Y, ...N } : Y);
497
493
  }
498
494
  return {
499
- getDataSourceRef: q,
500
- isTreeDataRef: a,
501
- reSetDataList: g,
502
- changeDataValue: Te,
503
- handleTableChange: D,
495
+ getDataSourceRef: _,
496
+ isTreeDataRef: q,
497
+ reSetDataList: I,
498
+ changeDataValue: p,
499
+ handleTableChange: S,
504
500
  reload: async (P) => {
505
- c(l) ? await L.run({ ...P, isPolling: !1 }) : R("reload");
501
+ r(a) ? await H.run({ ...P, isPolling: !1 }) : T("reload");
506
502
  }
507
503
  };
508
504
  }
509
- function yn({ search: e, searchMap: l, params: t, columns: n }) {
510
- const u = le({}), v = le({}), s = E([]), d = T(() => !!e.value.showSearch);
511
- X(d.value ? [() => l.value, () => n.value] : [() => l.value, () => n.value, () => t.value], () => {
512
- const i = H(l.value);
513
- n.value && n.value.map((S) => (S.searchConfig && i.push(S.searchConfig), S)), s.value = H(i);
514
- const r = At(i);
515
- Object.assign(v, { ...r }), Object.assign(u, {
505
+ function yn({ search: e, searchMap: a, params: t, columns: l }) {
506
+ const u = ae({}), c = ae({}), i = j([]), h = w(() => !!e.value.showSearch);
507
+ Q(h.value ? [() => a.value, () => l.value] : [() => a.value, () => l.value, () => t.value], () => {
508
+ const s = V(a.value);
509
+ l.value && l.value.map((C) => (C.searchConfig && s.push(C.searchConfig), C)), i.value = V(s);
510
+ const d = At(s);
511
+ Object.assign(c, { ...d }), Object.assign(u, {
516
512
  ...t.value || {},
517
- ...r
513
+ ...d
518
514
  });
519
515
  }, {
520
516
  deep: !0,
521
517
  immediate: !0
522
518
  });
523
- function p(i) {
524
- Object.assign(u, i);
519
+ function g(s) {
520
+ Object.assign(u, s);
525
521
  }
526
- return { formDataRef: s, formParamsRef: u, defaultParamsRef: v, setFormParams: p };
522
+ return { formDataRef: i, formParamsRef: u, defaultParamsRef: c, setFormParams: g };
527
523
  }
528
- function bn({ columns: e, columnsState: l, changeColumns: t }) {
529
- const n = E(void 0), u = le({}), v = le({}), s = le({}), d = E([]);
530
- X(() => e.value, () => {
531
- var r;
532
- (r = c(e)) == null || r.forEach(({ show: S, key: f, fixed: m }, C) => {
533
- const y = nt(f, C);
534
- y && (s[y] = { show: S === void 0 ? !0 : S, fixed: m });
524
+ function bn({ columns: e, columnsState: a, changeColumns: t }) {
525
+ const l = j(void 0), u = ae({}), c = ae({}), i = ae({}), h = j([]);
526
+ Q(() => e.value, () => {
527
+ var d;
528
+ (d = r(e)) == null || d.forEach(({ show: C, key: f, fixed: m }, b) => {
529
+ const v = nt(f, b);
530
+ v && (i[v] = { show: C === void 0 ? !0 : C, fixed: m });
535
531
  });
536
532
  }, {
537
533
  deep: !0,
538
534
  immediate: !0
539
- }), X(() => e.value, () => {
540
- const r = c(e).map((S) => S.key);
541
- i(r);
535
+ }), Q(() => e.value, () => {
536
+ const d = r(e).map((C) => C.key);
537
+ s(d);
542
538
  }, {
543
539
  deep: !0,
544
540
  immediate: !0
545
- }), ae(() => {
546
- var S;
547
- const r = {
548
- ...(S = c(l)) == null ? void 0 : S.value,
549
- ...c(s)
541
+ }), ce(() => {
542
+ var C;
543
+ const d = {
544
+ ...(C = r(a)) == null ? void 0 : C.value,
545
+ ...r(i)
550
546
  };
551
- Object.assign(u, r), Object.assign(v, r);
547
+ Object.assign(u, d), Object.assign(c, d);
552
548
  });
553
- function p(r, S) {
554
- n.value = S, Object.assign(u, r), t == null || t(u, S === "fixed");
549
+ function g(d, C) {
550
+ l.value = C, Object.assign(u, d), t == null || t(u, C === "fixed");
555
551
  }
556
- function i(r) {
557
- d.value = r;
552
+ function s(d) {
553
+ h.value = d;
558
554
  }
559
555
  return {
560
556
  columnsMap: u,
561
- operationType: n,
562
- setColumnsMap: p,
563
- sortKeyColumns: d,
564
- cacheColumnsMap: v,
565
- setSortKeyColumns: i
557
+ operationType: l,
558
+ setColumnsMap: g,
559
+ sortKeyColumns: h,
560
+ cacheColumnsMap: c,
561
+ setSortKeyColumns: s
566
562
  };
567
563
  }
568
564
  function Cn(e) {
569
- const l = T(() => e.draggabled), t = T(() => e.neverScroll), n = T(() => e.autoScroll);
565
+ const a = w(() => e.draggabled), t = w(() => e.neverScroll), l = w(() => e.autoScroll);
570
566
  return {
571
- draggabled: l,
567
+ draggabled: a,
572
568
  neverScroll: t,
573
- autoScroll: n
569
+ autoScroll: l
574
570
  };
575
571
  }
576
- function Sn({ scroll: e, columns: l, breakpoint: t, draggabled: n, autoScroll: u, neverScroll: v }) {
577
- const s = E([]), d = E([]);
578
- X([
572
+ function pn({ scroll: e, columns: a, breakpoint: t, draggabled: l, autoScroll: u, neverScroll: c }) {
573
+ const i = j([]), h = j([]);
574
+ Q([
579
575
  () => e.value,
580
- () => l.value,
576
+ () => a.value,
581
577
  () => t.value,
582
- () => n.value,
578
+ () => l.value,
583
579
  () => u.value,
584
- () => v.value
580
+ () => c.value
585
581
  ], () => {
586
- s.value = H(r(c(l))), d.value = H(r(c(l)));
582
+ i.value = V(d(r(a))), h.value = V(d(r(a)));
587
583
  }, {
588
584
  deep: !0,
589
585
  immediate: !0
590
586
  });
591
- const p = T(() => {
592
- const C = i(c(s).filter((F) => F.fixed === "left")), y = i(c(s).filter((F) => F.fixed !== "left" && F.fixed !== "right")), R = i(c(s).filter((F) => F.fixed === "right"));
587
+ const g = w(() => {
588
+ const b = s(r(i).filter((R) => R.fixed === "left")), v = s(r(i).filter((R) => R.fixed !== "left" && R.fixed !== "right")), T = s(r(i).filter((R) => R.fixed === "right"));
593
589
  return [
594
- ...C,
595
- ...y,
596
- ...R
590
+ ...b,
591
+ ...v,
592
+ ...T
597
593
  ];
598
594
  });
599
- function i(C) {
600
- return C.sort((y, R) => Wt(y, R, "order"));
595
+ function s(b) {
596
+ return b.sort((v, T) => _t(v, T, "order"));
601
597
  }
602
- function r(C) {
603
- return H(C).map((y, R) => {
604
- var F;
605
- if (y.dataIndex === "action" || R === C.length - 1 ? y.resizable = !1 : y.resizable = re(y.resizable) ? y.resizable : !!(lt(y.width) && c(n)), !y.width || c(v))
606
- return y;
607
- if (y.dataIndex === "action" && c(u))
608
- if (((F = c(e)) == null ? void 0 : F.x) || !c(t))
609
- y.width = y.width || 100, y.fixed = "right";
598
+ function d(b) {
599
+ return V(b).map((v, T) => {
600
+ var R;
601
+ if (v.dataIndex === "action" || T === b.length - 1 ? v.resizable = !1 : v.resizable = re(v.resizable) ? v.resizable : !!(lt(v.width) && r(l)), !v.width || r(c))
602
+ return v;
603
+ if (v.dataIndex === "action" && r(u))
604
+ if (((R = r(e)) == null ? void 0 : R.x) || !r(t))
605
+ v.width = v.width || 100, v.fixed = "right";
610
606
  else {
611
- const x = c(l).find((k) => k.dataIndex === y.dataIndex);
612
- y.width = (x == null ? void 0 : x.width) || "", y.fixed = x == null ? void 0 : x.fixed;
607
+ const D = r(a).find((x) => x.dataIndex === v.dataIndex);
608
+ v.width = (D == null ? void 0 : D.width) || "", v.fixed = D == null ? void 0 : D.fixed;
613
609
  }
614
- return y;
610
+ return v;
615
611
  });
616
612
  }
617
- function S(C, y) {
618
- s.value = s.value.map((R) => (R.uuid === y.uuid && (R.width = C), R));
613
+ function C(b, v) {
614
+ i.value = i.value.map((T) => (T.uuid === v.uuid && (T.width = b), T));
619
615
  }
620
- function f(C) {
621
- if (C.length <= 0) {
622
- s.value = [];
616
+ function f(b) {
617
+ if (b.length <= 0) {
618
+ i.value = [];
623
619
  return;
624
620
  }
625
- s.value = r(H(C));
621
+ i.value = d(V(b));
626
622
  }
627
- function m(C) {
628
- let y = H(l.value);
629
- y = y.map((R) => {
630
- var x, k, I;
631
- const F = R.key ? {
632
- show: (x = C[R.key]) == null ? void 0 : x.show,
633
- fixed: (k = C[R.key]) == null ? void 0 : k.fixed,
634
- order: (I = C[R.key]) == null ? void 0 : I.order
623
+ function m(b) {
624
+ let v = V(a.value);
625
+ v = v.map((T) => {
626
+ var D, x, E;
627
+ const R = T.key ? {
628
+ show: (D = b[T.key]) == null ? void 0 : D.show,
629
+ fixed: (x = b[T.key]) == null ? void 0 : x.fixed,
630
+ order: (E = b[T.key]) == null ? void 0 : E.order
635
631
  } : {};
636
632
  return {
637
- ...R,
638
- ...F
633
+ ...T,
634
+ ...R
639
635
  };
640
- }), f(y);
636
+ }), f(v);
641
637
  }
642
638
  return {
643
639
  breakpoint: t,
644
- getProColumns: p,
645
- cacheProColumns: d,
640
+ getProColumns: g,
641
+ cacheProColumns: h,
646
642
  setColumns: f,
647
643
  changeColumns: m,
648
- resizeColumnWidth: S
644
+ resizeColumnWidth: C
649
645
  };
650
646
  }
651
- function pn(e) {
652
- const l = T(() => e.scroll), t = T(() => e.autoScroll), n = T(() => e.modalScroll), u = T(() => e.neverScroll), v = T(() => e.rowSelection), s = T(() => e.scrollBreakpoint);
647
+ function Sn(e) {
648
+ const a = w(() => e.scroll), t = w(() => e.autoScroll), l = w(() => e.modalScroll), u = w(() => e.neverScroll), c = w(() => e.rowSelection), i = w(() => e.scrollBreakpoint);
653
649
  return {
654
- scroll: l,
650
+ scroll: a,
655
651
  neverScroll: u,
656
- rowSelection: v,
652
+ rowSelection: c,
657
653
  autoScroll: t,
658
- modalScroll: n,
659
- scrollBreakpoint: s
654
+ modalScroll: l,
655
+ scrollBreakpoint: i
660
656
  };
661
657
  }
662
- function xn({ scroll: e, columns: l, autoScroll: t, modalScroll: n, neverScroll: u, rowSelection: v, screensRef: s, innerWidth: d, scrollBreakpoint: p }) {
663
- const i = T(() => {
664
- var f, m, C;
665
- return c(p) ? lt(c(p)) ? d.value > c(p) : _t(c(p)) ? (f = s.value) == null ? void 0 : f[c(p)] : (m = s.value) == null ? void 0 : m.xl : (C = s.value) == null ? void 0 : C.xl;
666
- }), r = T(() => {
658
+ function xn({ scroll: e, columns: a, autoScroll: t, modalScroll: l, neverScroll: u, rowSelection: c, screensRef: i, innerWidth: h, scrollBreakpoint: g }) {
659
+ const s = w(() => {
660
+ var f, m, b;
661
+ return r(g) ? lt(r(g)) ? h.value > r(g) : qt(r(g)) ? (f = i.value) == null ? void 0 : f[r(g)] : (m = i.value) == null ? void 0 : m.xl : (b = i.value) == null ? void 0 : b.xl;
662
+ }), d = w(() => {
667
663
  let f = 0;
668
- const m = c(v) ? 60 : 0, C = 150, y = H(c(l));
669
- y.forEach((x) => {
670
- f += Number.parseInt(x.width) || 0;
664
+ const m = r(c) ? 60 : 0, b = 150, v = V(r(a));
665
+ v.forEach((D) => {
666
+ f += Number.parseInt(D.width) || 0;
671
667
  });
672
- const F = y.filter((x) => !Reflect.has(x, "width")).length;
673
- return F !== 0 && (f += F * C), m && (f += m), f;
668
+ const R = v.filter((D) => !Reflect.has(D, "width")).length;
669
+ return R !== 0 && (f += R * b), m && (f += m), f;
674
670
  });
675
- return { getScrollRef: T(() => {
671
+ return { getScrollRef: w(() => {
676
672
  var m;
677
- const { xl: f } = s.value;
678
- return c(u) ? {} : c(e) && Object.keys(c(e)).length ? c(e) : c(n) ? {
679
- y: ((m = c(e)) == null ? void 0 : m.y) || (f ? 400 : 235)
680
- } : c(t) ? i.value ? {} : re(i.value) ? { x: c(r) } : {} : {};
681
- }), breakpoint: i };
673
+ const { xl: f } = i.value;
674
+ return r(u) ? {} : r(e) && Object.keys(r(e)).length ? r(e) : r(l) ? {
675
+ y: ((m = r(e)) == null ? void 0 : m.y) || (f ? 400 : 235)
676
+ } : r(t) ? s.value ? {} : re(s.value) ? { x: r(d) } : {} : {};
677
+ }), breakpoint: s };
682
678
  }
683
- const ut = Symbol("table-context"), wn = (e = Symbol(), l) => kt(e, l || {}), Tn = (e) => {
684
- Rt(ut, e);
685
- }, oe = () => wn(ut, []);
686
- function Rn(e, l) {
687
- const t = le({});
688
- ae(() => {
689
- n();
679
+ const it = Symbol("table-context"), wn = (e = Symbol(), a) => Ft(e, a || {}), Tn = (e) => {
680
+ kt(it, e);
681
+ }, oe = () => wn(it, []);
682
+ function Rn(e, a) {
683
+ const t = ae({});
684
+ ce(() => {
685
+ l();
690
686
  });
691
- function n() {
692
- Object.keys(e).map((s) => {
693
- u(s, e[s]);
687
+ function l() {
688
+ Object.keys(e).map((i) => {
689
+ u(i, e[i]);
694
690
  });
695
- const v = l.find((s) => s.valueType === "dateRange");
696
- v && u(v.name || "", e[v.rangeStartName || "start"] ? [
697
- e[v.rangeStartName || "start"],
698
- e[v.rangeEndName || "end"]
691
+ const c = a.find((i) => i.valueType === "dateRange");
692
+ c && u(c.name || "", e[c.rangeStartName || "start"] ? [
693
+ e[c.rangeStartName || "start"],
694
+ e[c.rangeEndName || "end"]
699
695
  ] : []);
700
696
  }
701
- function u(v, s) {
702
- t[v] = s;
697
+ function u(c, i) {
698
+ t[c] = i;
703
699
  }
704
700
  return {
705
701
  formState: t,
706
- resetFormState: n,
702
+ resetFormState: l,
707
703
  changeFormState: u
708
704
  };
709
705
  }
@@ -712,14 +708,14 @@ function kn(e) {
712
708
  }
713
709
  const {
714
710
  useBreakpoint: Fn
715
- } = Be, {
711
+ } = $e, {
716
712
  MonthPicker: Dn,
717
713
  RangePicker: On
718
- } = tt, it = we({
714
+ } = tt, st = Te({
719
715
  name: "ProTableForm",
720
716
  props: {
721
- search: ne.search,
722
- modal: ne.modalScroll,
717
+ search: le.search,
718
+ modal: le.modalScroll,
723
719
  searchMap: {
724
720
  type: Array,
725
721
  default: () => []
@@ -730,17 +726,17 @@ const {
730
726
  },
731
727
  emits: ["search"],
732
728
  setup(e, {
733
- emit: l,
729
+ emit: a,
734
730
  slots: t,
735
- expose: n
731
+ expose: l
736
732
  }) {
737
733
  const u = Fn(), {
738
- setPagination: v
734
+ setPagination: c
739
735
  } = oe(), {
740
- formState: s,
741
- resetFormState: d,
742
- changeFormState: p
743
- } = Rn(e.defaultParams || {}, e.searchMap || []), i = E(!1), r = T(() => !!e.search.showSearch), S = T(() => e.search.showReset === void 0 ? r.value : e.search.showReset), f = [{
736
+ formState: i,
737
+ resetFormState: h,
738
+ changeFormState: g
739
+ } = Rn(e.defaultParams || {}, e.searchMap || []), s = j(!1), d = w(() => !!e.search.showSearch), C = w(() => e.search.showReset === void 0 ? d.value : e.search.showReset), f = [{
744
740
  value: "xxl",
745
741
  span: 4
746
742
  }, {
@@ -758,356 +754,359 @@ const {
758
754
  }, {
759
755
  value: "xs",
760
756
  span: 1
761
- }], m = T(() => C(e.search.span));
762
- X(() => e.search.defaultCollapsed, (a) => {
763
- i.value = i.value || !!a;
757
+ }], m = w(() => b(e.search.span));
758
+ Q(() => e.search.defaultCollapsed, (n) => {
759
+ s.value = s.value || !!n;
764
760
  });
765
- const C = (a) => {
766
- let h = 4;
767
- for (let D = 0; D < f.length; D += 1) {
768
- const M = f[D].value;
769
- if (u.value[M]) {
770
- h = (a == null ? void 0 : a[M]) || (e.modal ? 3 : f[D].span);
761
+ const b = (n) => {
762
+ let S = 4;
763
+ for (let k = 0; k < f.length; k += 1) {
764
+ const O = f[k].value;
765
+ if (u.value[O]) {
766
+ S = (n == null ? void 0 : n[O]) || (e.modal ? 3 : f[k].span);
771
767
  break;
772
768
  }
773
769
  }
774
- return h;
775
- }, y = (a) => {
776
- i.value = a;
777
- }, R = (a, h, D) => (a + 1) % h === 0 ? {
778
- ...D,
770
+ return S;
771
+ }, v = (n) => {
772
+ s.value = n;
773
+ }, T = (n, S, k) => (n + 1) % S === 0 ? {
774
+ ...k,
779
775
  marginRight: 0
780
776
  } : {
781
- ...D,
777
+ ...k,
782
778
  marginRight: "2%"
783
- }, F = (a, h) => {
784
- var D, M;
785
- switch (h.valueType) {
779
+ }, R = (n, S) => {
780
+ var k, O;
781
+ switch (S.valueType) {
786
782
  case "text":
787
- p(h.name, a || h.initialValue || "");
783
+ g(S.name, n || S.initialValue || "");
788
784
  break;
789
785
  case "select":
790
- p(h.name, a || a === 0 ? a : h.initialValue || void 0);
786
+ g(S.name, n || n === 0 ? n : S.initialValue || void 0);
791
787
  break;
792
788
  case "treeSelect":
793
- p(h.name, a || a === 0 ? a : h.initialValue || (((D = h.fidle) == null ? void 0 : D.treeCheckable) || ((M = h.field) == null ? void 0 : M.multiple) ? [] : null));
789
+ g(S.name, n || n === 0 ? n : S.initialValue || (((k = S.fidle) == null ? void 0 : k.treeCheckable) || ((O = S.field) == null ? void 0 : O.multiple) ? [] : null));
794
790
  break;
795
791
  case "date":
796
- p(h.name, a ? V(a).format(h.format || "YYYY-MM-DD") : h.initialValue || null);
792
+ g(S.name, n ? L(n).format(S.format || "YYYY-MM-DD") : S.initialValue || null);
797
793
  break;
798
794
  case "dateMonth":
799
- p(h.name, a ? V(a).format("YYYY-MM") : h.initialValue || null);
795
+ g(S.name, n ? L(n).format("YYYY-MM") : S.initialValue || null);
800
796
  break;
801
797
  case "dateRange":
802
- p(h.name, a && a.length > 0 ? [V(a[0]).format(h.format || "YYYY-MM-DD"), V(a[1]).format(h.format || "YYYY-MM-DD")] : h.initialValue || null);
798
+ g(S.name, n && n.length > 0 ? [L(n[0]).format(S.format || "YYYY-MM-DD"), L(n[1]).format(S.format || "YYYY-MM-DD")] : S.initialValue || null);
803
799
  break;
804
800
  case "time":
805
- p(h.name, a ? V(a).format(h.format || "HH:mm:ss") : h.initialValue || null);
801
+ g(S.name, n ? L(n).format(S.format || "HH:mm:ss") : S.initialValue || null);
806
802
  break;
807
803
  }
808
- e.search.showSearch || h.valueType === "text" || (h.valueType === "treeSelect" || h.valueType, x());
809
- }, x = (a) => {
810
- Ft(() => {
811
- const h = H(s), D = e.searchMap.find((g) => g.valueType === "text") || "", M = e.searchMap.find((g) => g.valueType === "dateRange") || "", j = e.searchMap.find((g) => g.valueType === "treeSelect") || "";
812
- D && (h[D.name] = s[D.name] || D.initialValue || ""), M && (h[M.rangeStartName || "start"] = h[M.name] ? h[M.name][0] : "", h[M.rangeEndName || "end"] = h[M.name] ? h[M.name][1] : "", delete h[M.name]), j && (Ne(s[j.name]) && (h[j.name] = s[j.name].length ? s[j.name].map((g) => g[j.valueKey === "text" ? "label" : "value"]).join() : ""), j && Ne(h[j.name]) && (h[j.name] = h[j.name].length ? h[j.name].map((g) => g[j.valueKey === "text" ? "label" : "value"]) : "")), (!r.value || a) && l("search", h);
804
+ e.search.showSearch || S.valueType === "text" || (S.valueType === "treeSelect" || S.valueType, x());
805
+ }, D = () => {
806
+ const n = V(i), S = e.searchMap.find((I) => I.valueType === "text") || "", k = e.searchMap.find((I) => I.valueType === "dateRange") || "", O = e.searchMap.find((I) => I.valueType === "treeSelect") || "";
807
+ return S && (n[S.name] = i[S.name] || S.initialValue || ""), k && (n[k.rangeStartName || "start"] = n[k.name] ? n[k.name][0] : "", n[k.rangeEndName || "end"] = n[k.name] ? n[k.name][1] : "", delete n[k.name]), O && (Ie(i[O.name]) && (n[O.name] = i[O.name].length ? i[O.name].map((I) => I[O.valueKey === "text" ? "label" : "value"]).join() : ""), O && Ie(n[O.name]) && (n[O.name] = n[O.name].length ? n[O.name].map((I) => I[O.valueKey === "text" ? "label" : "value"]) : "")), n;
808
+ }, x = (n) => {
809
+ Dt(() => {
810
+ (!d.value || n) && a("search", D());
813
811
  });
814
- }, k = () => {
815
- d(), v({
812
+ }, E = () => {
813
+ h(), c({
816
814
  current: 1
817
815
  }), x(!0);
818
816
  };
819
- n({
820
- resetFormParams: d
817
+ l({
818
+ formState: D(),
819
+ resetFormParams: h
821
820
  });
822
- const I = () => (r.value || S.value) && o(te, null, {
823
- default: () => [S.value && o(Ge, {
824
- onClick: () => k()
821
+ const z = () => (d.value || C.value) && o(ne, null, {
822
+ default: () => [C.value && o(Ge, {
823
+ onClick: () => E()
825
824
  }, {
826
825
  default: () => [e.search.resetText || "\u91CD\u7F6E"]
827
- }), r.value && o(Ge, {
826
+ }), d.value && o(Ge, {
828
827
  loading: e.loading,
829
828
  type: "primary",
830
829
  onClick: () => x(!0)
831
830
  }, {
832
831
  default: () => [e.search.searchText || "\u67E5\u8BE2"]
833
832
  })]
834
- }), N = ({
835
- formItemStyle: a,
836
- advanced: h,
837
- showAdvanced: D = !0
833
+ }), $ = ({
834
+ formItemStyle: n,
835
+ advanced: S,
836
+ showAdvanced: k = !0
838
837
  }) => o("div", {
839
- style: a,
838
+ style: n,
840
839
  class: `${e.prefixCls}-form-collapse-button`
841
- }, [o(te, {
840
+ }, [o(ne, {
842
841
  size: 16
843
842
  }, {
844
- default: () => [I(), D && o("span", {
843
+ default: () => [z(), k && o("span", {
845
844
  class: `${e.prefixCls}-a`,
846
- onClick: () => y(!h)
847
- }, [h ? "\u6536\u8D77" : "\u5C55\u5F00", e.search.collapseRender ? e.search.collapseRender() : h ? o(Jt, null, null) : o(Qt, null, null)])]
848
- })]), B = (a) => {
849
- var j;
850
- let h, D;
851
- const M = r.value ? Je : Je.Search;
852
- switch (a.valueType) {
845
+ onClick: () => v(!S)
846
+ }, [S ? "\u6536\u8D77" : "\u5C55\u5F00", e.search.collapseRender ? e.search.collapseRender() : S ? o(Qt, null, null) : o(Xt, null, null)])]
847
+ })]), H = (n) => {
848
+ var I;
849
+ let S, k;
850
+ const O = d.value ? Je : Je.Search;
851
+ switch (n.valueType) {
853
852
  case "text":
854
- D = o(M, {
853
+ k = o(O, {
855
854
  style: {
856
855
  width: "100%"
857
856
  },
858
- value: s[a.name],
859
- placeholder: a.placeholder || "\u8BF7\u8F93\u5165",
860
- allowClear: a.allowClear || a.allowClear === !1 ? a.allowClear : !0,
861
- onChange: (g) => F(g.target.value, a),
862
- onSearch: (g) => x()
857
+ value: i[n.name],
858
+ placeholder: n.placeholder || "\u8BF7\u8F93\u5165",
859
+ allowClear: n.allowClear || n.allowClear === !1 ? n.allowClear : !0,
860
+ onChange: (p) => R(p.target.value, n),
861
+ onSearch: (p) => x()
863
862
  }, null);
864
863
  break;
865
864
  case "select":
866
- D = o(Qe, {
865
+ k = o(Qe, {
867
866
  style: {
868
867
  width: "100%"
869
868
  },
870
- value: a.loading ? void 0 : s[a.name],
869
+ value: n.loading ? void 0 : i[n.name],
871
870
  optionFilterProp: "label",
872
- placeholder: a.placeholder || "\u8BF7\u9009\u62E9",
873
- showSearch: a.showSearch,
874
- allowClear: a.allowClear || a.allowClear === !1 ? a.allowClear : !0,
875
- getPopupContainer: (g) => g && g.parentNode ? g.parentNode : g,
876
- notFoundContent: a.loading === void 0 ? void 0 : a.loading ? o(je, {
871
+ placeholder: n.placeholder || "\u8BF7\u9009\u62E9",
872
+ showSearch: n.showSearch,
873
+ allowClear: n.allowClear || n.allowClear === !1 ? n.allowClear : !0,
874
+ getPopupContainer: (p) => p && p.parentNode ? p.parentNode : p,
875
+ notFoundContent: n.loading === void 0 ? void 0 : n.loading ? o(je, {
877
876
  size: "small"
878
877
  }, null) : void 0,
879
- onChange: (g) => F(g, a)
880
- }, kn(h = a.valueEnum.map((g) => o(Qe.Option, {
881
- key: g.value,
882
- value: g.value
878
+ onChange: (p) => R(p, n)
879
+ }, kn(S = n.valueEnum.map((p) => o(Qe.Option, {
880
+ key: p.value,
881
+ value: p.value
883
882
  }, {
884
- default: () => [g.text]
885
- }))) ? h : {
886
- default: () => [h]
883
+ default: () => [p.text]
884
+ }))) ? S : {
885
+ default: () => [S]
887
886
  });
888
887
  break;
889
888
  case "treeSelect":
890
- D = o(Et, ce({
889
+ k = o(jt, se({
891
890
  style: {
892
891
  width: "100%"
893
892
  },
894
- value: s[a.name],
895
- placeholder: a.placeholder || "\u8BF7\u9009\u62E9",
896
- allowClear: a.allowClear || a.allowClear === !1 ? a.allowClear : !0,
897
- treeData: a.valueEnum,
898
- getPopupContainer: (g) => g && g.parentNode ? g.parentNode : g,
899
- notFoundContent: a.loading === void 0 ? void 0 : a.loading ? o(je, {
893
+ value: i[n.name],
894
+ placeholder: n.placeholder || "\u8BF7\u9009\u62E9",
895
+ allowClear: n.allowClear || n.allowClear === !1 ? n.allowClear : !0,
896
+ treeData: n.valueEnum,
897
+ getPopupContainer: (p) => p && p.parentNode ? p.parentNode : p,
898
+ notFoundContent: n.loading === void 0 ? void 0 : n.loading ? o(je, {
900
899
  size: "small"
901
900
  }, null) : void 0,
902
- onChange: (g) => F(g, a)
903
- }, a.field || {}), null);
901
+ onChange: (p) => R(p, n)
902
+ }, n.field || {}), null);
904
903
  break;
905
904
  case "date":
906
- D = o(tt, {
905
+ k = o(tt, {
907
906
  style: {
908
907
  width: "100%"
909
908
  },
910
- value: s[a.name] ? V(s[a.name], a.format || "YYYY-MM-DD") : void 0,
911
- getPopupContainer: (g) => g && g.parentNode ? g.parentNode : g,
912
- placeholder: a.placeholder || "\u8BF7\u9009\u62E9",
913
- allowClear: a.allowClear || a.allowClear === !1 ? a.allowClear : !0,
914
- format: a.format || "YYYY-MM-DD",
915
- showTime: a.showTime,
916
- showToday: a.showToday || !0,
917
- renderExtraFooter: a.renderExtraFooter || null,
918
- onChange: (g) => F(g, a)
909
+ value: i[n.name] ? L(i[n.name], n.format || "YYYY-MM-DD") : void 0,
910
+ getPopupContainer: (p) => p && p.parentNode ? p.parentNode : p,
911
+ placeholder: n.placeholder || "\u8BF7\u9009\u62E9",
912
+ allowClear: n.allowClear || n.allowClear === !1 ? n.allowClear : !0,
913
+ format: n.format || "YYYY-MM-DD",
914
+ showTime: n.showTime,
915
+ showToday: n.showToday || !0,
916
+ renderExtraFooter: n.renderExtraFooter || null,
917
+ onChange: (p) => R(p, n)
919
918
  }, null);
920
919
  break;
921
920
  case "dateMonth":
922
- D = o(Dn, {
921
+ k = o(Dn, {
923
922
  style: {
924
923
  width: "100%"
925
924
  },
926
- value: s[a.name] ? V(s[a.name], a.format || "YYYY-MM") : void 0,
927
- getPopupContainer: (g) => g && g.parentNode ? g.parentNode : g,
928
- placeholder: a.placeholder || "\u8BF7\u9009\u62E9",
929
- renderExtraFooter: a.renderExtraFooter || null,
930
- onChange: (g) => F(g, a)
925
+ value: i[n.name] ? L(i[n.name], n.format || "YYYY-MM") : void 0,
926
+ getPopupContainer: (p) => p && p.parentNode ? p.parentNode : p,
927
+ placeholder: n.placeholder || "\u8BF7\u9009\u62E9",
928
+ renderExtraFooter: n.renderExtraFooter || null,
929
+ onChange: (p) => R(p, n)
931
930
  }, null);
932
931
  break;
933
932
  case "dateRange":
934
- D = o(On, {
933
+ k = o(On, {
935
934
  style: {
936
935
  width: "100%"
937
936
  },
938
- value: (j = s[a.name]) != null && j.length ? [V(s[a.name][0], a.format || "YYYY-MM-DD HH:mm:ss"), V(s[a.name][1], a.format || "YYYY-MM-DD HH:mm:ss")] : void 0,
939
- getPopupContainer: (g) => g && g.parentNode ? g.parentNode : g,
940
- placeholder: a.placeholder || ["\u5F00\u59CB\u65E5\u671F", "\u7ED3\u675F\u65E5\u671F"],
941
- format: a.format || "YYYY-MM-DD HH:mm:ss",
942
- renderExtraFooter: a.renderExtraFooter || null,
943
- showTime: a.showTime,
944
- onChange: (g) => F(g, a)
937
+ value: (I = i[n.name]) != null && I.length ? [L(i[n.name][0], n.format || "YYYY-MM-DD HH:mm:ss"), L(i[n.name][1], n.format || "YYYY-MM-DD HH:mm:ss")] : void 0,
938
+ getPopupContainer: (p) => p && p.parentNode ? p.parentNode : p,
939
+ placeholder: n.placeholder || ["\u5F00\u59CB\u65E5\u671F", "\u7ED3\u675F\u65E5\u671F"],
940
+ format: n.format || "YYYY-MM-DD HH:mm:ss",
941
+ renderExtraFooter: n.renderExtraFooter || null,
942
+ showTime: n.showTime,
943
+ onChange: (p) => R(p, n)
945
944
  }, null);
946
945
  break;
947
946
  case "time":
948
- D = o(Mt, {
947
+ k = o(Et, {
949
948
  style: {
950
949
  width: "100%"
951
950
  },
952
- value: s[a.name] ? V(s[a.name], a.format || "HH:mm:ss") : void 0,
953
- getPopupContainer: (g) => g && g.parentNode ? g.parentNode : g,
954
- placeholder: a.placeholder || "\u8BF7\u9009\u62E9",
955
- allowClear: a.allowClear || a.allowClear === !1 ? a.allowClear : !0,
956
- use12Hours: a.use12Hours,
957
- format: a.format || "HH:mm:ss",
958
- renderExtraFooter: a.renderExtraFooter || null,
959
- onChange: (g) => F(g, a)
951
+ value: i[n.name] ? L(i[n.name], n.format || "HH:mm:ss") : void 0,
952
+ getPopupContainer: (p) => p && p.parentNode ? p.parentNode : p,
953
+ placeholder: n.placeholder || "\u8BF7\u9009\u62E9",
954
+ allowClear: n.allowClear || n.allowClear === !1 ? n.allowClear : !0,
955
+ use12Hours: n.use12Hours,
956
+ format: n.format || "HH:mm:ss",
957
+ renderExtraFooter: n.renderExtraFooter || null,
958
+ onChange: (p) => R(p, n)
960
959
  }, null);
961
960
  break;
962
961
  }
963
- return D;
964
- }, L = ({
965
- formItemStyle: a,
966
- item: h
962
+ return k;
963
+ }, _ = ({
964
+ formItemStyle: n,
965
+ item: S
967
966
  }) => o(Ue.Item, {
968
- style: a
967
+ style: n
969
968
  }, {
970
- default: () => [h.__v_isVNode ? h : B(h)]
969
+ default: () => [S.__v_isVNode ? S : H(S)]
971
970
  }), q = () => {
972
- var h;
973
- const a = [...e.searchMap, ...((h = t.default) == null ? void 0 : h.call(t)) || []];
974
- return a.map((D, M) => {
975
- const j = {
971
+ var S;
972
+ const n = [...e.searchMap, ...((S = t.default) == null ? void 0 : S.call(t)) || []];
973
+ return n.map((k, O) => {
974
+ const I = {
976
975
  width: `${(100 - (m.value - 1) * 2) / m.value}%`
977
- }, g = R(M, m.value, j);
978
- return a.length < m.value || i.value ? o(Ie, null, [L({
979
- formItemStyle: g,
980
- item: D
981
- }), M === a.length - 1 && N({
976
+ }, p = T(O, m.value, I);
977
+ return n.length < m.value || s.value ? o(Ee, null, [_({
978
+ formItemStyle: p,
979
+ item: k
980
+ }), O === n.length - 1 && $({
982
981
  formItemStyle: {
983
982
  flex: 1,
984
983
  justifyContent: "flex-end"
985
984
  },
986
- advanced: i.value,
987
- showAdvanced: i.value
988
- })]) : o(Ie, null, [M < m.value - 1 && L({
989
- formItemStyle: g,
990
- item: D
991
- }), M === m.value - 1 && m.value - 1 === 0 && L({
992
- formItemStyle: g,
993
- item: D
994
- }), M === m.value - 1 && N({
985
+ advanced: s.value,
986
+ showAdvanced: s.value
987
+ })]) : o(Ee, null, [O < m.value - 1 && _({
988
+ formItemStyle: p,
989
+ item: k
990
+ }), O === m.value - 1 && m.value - 1 === 0 && _({
991
+ formItemStyle: p,
992
+ item: k
993
+ }), O === m.value - 1 && $({
995
994
  formItemStyle: {
996
995
  flex: 1,
997
996
  justifyContent: "flex-end"
998
997
  },
999
998
  advanced: !1,
1000
- showAdvanced: a.length >= m.value
999
+ showAdvanced: n.length >= m.value
1001
1000
  })]);
1002
1001
  });
1003
1002
  };
1004
1003
  return () => o("div", {
1005
1004
  class: {
1006
- [`${c(e.prefixCls)}-search`]: !0,
1005
+ [`${r(e.prefixCls)}-search`]: !0,
1007
1006
  [`${e.search.className}`]: e.search.className
1008
1007
  }
1009
1008
  }, [o(Ue, {
1010
- class: `${c(e.prefixCls)}-form`,
1009
+ class: `${r(e.prefixCls)}-form`,
1011
1010
  layout: "horizontal"
1012
1011
  }, {
1013
1012
  default: () => [o("div", {
1014
- class: `${c(e.prefixCls)}-form-container`
1013
+ class: `${r(e.prefixCls)}-form-container`
1015
1014
  }, [q()])]
1016
1015
  })]);
1017
1016
  }
1018
1017
  });
1019
- it.inheritAttrs = !1;
1020
- function Pn(e, l) {
1021
- for (var t = $e({}, e), n = 0; n < l.length; n += 1) {
1022
- var u = l[n];
1018
+ st.inheritAttrs = !1;
1019
+ function Pn(e, a) {
1020
+ for (var t = Ne({}, e), l = 0; l < a.length; l += 1) {
1021
+ var u = a[l];
1023
1022
  delete t[u];
1024
1023
  }
1025
1024
  return t;
1026
1025
  }
1027
- const ve = (e) => {
1028
- const l = E(null);
1029
- return l.value = e, (...t) => {
1030
- var n;
1031
- return (n = l.value) == null ? void 0 : n.call(l, ...t);
1026
+ const ge = (e) => {
1027
+ const a = j(null);
1028
+ return a.value = e, (...t) => {
1029
+ var l;
1030
+ return (l = a.value) == null ? void 0 : l.call(a, ...t);
1032
1031
  };
1033
1032
  };
1034
- const Pe = ({
1033
+ const Oe = ({
1035
1034
  title: e,
1036
- show: l,
1035
+ show: a,
1037
1036
  treeKey: t,
1038
- fixed: n
1037
+ fixed: l
1039
1038
  }, {
1040
1039
  slots: u
1041
1040
  }) => {
1042
1041
  const {
1043
- cacheColumns: v,
1044
- settingsAction: s
1042
+ cacheColumns: c,
1043
+ settingsAction: i
1045
1044
  } = oe();
1046
- return l ? o(J, {
1045
+ return a ? o(G, {
1047
1046
  title: e
1048
1047
  }, {
1049
1048
  default: () => {
1050
- var d;
1049
+ var h;
1051
1050
  return [o("span", {
1052
- onClick: (p) => {
1053
- var m, C;
1054
- p.stopPropagation(), p.preventDefault();
1055
- const i = ((m = c(v).find((y) => y.uuid === t)) == null ? void 0 : m.key) || "", r = (s == null ? void 0 : s.columnsMap[i]) || {};
1056
- if (typeof r.disable == "boolean" ? r.disable : (C = r.disable) == null ? void 0 : C.icon)
1051
+ onClick: (g) => {
1052
+ var m, b;
1053
+ g.stopPropagation(), g.preventDefault();
1054
+ const s = ((m = r(c).find((v) => v.uuid === t)) == null ? void 0 : m.key) || "", d = (i == null ? void 0 : i.columnsMap[s]) || {};
1055
+ if (typeof d.disable == "boolean" ? d.disable : (b = d.disable) == null ? void 0 : b.icon)
1057
1056
  return;
1058
1057
  const f = {
1059
- ...s == null ? void 0 : s.columnsMap,
1060
- [i]: {
1061
- ...r,
1062
- fixed: n
1058
+ ...i == null ? void 0 : i.columnsMap,
1059
+ [s]: {
1060
+ ...d,
1061
+ fixed: l
1063
1062
  }
1064
1063
  };
1065
- s == null || s.setColumnsMap(f, "fixed");
1064
+ i == null || i.setColumnsMap(f, "fixed");
1066
1065
  }
1067
- }, [(d = u.default) == null ? void 0 : d.call(u)])];
1066
+ }, [(h = u.default) == null ? void 0 : h.call(u)])];
1068
1067
  }
1069
1068
  }) : null;
1070
1069
  }, Mn = ({
1071
1070
  treeKey: e,
1072
- title: l,
1071
+ title: a,
1073
1072
  className: t,
1074
- fixed: n,
1073
+ fixed: l,
1075
1074
  autoScroll: u
1076
1075
  }) => {
1077
- var i;
1076
+ var s;
1078
1077
  const {
1079
- cacheColumns: v
1080
- } = oe(), s = ((i = c(v).find((r) => r.uuid === e)) == null ? void 0 : i.key) || "", d = T(() => s === "action" && (u == null ? void 0 : u.value)), p = o("span", {
1078
+ cacheColumns: c
1079
+ } = oe(), i = ((s = r(c).find((d) => d.uuid === e)) == null ? void 0 : s.key) || "", h = w(() => i === "action" && (u == null ? void 0 : u.value)), g = o("span", {
1081
1080
  class: `${t}-list-item-option`
1082
- }, [o(Pe, {
1081
+ }, [o(Oe, {
1083
1082
  treeKey: e,
1084
1083
  fixed: "left",
1085
1084
  title: "\u56FA\u5B9A\u5728\u5217\u9996",
1086
- show: n !== "left" && !d.value
1085
+ show: l !== "left" && !h.value
1087
1086
  }, {
1088
- default: () => [o(Xt, null, null)]
1089
- }), o(Pe, {
1087
+ default: () => [o(Zt, null, null)]
1088
+ }), o(Oe, {
1090
1089
  treeKey: e,
1091
1090
  fixed: void 0,
1092
1091
  title: "\u4E0D\u56FA\u5B9A",
1093
- show: !!n && !d.value
1092
+ show: !!l && !h.value
1094
1093
  }, {
1095
- default: () => [o(Zt, null, null)]
1096
- }), o(Pe, {
1094
+ default: () => [o(en, null, null)]
1095
+ }), o(Oe, {
1097
1096
  treeKey: e,
1098
1097
  fixed: "right",
1099
1098
  title: "\u56FA\u5B9A\u5728\u5217\u5C3E",
1100
- show: n !== "right"
1099
+ show: l !== "right"
1101
1100
  }, {
1102
- default: () => [o(en, null, null)]
1101
+ default: () => [o(tn, null, null)]
1103
1102
  })]);
1104
1103
  return o("span", {
1105
1104
  class: `${t}-list-item`,
1106
1105
  key: e
1107
1106
  }, [o("div", {
1108
1107
  class: `${t}-list-item-title`
1109
- }, [l]), p]);
1110
- }, Me = we({
1108
+ }, [a]), g]);
1109
+ }, Pe = Te({
1111
1110
  props: {
1112
1111
  list: Array,
1113
1112
  keys: Array,
@@ -1121,206 +1120,206 @@ const Pe = ({
1121
1120
  }
1122
1121
  },
1123
1122
  setup(e) {
1124
- const l = E(ze().uuid(15)), t = T(() => e.list && e.list.length > 0), n = E([]), u = E([]), {
1125
- cacheColumns: v,
1126
- slots: s,
1127
- settingsAction: d
1128
- } = oe(), p = (m, C) => m.map(({
1129
- key: y,
1130
- children: R,
1131
- uuid: F,
1132
- ...x
1123
+ const a = j(ze().uuid(15)), t = w(() => e.list && e.list.length > 0), l = j([]), u = j([]), {
1124
+ cacheColumns: c,
1125
+ slots: i,
1126
+ settingsAction: h
1127
+ } = oe(), g = (m, b) => m.map(({
1128
+ key: v,
1129
+ children: T,
1130
+ uuid: R,
1131
+ ...D
1133
1132
  }) => {
1134
- var B;
1135
- const k = (d == null ? void 0 : d.columnsMap[y || "null"]) || {
1133
+ var $;
1134
+ const x = (h == null ? void 0 : h.columnsMap[v || "null"]) || {
1136
1135
  show: !0
1137
1136
  };
1138
- let I = !1;
1139
- k.show !== !1 && (C == null ? void 0 : C.show) !== !1 && !R && (I = !0);
1140
- const N = {
1141
- key: F || "",
1142
- ...Pn(x, ["dataIndex"]),
1143
- checked: I,
1137
+ let E = !1;
1138
+ x.show !== !1 && (b == null ? void 0 : b.show) !== !1 && !T && (E = !0);
1139
+ const z = {
1140
+ key: R || "",
1141
+ ...Pn(D, ["dataIndex"]),
1142
+ checked: E,
1144
1143
  selectable: !1,
1145
- disabled: k.disable === !0,
1146
- disableCheckbox: typeof k.disable == "boolean" ? k.disable : (B = k.disable) == null ? void 0 : B.checkbox,
1144
+ disabled: x.disable === !0,
1145
+ disableCheckbox: typeof x.disable == "boolean" ? x.disable : ($ = x.disable) == null ? void 0 : $.checkbox,
1147
1146
  isLeaf: !0
1148
1147
  };
1149
- return R && (N.children = p(R, k)), N;
1148
+ return T && (z.children = g(T, x)), z;
1150
1149
  });
1151
- ae(() => {
1152
- const m = p(e.list || []);
1153
- n.value = m, u.value = m.filter((C) => C.checked).map((C) => C.key), (d == null ? void 0 : d.operationType.value) === "fixed" && (l.value = ze().uuid(15));
1150
+ ce(() => {
1151
+ const m = g(e.list || []);
1152
+ l.value = m, u.value = m.filter((b) => b.checked).map((b) => b.key), (h == null ? void 0 : h.operationType.value) === "fixed" && (a.value = ze().uuid(15));
1154
1153
  });
1155
- const i = ve((m, C, y) => {
1156
- var q, a;
1157
- const R = ((q = c(v).find((h) => h.uuid === m)) == null ? void 0 : q.key) || "", F = ((a = c(v).find((h) => h.uuid === C)) == null ? void 0 : a.key) || "", x = {
1158
- ...d == null ? void 0 : d.columnsMap
1159
- }, k = [...d.sortKeyColumns.value], I = k.findIndex((h) => h === R), N = k.findIndex((h) => h === F), B = y > I;
1160
- if (I < 0)
1154
+ const s = ge((m, b, v) => {
1155
+ var _, q;
1156
+ const T = ((_ = r(c).find((n) => n.uuid === m)) == null ? void 0 : _.key) || "", R = ((q = r(c).find((n) => n.uuid === b)) == null ? void 0 : q.key) || "", D = {
1157
+ ...h == null ? void 0 : h.columnsMap
1158
+ }, x = [...h.sortKeyColumns.value], E = x.findIndex((n) => n === T), z = x.findIndex((n) => n === R), $ = v > E;
1159
+ if (E < 0)
1161
1160
  return;
1162
- const L = k[I];
1163
- k.splice(I, 1), y === 0 ? k.unshift(L) : k.splice(B ? N : N + 1, 0, L), k.forEach((h, D) => {
1164
- x[h] = {
1165
- ...x[h] || {},
1166
- order: D
1161
+ const H = x[E];
1162
+ x.splice(E, 1), v === 0 ? x.unshift(H) : x.splice($ ? z : z + 1, 0, H), x.forEach((n, S) => {
1163
+ D[n] = {
1164
+ ...D[n] || {},
1165
+ order: S
1167
1166
  };
1168
- }), d == null || d.setColumnsMap(x, "drop"), d == null || d.setSortKeyColumns(k);
1169
- }), r = ve((m) => {
1170
- var k;
1171
- const C = m.node.key, y = ((k = c(v).find((I) => I.uuid === C)) == null ? void 0 : k.key) || "", F = {
1172
- ...(d == null ? void 0 : d.columnsMap[y]) || {}
1167
+ }), h == null || h.setColumnsMap(D, "drop"), h == null || h.setSortKeyColumns(x);
1168
+ }), d = ge((m) => {
1169
+ var x;
1170
+ const b = m.node.key, v = ((x = r(c).find((E) => E.uuid === b)) == null ? void 0 : x.key) || "", R = {
1171
+ ...(h == null ? void 0 : h.columnsMap[v]) || {}
1173
1172
  };
1174
- F.show = m.checked;
1175
- const x = {
1176
- ...d == null ? void 0 : d.columnsMap,
1177
- [y]: F
1173
+ R.show = m.checked;
1174
+ const D = {
1175
+ ...h == null ? void 0 : h.columnsMap,
1176
+ [v]: R
1178
1177
  };
1179
- d == null || d.setColumnsMap(x, "show");
1180
- }), S = (m) => {
1181
- const C = c(v).find((y) => y.uuid === m.key);
1182
- return m.title || Dt(s, "headerCell", {
1183
- title: C.title,
1184
- column: C
1185
- }, () => [C.title]);
1178
+ h == null || h.setColumnsMap(D, "show");
1179
+ }), C = (m) => {
1180
+ const b = r(c).find((v) => v.uuid === m.key);
1181
+ return m.title || Ot(i, "headerCell", {
1182
+ title: b.title,
1183
+ column: b
1184
+ }, () => [b.title]);
1186
1185
  }, f = () => {
1187
- var m, C;
1186
+ var m, b;
1188
1187
  return o(It, {
1189
- key: l.value,
1190
- draggable: e.draggable && !!((m = n.value) != null && m.length) && ((C = n.value) == null ? void 0 : C.length) > 1,
1188
+ key: a.value,
1189
+ draggable: e.draggable && !!((m = l.value) != null && m.length) && ((b = l.value) == null ? void 0 : b.length) > 1,
1191
1190
  checkable: e.checkable,
1192
1191
  blockNode: !0,
1193
1192
  showLine: !1,
1194
1193
  checkedKeys: u.value,
1195
1194
  height: 280,
1196
- onDrop: (y) => {
1197
- const R = y.node.key, F = y.dragNode.key, {
1198
- dropPosition: x,
1199
- dropToGap: k
1200
- } = y, I = x === -1 || !k ? x + 1 : x;
1201
- i(F, R, I);
1195
+ onDrop: (v) => {
1196
+ const T = v.node.key, R = v.dragNode.key, {
1197
+ dropPosition: D,
1198
+ dropToGap: x
1199
+ } = v, E = D === -1 || !x ? D + 1 : D;
1200
+ s(R, T, E);
1202
1201
  },
1203
- onCheck: (y, R) => r(R),
1204
- treeData: n.value
1202
+ onCheck: (v, T) => d(T),
1203
+ treeData: l.value
1205
1204
  }, {
1206
- title: (y) => {
1207
- const R = {
1208
- ...y,
1205
+ title: (v) => {
1206
+ const T = {
1207
+ ...v,
1209
1208
  children: void 0,
1210
- title: S(y),
1211
- autoScroll: d == null ? void 0 : d.autoScroll
1209
+ title: C(v),
1210
+ autoScroll: h == null ? void 0 : h.autoScroll
1212
1211
  };
1213
- return o(Mn, ce({
1212
+ return o(Mn, se({
1214
1213
  className: e.className
1215
- }, R, {
1216
- treeKey: R.key
1214
+ }, T, {
1215
+ treeKey: T.key
1217
1216
  }), null);
1218
1217
  }
1219
1218
  });
1220
1219
  };
1221
- return () => t.value ? o(Ie, null, [e.showTitle && o("span", {
1220
+ return () => t.value ? o(Ee, null, [e.showTitle && o("span", {
1222
1221
  class: `${e.className}-list-title`
1223
1222
  }, [e.title]), f()]) : null;
1224
1223
  }
1225
1224
  }), En = ({
1226
1225
  localColumns: e,
1227
- className: l,
1226
+ className: a,
1228
1227
  draggable: t,
1229
- checkable: n
1228
+ checkable: l
1230
1229
  }) => {
1231
- const u = [], v = [], s = [], d = [];
1232
- e.forEach((r) => {
1233
- if (r.hideInSetting)
1230
+ const u = [], c = [], i = [], h = [];
1231
+ e.forEach((d) => {
1232
+ if (d.hideInSetting)
1234
1233
  return;
1235
1234
  const {
1236
- fixed: S,
1235
+ fixed: C,
1237
1236
  show: f,
1238
1237
  uuid: m
1239
- } = r;
1240
- if ((f || f === void 0) && m && d.push(m), S === "left") {
1241
- v.push(r);
1238
+ } = d;
1239
+ if ((f || f === void 0) && m && h.push(m), C === "left") {
1240
+ c.push(d);
1242
1241
  return;
1243
1242
  }
1244
- if (S === "right") {
1245
- u.push(r);
1243
+ if (C === "right") {
1244
+ u.push(d);
1246
1245
  return;
1247
1246
  }
1248
- s.push(r);
1247
+ i.push(d);
1249
1248
  });
1250
- const p = u && u.length > 0, i = v && v.length > 0;
1249
+ const g = u && u.length > 0, s = c && c.length > 0;
1251
1250
  return o("div", {
1252
1251
  class: {
1253
- [`${l}-list`]: !0,
1254
- [`${l}-list-group`]: p || i
1252
+ [`${a}-list`]: !0,
1253
+ [`${a}-list-group`]: g || s
1255
1254
  }
1256
- }, [o(Me, {
1255
+ }, [o(Pe, {
1257
1256
  title: "\u56FA\u5B9A\u5728\u5DE6\u4FA7",
1258
- list: v,
1259
- keys: d,
1257
+ list: c,
1258
+ keys: h,
1260
1259
  draggable: t,
1261
- checkable: n,
1262
- className: l
1263
- }, null), o(Me, {
1264
- list: s,
1265
- keys: d,
1260
+ checkable: l,
1261
+ className: a
1262
+ }, null), o(Pe, {
1263
+ list: i,
1264
+ keys: h,
1266
1265
  draggable: t,
1267
- checkable: n,
1266
+ checkable: l,
1268
1267
  title: "\u4E0D\u56FA\u5B9A",
1269
- showTitle: i || p,
1270
- className: l
1271
- }, null), o(Me, {
1268
+ showTitle: s || g,
1269
+ className: a
1270
+ }, null), o(Pe, {
1272
1271
  title: "\u56FA\u5B9A\u5728\u53F3\u4FA7",
1273
1272
  list: u,
1274
- keys: d,
1273
+ keys: h,
1275
1274
  draggable: t,
1276
- checkable: n,
1277
- className: l
1275
+ checkable: l,
1276
+ className: a
1278
1277
  }, null)]);
1279
- }, In = (e) => {
1280
- var r, S;
1278
+ }, jn = (e) => {
1279
+ var d, C;
1281
1280
  const {
1282
- checkedReset: l = !0
1283
- } = e, t = Ye({
1281
+ checkedReset: a = !0
1282
+ } = e, t = Be({
1284
1283
  suffixCls: "table-column-setting",
1285
1284
  isPor: !0
1286
1285
  }), {
1287
- columns: n,
1286
+ columns: l,
1288
1287
  settingsAction: u
1289
- } = oe(), v = ve((f = !0) => {
1290
- const m = {}, C = (y) => {
1291
- y.forEach(({
1292
- key: R,
1293
- fixed: F,
1294
- index: x,
1295
- children: k
1288
+ } = oe(), c = ge((f = !0) => {
1289
+ const m = {}, b = (v) => {
1290
+ v.forEach(({
1291
+ key: T,
1292
+ fixed: R,
1293
+ index: D,
1294
+ children: x
1296
1295
  }) => {
1297
- const I = nt(R, x);
1298
- I && (m[I] = {
1296
+ const E = nt(T, D);
1297
+ E && (m[E] = {
1299
1298
  show: f,
1300
- fixed: F
1301
- }), k && C(k);
1299
+ fixed: R
1300
+ }), x && b(x);
1302
1301
  });
1303
1302
  };
1304
- C(n.value), u == null || u.setColumnsMap(m, "show");
1305
- }), s = ve((f) => {
1306
- f.target.checked ? v() : v(!1);
1307
- }), d = ve(() => {
1303
+ b(l.value), u == null || u.setColumnsMap(m, "show");
1304
+ }), i = ge((f) => {
1305
+ f.target.checked ? c() : c(!1);
1306
+ }), h = ge(() => {
1308
1307
  u == null || u.setColumnsMap(u == null ? void 0 : u.cacheColumnsMap, "fixed");
1309
- }), p = T(() => Object.values(u == null ? void 0 : u.columnsMap).filter((f) => !f || f.show === !1)), i = T(() => c(p).length > 0 && c(p).length !== n.value.length);
1310
- return o(jt, {
1308
+ }), g = w(() => Object.values(u == null ? void 0 : u.columnsMap).filter((f) => !f || f.show === !1)), s = w(() => r(g).length > 0 && r(g).length !== l.value.length);
1309
+ return o(zt, {
1311
1310
  arrowPointAtCenter: !0,
1312
1311
  title: o("div", {
1313
1312
  class: `${t}-title`
1314
1313
  }, [o(Nt, {
1315
- indeterminate: i.value,
1316
- checked: c(p).length === 0 && c(p).length !== n.value.length,
1317
- onChange: (f) => s(f)
1314
+ indeterminate: s.value,
1315
+ checked: r(g).length === 0 && r(g).length !== l.value.length,
1316
+ onChange: (f) => i(f)
1318
1317
  }, {
1319
- default: () => [he("\u5217\u5C55\u793A")]
1320
- }), l ? o("a", {
1321
- onClick: d,
1318
+ default: () => [me("\u5217\u5C55\u793A")]
1319
+ }), a ? o("a", {
1320
+ onClick: h,
1322
1321
  class: `${t}-action-rest-button`
1323
- }, [he("\u91CD\u7F6E")]) : null, e != null && e.extra ? o(te, {
1322
+ }, [me("\u91CD\u7F6E")]) : null, e != null && e.extra ? o(ne, {
1324
1323
  size: 12,
1325
1324
  align: "center"
1326
1325
  }, {
@@ -1330,44 +1329,44 @@ const Pe = ({
1330
1329
  trigger: "click",
1331
1330
  placement: "bottomRight",
1332
1331
  content: o(En, {
1333
- checkable: (r = e.checkable) != null ? r : !0,
1334
- draggable: (S = e.draggable) != null ? S : !0,
1332
+ checkable: (d = e.checkable) != null ? d : !0,
1333
+ draggable: (C = e.draggable) != null ? C : !0,
1335
1334
  className: t,
1336
- localColumns: n.value
1335
+ localColumns: l.value
1337
1336
  }, null)
1338
1337
  }, {
1339
- default: () => [o(J, {
1338
+ default: () => [o(G, {
1340
1339
  title: "\u5217\u8BBE\u7F6E"
1341
1340
  }, {
1342
1341
  default: () => [o(ot, null, null)]
1343
1342
  })]
1344
1343
  });
1345
- }, st = () => {
1344
+ }, rt = () => {
1346
1345
  const {
1347
1346
  isFullscreen: e
1348
1347
  } = et();
1349
- return e.value ? o(J, {
1348
+ return e.value ? o(G, {
1350
1349
  title: "\u9000\u51FA\u5168\u5C4F"
1351
1350
  }, {
1352
- default: () => [o(tn, null, null)]
1353
- }) : o(J, {
1351
+ default: () => [o(nn, null, null)]
1352
+ }) : o(G, {
1354
1353
  title: "\u5168\u5C4F"
1355
1354
  }, {
1356
- default: () => [o(nn, null, null)]
1355
+ default: () => [o(ln, null, null)]
1357
1356
  });
1358
- }, jn = () => {
1357
+ }, In = () => {
1359
1358
  const {
1360
1359
  action: e,
1361
- tableSize: l
1360
+ tableSize: a
1362
1361
  } = oe();
1363
- return o(zt, {
1362
+ return o($t, {
1364
1363
  overlay: o(Se, {
1365
- selectedKeys: [l.value],
1364
+ selectedKeys: [a.value],
1366
1365
  onClick: ({
1367
1366
  key: t
1368
1367
  }) => {
1369
- var n;
1370
- (n = e.setTableSize) == null || n.call(e, t);
1368
+ var l;
1369
+ (l = e.setTableSize) == null || l.call(e, t);
1371
1370
  },
1372
1371
  style: {
1373
1372
  width: 80
@@ -1376,23 +1375,23 @@ const Pe = ({
1376
1375
  default: () => [o(Se.Item, {
1377
1376
  key: "large"
1378
1377
  }, {
1379
- default: () => [he("\u9ED8\u8BA4")]
1378
+ default: () => [me("\u9ED8\u8BA4")]
1380
1379
  }), o(Se.Item, {
1381
1380
  key: "middle"
1382
1381
  }, {
1383
- default: () => [he("\u4E2D\u7B49")]
1382
+ default: () => [me("\u4E2D\u7B49")]
1384
1383
  }), o(Se.Item, {
1385
1384
  key: "small"
1386
1385
  }, {
1387
- default: () => [he("\u7D27\u51D1")]
1386
+ default: () => [me("\u7D27\u51D1")]
1388
1387
  })]
1389
1388
  }),
1390
1389
  trigger: ["click"]
1391
1390
  }, {
1392
- default: () => [o(J, {
1391
+ default: () => [o(G, {
1393
1392
  title: "\u8868\u683C\u5BC6\u5EA6"
1394
1393
  }, {
1395
- default: () => [o(ln, null, null)]
1394
+ default: () => [o(an, null, null)]
1396
1395
  })]
1397
1396
  });
1398
1397
  };
@@ -1400,120 +1399,120 @@ function Xe(e) {
1400
1399
  return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !de(e);
1401
1400
  }
1402
1401
  const {
1403
- useBreakpoint: Nn
1404
- } = Be;
1405
- function zn(e) {
1402
+ useBreakpoint: zn
1403
+ } = $e;
1404
+ function Nn(e) {
1406
1405
  if (de(e))
1407
1406
  return e;
1408
1407
  if (e) {
1409
- const l = e, {
1408
+ const a = e, {
1410
1409
  icon: t,
1411
- tooltip: n,
1410
+ tooltip: l,
1412
1411
  onClick: u,
1413
- key: v
1414
- } = l;
1415
- return t && n ? o(J, {
1416
- title: n
1412
+ key: c
1413
+ } = a;
1414
+ return t && l ? o(G, {
1415
+ title: l
1417
1416
  }, {
1418
1417
  default: () => [o("span", {
1419
- key: v,
1418
+ key: c,
1420
1419
  onClick: () => {
1421
- u && u(v);
1420
+ u && u(c);
1422
1421
  }
1423
1422
  }, [t])]
1424
1423
  }) : t;
1425
1424
  }
1426
1425
  return null;
1427
1426
  }
1428
- const ct = we({
1427
+ const ct = Te({
1429
1428
  props: {
1430
- actions: ne.toolBarBtn,
1429
+ actions: le.toolBarBtn,
1431
1430
  settings: [Array],
1432
- titleTip: ne.titleTip,
1431
+ titleTip: le.titleTip,
1433
1432
  prefixCls: String,
1434
- headerTitle: ne.headerTitle,
1435
- titleTipText: ne.titleTipText,
1436
- optionsExtra: ne.optionsExtra
1433
+ headerTitle: le.headerTitle,
1434
+ titleTipText: le.titleTipText,
1435
+ optionsExtra: le.optionsExtra
1437
1436
  },
1438
1437
  setup(e) {
1439
- const l = Nn(), t = T(() => {
1440
- var i;
1441
- return !!(e.titleTip || e.headerTitle || ((i = e.actions) == null ? void 0 : i.length));
1442
- }), n = T(() => {
1443
- var i;
1444
- return !!(((i = e.settings) == null ? void 0 : i.length) || e.optionsExtra);
1445
- }), u = T(() => !!(e.titleTip || e.headerTitle)), v = pe(() => {
1446
- var r;
1447
- let i;
1448
- return Array.isArray(e.actions) ? ((r = e.actions) == null ? void 0 : r.length) < 1 ? null : o(te, {
1438
+ const a = zn(), t = w(() => {
1439
+ var s;
1440
+ return !!(e.titleTip || e.headerTitle || ((s = e.actions) == null ? void 0 : s.length));
1441
+ }), l = w(() => {
1442
+ var s;
1443
+ return !!(((s = e.settings) == null ? void 0 : s.length) || e.optionsExtra);
1444
+ }), u = w(() => !!(e.titleTip || e.headerTitle)), c = xe(() => {
1445
+ var d;
1446
+ let s;
1447
+ return Array.isArray(e.actions) ? ((d = e.actions) == null ? void 0 : d.length) < 1 ? null : o(ne, {
1449
1448
  align: "center"
1450
- }, Xe(i = e.actions.map((S, f) => de(S) ? Ot(S, {
1449
+ }, Xe(s = e.actions.map((C, f) => de(C) ? Pt(C, {
1451
1450
  key: f,
1452
- ...S == null ? void 0 : S.props
1451
+ ...C == null ? void 0 : C.props
1453
1452
  }) : o("template", {
1454
1453
  key: f
1455
- }, [S]))) ? i : {
1456
- default: () => [i]
1454
+ }, [C]))) ? s : {
1455
+ default: () => [s]
1457
1456
  }) : e.actions;
1458
- }), s = pe(() => !t.value && n.value ? o("div", {
1457
+ }), i = xe(() => !t.value && l.value ? o("div", {
1459
1458
  class: `${e.prefixCls}-left`
1460
- }, null) : u.value ? o(te, {
1459
+ }, null) : u.value ? o(ne, {
1461
1460
  class: `${e.prefixCls}-left`
1462
1461
  }, {
1463
1462
  default: () => [o("div", {
1464
1463
  class: `${e.prefixCls}-title`
1465
- }, [e.headerTitle, e.titleTip && o(J, {
1464
+ }, [e.headerTitle, e.titleTip && o(G, {
1466
1465
  title: e.titleTipText
1467
1466
  }, {
1468
- default: () => [re(e.titleTip) && e.titleTip ? o(an, null, null) : e.titleTip]
1469
- })]), v.value && o("div", {
1467
+ default: () => [re(e.titleTip) && e.titleTip ? o(on, null, null) : e.titleTip]
1468
+ })]), c.value && o("div", {
1470
1469
  class: `${e.prefixCls}-actions`
1471
- }, [v.value])]
1472
- }) : o(te, {
1470
+ }, [c.value])]
1471
+ }) : o(ne, {
1473
1472
  class: `${e.prefixCls}-left`
1474
1473
  }, {
1475
- default: () => [v.value && o("div", {
1474
+ default: () => [c.value && o("div", {
1476
1475
  class: `${e.prefixCls}-actions`
1477
- }, [v.value])]
1478
- })), d = pe(() => {
1479
- let i;
1480
- return n.value ? o(te, {
1476
+ }, [c.value])]
1477
+ })), h = xe(() => {
1478
+ let s;
1479
+ return l.value ? o(ne, {
1481
1480
  size: 16,
1482
1481
  class: `${e.prefixCls}-right`,
1483
- align: l.value.lg ? "center" : "end",
1484
- direction: l.value.lg ? "horizontal" : "vertical"
1482
+ align: a.value.lg ? "center" : "end",
1483
+ direction: a.value.lg ? "horizontal" : "vertical"
1485
1484
  }, {
1486
1485
  default: () => {
1487
- var r;
1488
- return [e.optionsExtra, (r = e.settings) != null && r.length ? o(te, {
1486
+ var d;
1487
+ return [e.optionsExtra, (d = e.settings) != null && d.length ? o(ne, {
1489
1488
  size: 12,
1490
1489
  align: "center",
1491
1490
  class: `${e.prefixCls}-setting-items`
1492
- }, Xe(i = e.settings.map((S, f) => {
1493
- const m = zn(S);
1491
+ }, Xe(s = e.settings.map((C, f) => {
1492
+ const m = Nn(C);
1494
1493
  return o("div", {
1495
1494
  key: f,
1496
1495
  class: `${e.prefixCls}-setting-item`
1497
1496
  }, [m]);
1498
- })) ? i : {
1499
- default: () => [i]
1497
+ })) ? s : {
1498
+ default: () => [s]
1500
1499
  }) : null];
1501
1500
  }
1502
1501
  }) : null;
1503
- }), p = pe(() => {
1504
- if (!n.value && !t.value)
1502
+ }), g = xe(() => {
1503
+ if (!l.value && !t.value)
1505
1504
  return null;
1506
- const i = {
1505
+ const s = {
1507
1506
  [`${e.prefixCls}-container`]: !0,
1508
- [`${e.prefixCls}-container-mobile`]: !l.value.xl
1507
+ [`${e.prefixCls}-container-mobile`]: !a.value.xl
1509
1508
  };
1510
1509
  return o("div", {
1511
- class: i
1512
- }, [s.value, d.value]);
1510
+ class: s
1511
+ }, [i.value, h.value]);
1513
1512
  });
1514
1513
  return () => o("div", {
1515
1514
  class: `${e.prefixCls}`
1516
- }, [p.value]);
1515
+ }, [g.value]);
1517
1516
  }
1518
1517
  });
1519
1518
  ct.inheritAttrs = !1;
@@ -1521,11 +1520,11 @@ function $n() {
1521
1520
  return {
1522
1521
  reload: {
1523
1522
  text: "\u5237\u65B0",
1524
- icon: o(on, null, null)
1523
+ icon: o(un, null, null)
1525
1524
  },
1526
1525
  density: {
1527
1526
  text: "\u8868\u683C\u5BC6\u5EA6",
1528
- icon: o(jn, null, null)
1527
+ icon: o(In, null, null)
1529
1528
  },
1530
1529
  setting: {
1531
1530
  text: "\u5217\u8BBE\u7F6E",
@@ -1533,77 +1532,76 @@ function $n() {
1533
1532
  },
1534
1533
  fullScreen: {
1535
1534
  text: "\u5168\u5C4F",
1536
- icon: o(st, null, null)
1535
+ icon: o(rt, null, null)
1537
1536
  }
1538
1537
  };
1539
1538
  }
1540
- function Bn(e, l) {
1539
+ function Bn(e, a) {
1541
1540
  return Object.keys(e).filter((t) => t).map((t) => {
1542
- const n = e[t];
1543
- if (!n)
1541
+ const l = e[t];
1542
+ if (!l)
1544
1543
  return null;
1545
- let u = n === !0 ? l[t] : () => n == null ? void 0 : n();
1544
+ let u = l === !0 ? a[t] : () => l == null ? void 0 : l();
1546
1545
  if (typeof u != "function" && (u = () => {
1547
1546
  }), t === "setting")
1548
- return o(In, ce(e[t], {
1547
+ return o(jn, se(e[t], {
1549
1548
  key: t
1550
1549
  }), null);
1551
1550
  if (t === "fullScreen")
1552
1551
  return o("span", {
1553
1552
  key: t,
1554
1553
  onClick: u
1555
- }, [o(st, null, null)]);
1556
- const v = $n()[t];
1557
- return v ? o("span", {
1554
+ }, [o(rt, null, null)]);
1555
+ const c = $n()[t];
1556
+ return c ? o("span", {
1558
1557
  key: t,
1559
1558
  onClick: u
1560
- }, [o(J, {
1561
- title: v.text
1559
+ }, [o(G, {
1560
+ title: c.text
1562
1561
  }, {
1563
- default: () => [v.icon]
1562
+ default: () => [c.icon]
1564
1563
  })]) : null;
1565
1564
  }).filter((t) => t);
1566
1565
  }
1567
1566
  function Yn({
1568
1567
  toolBarBtn: e,
1569
- headerTitle: l,
1568
+ headerTitle: a,
1570
1569
  titleTip: t,
1571
- titleTipText: n,
1570
+ titleTipText: l,
1572
1571
  options: u,
1573
- optionsExtra: v,
1574
- settingExtra: s
1572
+ optionsExtra: c,
1573
+ settingExtra: i
1575
1574
  }) {
1576
- const d = E(), p = Ye({
1575
+ const h = Be({
1577
1576
  suffixCls: "table-list-toolbar",
1578
1577
  isPor: !0
1579
1578
  }), {
1580
- action: i
1581
- } = oe(), r = T(() => {
1582
- const f = {
1583
- reload: () => i == null ? void 0 : i.reload(),
1579
+ action: g
1580
+ } = oe(), s = w(() => {
1581
+ const C = {
1582
+ reload: () => g == null ? void 0 : g.reload(),
1584
1583
  density: !0,
1585
1584
  setting: !0,
1586
- fullScreen: () => i == null ? void 0 : i.toggle()
1585
+ fullScreen: () => g == null ? void 0 : g.toggle()
1587
1586
  };
1588
1587
  if (!Object.keys(u || {}).length)
1589
1588
  return [];
1590
- const m = {
1591
- ...f,
1589
+ const f = {
1590
+ ...C,
1592
1591
  ...u
1593
1592
  };
1594
- return m.setting !== !1 && s && (m.setting = {}, m.setting.extra = s), Bn(m, {
1595
- ...f
1593
+ return f.setting !== !1 && i && (f.setting = {}, f.setting.extra = i), Bn(f, {
1594
+ ...C
1596
1595
  });
1597
1596
  });
1598
1597
  return o(ct, {
1599
- ref: () => d.value,
1600
- prefixCls: p,
1598
+ prefixCls: h,
1601
1599
  actions: e || [],
1602
- optionsExtra: v,
1603
- headerTitle: l,
1604
- settings: c(r),
1600
+ optionsExtra: c,
1601
+ headerTitle: a,
1602
+ settings: r(s),
1605
1603
  titleTip: t,
1606
- titleTipText: n
1604
+ titleTipText: l
1607
1605
  }, null);
1608
1606
  }
1609
1607
  const Kn = (e) => o(Yn, e, null), Ln = [
@@ -1619,299 +1617,290 @@ const Kn = (e) => o(Yn, e, null), Ln = [
1619
1617
  function Vn(e) {
1620
1618
  return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !de(e);
1621
1619
  }
1622
- function Hn(e, l, t) {
1623
- if (!l)
1620
+ function Hn(e, a, t) {
1621
+ if (!a)
1624
1622
  return e;
1625
- let n = e;
1626
- if (at(l)) {
1627
- const u = l.node === "a" ? "span" : l.node;
1628
- return o(u, ce(l.attr, {
1629
- class: [l.class, l.node === "a" ? `${t}-a` : ""],
1630
- onClick: l.click
1623
+ let l = e;
1624
+ if (at(a)) {
1625
+ const u = a.node === "a" ? "span" : a.node;
1626
+ return o(u, se(a.attr, {
1627
+ class: [a.class, a.node === "a" ? `${t}-a` : ""],
1628
+ onClick: a.click
1631
1629
  }), Vn(e) ? e : {
1632
1630
  default: () => [e]
1633
1631
  });
1634
1632
  }
1635
- switch (l) {
1633
+ switch (a) {
1636
1634
  case "link":
1637
- n = o("span", {
1635
+ l = o("span", {
1638
1636
  class: `${t}-a`
1639
1637
  }, [e]);
1640
1638
  break;
1641
1639
  case "time":
1642
- n = V(e).format("HH:mm:ss");
1640
+ l = L(e).format("HH:mm:ss");
1643
1641
  break;
1644
1642
  case "dateMonth":
1645
- n = `${V(e).month() + 1}\u6708`;
1643
+ l = `${L(e).month() + 1}\u6708`;
1646
1644
  break;
1647
1645
  case "dateTime":
1648
- n = V(e).format("YYYY-MM-DD HH:mm:ss");
1646
+ l = L(e).format("YYYY-MM-DD HH:mm:ss");
1649
1647
  break;
1650
1648
  }
1651
- return n;
1649
+ return l;
1652
1650
  }
1653
1651
  const {
1654
- useBreakpoint: An
1655
- } = Be, Wn = {
1652
+ useBreakpoint: Wn
1653
+ } = $e, An = {
1656
1654
  reload: !0,
1657
1655
  density: !0,
1658
1656
  setting: !0,
1659
1657
  fullScreen: !0
1660
- }, Ee = we({
1658
+ }, Me = Te({
1661
1659
  name: "ProTable",
1662
- props: ne,
1660
+ props: le,
1663
1661
  emits: ["reset", "reload", "submit", "sizeChange", "expandedRowsChange", "expand", "change", "requestError", "beforeSearchSubmit", "columnsStateChange", "loadingChange"],
1662
+ slots: ["customize", "search", "toolBarBtn", "headerTitle", "titleTip", "optionsExtra"],
1664
1663
  setup(e, {
1665
- emit: l,
1664
+ emit: a,
1666
1665
  slots: t,
1667
- attrs: n
1666
+ attrs: l,
1667
+ expose: u
1668
1668
  }) {
1669
- const u = Ye({
1669
+ const c = Be({
1670
1670
  suffixCls: "table",
1671
1671
  isPor: !0
1672
- }), v = An(), s = E(window.innerWidth), d = E(), p = E(), {
1673
- toggle: i,
1674
- isFullscreen: r
1675
- } = et(d), S = T(() => ({
1672
+ }), i = Wn(), h = j(window.innerWidth), g = j(), s = j(), {
1673
+ toggle: d,
1674
+ isFullscreen: C
1675
+ } = et(g), f = w(() => ({
1676
1676
  ...e
1677
- })), f = T(() => {
1678
- var b, w;
1679
- return e.virtualScroll && un(!((b = e.scroll) != null && b.y), "\u53C2\u6570scroll\u7684Y\u503C\u4E0D\u80FD\u4E3A\u7A7A\uFF01"), !!(((w = e.scroll) == null ? void 0 : w.y) && e.virtualScroll);
1680
- }), m = T(() => {
1681
- const b = (e.columns || []).map((w) => ({
1682
- ...w,
1683
- key: w.key || w.dataIndex,
1684
- align: w.align || e.align,
1677
+ })), m = w(() => {
1678
+ var y, F;
1679
+ return e.virtualScroll && sn(!((y = e.scroll) != null && y.y), "\u53C2\u6570scroll\u7684Y\u503C\u4E0D\u80FD\u4E3A\u7A7A\uFF01"), !!(((F = e.scroll) == null ? void 0 : F.y) && e.virtualScroll);
1680
+ }), b = w(() => {
1681
+ const y = (e.columns || []).map((F) => ({
1682
+ ...F,
1683
+ key: F.key || F.dataIndex,
1684
+ align: F.align || e.align,
1685
1685
  uuid: ze().uuid(15)
1686
1686
  }));
1687
- return qt(b, {
1687
+ return Ut(y, {
1688
1688
  align: e.align,
1689
1689
  showIndex: e.showIndex
1690
1690
  });
1691
1691
  }), {
1692
- getLoading: C,
1693
- setLoading: y
1694
- } = rn({
1695
- emit: l,
1696
- loading: G(e, "loading")
1692
+ getLoading: v,
1693
+ setLoading: T
1694
+ } = cn({
1695
+ emit: a,
1696
+ loading: U(e, "loading")
1697
1697
  }), {
1698
1698
  sizeRef: R,
1699
- setTableSize: F
1699
+ setTableSize: D
1700
1700
  } = dn({
1701
- emit: l,
1702
- size: G(e, "size")
1701
+ emit: a,
1702
+ size: U(e, "size")
1703
1703
  }), {
1704
1704
  getPaginationInfo: x,
1705
- setPagination: k
1705
+ setPagination: E
1706
1706
  } = fn({
1707
1707
  slots: t,
1708
- props: S,
1709
- pagination: G(e, "pagination")
1710
- }), I = pn(e), {
1711
- getScrollRef: N,
1712
- breakpoint: B
1708
+ props: f,
1709
+ pagination: U(e, "pagination")
1710
+ }), z = Sn(e), {
1711
+ getScrollRef: $,
1712
+ breakpoint: H
1713
1713
  } = xn({
1714
- ...I,
1715
- innerWidth: s,
1716
- columns: m,
1717
- screensRef: v
1718
- }), L = Cn(e), {
1714
+ ...z,
1715
+ innerWidth: h,
1716
+ columns: b,
1717
+ screensRef: i
1718
+ }), _ = Cn(e), {
1719
1719
  getProColumns: q,
1720
- cacheProColumns: a,
1721
- setColumns: h,
1722
- changeColumns: D,
1723
- resizeColumnWidth: M
1724
- } = Sn({
1725
- ...L,
1726
- breakpoint: B,
1727
- scroll: N,
1728
- columns: m
1720
+ cacheProColumns: n,
1721
+ setColumns: S,
1722
+ changeColumns: k,
1723
+ resizeColumnWidth: O
1724
+ } = pn({
1725
+ ..._,
1726
+ breakpoint: H,
1727
+ scroll: $,
1728
+ columns: b
1729
1729
  }), {
1730
- columnsMap: j,
1731
- operationType: g,
1732
- setColumnsMap: Te,
1733
- sortKeyColumns: P,
1734
- cacheColumnsMap: $,
1735
- setSortKeyColumns: Y
1730
+ columnsMap: I,
1731
+ operationType: p,
1732
+ setColumnsMap: P,
1733
+ sortKeyColumns: N,
1734
+ cacheColumnsMap: Y,
1735
+ setSortKeyColumns: K
1736
1736
  } = bn({
1737
- columns: a,
1738
- columnsState: G(e, "columnsState"),
1739
- changeColumns: D
1737
+ columns: n,
1738
+ columnsState: U(e, "columnsState"),
1739
+ changeColumns: k
1740
1740
  }), {
1741
- formDataRef: K,
1742
- formParamsRef: ue,
1741
+ formDataRef: ue,
1742
+ formParamsRef: ye,
1743
1743
  defaultParamsRef: Re,
1744
- setFormParams: me
1744
+ setFormParams: fe
1745
1745
  } = yn({
1746
- search: G(e, "search"),
1747
- searchMap: G(e, "searchMap"),
1748
- params: G(e, "params"),
1749
- columns: m
1746
+ search: U(e, "search"),
1747
+ searchMap: U(e, "searchMap"),
1748
+ params: U(e, "params"),
1749
+ columns: b
1750
1750
  }), {
1751
- selectedKey: ge,
1752
- changeRowKey: ke,
1753
- selectRowKey: ye,
1754
- selectAllRowKey: be,
1755
- syncSelectedRows: Z,
1756
- removeRowKeys: Ce
1757
- } = hn(G(e, "rowKey"), G(e, "rowSelection")), fe = mn(e), {
1758
- reload: _,
1759
- reSetDataList: ie,
1760
- changeDataValue: A,
1761
- isTreeDataRef: Ke,
1762
- getDataSourceRef: Fe,
1751
+ selectedKey: ke,
1752
+ changeRowKey: be,
1753
+ selectRowKey: Ce,
1754
+ selectAllRowKey: X,
1755
+ syncSelectedRows: pe,
1756
+ removeRowKeys: he
1757
+ } = hn(U(e, "rowKey"), U(e, "rowSelection")), Z = mn(e), {
1758
+ reload: J,
1759
+ reSetDataList: W,
1760
+ changeDataValue: dt,
1761
+ isTreeDataRef: Ye,
1762
+ getDataSourceRef: Ke,
1763
1763
  handleTableChange: Le
1764
1764
  } = gn({
1765
- ...fe
1765
+ ...Z
1766
1766
  }, {
1767
- getLoading: C,
1767
+ getLoading: v,
1768
1768
  getPaginationInfo: x,
1769
- setPagination: k,
1770
- removeRowKeys: Ce,
1771
- syncSelectedRows: Z,
1772
- setLoading: y,
1773
- setColumns: h,
1769
+ setPagination: E,
1770
+ removeRowKeys: he,
1771
+ syncSelectedRows: pe,
1772
+ setLoading: T,
1773
+ setColumns: S,
1774
1774
  columns: q,
1775
- formParamsRef: ue,
1775
+ formParamsRef: ye,
1776
1776
  onBeforeSearchSubmit: e.onBeforeSearchSubmit
1777
- }, l), rt = T(() => {
1778
- if (e.options) {
1779
- const b = H(at(e.options) ? e.options : {});
1780
- return {
1781
- ...Wn,
1782
- ...b
1783
- };
1784
- }
1785
- return {};
1786
- }), dt = () => {
1787
- var b;
1788
- (b = e.actionRef) == null || b.call(e, {
1789
- pageParams: x.value,
1790
- getLoadingStatus: C.value,
1791
- reload: (w) => _(w),
1792
- reloadAndRest: () => {
1793
- De({
1794
- current: 1,
1795
- pageSize: 10
1796
- }), _();
1797
- },
1798
- reSetDataList: ie,
1799
- changePageInfo: (w, O, U) => De(w, O, U),
1800
- changeDataValue: ({
1801
- key: w,
1802
- params: O
1803
- }) => A({
1804
- key: w,
1805
- params: O
1806
- }),
1807
- loadingOperation: (w) => y(w)
1808
- });
1809
- }, ft = () => {
1810
- var b, w;
1811
- (w = e.formRef) == null || w.call(e, {
1812
- formParams: ue.value,
1813
- restForm: e.search.showSearch ? (b = p.value) == null ? void 0 : b.resetFormParams() : null
1814
- });
1815
- };
1816
- ae(() => {
1817
- e.actionRef && dt(), e.formRef && ft();
1818
- }), Pt(() => {
1777
+ }, a), ft = w(() => e.options ? {
1778
+ ...An,
1779
+ ...V(at(e.options) ? e.options : {})
1780
+ } : {});
1781
+ Mt(() => {
1819
1782
  window.addEventListener("resize", Ve);
1820
1783
  }), Ze(() => {
1821
1784
  window.removeEventListener("resize", Ve);
1822
1785
  });
1823
1786
  const Ve = () => {
1824
- s.value = window.innerWidth;
1825
- }, He = T(() => {
1826
- const b = c(Fe);
1827
- let w = {
1828
- ...n,
1787
+ h.value = window.innerWidth;
1788
+ }, He = w(() => {
1789
+ const y = r(Ke);
1790
+ let F = {
1791
+ ...l,
1829
1792
  ...e,
1830
- virtualScroll: f.value,
1831
- size: c(R),
1832
- scroll: c(N),
1833
- loading: !!c(C),
1834
- columns: Oe(c(q).filter((O) => O.show || O.show === void 0)),
1835
- pagination: Oe(c(x)),
1836
- dataSource: b
1793
+ virtualScroll: m.value,
1794
+ size: r(R),
1795
+ scroll: r($),
1796
+ loading: !!r(v),
1797
+ columns: De(r(q).filter((M) => M.show || M.show === void 0)),
1798
+ pagination: De(r(x)),
1799
+ dataSource: y
1837
1800
  };
1838
- return w = qe(w, ["class", "onChange", "onExpand", "onExpandedRowsChange"]), w;
1839
- }), ht = T(() => {
1840
- var b;
1801
+ return F = qe(F, ["class", "onChange", "onExpand", "onExpandedRowsChange"]), F;
1802
+ }), ht = w(() => {
1803
+ var y;
1841
1804
  return [{
1842
- [`${u}`]: !0,
1843
- [`${n.class}`]: n.class,
1844
- [`${u}-no-scroll`]: !Object.keys(((b = He.value) == null ? void 0 : b.scroll) || {}).length,
1845
- [`${u}-table-tree`]: Ke.value,
1846
- [`${u}-full-screen`]: r.value
1805
+ [`${c}`]: !0,
1806
+ [`${l.class}`]: l.class,
1807
+ [`${c}-no-scroll`]: !Object.keys(((y = He.value) == null ? void 0 : y.scroll) || {}).length,
1808
+ [`${c}-table-tree`]: Ye.value,
1809
+ [`${c}-full-screen`]: C.value
1847
1810
  }];
1848
1811
  });
1849
1812
  Tn({
1850
1813
  tableSize: R,
1851
1814
  columns: q,
1852
- cacheColumns: m,
1815
+ cacheColumns: b,
1853
1816
  action: {
1854
- setTableSize: F,
1855
- reload: (b) => _(b),
1856
- toggle: i
1817
+ setTableSize: D,
1818
+ reload: (y) => J(y),
1819
+ toggle: d
1857
1820
  },
1858
1821
  settingsAction: {
1859
- autoScroll: G(e, "autoScroll"),
1860
- columnsMap: j,
1861
- operationType: g,
1862
- setColumnsMap: Te,
1863
- sortKeyColumns: P,
1864
- cacheColumnsMap: $,
1865
- setSortKeyColumns: Y
1822
+ autoScroll: U(e, "autoScroll"),
1823
+ columnsMap: I,
1824
+ operationType: p,
1825
+ setColumnsMap: P,
1826
+ sortKeyColumns: N,
1827
+ cacheColumnsMap: Y,
1828
+ setSortKeyColumns: K
1866
1829
  },
1867
- setPagination: k,
1868
- changeColumns: D,
1830
+ setPagination: E,
1831
+ changeColumns: k,
1869
1832
  slots: t
1833
+ }), u({
1834
+ formRef: () => {
1835
+ var y;
1836
+ return {
1837
+ formParams: ye,
1838
+ getFormState: () => {
1839
+ var F;
1840
+ return (F = s.value) == null ? void 0 : F.formState;
1841
+ },
1842
+ restForm: e.search.showSearch ? (y = s.value) == null ? void 0 : y.resetFormParams() : null
1843
+ };
1844
+ },
1845
+ actionRef: () => ({
1846
+ pageParams: x.value,
1847
+ getLoadingStatus: v.value,
1848
+ reload: J,
1849
+ reloadAndRest: async () => {
1850
+ Fe({
1851
+ current: 1,
1852
+ pageSize: 10
1853
+ }), await J();
1854
+ },
1855
+ reSetDataList: W,
1856
+ changePageInfo: Fe,
1857
+ changeDataValue: dt,
1858
+ loadingOperation: T
1859
+ })
1870
1860
  });
1871
- const vt = (b) => {
1872
- const w = {};
1873
- return Object.keys(b).map((O) => (Ln.includes(O) || (w[O] = b[O]), O)), w;
1874
- }, Ae = T(() => {
1875
- var U;
1876
- let b;
1877
- const w = c(S).direction === "rtl" ? "bottomLeft" : "right", O = (U = c(x)) == null ? void 0 : U.position;
1878
- if (O !== null && Array.isArray(O)) {
1879
- const Q = O.find((ee) => ee.indexOf("top") !== -1), z = O.find((ee) => ee.indexOf("bottom") !== -1), W = O.every((ee) => `${ee}` == "none");
1880
- !Q && !z && !W && (b = w), Q && (b = Q.toLowerCase().replace("top", "")), z && (b = z.toLowerCase().replace("bottom", ""));
1861
+ const vt = (y) => {
1862
+ const F = {};
1863
+ return Object.keys(y).map((M) => (Ln.includes(M) || (F[M] = y[M]), M)), F;
1864
+ }, We = w(() => {
1865
+ var ee;
1866
+ let y;
1867
+ const F = r(f).direction === "rtl" ? "bottomLeft" : "right", M = (ee = r(x)) == null ? void 0 : ee.position;
1868
+ if (M !== null && Array.isArray(M)) {
1869
+ const ie = M.find((te) => te.indexOf("top") !== -1), B = M.find((te) => te.indexOf("bottom") !== -1), A = M.every((te) => `${te}` == "none");
1870
+ !ie && !B && !A && (y = F), ie && (y = ie.toLowerCase().replace("top", "")), B && (y = B.toLowerCase().replace("bottom", ""));
1881
1871
  } else
1882
- b = w;
1883
- return b;
1884
- }), We = (b) => {
1885
- e.search.showSearch ? (me({
1886
- ...b,
1872
+ y = F;
1873
+ return y;
1874
+ }), Ae = async (y) => {
1875
+ e.search.showSearch ? (fe({
1876
+ ...y,
1887
1877
  ...e.params || {}
1888
- }), _()) : me(b);
1889
- }, mt = (b, w) => {
1890
- w ? (l("reset", b), e.request && We(b)) : e.request ? (l("submit", b), We(b)) : l("submit", b);
1891
- }, De = (b, w, O) => {
1892
- k({
1893
- current: b.current,
1894
- pageSize: b.pageSize
1895
- }), Le(b, w, O);
1896
- }, gt = (b, w) => {
1897
- var O;
1898
- k({
1899
- current: b,
1900
- pageSize: w
1878
+ }), await J()) : fe(y);
1879
+ }, mt = async (y, F) => {
1880
+ F ? (a("reset", y), e.request && await Ae(y)) : e.request ? (a("submit", y), await Ae(y)) : a("submit", y);
1881
+ }, Fe = (y, F, M) => {
1882
+ E({
1883
+ current: y.current,
1884
+ pageSize: y.pageSize
1885
+ }), Le(y, F, M);
1886
+ }, gt = (y, F) => {
1887
+ var M;
1888
+ E({
1889
+ current: y,
1890
+ pageSize: F
1901
1891
  }), Le({
1902
- current: b,
1903
- pageSize: w,
1904
- total: x.value && ((O = x.value) == null ? void 0 : O.total) || 0
1892
+ current: y,
1893
+ pageSize: F,
1894
+ total: x.value && ((M = x.value) == null ? void 0 : M.total) || 0
1905
1895
  }, !1, !1);
1906
- }, yt = (b) => {
1907
- l("expandedRowsChange", b);
1908
- }, bt = (b, w) => {
1909
- l("expand", b, w);
1910
- }, Ct = (b, w) => M(b, w), St = (b, w, O) => {
1911
- let U = b;
1912
- const Q = O.align === "center" ? "top" : O.align === "left" || !O.align ? "topLeft" : "topRight";
1913
- return w && O.copyable ? U = o(Yt.Paragraph, {
1914
- class: `${u}-copyable`,
1896
+ }, yt = (y) => {
1897
+ a("expandedRowsChange", y);
1898
+ }, bt = (y, F) => {
1899
+ a("expand", y, F);
1900
+ }, Ct = (y, F) => O(y, F), pt = (y, F, M) => {
1901
+ const ee = M.align === "center" ? "top" : M.align === "left" || !M.align ? "topLeft" : "topRight";
1902
+ return F && M.copyable ? o(Kt.Paragraph, {
1903
+ class: `${c}-copyable`,
1915
1904
  style: {
1916
1905
  margin: "0",
1917
1906
  width: "100%",
@@ -1919,92 +1908,92 @@ const {
1919
1908
  },
1920
1909
  copyable: !0
1921
1910
  }, {
1922
- default: () => [o(J, {
1923
- title: b,
1924
- placement: Q
1911
+ default: () => [o(G, {
1912
+ title: y,
1913
+ placement: ee
1925
1914
  }, {
1926
1915
  default: () => [o("div", {
1927
- class: `${u}-ellipsis`
1928
- }, [b])]
1916
+ class: `${c}-ellipsis`
1917
+ }, [y])]
1929
1918
  })]
1930
- }) : w && !O.copyable && (U = o(J, {
1931
- title: b,
1932
- placement: Q
1919
+ }) : F && !M.copyable ? o(G, {
1920
+ title: y,
1921
+ placement: ee
1933
1922
  }, {
1934
- default: () => [Ke.value ? b : o("div", {
1935
- class: `${u}-ellipsis`
1936
- }, [b])]
1937
- })), U;
1938
- }, pt = (b, w, O) => o(Kn, {
1939
- headerTitle: b,
1940
- titleTip: O,
1923
+ default: () => [Ye.value ? y : o("div", {
1924
+ class: `${c}-ellipsis`
1925
+ }, [y])]
1926
+ }) : y;
1927
+ }, St = () => {
1928
+ const y = ut(t, e, "customize");
1929
+ return y ? y(Ke.value) : null;
1930
+ }, xt = (y, F, M) => o(Kn, {
1931
+ headerTitle: y,
1932
+ titleTip: M,
1941
1933
  titleTipText: e.titleTipText,
1942
- options: c(rt),
1943
- settingExtra: se(t, e, "settingExtra"),
1944
- optionsExtra: se(t, e, "optionsExtra"),
1945
- toolBarBtn: w
1934
+ options: r(ft),
1935
+ settingExtra: ve(t, e, "settingExtra"),
1936
+ optionsExtra: ve(t, e, "optionsExtra"),
1937
+ toolBarBtn: F
1946
1938
  }, null);
1947
1939
  return () => {
1948
- var Q;
1949
- const b = se(t, e, "headerTitle"), w = se(t, e, "titleTip"), O = se(t, e, "toolBarBtn"), U = se(t, e, "customize");
1940
+ var ee, ie;
1941
+ const y = ve(t, e, "headerTitle"), F = ve(t, e, "titleTip"), M = ve(t, e, "toolBarBtn");
1950
1942
  return o("div", {
1951
- ref: (z) => d.value = z,
1943
+ ref: (B) => g.value = B,
1952
1944
  class: ht.value
1953
1945
  }, [o("div", {
1954
1946
  class: "gx-pro-table-content"
1955
- }, [(!!K.value.length || !!((Q = t.search) != null && Q.call(t))) && o(it, {
1956
- ref: p,
1947
+ }, [(!!ue.value.length || !!((ee = t.search) != null && ee.call(t))) && o(st, {
1948
+ ref: s,
1957
1949
  search: e.search,
1958
1950
  modal: e.modalScroll,
1959
- searchMap: K.value,
1960
- prefixCls: u,
1961
- loading: !!c(C),
1951
+ searchMap: ue.value,
1952
+ prefixCls: c,
1953
+ loading: !!r(v),
1962
1954
  onSearch: mt,
1963
1955
  defaultParams: Re
1964
1956
  }, {
1965
1957
  default: t.search ? () => {
1966
- var z;
1967
- return (z = t.search) == null ? void 0 : z.call(t);
1958
+ var B;
1959
+ return (B = t.search) == null ? void 0 : B.call(t);
1968
1960
  } : null
1969
- }), !f.value && pt(b, O, w), U ? o(je, {
1970
- spinning: !!c(C)
1961
+ }), !m.value && xt(y, M, F), ((ie = e.customize) != null ? ie : t.customize) ? o(je, {
1962
+ spinning: !!r(v)
1971
1963
  }, {
1972
- default: () => {
1973
- var z;
1974
- return [e.customize ? e.customize(c(Fe)) : (z = t.customize) == null ? void 0 : z.call(t, c(Fe)), o($t, ce({
1975
- class: {
1976
- ["ant-table-pagination"]: !0,
1977
- [`ant-table-pagination-${Ae.value}`]: Ae.value
1978
- }
1979
- }, Oe(c(x)), {
1980
- onChange: gt
1981
- }), null)];
1982
- }
1983
- }) : o(Bt, ce(He.value, {
1964
+ default: () => [St(), o(Bt, se({
1965
+ class: {
1966
+ ["ant-table-pagination"]: !0,
1967
+ [`ant-table-pagination-${We.value}`]: We.value
1968
+ }
1969
+ }, De(r(x)), {
1970
+ onChange: gt
1971
+ }), null)]
1972
+ }) : o(Yt, se(He.value, {
1984
1973
  style: e.tableStyle || void 0,
1985
1974
  class: e.tableClassName,
1986
- rowKey: (z) => z[e.rowKey || "sortIndex"],
1975
+ rowKey: (B) => B[e.rowKey || "sortIndex"],
1987
1976
  transformCellText: ({
1988
- text: z,
1989
- column: W
1977
+ text: B,
1978
+ column: A
1990
1979
  }) => {
1991
- const ee = Ne(z) ? z == null ? void 0 : z[0] : z;
1992
- if (de(ee))
1993
- return z;
1980
+ const te = Ie(B) ? B == null ? void 0 : B[0] : B;
1981
+ if (de(te))
1982
+ return B;
1994
1983
  const {
1995
- value: xt,
1996
- success: wt
1997
- } = Ut(ee, (W == null ? void 0 : W.columnEmptyText) || (e == null ? void 0 : e.columnEmptyText)), _e = Hn(xt, W == null ? void 0 : W.valueType, u);
1998
- return W != null && W.ellipsis ? St(_e, wt, W) : _e;
1984
+ value: wt,
1985
+ success: Tt
1986
+ } = Gt(te, (A == null ? void 0 : A.columnEmptyText) || (e == null ? void 0 : e.columnEmptyText)), _e = Hn(wt, A == null ? void 0 : A.valueType, c);
1987
+ return A != null && A.ellipsis ? pt(_e, Tt, A) : _e;
1999
1988
  },
2000
1989
  rowSelection: e.rowSelection ? {
2001
1990
  ...qe(e.rowSelection, ["onSelect", "onSelectAll", "onChange", "selectedRowKeys"]),
2002
- selectedRowKeys: ge.value,
2003
- onSelect: ye,
2004
- onSelectAll: be,
2005
- onChange: ke
1991
+ selectedRowKeys: ke.value,
1992
+ onSelect: Ce,
1993
+ onSelectAll: X,
1994
+ onChange: be
2006
1995
  } : void 0,
2007
- onChange: De,
1996
+ onChange: Fe,
2008
1997
  onExpandedRowsChange: yt,
2009
1998
  onExpand: bt,
2010
1999
  onResizeColumn: Ct
@@ -2014,9 +2003,9 @@ const {
2014
2003
  };
2015
2004
  }
2016
2005
  });
2017
- Ee.install = (e) => (e.component(Ee.name, Ee), e);
2006
+ Me.install = (e) => (e.component(Me.name, Me), e);
2018
2007
  export {
2019
- Ee as ProTable,
2020
- Ee as default,
2021
- ne as proTableProps
2008
+ Me as ProTable,
2009
+ Me as default,
2010
+ le as proTableProps
2022
2011
  };