@gx-design-vue/pro-table 0.0.3-rc.3 → 0.0.3-rc.5

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