tm-table 1.2.3 → 1.2.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,33 +1,33 @@
1
- var Ae = Object.defineProperty, De = Object.defineProperties;
2
- var Me = Object.getOwnPropertyDescriptors;
3
- var Q = Object.getOwnPropertySymbols;
4
- var re = Object.prototype.hasOwnProperty, oe = Object.prototype.propertyIsEnumerable;
5
- var se = (e, l, t) => l in e ? Ae(e, l, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[l] = t, x = (e, l) => {
6
- for (var t in l || (l = {}))
7
- re.call(l, t) && se(e, t, l[t]);
8
- if (Q)
9
- for (var t of Q(l))
10
- oe.call(l, t) && se(e, t, l[t]);
1
+ var Me = Object.defineProperty, He = Object.defineProperties;
2
+ var Re = Object.getOwnPropertyDescriptors;
3
+ var q = Object.getOwnPropertySymbols;
4
+ var oe = Object.prototype.hasOwnProperty, re = Object.prototype.propertyIsEnumerable;
5
+ var se = (e, i, t) => i in e ? Me(e, i, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[i] = t, x = (e, i) => {
6
+ for (var t in i || (i = {}))
7
+ oe.call(i, t) && se(e, t, i[t]);
8
+ if (q)
9
+ for (var t of q(i))
10
+ re.call(i, t) && se(e, t, i[t]);
11
11
  return e;
12
- }, I = (e, l) => De(e, Me(l));
13
- var ue = (e, l) => {
12
+ }, I = (e, i) => He(e, Re(i));
13
+ var ue = (e, i) => {
14
14
  var t = {};
15
15
  for (var a in e)
16
- re.call(e, a) && l.indexOf(a) < 0 && (t[a] = e[a]);
17
- if (e != null && Q)
18
- for (var a of Q(e))
19
- l.indexOf(a) < 0 && oe.call(e, a) && (t[a] = e[a]);
16
+ oe.call(e, a) && i.indexOf(a) < 0 && (t[a] = e[a]);
17
+ if (e != null && q)
18
+ for (var a of q(e))
19
+ i.indexOf(a) < 0 && re.call(e, a) && (t[a] = e[a]);
20
20
  return t;
21
21
  };
22
- import { ref as He, createElementBlock as b, openBlock as o, normalizeStyle as B, createElementVNode as v, h as be, resolveComponent as u, createBlock as m, mergeProps as _, withCtx as p, toDisplayString as T, normalizeClass as X, createCommentVNode as C, defineComponent as Re, useAttrs as Ie, useSlots as Ee, computed as de, resolveDynamicComponent as We, Fragment as L, renderList as A, createVNode as g, renderSlot as S, toHandlers as M, createTextVNode as z, withKeys as Ne, createSlots as ye, resolveDirective as Pe, withDirectives as Be, normalizeProps as Ue, guardReactiveProps as je } from "vue";
23
- import { CircleClose as Je } from "@element-plus/icons-vue";
22
+ import { ref as Ie, createElementBlock as y, openBlock as r, normalizeStyle as B, createElementVNode as v, h as ve, resolveComponent as u, createBlock as m, mergeProps as _, withCtx as p, toDisplayString as T, normalizeClass as Z, createCommentVNode as C, defineComponent as Ee, useAttrs as We, useSlots as Ne, computed as de, resolveDynamicComponent as Pe, Fragment as L, renderList as A, createVNode as g, renderSlot as S, toHandlers as M, createTextVNode as z, withKeys as Be, createSlots as Ce, resolveDirective as Ue, withDirectives as je, normalizeProps as Je, guardReactiveProps as Ke } from "vue";
23
+ import { CircleClose as Qe } from "@element-plus/icons-vue";
24
24
  import R from "sortablejs";
25
25
  const he = {
26
26
  mini: "small",
27
27
  small: "small",
28
28
  default: "default",
29
29
  large: "large"
30
- }, K = (e) => he[e] || he.default, k = () => "default", Ke = {
30
+ }, Q = (e) => he[e] || he.default, k = () => "default", qe = {
31
31
  today: "今天",
32
32
  yesterday: "昨天",
33
33
  last7days: "最近7天",
@@ -66,7 +66,7 @@ const he = {
66
66
  cancelTop: "取消置顶",
67
67
  copySuccess: "复制成功",
68
68
  copyFailed: "复制失败"
69
- }, Qe = {
69
+ }, Ye = {
70
70
  today: "Today",
71
71
  yesterday: "Yesterday",
72
72
  last7days: "Last 7 days",
@@ -105,27 +105,27 @@ const he = {
105
105
  cancelTop: "Cancel top",
106
106
  copySuccess: "Copy successfully",
107
107
  copyFailed: "Copy failed"
108
- }, qe = {
109
- "zh-CN": Ke,
110
- "en-US": Qe
108
+ }, Ge = {
109
+ "zh-CN": qe,
110
+ "en-US": Ye
111
111
  };
112
- let Z = { value: "zh-CN" };
113
- Z = He("zh-CN");
114
- const Ye = (e) => {
115
- var l;
116
- return ((l = qe[Z.value]) == null ? void 0 : l[e]) || e;
112
+ let $ = { value: "zh-CN" };
113
+ $ = Ie("zh-CN");
114
+ const Xe = (e) => {
115
+ var i;
116
+ return ((i = Ge[$.value]) == null ? void 0 : i[e]) || e;
117
117
  }, ae = (e) => {
118
- Z.value = e;
118
+ $.value = e;
119
119
  }, H = () => ({
120
- t: Ye,
120
+ t: Xe,
121
121
  setLang: ae,
122
- currentLang: Z
123
- }), w = (e, l) => {
122
+ currentLang: $
123
+ }), w = (e, i) => {
124
124
  const t = e.__vccOpts || e;
125
- for (const [a, i] of l)
126
- t[a] = i;
125
+ for (const [a, l] of i)
126
+ t[a] = l;
127
127
  return t;
128
- }, Ge = {
128
+ }, Ze = {
129
129
  name: "BaseIcon",
130
130
  props: {
131
131
  path: {
@@ -142,24 +142,24 @@ const Ye = (e) => {
142
142
  handleClick() {
143
143
  }
144
144
  }
145
- }, Xe = ["width", "height"], Ze = ["d"];
146
- function $e(e, l, t, a, i, n) {
147
- return o(), b("i", {
145
+ }, $e = ["width", "height"], et = ["d"];
146
+ function tt(e, i, t, a, l, n) {
147
+ return r(), y("i", {
148
148
  class: "tm-icon",
149
- onClick: l[0] || (l[0] = (...r) => n.handleClick && n.handleClick(...r))
149
+ onClick: i[0] || (i[0] = (...o) => n.handleClick && n.handleClick(...o))
150
150
  }, [
151
- (o(), b("svg", {
151
+ (r(), y("svg", {
152
152
  width: t.size,
153
153
  height: t.size,
154
154
  style: B({ color: t.color }),
155
155
  viewBox: "0 0 1024 1024",
156
156
  xmlns: "http://www.w3.org/2000/svg"
157
157
  }, [
158
- v("path", { d: t.path }, null, 8, Ze)
159
- ], 12, Xe))
158
+ v("path", { d: t.path }, null, 8, et)
159
+ ], 12, $e))
160
160
  ]);
161
161
  }
162
- const et = /* @__PURE__ */ w(Ge, [["render", $e], ["__scopeId", "data-v-1c30ca93"]]), tt = {
162
+ const it = /* @__PURE__ */ w(Ze, [["render", tt], ["__scopeId", "data-v-1c30ca93"]]), lt = {
163
163
  menu: "M160 448a32 32 0 0 1-32-32V160.064a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V416a32 32 0 0 1-32 32zm448 0a32 32 0 0 1-32-32V160.064a32 32 0 0 1 32-32h255.936a32 32 0 0 1 32 32V416a32 32 0 0 1-32 32zM160 896a32 32 0 0 1-32-32V608a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32v256a32 32 0 0 1-32 32zm448 0a32 32 0 0 1-32-32V608a32 32 0 0 1 32-32h255.936a32 32 0 0 1 32 32v256a32 32 0 0 1-32 32z",
164
164
  more: "M76.92892277 192.94787572h864.34120754c23.20379058 0 46.40758118-17.40284367 46.40758118-46.40758118s-23.20379058-46.40758118-46.40758118-46.40758116H76.92892277c-29.00473897 0-46.40758264 17.40284367-46.40758264 46.40758116s23.20379058 46.40758118 46.40758264 46.40758118zM941.27013031 465.59241882H76.92892277c-29.00473897 0-46.40758264 17.40284367-46.40758264 46.40758118s23.20379058 46.40758118 46.40758264 46.40758118h864.34120754c23.20379058 0 46.40758118-17.40284367 46.40758118-46.40758118s-23.20379058-46.40758118-46.40758118-46.40758118zM941.27013031 825.25117589H76.92892277c-29.00473897 0-46.40758264 17.40284367-46.40758264 46.40758118s23.20379058 46.40758118 46.40758264 46.40758264h864.34120754c23.20379058 0 46.40758118-17.40284367 46.40758118-46.40758264s-23.20379058-46.40758118-46.40758118-46.40758118z",
165
165
  refresh: "M771.776 794.88A384 384 0 0 1 128 512h64a320 320 0 0 0 555.712 216.448H654.72a32 32 0 1 1 0-64h149.056a32 32 0 0 1 32 32v148.928a32 32 0 1 1-64 0v-50.56zM276.288 295.616h92.992a32 32 0 0 1 0 64H220.16a32 32 0 0 1-32-32V178.56a32 32 0 0 1 64 0v50.56A384 384 0 0 1 896.128 512h-64a320 320 0 0 0-555.776-216.384z",
@@ -171,8 +171,8 @@ const et = /* @__PURE__ */ w(Ge, [["render", $e], ["__scopeId", "data-v-1c30ca93
171
171
  download: "M160 832h704a32 32 0 1 1 0 64H160a32 32 0 1 1 0-64m384-253.696 236.288-236.352 45.248 45.248L508.8 704 192 387.2l45.248-45.248L480 584.704V128h64z",
172
172
  delete: "M160 256H96a32 32 0 0 1 0-64h256V95.936a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V192h256a32 32 0 1 1 0 64h-64v672a32 32 0 0 1-32 32H192a32 32 0 0 1-32-32zm448-64v-64H416v64zM224 896h576V256H224zm192-128a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32m192 0a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32",
173
173
  copy: "M128 320v576h576V320zm-32-64h640a32 32 0 0 1 32 32v640a32 32 0 0 1-32 32H96a32 32 0 0 1-32-32V288a32 32 0 0 1 32-32M960 96v704a32 32 0 0 1-32 32h-96v-64h64V128H384v64h-64V96a32 32 0 0 1 32-32h576a32 32 0 0 1 32 32M256 672h320v64H256zm0-192h320v64H256z"
174
- }, D = Object.entries(tt).reduce((e, [l, t]) => {
175
- const a = `${l}Icon`, i = {
174
+ }, D = Object.entries(lt).reduce((e, [i, t]) => {
175
+ const a = `${i}Icon`, l = {
176
176
  name: a,
177
177
  props: {
178
178
  path: {
@@ -187,18 +187,18 @@ const et = /* @__PURE__ */ w(Ge, [["render", $e], ["__scopeId", "data-v-1c30ca93
187
187
  }
188
188
  },
189
189
  render(n) {
190
- return be(et, this.$props);
190
+ return ve(it, this.$props);
191
191
  }
192
192
  };
193
- return i.install = (n) => {
194
- n.component(a, i);
195
- }, e[l] = i, e;
196
- }, {}), lt = D.menu, it = D.refresh, nt = D.move;
193
+ return l.install = (n) => {
194
+ n.component(a, l);
195
+ }, e[i] = l, e;
196
+ }, {}), nt = D.menu, at = D.refresh, st = D.move;
197
197
  D["column-setting"];
198
- const at = D.more, st = D["fixed-left"], rt = D["fixed-right"], ot = D.upload, ut = D.download, dt = D.delete, ve = D.copy, { t: ee } = H(), ht = !1, ct = !0, ft = {
198
+ const ot = D.more, rt = D["fixed-left"], ut = D["fixed-right"], dt = D.upload, ht = D.download, ct = D.delete, _e = D.copy, { t: te } = H(), ft = !1, pt = !0, mt = {
199
199
  name: "TmEllipsisText",
200
200
  components: {
201
- CopyIcon: ve
201
+ CopyIcon: _e
202
202
  },
203
203
  props: {
204
204
  text: {
@@ -235,8 +235,8 @@ const at = D.more, st = D["fixed-left"], rt = D["fixed-right"], ot = D.upload, u
235
235
  },
236
236
  data() {
237
237
  return {
238
- isVue2: ht,
239
- isVue3: ct,
238
+ isVue2: ft,
239
+ isVue3: pt,
240
240
  isOverflow: !1,
241
241
  currentLines: 1,
242
242
  resizeObserver: null
@@ -247,10 +247,10 @@ const at = D.more, st = D["fixed-left"], rt = D["fixed-right"], ot = D.upload, u
247
247
  return !this.showTooltip || !this.isOverflow;
248
248
  },
249
249
  textStyle() {
250
- const e = typeof this.width == "number" ? `${this.width}px` : this.width, l = typeof this.maxWidth == "number" ? `${this.maxWidth}px` : this.maxWidth;
250
+ const e = typeof this.width == "number" ? `${this.width}px` : this.width, i = typeof this.maxWidth == "number" ? `${this.maxWidth}px` : this.maxWidth;
251
251
  return {
252
252
  width: e,
253
- maxWidth: l,
253
+ maxWidth: i,
254
254
  lineHeight: this.lineHeight,
255
255
  display: "-webkit-inline-box",
256
256
  overflow: "hidden",
@@ -286,22 +286,22 @@ const at = D.more, st = D["fixed-left"], rt = D["fixed-right"], ot = D.upload, u
286
286
  var f;
287
287
  const e = this.$refs.textEl;
288
288
  if (!e) return;
289
- const l = getComputedStyle(e);
290
- if (!l.width || l.width === "0px") {
289
+ const i = getComputedStyle(e);
290
+ if (!i.width || i.width === "0px") {
291
291
  this.$nextTick(() => {
292
292
  this.performOverflowCheck();
293
293
  });
294
294
  return;
295
295
  }
296
- const t = e.scrollHeight, a = e.scrollWidth, i = e.clientHeight, n = e.clientWidth, r = 1, c = t > i + r, h = a > n + r;
297
- if (c || h) {
296
+ const t = e.scrollHeight, a = e.scrollWidth, l = e.clientHeight, n = e.clientWidth, o = 1, d = t > l + o, c = a > n + o;
297
+ if (d || c) {
298
298
  this.isOverflow = !0;
299
- const y = parseFloat(l.lineHeight) || 16;
300
- this.currentLines = Math.ceil(t / y);
299
+ const b = parseFloat(i.lineHeight) || 16;
300
+ this.currentLines = Math.ceil(t / b);
301
301
  } else {
302
- const y = e.getBoundingClientRect(), V = (f = e.parentElement) == null ? void 0 : f.getBoundingClientRect();
302
+ const b = e.getBoundingClientRect(), V = (f = e.parentElement) == null ? void 0 : f.getBoundingClientRect();
303
303
  if (V) {
304
- const O = y.height > V.height || y.width > V.width;
304
+ const O = b.height > V.height || b.width > V.width;
305
305
  this.isOverflow = O;
306
306
  } else
307
307
  this.isOverflow = !1;
@@ -335,7 +335,7 @@ const at = D.more, st = D["fixed-left"], rt = D["fixed-right"], ot = D.upload, u
335
335
  },
336
336
  handleCopy() {
337
337
  navigator.clipboard && window.isSecureContext ? navigator.clipboard.writeText(this.text).then(() => {
338
- this.$message.success(ee("copySuccess"));
338
+ this.$message.success(te("copySuccess"));
339
339
  }).catch(() => {
340
340
  this.fallbackCopy();
341
341
  }) : this.fallbackCopy();
@@ -344,35 +344,35 @@ const at = D.more, st = D["fixed-left"], rt = D["fixed-right"], ot = D.upload, u
344
344
  const e = document.createElement("textarea");
345
345
  e.value = this.text, e.style.position = "fixed", e.style.left = "-999999px", e.style.top = "-999999px", document.body.appendChild(e), e.focus(), e.select();
346
346
  try {
347
- document.execCommand("copy"), this.$message.success(ee("copySuccess"));
348
- } catch (l) {
349
- this.$message.error(ee("copyFailed"));
347
+ document.execCommand("copy"), this.$message.success(te("copySuccess"));
348
+ } catch (i) {
349
+ this.$message.error(te("copyFailed"));
350
350
  }
351
351
  document.body.removeChild(e);
352
352
  }
353
353
  }
354
- }, pt = { class: "ellipsis-text-container" };
355
- function mt(e, l, t, a, i, n) {
356
- const r = u("CopyIcon"), c = u("el-tooltip");
357
- return o(), m(c, _({
354
+ }, gt = { class: "ellipsis-text-container" };
355
+ function bt(e, i, t, a, l, n) {
356
+ const o = u("CopyIcon"), d = u("el-tooltip");
357
+ return r(), m(d, _({
358
358
  disabled: n.tooltipDisabled,
359
359
  content: t.text,
360
360
  effect: "dark",
361
361
  placement: "top"
362
362
  }, {
363
- [i.isVue2 ? "open-delay" : "show-after"]: 300
363
+ [l.isVue2 ? "open-delay" : "show-after"]: 300
364
364
  }), {
365
365
  default: p(() => [
366
- v("div", pt, [
366
+ v("div", gt, [
367
367
  v("div", {
368
368
  ref: "textEl",
369
369
  class: "ellipsis-text",
370
370
  style: B(n.textStyle)
371
371
  }, T(t.text), 5),
372
372
  v("div", {
373
- class: X(["toolbar", { multiline: i.currentLines > 1 && t.lines > 1 }])
373
+ class: Z(["toolbar", { multiline: l.currentLines > 1 && t.lines > 1 }])
374
374
  }, [
375
- t.copyable ? (o(), m(r, {
375
+ t.copyable ? (r(), m(o, {
376
376
  key: 0,
377
377
  class: "icon-item",
378
378
  onClick: n.handleCopy
@@ -383,45 +383,45 @@ function mt(e, l, t, a, i, n) {
383
383
  _: 1
384
384
  }, 16, ["disabled", "content"]);
385
385
  }
386
- const $ = /* @__PURE__ */ w(ft, [["render", mt], ["__scopeId", "data-v-70ba8157"]]);
387
- var gt = Object.defineProperty, bt = Object.defineProperties, yt = Object.getOwnPropertyDescriptors, ce = Object.getOwnPropertySymbols, vt = Object.prototype.hasOwnProperty, Ct = Object.prototype.propertyIsEnumerable, fe = (e, l, t) => l in e ? gt(e, l, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[l] = t, pe = (e, l) => {
388
- for (var t in l || (l = {}))
389
- vt.call(l, t) && fe(e, t, l[t]);
386
+ const ee = /* @__PURE__ */ w(mt, [["render", bt], ["__scopeId", "data-v-70ba8157"]]);
387
+ var yt = Object.defineProperty, vt = Object.defineProperties, Ct = Object.getOwnPropertyDescriptors, ce = Object.getOwnPropertySymbols, _t = Object.prototype.hasOwnProperty, St = Object.prototype.propertyIsEnumerable, fe = (e, i, t) => i in e ? yt(e, i, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[i] = t, pe = (e, i) => {
388
+ for (var t in i || (i = {}))
389
+ _t.call(i, t) && fe(e, t, i[t]);
390
390
  if (ce)
391
- for (var t of ce(l))
392
- Ct.call(l, t) && fe(e, t, l[t]);
391
+ for (var t of ce(i))
392
+ St.call(i, t) && fe(e, t, i[t]);
393
393
  return e;
394
- }, me = (e, l) => bt(e, yt(l));
395
- const _t = {
394
+ }, me = (e, i) => vt(e, Ct(i));
395
+ const xt = {
396
396
  name: "RenderVue3",
397
397
  inheritAttrs: !1
398
- }, St = /* @__PURE__ */ Re(me(pe({}, _t), {
398
+ }, Tt = /* @__PURE__ */ Ee(me(pe({}, xt), {
399
399
  props: {
400
400
  renderFn: { type: Function },
401
401
  data: {}
402
402
  },
403
403
  setup(e) {
404
- const l = e, t = Ie(), a = Ee(), i = de(() => me(pe({}, l.data || {}), {
404
+ const i = e, t = We(), a = Ne(), l = de(() => me(pe({}, i.data || {}), {
405
405
  $attrs: t,
406
406
  $slots: a
407
407
  })), n = de(() => {
408
408
  try {
409
- if (!l.renderFn || typeof l.renderFn != "function")
409
+ if (!i.renderFn || typeof i.renderFn != "function")
410
410
  return console.warn("[RenderComponent] renderFn must be a function"), null;
411
- const r = l.renderFn.toString(), c = /\(\s*h\s*[,)]/.test(r) || l.renderFn.length >= 1;
412
- let h;
413
- return c ? h = l.renderFn(be, i.value) : h = l.renderFn(i.value), h;
414
- } catch (r) {
415
- return console.error("[RenderComponent] Error in render function:", r), null;
411
+ const o = i.renderFn.toString(), d = /\(\s*h\s*[,)]/.test(o) || i.renderFn.length >= 1;
412
+ let c;
413
+ return d ? c = i.renderFn(ve, l.value) : c = i.renderFn(l.value), c;
414
+ } catch (o) {
415
+ return console.error("[RenderComponent] Error in render function:", o), null;
416
416
  }
417
417
  });
418
- return (r, c) => (o(), m(We(n.value)));
418
+ return (o, d) => (r(), m(Pe(n.value)));
419
419
  }
420
- })), xt = !1, Tt = !0, wt = {
420
+ })), wt = !1, Vt = !0, Ft = {
421
421
  name: "FormItemLayout",
422
422
  components: {
423
- EllipsisText: $,
424
- RenderComponent: St
423
+ EllipsisText: ee,
424
+ RenderComponent: Tt
425
425
  },
426
426
  props: {
427
427
  // 布局方向
@@ -462,8 +462,8 @@ const _t = {
462
462
  data() {
463
463
  return {
464
464
  t: H().t,
465
- isVue2: xt,
466
- isVue3: Tt,
465
+ isVue2: wt,
466
+ isVue3: Vt,
467
467
  getDefaultSize: k
468
468
  };
469
469
  },
@@ -475,8 +475,8 @@ const _t = {
475
475
  containerStyle() {
476
476
  const e = {};
477
477
  if (this.direction === "horizontal") {
478
- const l = this.hasLabel ? this.parsedLabelWidth + this.parsedInputWidth : this.parsedInputWidth;
479
- e.width = `${l}px`;
478
+ const i = this.hasLabel ? this.parsedLabelWidth + this.parsedInputWidth : this.parsedInputWidth;
479
+ e.width = `${i}px`;
480
480
  } else
481
481
  e.width = `${this.parsedInputWidth}px`;
482
482
  return e;
@@ -523,53 +523,53 @@ const _t = {
523
523
  this.$emit("field-change", e);
524
524
  }
525
525
  }
526
- }, Vt = {
526
+ }, zt = {
527
527
  key: 0,
528
528
  class: "label-text"
529
- }, Ft = {
529
+ }, Lt = {
530
530
  key: 1,
531
531
  class: "label-render"
532
532
  };
533
- function zt(e, l, t, a, i, n) {
534
- const r = u("el-option"), c = u("el-select"), h = u("EllipsisText"), f = u("RenderComponent");
535
- return o(), b("div", {
536
- class: X(["form-item-layout", {
533
+ function kt(e, i, t, a, l, n) {
534
+ const o = u("el-option"), d = u("el-select"), c = u("EllipsisText"), f = u("RenderComponent");
535
+ return r(), y("div", {
536
+ class: Z(["form-item-layout", {
537
537
  "form-item-layout--horizontal": t.direction === "horizontal",
538
538
  "form-item-layout--vertical": t.direction === "vertical"
539
539
  }]),
540
540
  style: B(n.containerStyle)
541
541
  }, [
542
- n.hasLabel ? (o(), b("div", {
542
+ n.hasLabel ? (r(), y("div", {
543
543
  key: 0,
544
544
  class: "form-item-label",
545
545
  style: B(n.labelStyle)
546
546
  }, [
547
- t.labelOptions && t.labelOptions.length ? (o(), m(c, {
547
+ t.labelOptions && t.labelOptions.length ? (r(), m(d, {
548
548
  key: 0,
549
549
  modelValue: n.fieldValue,
550
- "onUpdate:modelValue": l[0] || (l[0] = (y) => n.fieldValue = y),
551
- placeholder: i.t("selectPlaceholder"),
552
- size: i.getDefaultSize(),
550
+ "onUpdate:modelValue": i[0] || (i[0] = (b) => n.fieldValue = b),
551
+ placeholder: l.t("selectPlaceholder"),
552
+ size: l.getDefaultSize(),
553
553
  class: "label-select",
554
554
  onChange: n.handleFieldChange
555
555
  }, {
556
556
  default: p(() => [
557
- (o(!0), b(L, null, A(t.labelOptions, (y) => (o(), m(r, {
558
- key: y.value,
559
- label: y.label,
560
- value: y.value
557
+ (r(!0), y(L, null, A(t.labelOptions, (b) => (r(), m(o, {
558
+ key: b.value,
559
+ label: b.label,
560
+ value: b.value
561
561
  }, null, 8, ["label", "value"]))), 128))
562
562
  ]),
563
563
  _: 1
564
- }, 8, ["modelValue", "placeholder", "size", "onChange"])) : t.label ? (o(), b(L, { key: 1 }, [
565
- typeof t.label == "string" ? (o(), b("div", Vt, [
566
- g(h, {
564
+ }, 8, ["modelValue", "placeholder", "size", "onChange"])) : t.label ? (r(), y(L, { key: 1 }, [
565
+ typeof t.label == "string" ? (r(), y("div", zt, [
566
+ g(c, {
567
567
  text: t.label,
568
568
  lines: 2,
569
569
  width: t.labelWidth - 4,
570
570
  "text-align": t.labelAlign
571
571
  }, null, 8, ["text", "width", "text-align"])
572
- ])) : typeof t.label == "function" ? (o(), b("div", Ft, [
572
+ ])) : typeof t.label == "function" ? (r(), y("div", Lt, [
573
573
  g(f, { "render-fn": t.label }, null, 8, ["render-fn"])
574
574
  ])) : C("", !0)
575
575
  ], 64)) : C("", !0)
@@ -582,13 +582,13 @@ function zt(e, l, t, a, i, n) {
582
582
  ], 4)
583
583
  ], 6);
584
584
  }
585
- const E = /* @__PURE__ */ w(wt, [["render", zt], ["__scopeId", "data-v-57462da5"]]), Lt = !1, kt = !0, q = "modelValue", Ot = "update:modelValue", At = {
585
+ const E = /* @__PURE__ */ w(Ft, [["render", kt], ["__scopeId", "data-v-57462da5"]]), Ot = !1, At = !0, Y = "modelValue", Dt = "update:modelValue", Mt = {
586
586
  name: "TmSelectFilter",
587
587
  components: {
588
588
  FormItemLayout: E
589
589
  },
590
590
  props: {
591
- [q]: {
591
+ [Y]: {
592
592
  type: [String, Number, Array],
593
593
  default: ""
594
594
  },
@@ -666,8 +666,8 @@ const E = /* @__PURE__ */ w(wt, [["render", zt], ["__scopeId", "data-v-57462da5"
666
666
  data() {
667
667
  return {
668
668
  t: H().t,
669
- isVue2: Lt,
670
- isVue3: kt,
669
+ isVue2: Ot,
670
+ isVue3: At,
671
671
  getDefaultSize: k,
672
672
  optionsList: [],
673
673
  loading: !1,
@@ -678,15 +678,15 @@ const E = /* @__PURE__ */ w(wt, [["render", zt], ["__scopeId", "data-v-57462da5"
678
678
  computed: {
679
679
  computedValue: {
680
680
  get() {
681
- return this[q];
681
+ return this[Y];
682
682
  },
683
683
  set(e) {
684
- let l = e;
684
+ let i = e;
685
685
  if (this.multiple && Array.isArray(e) && e.length === 0 && this.valueOnClear !== void 0) {
686
- const t = this[q];
687
- Array.isArray(t) && t.length > 0 && (l = typeof this.valueOnClear == "function" ? this.valueOnClear() : this.valueOnClear);
686
+ const t = this[Y];
687
+ Array.isArray(t) && t.length > 0 && (i = typeof this.valueOnClear == "function" ? this.valueOnClear() : this.valueOnClear);
688
688
  }
689
- this.$emit(Ot, l), this.$emit("change", l);
689
+ this.$emit(Dt, i), this.$emit("change", i);
690
690
  }
691
691
  },
692
692
  propMap() {
@@ -697,7 +697,7 @@ const E = /* @__PURE__ */ w(wt, [["render", zt], ["__scopeId", "data-v-57462da5"
697
697
  }
698
698
  },
699
699
  watch: {
700
- [q](e) {
700
+ [Y](e) {
701
701
  !this.multiple || !this.showCheckAll || (e.length === 0 ? (this.checkAll = !1, this.indeterminate = !1) : e.length === this.optionsList.length ? (this.checkAll = !0, this.indeterminate = !1) : this.indeterminate = !0);
702
702
  }
703
703
  },
@@ -724,8 +724,8 @@ const E = /* @__PURE__ */ w(wt, [["render", zt], ["__scopeId", "data-v-57462da5"
724
724
  },
725
725
  handleCheckAll(e) {
726
726
  this.indeterminate = !1;
727
- let l = [];
728
- e && (l = this.optionsList.map((t) => t[this.propMap.value])), this.computedValue = l;
727
+ let i = [];
728
+ e && (i = this.optionsList.map((t) => t[this.propMap.value])), this.computedValue = i;
729
729
  },
730
730
  handleClear() {
731
731
  if (this.valueOnClear !== void 0) {
@@ -736,13 +736,13 @@ const E = /* @__PURE__ */ w(wt, [["render", zt], ["__scopeId", "data-v-57462da5"
736
736
  }
737
737
  }
738
738
  }
739
- }, Dt = {
739
+ }, Ht = {
740
740
  key: 0,
741
741
  class: "check-all-option"
742
742
  };
743
- function Mt(e, l, t, a, i, n) {
744
- const r = u("el-checkbox"), c = u("el-option"), h = u("el-select"), f = u("FormItemLayout");
745
- return o(), m(f, {
743
+ function Rt(e, i, t, a, l, n) {
744
+ const o = u("el-checkbox"), d = u("el-option"), c = u("el-select"), f = u("FormItemLayout");
745
+ return r(), m(f, {
746
746
  label: t.label,
747
747
  "label-options": t.labelOptions,
748
748
  field: t.field,
@@ -753,62 +753,62 @@ function Mt(e, l, t, a, i, n) {
753
753
  "label-align": t.labelAlign
754
754
  }, {
755
755
  default: p(() => [
756
- g(h, _({
756
+ g(c, _({
757
757
  ref: "select",
758
758
  class: "select",
759
759
  onClear: n.handleClear,
760
760
  modelValue: n.computedValue,
761
- "onUpdate:modelValue": l[2] || (l[2] = (y) => n.computedValue = y)
761
+ "onUpdate:modelValue": i[2] || (i[2] = (b) => n.computedValue = b)
762
762
  }, I(x({}, e.$attrs), {
763
- size: i.getDefaultSize(),
763
+ size: l.getDefaultSize(),
764
764
  filterable: t.filterable,
765
765
  clearable: t.clearable,
766
766
  collapseTags: t.collapseTags,
767
767
  multiple: t.multiple,
768
768
  placeholder: t.placeholder,
769
- loading: i.loading
770
- }), M(i.isVue2 ? e.$listeners : {}), { loading: i.loading }), {
769
+ loading: l.loading
770
+ }), M(l.isVue2 ? e.$listeners : {}), { loading: l.loading }), {
771
771
  header: p(() => [
772
- i.isVue3 && t.multiple && t.showCheckAll ? (o(), m(r, {
772
+ l.isVue3 && t.multiple && t.showCheckAll ? (r(), m(o, {
773
773
  key: 0,
774
- modelValue: i.checkAll,
775
- "onUpdate:modelValue": l[1] || (l[1] = (y) => i.checkAll = y),
776
- indeterminate: i.indeterminate,
777
- size: i.getDefaultSize(),
774
+ modelValue: l.checkAll,
775
+ "onUpdate:modelValue": i[1] || (i[1] = (b) => l.checkAll = b),
776
+ indeterminate: l.indeterminate,
777
+ size: l.getDefaultSize(),
778
778
  onChange: n.handleCheckAll,
779
779
  style: { width: "100%", height: "20px", "padding-left": "10px" }
780
780
  }, {
781
781
  default: p(() => [
782
- z(T(i.t("all")), 1)
782
+ z(T(l.t("all")), 1)
783
783
  ]),
784
784
  _: 1
785
785
  }, 8, ["modelValue", "indeterminate", "size", "onChange"])) : C("", !0)
786
786
  ]),
787
787
  default: p(() => [
788
- i.isVue2 && t.multiple && t.showCheckAll ? (o(), b("div", Dt, [
789
- g(r, {
788
+ l.isVue2 && t.multiple && t.showCheckAll ? (r(), y("div", Ht, [
789
+ g(o, {
790
790
  style: { width: "100%" },
791
- modelValue: i.checkAll,
792
- "onUpdate:modelValue": l[0] || (l[0] = (y) => i.checkAll = y),
793
- indeterminate: i.indeterminate,
794
- size: i.getDefaultSize(),
791
+ modelValue: l.checkAll,
792
+ "onUpdate:modelValue": i[0] || (i[0] = (b) => l.checkAll = b),
793
+ indeterminate: l.indeterminate,
794
+ size: l.getDefaultSize(),
795
795
  onChange: n.handleCheckAll
796
796
  }, {
797
797
  default: p(() => [
798
- z(T(i.t("all")), 1)
798
+ z(T(l.t("all")), 1)
799
799
  ]),
800
800
  _: 1
801
801
  }, 8, ["modelValue", "indeterminate", "size", "onChange"])
802
802
  ])) : C("", !0),
803
- (o(!0), b(L, null, A(i.optionsList, (y) => (o(), m(c, {
804
- key: y[n.propMap.value],
805
- label: y[n.propMap.label],
806
- value: y[n.propMap.value],
807
- disabled: y.disabled
803
+ (r(!0), y(L, null, A(l.optionsList, (b) => (r(), m(d, {
804
+ key: b[n.propMap.value],
805
+ label: b[n.propMap.label],
806
+ value: b[n.propMap.value],
807
+ disabled: b.disabled
808
808
  }, {
809
809
  default: p(() => [
810
- S(e.$slots, "option", { item: y }, () => [
811
- z(T(y[n.propMap.label]), 1)
810
+ S(e.$slots, "option", { item: b }, () => [
811
+ z(T(b[n.propMap.label]), 1)
812
812
  ], !0)
813
813
  ]),
814
814
  _: 2
@@ -820,10 +820,10 @@ function Mt(e, l, t, a, i, n) {
820
820
  _: 3
821
821
  }, 8, ["label", "label-options", "field", "onFieldChange", "label-width", "input-width", "direction", "label-align"]);
822
822
  }
823
- const Ce = /* @__PURE__ */ w(At, [["render", Mt], ["__scopeId", "data-v-ef8f7987"]]), Ht = {
823
+ const Se = /* @__PURE__ */ w(Mt, [["render", Rt], ["__scopeId", "data-v-ef8f7987"]]), It = {
824
824
  name: "TmInputFilter",
825
825
  components: {
826
- MoreIcon: at,
826
+ MoreIcon: ot,
827
827
  FormItemLayout: E
828
828
  },
829
829
  props: {
@@ -875,7 +875,7 @@ const Ce = /* @__PURE__ */ w(At, [["render", Mt], ["__scopeId", "data-v-ef8f7987
875
875
  return {
876
876
  t: H().t,
877
877
  getDefaultSize: k,
878
- getCompatSize: K,
878
+ getCompatSize: Q,
879
879
  exactValue: "",
880
880
  inputValue: "",
881
881
  isExactMode: !1,
@@ -937,10 +937,10 @@ const Ce = /* @__PURE__ */ w(At, [["render", Mt], ["__scopeId", "data-v-ef8f7987
937
937
  created() {
938
938
  this.updateCurrentOptionMultiple();
939
939
  }
940
- }, Rt = { class: "popover-content" }, It = { class: "popover-subtitle" }, Et = { class: "popover-footer" };
941
- function Wt(e, l, t, a, i, n) {
942
- const r = u("el-input"), c = u("el-button"), h = u("MoreIcon"), f = u("el-popover"), y = u("FormItemLayout");
943
- return o(), m(y, {
940
+ }, Et = { class: "popover-content" }, Wt = { class: "popover-subtitle" }, Nt = { class: "popover-footer" };
941
+ function Pt(e, i, t, a, l, n) {
942
+ const o = u("el-input"), d = u("el-button"), c = u("MoreIcon"), f = u("el-popover"), b = u("FormItemLayout");
943
+ return r(), m(b, {
944
944
  label: t.label,
945
945
  "label-options": t.labelOptions,
946
946
  field: t.field,
@@ -951,67 +951,67 @@ function Wt(e, l, t, a, i, n) {
951
951
  "label-align": t.labelAlign
952
952
  }, {
953
953
  default: p(() => [
954
- g(r, {
955
- modelValue: i.inputValue,
956
- "onUpdate:modelValue": l[1] || (l[1] = (V) => i.inputValue = V),
957
- size: i.getDefaultSize(),
954
+ g(o, {
955
+ modelValue: l.inputValue,
956
+ "onUpdate:modelValue": i[1] || (i[1] = (V) => l.inputValue = V),
957
+ size: l.getDefaultSize(),
958
958
  placeholder: t.placeholder,
959
- onKeyup: Ne(n.handleEnter, ["enter", "native"]),
959
+ onKeyup: Be(n.handleEnter, ["enter", "native"]),
960
960
  clearable: "",
961
961
  class: "tm-input"
962
- }, ye({ _: 2 }, [
962
+ }, Ce({ _: 2 }, [
963
963
  n.shouldShowMultiple ? {
964
964
  name: "append",
965
965
  fn: p(() => [
966
966
  g(f, {
967
- visible: i.isExactMode,
967
+ visible: l.isExactMode,
968
968
  placement: "bottom-end",
969
969
  width: 260,
970
970
  trigger: "click",
971
971
  "onUpdate:visible": n.handleVisibleChange
972
972
  }, {
973
973
  reference: p(() => [
974
- g(h, { style: { cursor: "pointer" } })
974
+ g(c, { style: { cursor: "pointer" } })
975
975
  ]),
976
976
  default: p(() => [
977
- v("div", Rt, [
978
- v("p", It, T(i.t("accurateSearchTips")), 1),
979
- g(r, {
980
- size: i.getDefaultSize(),
977
+ v("div", Et, [
978
+ v("p", Wt, T(l.t("accurateSearchTips")), 1),
979
+ g(o, {
980
+ size: l.getDefaultSize(),
981
981
  type: "textarea",
982
982
  rows: 8,
983
- modelValue: i.exactValue,
984
- "onUpdate:modelValue": l[0] || (l[0] = (V) => i.exactValue = V),
985
- placeholder: i.t("accurateSearchPlaceholder"),
983
+ modelValue: l.exactValue,
984
+ "onUpdate:modelValue": i[0] || (i[0] = (V) => l.exactValue = V),
985
+ placeholder: l.t("accurateSearchPlaceholder"),
986
986
  style: { "font-size": "12px" }
987
987
  }, null, 8, ["size", "modelValue", "placeholder"]),
988
- v("div", Et, [
989
- g(c, {
988
+ v("div", Nt, [
989
+ g(d, {
990
990
  style: { float: "left" },
991
- size: i.getCompatSize("mini"),
991
+ size: l.getCompatSize("mini"),
992
992
  onClick: n.handleClear
993
993
  }, {
994
994
  default: p(() => [
995
- z(T(i.t("clear")), 1)
995
+ z(T(l.t("clear")), 1)
996
996
  ]),
997
997
  _: 1
998
998
  }, 8, ["size", "onClick"]),
999
- g(c, {
1000
- size: i.getCompatSize("mini"),
999
+ g(d, {
1000
+ size: l.getCompatSize("mini"),
1001
1001
  onClick: n.handlePopoverClose
1002
1002
  }, {
1003
1003
  default: p(() => [
1004
- z(T(i.t("cancel")), 1)
1004
+ z(T(l.t("cancel")), 1)
1005
1005
  ]),
1006
1006
  _: 1
1007
1007
  }, 8, ["size", "onClick"]),
1008
- g(c, {
1008
+ g(d, {
1009
1009
  type: "primary",
1010
- size: i.getCompatSize("mini"),
1010
+ size: l.getCompatSize("mini"),
1011
1011
  onClick: n.handleExactSearch
1012
1012
  }, {
1013
1013
  default: p(() => [
1014
- z(T(i.t("search")), 1)
1014
+ z(T(l.t("search")), 1)
1015
1015
  ]),
1016
1016
  _: 1
1017
1017
  }, 8, ["size", "onClick"])
@@ -1028,7 +1028,7 @@ function Wt(e, l, t, a, i, n) {
1028
1028
  _: 1
1029
1029
  }, 8, ["label", "label-options", "field", "onFieldChange", "label-width", "input-width", "direction", "label-align"]);
1030
1030
  }
1031
- const _e = /* @__PURE__ */ w(Ht, [["render", Wt], ["__scopeId", "data-v-90ce9bc0"]]), { t: F } = H(), Nt = !1, Pt = !0, Bt = "modelValue", Ut = {
1031
+ const xe = /* @__PURE__ */ w(It, [["render", Pt], ["__scopeId", "data-v-90ce9bc0"]]), { t: F } = H(), Bt = !1, Ut = !0, jt = "modelValue", Jt = {
1032
1032
  name: "TmDateFilter",
1033
1033
  components: {
1034
1034
  FormItemLayout: E
@@ -1180,49 +1180,49 @@ const _e = /* @__PURE__ */ w(Ht, [["render", Wt], ["__scopeId", "data-v-90ce9bc0
1180
1180
  },
1181
1181
  computedPickerOptions() {
1182
1182
  const e = {};
1183
- if (this.pastOnly && (e.disabledDate = (l) => l.getTime() > Date.now()), ["daterange", "datetimerange"].includes(this.type)) {
1184
- const l = this.type === "datetimerange";
1183
+ if (this.pastOnly && (e.disabledDate = (i) => i.getTime() > Date.now()), ["daterange", "datetimerange"].includes(this.type)) {
1184
+ const i = this.type === "datetimerange";
1185
1185
  e.shortcuts = this.shortcuts.length > 0 ? this.shortcuts : [
1186
1186
  {
1187
1187
  text: F("today"),
1188
1188
  onClick(t) {
1189
- const a = /* @__PURE__ */ new Date(), i = /* @__PURE__ */ new Date();
1190
- l && (i.setHours(0, 0, 0, 0), a.setHours(23, 59, 59, 999)), t.$emit("pick", [i, a]);
1189
+ const a = /* @__PURE__ */ new Date(), l = /* @__PURE__ */ new Date();
1190
+ i && (l.setHours(0, 0, 0, 0), a.setHours(23, 59, 59, 999)), t.$emit("pick", [l, a]);
1191
1191
  }
1192
1192
  },
1193
1193
  {
1194
1194
  text: F("yesterday"),
1195
1195
  onClick(t) {
1196
- const a = /* @__PURE__ */ new Date(), i = /* @__PURE__ */ new Date();
1197
- i.setTime(i.getTime() - 3600 * 1e3 * 24), a.setTime(a.getTime() - 3600 * 1e3 * 24), l && (i.setHours(0, 0, 0, 0), a.setHours(23, 59, 59, 999)), t.$emit("pick", [i, a]);
1196
+ const a = /* @__PURE__ */ new Date(), l = /* @__PURE__ */ new Date();
1197
+ l.setTime(l.getTime() - 3600 * 1e3 * 24), a.setTime(a.getTime() - 3600 * 1e3 * 24), i && (l.setHours(0, 0, 0, 0), a.setHours(23, 59, 59, 999)), t.$emit("pick", [l, a]);
1198
1198
  }
1199
1199
  },
1200
1200
  {
1201
1201
  text: F("last7days"),
1202
1202
  onClick(t) {
1203
- const a = /* @__PURE__ */ new Date(), i = /* @__PURE__ */ new Date();
1204
- i.setTime(i.getTime() - 3600 * 1e3 * 24 * 7), l && (i.setHours(0, 0, 0, 0), a.setHours(23, 59, 59, 999)), t.$emit("pick", [i, a]);
1203
+ const a = /* @__PURE__ */ new Date(), l = /* @__PURE__ */ new Date();
1204
+ l.setTime(l.getTime() - 3600 * 1e3 * 24 * 7), i && (l.setHours(0, 0, 0, 0), a.setHours(23, 59, 59, 999)), t.$emit("pick", [l, a]);
1205
1205
  }
1206
1206
  },
1207
1207
  {
1208
1208
  text: F("last30days"),
1209
1209
  onClick(t) {
1210
- const a = /* @__PURE__ */ new Date(), i = /* @__PURE__ */ new Date();
1211
- i.setTime(i.getTime() - 3600 * 1e3 * 24 * 30), l && (i.setHours(0, 0, 0, 0), a.setHours(23, 59, 59, 999)), t.$emit("pick", [i, a]);
1210
+ const a = /* @__PURE__ */ new Date(), l = /* @__PURE__ */ new Date();
1211
+ l.setTime(l.getTime() - 3600 * 1e3 * 24 * 30), i && (l.setHours(0, 0, 0, 0), a.setHours(23, 59, 59, 999)), t.$emit("pick", [l, a]);
1212
1212
  }
1213
1213
  },
1214
1214
  {
1215
1215
  text: F("thisMonth"),
1216
1216
  onClick(t) {
1217
- const a = /* @__PURE__ */ new Date(), i = /* @__PURE__ */ new Date();
1218
- i.setDate(1), l && (i.setHours(0, 0, 0, 0), a.setHours(23, 59, 59, 999)), t.$emit("pick", [i, a]);
1217
+ const a = /* @__PURE__ */ new Date(), l = /* @__PURE__ */ new Date();
1218
+ l.setDate(1), i && (l.setHours(0, 0, 0, 0), a.setHours(23, 59, 59, 999)), t.$emit("pick", [l, a]);
1219
1219
  }
1220
1220
  },
1221
1221
  {
1222
1222
  text: F("lastMonth"),
1223
1223
  onClick(t) {
1224
- const a = /* @__PURE__ */ new Date(), i = /* @__PURE__ */ new Date();
1225
- i.setMonth(i.getMonth() - 1), i.setDate(1), a.setDate(0), l && (i.setHours(0, 0, 0, 0), a.setHours(23, 59, 59, 999)), t.$emit("pick", [i, a]);
1224
+ const a = /* @__PURE__ */ new Date(), l = /* @__PURE__ */ new Date();
1225
+ l.setMonth(l.getMonth() - 1), l.setDate(1), a.setDate(0), i && (l.setHours(0, 0, 0, 0), a.setHours(23, 59, 59, 999)), t.$emit("pick", [l, a]);
1226
1226
  }
1227
1227
  }
1228
1228
  ];
@@ -1239,43 +1239,43 @@ const _e = /* @__PURE__ */ w(Ht, [["render", Wt], ["__scopeId", "data-v-90ce9bc0
1239
1239
  {
1240
1240
  text: F("today"),
1241
1241
  value: () => {
1242
- const l = /* @__PURE__ */ new Date(), t = /* @__PURE__ */ new Date();
1243
- return e && (t.setHours(0, 0, 0, 0), l.setHours(23, 59, 59, 999)), [t, l];
1242
+ const i = /* @__PURE__ */ new Date(), t = /* @__PURE__ */ new Date();
1243
+ return e && (t.setHours(0, 0, 0, 0), i.setHours(23, 59, 59, 999)), [t, i];
1244
1244
  }
1245
1245
  },
1246
1246
  {
1247
1247
  text: F("yesterday"),
1248
1248
  value: () => {
1249
- const l = /* @__PURE__ */ new Date(), t = /* @__PURE__ */ new Date();
1250
- return t.setTime(t.getTime() - 3600 * 1e3 * 24), l.setTime(l.getTime() - 3600 * 1e3 * 24), e && (t.setHours(0, 0, 0, 0), l.setHours(23, 59, 59, 999)), [t, l];
1249
+ const i = /* @__PURE__ */ new Date(), t = /* @__PURE__ */ new Date();
1250
+ return t.setTime(t.getTime() - 3600 * 1e3 * 24), i.setTime(i.getTime() - 3600 * 1e3 * 24), e && (t.setHours(0, 0, 0, 0), i.setHours(23, 59, 59, 999)), [t, i];
1251
1251
  }
1252
1252
  },
1253
1253
  {
1254
1254
  text: F("last7days"),
1255
1255
  value: () => {
1256
- const l = /* @__PURE__ */ new Date(), t = /* @__PURE__ */ new Date();
1257
- return t.setTime(t.getTime() - 3600 * 1e3 * 24 * 7), e && (t.setHours(0, 0, 0, 0), l.setHours(23, 59, 59, 999)), [t, l];
1256
+ const i = /* @__PURE__ */ new Date(), t = /* @__PURE__ */ new Date();
1257
+ return t.setTime(t.getTime() - 3600 * 1e3 * 24 * 7), e && (t.setHours(0, 0, 0, 0), i.setHours(23, 59, 59, 999)), [t, i];
1258
1258
  }
1259
1259
  },
1260
1260
  {
1261
1261
  text: F("last30days"),
1262
1262
  value: () => {
1263
- const l = /* @__PURE__ */ new Date(), t = /* @__PURE__ */ new Date();
1264
- return t.setTime(t.getTime() - 3600 * 1e3 * 24 * 30), e && (t.setHours(0, 0, 0, 0), l.setHours(23, 59, 59, 999)), [t, l];
1263
+ const i = /* @__PURE__ */ new Date(), t = /* @__PURE__ */ new Date();
1264
+ return t.setTime(t.getTime() - 3600 * 1e3 * 24 * 30), e && (t.setHours(0, 0, 0, 0), i.setHours(23, 59, 59, 999)), [t, i];
1265
1265
  }
1266
1266
  },
1267
1267
  {
1268
1268
  text: F("thisMonth"),
1269
1269
  value: () => {
1270
- const l = /* @__PURE__ */ new Date(), t = /* @__PURE__ */ new Date();
1271
- return t.setDate(1), e && (t.setHours(0, 0, 0, 0), l.setHours(23, 59, 59, 999)), [t, l];
1270
+ const i = /* @__PURE__ */ new Date(), t = /* @__PURE__ */ new Date();
1271
+ return t.setDate(1), e && (t.setHours(0, 0, 0, 0), i.setHours(23, 59, 59, 999)), [t, i];
1272
1272
  }
1273
1273
  },
1274
1274
  {
1275
1275
  text: F("lastMonth"),
1276
1276
  value: () => {
1277
- const l = /* @__PURE__ */ new Date(), t = /* @__PURE__ */ new Date();
1278
- return t.setMonth(t.getMonth() - 1), t.setDate(1), l.setDate(0), e && (t.setHours(0, 0, 0, 0), l.setHours(23, 59, 59, 999)), [t, l];
1277
+ const i = /* @__PURE__ */ new Date(), t = /* @__PURE__ */ new Date();
1278
+ return t.setMonth(t.getMonth() - 1), t.setDate(1), i.setDate(0), e && (t.setHours(0, 0, 0, 0), i.setHours(23, 59, 59, 999)), [t, i];
1279
1279
  }
1280
1280
  }
1281
1281
  ];
@@ -1291,29 +1291,29 @@ const _e = /* @__PURE__ */ w(Ht, [["render", Wt], ["__scopeId", "data-v-90ce9bc0
1291
1291
  return e;
1292
1292
  if (e) {
1293
1293
  if (this.type === "datetimerange" && Array.isArray(e))
1294
- return e.map((l) => {
1295
- if (typeof l == "string") {
1296
- const t = /* @__PURE__ */ new Date(), [a, i, n] = l.split(":").map(Number);
1294
+ return e.map((i) => {
1295
+ if (typeof i == "string") {
1296
+ const t = /* @__PURE__ */ new Date(), [a, l, n] = i.split(":").map(Number);
1297
1297
  return new Date(
1298
1298
  t.getFullYear(),
1299
1299
  t.getMonth(),
1300
1300
  t.getDate(),
1301
1301
  a,
1302
- i,
1302
+ l,
1303
1303
  n || 0
1304
1304
  );
1305
1305
  }
1306
- return l;
1306
+ return i;
1307
1307
  });
1308
1308
  if (this.type === "datetime" && typeof e == "string") {
1309
- const l = /* @__PURE__ */ new Date(), [t, a, i] = e.split(":").map(Number);
1309
+ const i = /* @__PURE__ */ new Date(), [t, a, l] = e.split(":").map(Number);
1310
1310
  return new Date(
1311
- l.getFullYear(),
1312
- l.getMonth(),
1313
- l.getDate(),
1311
+ i.getFullYear(),
1312
+ i.getMonth(),
1313
+ i.getDate(),
1314
1314
  t,
1315
1315
  a,
1316
- i || 0
1316
+ l || 0
1317
1317
  );
1318
1318
  }
1319
1319
  return e;
@@ -1326,10 +1326,10 @@ const _e = /* @__PURE__ */ w(Ht, [["render", Wt], ["__scopeId", "data-v-90ce9bc0
1326
1326
  data() {
1327
1327
  return {
1328
1328
  t: F,
1329
- isVue2: Nt,
1330
- isVue3: Pt,
1329
+ isVue2: Bt,
1330
+ isVue3: Ut,
1331
1331
  getDefaultSize: k,
1332
- valueField: Bt
1332
+ valueField: jt
1333
1333
  };
1334
1334
  },
1335
1335
  methods: {
@@ -1351,9 +1351,9 @@ const _e = /* @__PURE__ */ w(Ht, [["render", Wt], ["__scopeId", "data-v-90ce9bc0
1351
1351
  }
1352
1352
  }
1353
1353
  };
1354
- function jt(e, l, t, a, i, n) {
1355
- const r = u("el-date-picker"), c = u("FormItemLayout");
1356
- return o(), m(c, {
1354
+ function Kt(e, i, t, a, l, n) {
1355
+ const o = u("el-date-picker"), d = u("FormItemLayout");
1356
+ return r(), m(d, {
1357
1357
  label: t.label,
1358
1358
  "label-options": t.labelOptions,
1359
1359
  field: t.field,
@@ -1364,10 +1364,10 @@ function jt(e, l, t, a, i, n) {
1364
1364
  "label-align": t.labelAlign
1365
1365
  }, {
1366
1366
  default: p(() => [
1367
- g(r, {
1367
+ g(o, {
1368
1368
  "model-value": n.dateValue,
1369
1369
  type: t.type,
1370
- size: i.getDefaultSize(),
1370
+ size: l.getDefaultSize(),
1371
1371
  "range-separator": t.rangeSeparator,
1372
1372
  "start-placeholder": n.computedStartPlaceholder,
1373
1373
  "end-placeholder": n.computedEndPlaceholder,
@@ -1394,7 +1394,7 @@ function jt(e, l, t, a, i, n) {
1394
1394
  _: 1
1395
1395
  }, 8, ["label", "label-options", "field", "onFieldChange", "label-width", "input-width", "direction", "label-align"]);
1396
1396
  }
1397
- const Se = /* @__PURE__ */ w(Ut, [["render", jt], ["__scopeId", "data-v-cd8a2978"]]), Jt = !1, Kt = {
1397
+ const Te = /* @__PURE__ */ w(Jt, [["render", Kt], ["__scopeId", "data-v-cd8a2978"]]), Qt = !1, qt = {
1398
1398
  name: "TmCascaderFilter",
1399
1399
  components: {
1400
1400
  FormItemLayout: E
@@ -1463,7 +1463,7 @@ const Se = /* @__PURE__ */ w(Ut, [["render", jt], ["__scopeId", "data-v-cd8a2978
1463
1463
  },
1464
1464
  data() {
1465
1465
  return {
1466
- isVue2: Jt,
1466
+ isVue2: Qt,
1467
1467
  getDefaultSize: k,
1468
1468
  selectedValue: this.value,
1469
1469
  optionsList: [],
@@ -1506,20 +1506,20 @@ const Se = /* @__PURE__ */ w(Ut, [["render", jt], ["__scopeId", "data-v-cd8a2978
1506
1506
  if (typeof e == "function")
1507
1507
  try {
1508
1508
  this.loading = !0;
1509
- const l = await e();
1510
- Array.isArray(l) && (this.optionsList = l);
1511
- } catch (l) {
1512
- console.error(l);
1509
+ const i = await e();
1510
+ Array.isArray(i) && (this.optionsList = i);
1511
+ } catch (i) {
1512
+ console.error(i);
1513
1513
  } finally {
1514
1514
  this.loading = !1;
1515
1515
  }
1516
1516
  else Array.isArray(e) && (this.optionsList = e);
1517
1517
  }
1518
1518
  }
1519
- }, Qt = { class: "cascader" };
1520
- function qt(e, l, t, a, i, n) {
1521
- const r = u("el-cascader"), c = u("FormItemLayout");
1522
- return o(), m(c, {
1519
+ }, Yt = { class: "cascader" };
1520
+ function Gt(e, i, t, a, l, n) {
1521
+ const o = u("el-cascader"), d = u("FormItemLayout");
1522
+ return r(), m(d, {
1523
1523
  label: t.label,
1524
1524
  "label-width": t.labelWidth,
1525
1525
  "input-width": t.inputWidth,
@@ -1527,25 +1527,25 @@ function qt(e, l, t, a, i, n) {
1527
1527
  "label-align": t.labelAlign
1528
1528
  }, {
1529
1529
  default: p(() => [
1530
- v("div", Qt, [
1531
- g(r, _({
1530
+ v("div", Yt, [
1531
+ g(o, _({
1532
1532
  ref: "cascader",
1533
- modelValue: i.selectedValue,
1534
- "onUpdate:modelValue": l[0] || (l[0] = (h) => i.selectedValue = h)
1533
+ modelValue: l.selectedValue,
1534
+ "onUpdate:modelValue": i[0] || (i[0] = (c) => l.selectedValue = c)
1535
1535
  }, I(x({}, e.$attrs), {
1536
- size: i.getDefaultSize(),
1536
+ size: l.getDefaultSize(),
1537
1537
  filterable: t.filterable,
1538
1538
  clearable: t.clearable,
1539
1539
  collapseTags: t.collapseTags,
1540
1540
  collapseTagsTooltip: t.collapseTagsTooltip,
1541
1541
  props: n.cascaderProps,
1542
1542
  placeholder: t.placeholder,
1543
- options: i.optionsList,
1544
- loading: i.loading
1545
- }), M(i.isVue2 ? e.$listeners : {})), {
1546
- default: p(({ node: h, data: f }) => [
1543
+ options: l.optionsList,
1544
+ loading: l.loading
1545
+ }), M(l.isVue2 ? e.$listeners : {})), {
1546
+ default: p(({ node: c, data: f }) => [
1547
1547
  S(e.$slots, "default", {
1548
- node: h,
1548
+ node: c,
1549
1549
  data: f
1550
1550
  }, () => [
1551
1551
  v("span", null, T(f[n.propMap.label]), 1)
@@ -1558,7 +1558,7 @@ function qt(e, l, t, a, i, n) {
1558
1558
  _: 3
1559
1559
  }, 8, ["label", "label-width", "input-width", "direction", "label-align"]);
1560
1560
  }
1561
- const xe = /* @__PURE__ */ w(Kt, [["render", qt], ["__scopeId", "data-v-7c915d17"]]), Yt = !1, Gt = !0, Xt = {
1561
+ const we = /* @__PURE__ */ w(qt, [["render", Gt], ["__scopeId", "data-v-7c915d17"]]), Xt = !1, Zt = !0, $t = {
1562
1562
  name: "TmRadioFilter",
1563
1563
  components: {
1564
1564
  FormItemLayout: E
@@ -1614,8 +1614,8 @@ const xe = /* @__PURE__ */ w(Kt, [["render", qt], ["__scopeId", "data-v-7c915d17
1614
1614
  },
1615
1615
  data() {
1616
1616
  return {
1617
- isVue2: Yt,
1618
- isVue3: Gt,
1617
+ isVue2: Xt,
1618
+ isVue3: Zt,
1619
1619
  getDefaultSize: k,
1620
1620
  selectedValue: this.value,
1621
1621
  optionsList: [],
@@ -1652,10 +1652,10 @@ const xe = /* @__PURE__ */ w(Kt, [["render", qt], ["__scopeId", "data-v-7c915d17
1652
1652
  if (typeof e == "function")
1653
1653
  try {
1654
1654
  this.loading = !0;
1655
- const l = await e();
1656
- Array.isArray(l) && (this.optionsList = l);
1657
- } catch (l) {
1658
- console.error(l);
1655
+ const i = await e();
1656
+ Array.isArray(i) && (this.optionsList = i);
1657
+ } catch (i) {
1658
+ console.error(i);
1659
1659
  } finally {
1660
1660
  this.loading = !1;
1661
1661
  }
@@ -1663,9 +1663,9 @@ const xe = /* @__PURE__ */ w(Kt, [["render", qt], ["__scopeId", "data-v-7c915d17
1663
1663
  }
1664
1664
  }
1665
1665
  };
1666
- function Zt(e, l, t, a, i, n) {
1667
- const r = u("el-radio-button"), c = u("el-radio-group"), h = u("FormItemLayout");
1668
- return o(), m(h, {
1666
+ function ei(e, i, t, a, l, n) {
1667
+ const o = u("el-radio-button"), d = u("el-radio-group"), c = u("FormItemLayout");
1668
+ return r(), m(c, {
1669
1669
  label: t.label,
1670
1670
  "label-width": t.labelWidth,
1671
1671
  "input-width": t.inputWidth,
@@ -1673,16 +1673,16 @@ function Zt(e, l, t, a, i, n) {
1673
1673
  "label-align": t.labelAlign
1674
1674
  }, {
1675
1675
  default: p(() => [
1676
- g(c, _({
1676
+ g(d, _({
1677
1677
  ref: "radioGroup",
1678
- modelValue: i.selectedValue,
1679
- "onUpdate:modelValue": l[0] || (l[0] = (f) => i.selectedValue = f)
1678
+ modelValue: l.selectedValue,
1679
+ "onUpdate:modelValue": i[0] || (i[0] = (f) => l.selectedValue = f)
1680
1680
  }, I(x({}, e.$attrs), {
1681
- size: i.getDefaultSize()
1682
- }), { class: "radio-group" }, M(i.isVue2 ? e.$listeners : {})), {
1681
+ size: l.getDefaultSize()
1682
+ }), { class: "radio-group" }, M(l.isVue2 ? e.$listeners : {})), {
1683
1683
  default: p(() => [
1684
- e.$slots.default ? S(e.$slots, "default", { key: 0 }, void 0, !0) : (o(!0), b(L, { key: 1 }, A(i.optionsList, (f) => (o(), m(r, _({ ref_for: !0 }, {
1685
- [i.isVue3 ? "value" : "label"]: f[n.propMap.value],
1684
+ e.$slots.default ? S(e.$slots, "default", { key: 0 }, void 0, !0) : (r(!0), y(L, { key: 1 }, A(l.optionsList, (f) => (r(), m(o, _({ ref_for: !0 }, {
1685
+ [l.isVue3 ? "value" : "label"]: f[n.propMap.value],
1686
1686
  disabled: f.disabled
1687
1687
  }, {
1688
1688
  style: { flex: "1" },
@@ -1702,7 +1702,7 @@ function Zt(e, l, t, a, i, n) {
1702
1702
  _: 3
1703
1703
  }, 8, ["label", "label-width", "input-width", "direction", "label-align"]);
1704
1704
  }
1705
- const Te = /* @__PURE__ */ w(Xt, [["render", Zt], ["__scopeId", "data-v-210a44fd"]]), $t = !1, el = !0, tl = {
1705
+ const Ve = /* @__PURE__ */ w($t, [["render", ei], ["__scopeId", "data-v-210a44fd"]]), ti = !1, ii = !0, li = {
1706
1706
  name: "TmCheckboxFilter",
1707
1707
  components: {
1708
1708
  FormItemLayout: E
@@ -1753,8 +1753,8 @@ const Te = /* @__PURE__ */ w(Xt, [["render", Zt], ["__scopeId", "data-v-210a44fd
1753
1753
  },
1754
1754
  data() {
1755
1755
  return {
1756
- isVue2: $t,
1757
- isVue3: el,
1756
+ isVue2: ti,
1757
+ isVue3: ii,
1758
1758
  getDefaultSize: k,
1759
1759
  selectedValue: this.value || [],
1760
1760
  optionsList: [],
@@ -1791,20 +1791,20 @@ const Te = /* @__PURE__ */ w(Xt, [["render", Zt], ["__scopeId", "data-v-210a44fd
1791
1791
  if (typeof e == "function")
1792
1792
  try {
1793
1793
  this.loading = !0;
1794
- const l = await e();
1795
- Array.isArray(l) && (this.optionsList = l);
1796
- } catch (l) {
1797
- console.error(l);
1794
+ const i = await e();
1795
+ Array.isArray(i) && (this.optionsList = i);
1796
+ } catch (i) {
1797
+ console.error(i);
1798
1798
  } finally {
1799
1799
  this.loading = !1;
1800
1800
  }
1801
1801
  else Array.isArray(e) && (this.optionsList = e);
1802
1802
  }
1803
1803
  }
1804
- }, ll = { class: "checkbox-content" };
1805
- function il(e, l, t, a, i, n) {
1806
- const r = u("el-checkbox-button"), c = u("el-checkbox-group"), h = u("FormItemLayout");
1807
- return o(), m(h, {
1804
+ }, ni = { class: "checkbox-content" };
1805
+ function ai(e, i, t, a, l, n) {
1806
+ const o = u("el-checkbox-button"), d = u("el-checkbox-group"), c = u("FormItemLayout");
1807
+ return r(), m(c, {
1808
1808
  label: t.label,
1809
1809
  "label-width": t.labelWidth,
1810
1810
  "input-width": t.inputWidth,
@@ -1812,19 +1812,19 @@ function il(e, l, t, a, i, n) {
1812
1812
  "label-align": t.labelAlign
1813
1813
  }, {
1814
1814
  default: p(() => [
1815
- v("div", ll, [
1816
- g(c, _({
1815
+ v("div", ni, [
1816
+ g(d, _({
1817
1817
  ref: "checkboxGroup",
1818
- modelValue: i.selectedValue,
1819
- "onUpdate:modelValue": l[0] || (l[0] = (f) => i.selectedValue = f)
1818
+ modelValue: l.selectedValue,
1819
+ "onUpdate:modelValue": i[0] || (i[0] = (f) => l.selectedValue = f)
1820
1820
  }, I(x({}, e.$attrs), {
1821
- size: i.getDefaultSize()
1822
- }), M(i.isVue2 ? e.$listeners : {})), {
1821
+ size: l.getDefaultSize()
1822
+ }), M(l.isVue2 ? e.$listeners : {})), {
1823
1823
  default: p(() => [
1824
- e.$slots.default ? S(e.$slots, "default", { key: 0 }, void 0, !0) : (o(!0), b(L, { key: 1 }, A(i.optionsList, (f) => (o(), m(r, _({
1824
+ e.$slots.default ? S(e.$slots, "default", { key: 0 }, void 0, !0) : (r(!0), y(L, { key: 1 }, A(l.optionsList, (f) => (r(), m(o, _({
1825
1825
  key: f[n.propMap.value]
1826
1826
  }, { ref_for: !0 }, {
1827
- [i.isVue3 ? "value" : "label"]: f[n.propMap.value],
1827
+ [l.isVue3 ? "value" : "label"]: f[n.propMap.value],
1828
1828
  disabled: f.disabled
1829
1829
  }, { style: { flex: "1" } }), {
1830
1830
  default: p(() => [
@@ -1842,7 +1842,7 @@ function il(e, l, t, a, i, n) {
1842
1842
  _: 3
1843
1843
  }, 8, ["label", "label-width", "input-width", "direction", "label-align"]);
1844
1844
  }
1845
- const we = /* @__PURE__ */ w(tl, [["render", il], ["__scopeId", "data-v-39ef0641"]]), nl = !1, al = {
1845
+ const Fe = /* @__PURE__ */ w(li, [["render", ai], ["__scopeId", "data-v-39ef0641"]]), si = !1, oi = {
1846
1846
  name: "TmSwitchFilter",
1847
1847
  components: {
1848
1848
  FormItemLayout: E
@@ -1878,7 +1878,7 @@ const we = /* @__PURE__ */ w(tl, [["render", il], ["__scopeId", "data-v-39ef0641
1878
1878
  },
1879
1879
  data() {
1880
1880
  return {
1881
- isVue2: nl,
1881
+ isVue2: si,
1882
1882
  getDefaultSize: k,
1883
1883
  switchValue: this.value
1884
1884
  };
@@ -1894,10 +1894,10 @@ const we = /* @__PURE__ */ w(tl, [["render", il], ["__scopeId", "data-v-39ef0641
1894
1894
  this.$emit("input", e), this.$emit("change", e);
1895
1895
  }
1896
1896
  }
1897
- }, sl = { class: "switch-content" };
1898
- function rl(e, l, t, a, i, n) {
1899
- const r = u("el-switch"), c = u("FormItemLayout");
1900
- return o(), m(c, {
1897
+ }, ri = { class: "switch-content" };
1898
+ function ui(e, i, t, a, l, n) {
1899
+ const o = u("el-switch"), d = u("FormItemLayout");
1900
+ return r(), m(d, {
1901
1901
  label: t.label,
1902
1902
  "label-width": t.labelWidth,
1903
1903
  "input-width": t.inputWidth,
@@ -1905,24 +1905,24 @@ function rl(e, l, t, a, i, n) {
1905
1905
  "label-align": t.labelAlign
1906
1906
  }, {
1907
1907
  default: p(() => [
1908
- v("div", sl, [
1909
- g(r, _({
1908
+ v("div", ri, [
1909
+ g(o, _({
1910
1910
  ref: "switch",
1911
- modelValue: i.switchValue,
1912
- "onUpdate:modelValue": l[0] || (l[0] = (h) => i.switchValue = h)
1913
- }, e.$attrs, M(i.isVue2 ? e.$listeners : {}), {
1914
- size: i.getDefaultSize()
1911
+ modelValue: l.switchValue,
1912
+ "onUpdate:modelValue": i[0] || (i[0] = (c) => l.switchValue = c)
1913
+ }, e.$attrs, M(l.isVue2 ? e.$listeners : {}), {
1914
+ size: l.getDefaultSize()
1915
1915
  }), null, 16, ["modelValue", "size"])
1916
1916
  ])
1917
1917
  ]),
1918
1918
  _: 1
1919
1919
  }, 8, ["label", "label-width", "input-width", "direction", "label-align"]);
1920
1920
  }
1921
- const Ve = /* @__PURE__ */ w(al, [["render", rl], ["__scopeId", "data-v-7455db21"]]), ol = !1, ul = !0, ge = "modelValue", te = "update:modelValue", dl = {
1921
+ const ze = /* @__PURE__ */ w(oi, [["render", ui], ["__scopeId", "data-v-7455db21"]]), di = !1, hi = !0, ge = "modelValue", ie = "update:modelValue", ci = {
1922
1922
  name: "TmTextareaFilter",
1923
1923
  components: {
1924
1924
  FormItemLayout: E,
1925
- CircleClose: Je
1925
+ CircleClose: Qe
1926
1926
  },
1927
1927
  props: {
1928
1928
  label: {
@@ -2012,8 +2012,8 @@ const Ve = /* @__PURE__ */ w(al, [["render", rl], ["__scopeId", "data-v-7455db21
2012
2012
  },
2013
2013
  data() {
2014
2014
  return {
2015
- isVue2: ol,
2016
- isVue3: ul,
2015
+ isVue2: di,
2016
+ isVue3: hi,
2017
2017
  getDefaultSize: k,
2018
2018
  inputValue: this.value
2019
2019
  };
@@ -2031,12 +2031,12 @@ const Ve = /* @__PURE__ */ w(al, [["render", rl], ["__scopeId", "data-v-7455db21
2031
2031
  }
2032
2032
  },
2033
2033
  inputValue(e) {
2034
- this.$emit(te, e);
2034
+ this.$emit(ie, e);
2035
2035
  }
2036
2036
  },
2037
2037
  methods: {
2038
2038
  handleInput(e) {
2039
- this.inputValue = e, this.$emit(te, e);
2039
+ this.inputValue = e, this.$emit(ie, e);
2040
2040
  },
2041
2041
  handleChange(e) {
2042
2042
  this.$emit("change", e);
@@ -2048,7 +2048,7 @@ const Ve = /* @__PURE__ */ w(al, [["render", rl], ["__scopeId", "data-v-7455db21
2048
2048
  this.$emit("blur", e);
2049
2049
  },
2050
2050
  handleClear() {
2051
- this.inputValue = "", this.$emit(te, ""), this.$emit("clear");
2051
+ this.inputValue = "", this.$emit(ie, ""), this.$emit("clear");
2052
2052
  },
2053
2053
  handleFieldChange(e) {
2054
2054
  this.$emit("field-change", e);
@@ -2064,10 +2064,10 @@ const Ve = /* @__PURE__ */ w(al, [["render", rl], ["__scopeId", "data-v-7455db21
2064
2064
  this.$refs.textarea.select();
2065
2065
  }
2066
2066
  }
2067
- }, hl = { class: "textarea" };
2068
- function cl(e, l, t, a, i, n) {
2069
- const r = u("el-input"), c = u("CircleClose"), h = u("el-icon"), f = u("FormItemLayout");
2070
- return o(), m(f, {
2067
+ }, fi = { class: "textarea" };
2068
+ function pi(e, i, t, a, l, n) {
2069
+ const o = u("el-input"), d = u("CircleClose"), c = u("el-icon"), f = u("FormItemLayout");
2070
+ return r(), m(f, {
2071
2071
  label: t.label,
2072
2072
  "label-options": t.labelOptions,
2073
2073
  field: t.field,
@@ -2078,12 +2078,12 @@ function cl(e, l, t, a, i, n) {
2078
2078
  "label-align": t.labelAlign
2079
2079
  }, {
2080
2080
  default: p(() => [
2081
- v("div", hl, [
2082
- g(r, _({
2081
+ v("div", fi, [
2082
+ g(o, _({
2083
2083
  ref: "textarea",
2084
- modelValue: i.inputValue,
2085
- "onUpdate:modelValue": l[0] || (l[0] = (y) => i.inputValue = y),
2086
- size: i.getDefaultSize(),
2084
+ modelValue: l.inputValue,
2085
+ "onUpdate:modelValue": i[0] || (i[0] = (b) => l.inputValue = b),
2086
+ size: l.getDefaultSize(),
2087
2087
  placeholder: t.placeholder,
2088
2088
  type: "textarea",
2089
2089
  autosize: t.autosize,
@@ -2095,7 +2095,7 @@ function cl(e, l, t, a, i, n) {
2095
2095
  resize: t.resize,
2096
2096
  tabindex: t.tabindex,
2097
2097
  "validate-event": t.validateEvent
2098
- }, e.$attrs, M(i.isVue2 ? e.$listeners : {}), {
2098
+ }, e.$attrs, M(l.isVue2 ? e.$listeners : {}), {
2099
2099
  onInput: n.handleInput,
2100
2100
  onChange: n.handleChange,
2101
2101
  onFocus: n.handleFocus,
@@ -2103,13 +2103,13 @@ function cl(e, l, t, a, i, n) {
2103
2103
  onClear: n.handleClear,
2104
2104
  class: "textarea-input"
2105
2105
  }), null, 16, ["modelValue", "size", "placeholder", "autosize", "maxlength", "minlength", "show-word-limit", "readonly", "disabled", "resize", "tabindex", "validate-event", "onInput", "onChange", "onFocus", "onBlur", "onClear"]),
2106
- t.clearable && i.inputValue ? (o(), m(h, {
2106
+ t.clearable && l.inputValue ? (r(), m(c, {
2107
2107
  key: 0,
2108
2108
  class: "textarea-clear-icon",
2109
2109
  onClick: n.handleClear
2110
2110
  }, {
2111
2111
  default: p(() => [
2112
- g(c)
2112
+ g(d)
2113
2113
  ]),
2114
2114
  _: 1
2115
2115
  }, 8, ["onClick"])) : C("", !0)
@@ -2118,7 +2118,7 @@ function cl(e, l, t, a, i, n) {
2118
2118
  _: 1
2119
2119
  }, 8, ["label", "label-options", "field", "onFieldChange", "label-width", "input-width", "direction", "label-align"]);
2120
2120
  }
2121
- const Fe = /* @__PURE__ */ w(dl, [["render", cl], ["__scopeId", "data-v-9b0ae8e6"]]), fl = {
2121
+ const Le = /* @__PURE__ */ w(ci, [["render", pi], ["__scopeId", "data-v-9b0ae8e6"]]), mi = {
2122
2122
  name: "DynamicSlot",
2123
2123
  props: {
2124
2124
  name: {
@@ -2131,20 +2131,20 @@ const Fe = /* @__PURE__ */ w(dl, [["render", cl], ["__scopeId", "data-v-9b0ae8e6
2131
2131
  }
2132
2132
  },
2133
2133
  render(e) {
2134
- var i;
2135
- const l = (n) => {
2136
- var r;
2137
- return n ? (r = n.$slots) == null ? void 0 : r[this.name] : null;
2134
+ var l;
2135
+ const i = (n) => {
2136
+ var o;
2137
+ return n ? (o = n.$slots) == null ? void 0 : o[this.name] : null;
2138
2138
  }, t = (n) => {
2139
- var r, c, h, f;
2140
- return n ? ((c = (r = n.$) == null ? void 0 : r.type) == null ? void 0 : c.name) === "TmTable" || ((f = (h = n.$) == null ? void 0 : h.type) == null ? void 0 : f.__name) === "TmTable" : !1;
2139
+ var o, d, c, f;
2140
+ return n ? ((d = (o = n.$) == null ? void 0 : o.type) == null ? void 0 : d.name) === "TmTable" || ((f = (c = n.$) == null ? void 0 : c.type) == null ? void 0 : f.__name) === "TmTable" : !1;
2141
2141
  };
2142
- let a = l(this.$parent);
2142
+ let a = i(this.$parent);
2143
2143
  if (!a) {
2144
- let n = (i = this.$parent) == null ? void 0 : i.$parent;
2144
+ let n = (l = this.$parent) == null ? void 0 : l.$parent;
2145
2145
  for (; n && !a; ) {
2146
2146
  if (t(n)) {
2147
- a = l(n);
2147
+ a = i(n);
2148
2148
  break;
2149
2149
  }
2150
2150
  n = n.$parent;
@@ -2152,7 +2152,7 @@ const Fe = /* @__PURE__ */ w(dl, [["render", cl], ["__scopeId", "data-v-9b0ae8e6
2152
2152
  }
2153
2153
  return a ? typeof a == "function" ? a(this.slotProps) : a : null;
2154
2154
  }
2155
- }, { t: pl } = H(), ml = !1, gl = !0, bl = [
2155
+ }, { t: gi } = H(), bi = !1, yi = !0, vi = [
2156
2156
  "date",
2157
2157
  "daterange",
2158
2158
  "datetime",
@@ -2164,18 +2164,18 @@ const Fe = /* @__PURE__ */ w(dl, [["render", cl], ["__scopeId", "data-v-9b0ae8e6
2164
2164
  "years",
2165
2165
  "week",
2166
2166
  "monthrange"
2167
- ], yl = {
2167
+ ], Ci = {
2168
2168
  name: "TmTableSearch",
2169
2169
  components: {
2170
- TmSelect: Ce,
2171
- TmInput: _e,
2172
- TmDate: Se,
2173
- TmCascader: xe,
2174
- TmRadio: Te,
2175
- TmCheckbox: we,
2176
- TmSwitch: Ve,
2177
- TmTextarea: Fe,
2178
- DynamicSlot: fl
2170
+ TmSelect: Se,
2171
+ TmInput: xe,
2172
+ TmDate: Te,
2173
+ TmCascader: we,
2174
+ TmRadio: Ve,
2175
+ TmCheckbox: Fe,
2176
+ TmSwitch: ze,
2177
+ TmTextarea: Le,
2178
+ DynamicSlot: mi
2179
2179
  },
2180
2180
  props: {
2181
2181
  disabled: {
@@ -2212,12 +2212,12 @@ const Fe = /* @__PURE__ */ w(dl, [["render", cl], ["__scopeId", "data-v-9b0ae8e6
2212
2212
  },
2213
2213
  data() {
2214
2214
  return {
2215
- t: pl,
2216
- isVue2: ml,
2217
- isVue3: gl,
2218
- getCompatSize: K,
2215
+ t: gi,
2216
+ isVue2: bi,
2217
+ isVue3: yi,
2218
+ getCompatSize: Q,
2219
2219
  getDefaultSize: k,
2220
- DATE_TYPES: bl,
2220
+ DATE_TYPES: vi,
2221
2221
  // 用于存储初始默认值,重置时恢复
2222
2222
  defaultValues: {}
2223
2223
  };
@@ -2234,8 +2234,8 @@ const Fe = /* @__PURE__ */ w(dl, [["render", cl], ["__scopeId", "data-v-9b0ae8e6
2234
2234
  // 合并参数的方法:单独配置 > 全局配置 > 默认值
2235
2235
  getLayoutProps() {
2236
2236
  return (e) => {
2237
- const l = {};
2238
- return e.labelWidth !== void 0 ? l.labelWidth = e.labelWidth : this.labelWidth !== void 0 && (l.labelWidth = this.labelWidth), e.inputWidth !== void 0 ? l.inputWidth = e.inputWidth : this.inputWidth !== void 0 && (l.inputWidth = this.inputWidth), e.direction !== void 0 ? l.direction = e.direction : this.direction !== void 0 && (l.direction = this.direction), e.labelAlign !== void 0 ? l.labelAlign = e.labelAlign : this.labelAlign !== void 0 && (l.labelAlign = this.labelAlign), l;
2237
+ const i = {};
2238
+ return e.labelWidth !== void 0 ? i.labelWidth = e.labelWidth : this.labelWidth !== void 0 && (i.labelWidth = this.labelWidth), e.inputWidth !== void 0 ? i.inputWidth = e.inputWidth : this.inputWidth !== void 0 && (i.inputWidth = this.inputWidth), e.direction !== void 0 ? i.direction = e.direction : this.direction !== void 0 && (i.direction = this.direction), e.labelAlign !== void 0 ? i.labelAlign = e.labelAlign : this.labelAlign !== void 0 && (i.labelAlign = this.labelAlign), i;
2239
2239
  };
2240
2240
  }
2241
2241
  },
@@ -2251,21 +2251,21 @@ const Fe = /* @__PURE__ */ w(dl, [["render", cl], ["__scopeId", "data-v-9b0ae8e6
2251
2251
  const e = this.$slots.default;
2252
2252
  return e ? this.isVue2 ? !!e : e()[0].children.length > 0 : !1;
2253
2253
  },
2254
- handleUpdate(e, l, t) {
2254
+ handleUpdate(e, i, t) {
2255
2255
  const a = this.getFieldValue(e, t);
2256
2256
  a && this.$emit("update:search-form", I(x({}, this.computedSearchForm), {
2257
- [a]: l
2257
+ [a]: i
2258
2258
  }));
2259
2259
  },
2260
- handleUpdateDate(e, l) {
2261
- const t = l || [], a = this.getFieldValue(e, "start"), i = this.getFieldValue(e, "end"), n = this.getFieldValue(e, "value"), r = {};
2262
- a && (r[a] = t[0]), i && (r[i] = t[1]), n && (r[n] = t), this.$emit("update:search-form", x(x({}, this.computedSearchForm), r));
2260
+ handleUpdateDate(e, i) {
2261
+ const t = i || [], a = this.getFieldValue(e, "start"), l = this.getFieldValue(e, "end"), n = this.getFieldValue(e, "value"), o = {};
2262
+ a && (o[a] = t[0]), l && (o[l] = t[1]), n && (o[n] = t), this.$emit("update:search-form", x(x({}, this.computedSearchForm), o));
2263
2263
  },
2264
- getFieldValue(e, l) {
2264
+ getFieldValue(e, i) {
2265
2265
  if (typeof e == "string")
2266
2266
  return e;
2267
- if (e.fields && l in e.fields) {
2268
- const t = e.fields[l];
2267
+ if (e.fields && i in e.fields) {
2268
+ const t = e.fields[i];
2269
2269
  if (typeof t == "string")
2270
2270
  return t;
2271
2271
  if (Array.isArray(t))
@@ -2275,9 +2275,9 @@ const Fe = /* @__PURE__ */ w(dl, [["render", cl], ["__scopeId", "data-v-9b0ae8e6
2275
2275
  }
2276
2276
  },
2277
2277
  // 获取字段默认值(仅支持新的fields结构)
2278
- getFieldDefault(e, l) {
2279
- if (e.fields && l in e.fields) {
2280
- const t = e.fields[l];
2278
+ getFieldDefault(e, i) {
2279
+ if (e.fields && i in e.fields) {
2280
+ const t = e.fields[i];
2281
2281
  if (Array.isArray(t) && t.length > 1)
2282
2282
  return t[1];
2283
2283
  if (t && typeof t == "object" && "default" in t)
@@ -2286,13 +2286,13 @@ const Fe = /* @__PURE__ */ w(dl, [["render", cl], ["__scopeId", "data-v-9b0ae8e6
2286
2286
  },
2287
2287
  // 检查是否存在对应名称的插槽
2288
2288
  hasSearchSlot(e) {
2289
- const l = "$slots";
2290
- if (this[l][e])
2289
+ const i = "$slots";
2290
+ if (this[i][e])
2291
2291
  return !0;
2292
2292
  let a = this.$parent;
2293
2293
  for (; a; ) {
2294
- const i = a[l];
2295
- if (a.$options.name === "TmTable" && (i != null && i[e]))
2294
+ const l = a[i];
2295
+ if (a.$options.name === "TmTable" && (l != null && l[e]))
2296
2296
  return !0;
2297
2297
  a = a.$parent;
2298
2298
  }
@@ -2302,42 +2302,42 @@ const Fe = /* @__PURE__ */ w(dl, [["render", cl], ["__scopeId", "data-v-9b0ae8e6
2302
2302
  initDefaultValues() {
2303
2303
  if (!this.searchColumns || !this.searchColumns.length) return;
2304
2304
  const e = {};
2305
- this.searchColumns.forEach((l) => {
2306
- if (typeof l == "string" || !l.fields) return;
2307
- const t = this.getFieldValue(l, "value"), a = this.getFieldValue(l, "label");
2308
- if (l.type === "input" && l.labelOptions && l.labelOptions.length > 0) {
2309
- const n = l.labelOptions[0];
2305
+ this.searchColumns.forEach((i) => {
2306
+ if (typeof i == "string" || !i.fields) return;
2307
+ const t = this.getFieldValue(i, "value"), a = this.getFieldValue(i, "label");
2308
+ if (i.type === "input" && i.labelOptions && i.labelOptions.length > 0) {
2309
+ const n = i.labelOptions[0];
2310
2310
  if (a)
2311
2311
  if (a in this.computedSearchForm)
2312
2312
  e[a] = this.computedSearchForm[a];
2313
2313
  else {
2314
- const r = this.getFieldDefault(l, "label");
2315
- r !== void 0 ? e[a] = r : n && n.value !== void 0 && (e[a] = n.value);
2314
+ const o = this.getFieldDefault(i, "label");
2315
+ o !== void 0 ? e[a] = o : n && n.value !== void 0 && (e[a] = n.value);
2316
2316
  }
2317
2317
  t && !(t in this.computedSearchForm) && (e[t] = "");
2318
- } else if (this.isDateType(l.type) && l.labelOptions && l.labelOptions.length > 0) {
2319
- const n = l.labelOptions[0];
2318
+ } else if (this.isDateType(i.type) && i.labelOptions && i.labelOptions.length > 0) {
2319
+ const n = i.labelOptions[0];
2320
2320
  if (t && !(t in this.computedSearchForm) && (e[t] = []), a)
2321
2321
  if (a in this.computedSearchForm)
2322
2322
  e[a] = this.computedSearchForm[a];
2323
2323
  else {
2324
- const r = this.getFieldDefault(l, "label");
2325
- r !== void 0 ? e[a] = r : n && n.value !== void 0 && (e[a] = n.value);
2324
+ const o = this.getFieldDefault(i, "label");
2325
+ o !== void 0 ? e[a] = o : n && n.value !== void 0 && (e[a] = n.value);
2326
2326
  }
2327
- } else if (l.type === "select" && l.labelOptions && l.labelOptions.length > 0) {
2328
- const n = l.labelOptions[0];
2329
- if (t && !(t in this.computedSearchForm) && (e[t] = l.multiple ? [] : ""), a)
2327
+ } else if (i.type === "select" && i.labelOptions && i.labelOptions.length > 0) {
2328
+ const n = i.labelOptions[0];
2329
+ if (t && !(t in this.computedSearchForm) && (e[t] = i.multiple ? [] : ""), a)
2330
2330
  if (a in this.computedSearchForm)
2331
2331
  e[a] = this.computedSearchForm[a];
2332
2332
  else {
2333
- const r = this.getFieldDefault(l, "label");
2334
- r !== void 0 ? e[a] = r : n && n.value !== void 0 && (e[a] = n.value);
2333
+ const o = this.getFieldDefault(i, "label");
2334
+ o !== void 0 ? e[a] = o : n && n.value !== void 0 && (e[a] = n.value);
2335
2335
  }
2336
2336
  }
2337
- const i = this.getFieldDefault(l, "value");
2338
- if (t && i !== void 0 && !(t in this.computedSearchForm) ? this.isDateType(l.type) && !Array.isArray(i) ? e[t] = [] : l.type === "checkbox" && !Array.isArray(i) ? e[t] = i ? [i] : [] : l.type === "switch" && typeof i != "boolean" ? e[t] = !!i : e[t] = i : t && !(t in this.computedSearchForm) && (l.type === "checkbox" ? e[t] = [] : l.type === "switch" && (e[t] = !1)), this.isDateType(l.type)) {
2339
- const n = this.getFieldValue(l, "start"), r = this.getFieldValue(l, "end"), c = this.getFieldDefault(l, "start"), h = this.getFieldDefault(l, "end");
2340
- n && c !== void 0 && !(n in this.computedSearchForm) && (e[n] = c), r && h !== void 0 && !(r in this.computedSearchForm) && (e[r] = h);
2337
+ const l = this.getFieldDefault(i, "value");
2338
+ if (t && l !== void 0 && !(t in this.computedSearchForm) ? this.isDateType(i.type) && !Array.isArray(l) ? e[t] = [] : i.type === "checkbox" && !Array.isArray(l) ? e[t] = l ? [l] : [] : i.type === "switch" && typeof l != "boolean" ? e[t] = !!l : e[t] = l : t && !(t in this.computedSearchForm) && (i.type === "checkbox" ? e[t] = [] : i.type === "switch" && (e[t] = !1)), this.isDateType(i.type)) {
2339
+ const n = this.getFieldValue(i, "start"), o = this.getFieldValue(i, "end"), d = this.getFieldDefault(i, "start"), c = this.getFieldDefault(i, "end");
2340
+ n && d !== void 0 && !(n in this.computedSearchForm) && (e[n] = d), o && c !== void 0 && !(o in this.computedSearchForm) && (e[o] = c);
2341
2341
  }
2342
2342
  }), this.defaultValues = e, this.$emit("update:search-form", x(x({}, e), this.computedSearchForm));
2343
2343
  },
@@ -2356,49 +2356,49 @@ const Fe = /* @__PURE__ */ w(dl, [["render", cl], ["__scopeId", "data-v-9b0ae8e6
2356
2356
  this.$emit("update:search-form", x({}, this.defaultValues)), this.$emit("reset");
2357
2357
  }
2358
2358
  }
2359
- }, vl = { class: "search-content" }, Cl = { class: "search-actions" };
2360
- function _l(e, l, t, a, i, n) {
2361
- const r = u("dynamic-slot"), c = u("tm-Input"), h = u("tm-date"), f = u("tm-select"), y = u("tm-cascader"), V = u("tm-radio"), O = u("tm-checkbox"), U = u("tm-switch"), j = u("tm-textarea"), W = u("el-button");
2362
- return o(), b("div", {
2363
- class: X(["table-search", `table-search--${i.isVue2 ? "v2" : "v3"}`])
2359
+ }, _i = { class: "search-content" }, Si = { class: "search-actions" };
2360
+ function xi(e, i, t, a, l, n) {
2361
+ const o = u("dynamic-slot"), d = u("tm-Input"), c = u("tm-date"), f = u("tm-select"), b = u("tm-cascader"), V = u("tm-radio"), O = u("tm-checkbox"), U = u("tm-switch"), j = u("tm-textarea"), W = u("el-button");
2362
+ return r(), y("div", {
2363
+ class: Z(["table-search", `table-search--${l.isVue2 ? "v2" : "v3"}`])
2364
2364
  }, [
2365
- v("div", vl, [
2366
- n.hasDefaultSlot() ? S(e.$slots, "default", { key: 0 }, void 0, !0) : t.searchColumns && t.searchColumns.length ? (o(!0), b(L, { key: 1 }, A(t.searchColumns, (s, N) => (o(), b(L, null, [
2367
- typeof s == "string" ? (o(), b("div", {
2365
+ v("div", _i, [
2366
+ n.hasDefaultSlot() ? S(e.$slots, "default", { key: 0 }, void 0, !0) : t.searchColumns && t.searchColumns.length ? (r(!0), y(L, { key: 1 }, A(t.searchColumns, (s, N) => (r(), y(L, null, [
2367
+ typeof s == "string" ? (r(), y("div", {
2368
2368
  key: `str-${s}-${N}`,
2369
2369
  class: "search-item"
2370
2370
  }, [
2371
- (o(), m(r, {
2371
+ (r(), m(o, {
2372
2372
  name: `search-${s}`,
2373
2373
  "slot-props": { searchForm: t.searchForm },
2374
2374
  key: s
2375
2375
  }, null, 8, ["name", "slot-props"]))
2376
- ])) : (o(), b("div", {
2376
+ ])) : (r(), y("div", {
2377
2377
  key: `obj-${N}`,
2378
2378
  class: "search-item"
2379
2379
  }, [
2380
- s.fields ? (o(), b(L, { key: 0 }, [
2381
- n.hasSearchSlot(`search-${n.getFieldValue(s, "value")}`) ? (o(), m(r, {
2380
+ s.fields ? (r(), y(L, { key: 0 }, [
2381
+ n.hasSearchSlot(`search-${n.getFieldValue(s, "value")}`) ? (r(), m(o, {
2382
2382
  name: `search-${n.getFieldValue(s, "value")}`,
2383
2383
  "slot-props": { searchForm: t.searchForm, col: s },
2384
2384
  key: n.getFieldValue(s, "value")
2385
- }, null, 8, ["name", "slot-props"])) : (o(), b("div", {
2385
+ }, null, 8, ["name", "slot-props"])) : (r(), y("div", {
2386
2386
  style: { display: "flex" },
2387
2387
  key: n.getFieldValue(s, "value") || `col-${N}`
2388
2388
  }, [
2389
- s.type === "input" ? (o(), m(c, _({
2389
+ s.type === "input" ? (r(), m(d, _({
2390
2390
  key: 0,
2391
2391
  label: s.label,
2392
2392
  value: n.computedSearchForm[n.getFieldValue(s, "value")],
2393
2393
  field: n.computedSearchForm[n.getFieldValue(s, "label")],
2394
- onValueChange: (d) => n.handleUpdate(s, d, "value"),
2395
- onFieldChange: (d) => n.handleUpdate(s, d, "label"),
2394
+ onValueChange: (h) => n.handleUpdate(s, h, "value"),
2395
+ onFieldChange: (h) => n.handleUpdate(s, h, "label"),
2396
2396
  multiple: s.multiple,
2397
2397
  labelOptions: s.labelOptions,
2398
2398
  placeholder: s.placeholder,
2399
2399
  onSearch: n.handleSearch
2400
2400
  }, { ref_for: !0 }, n.getLayoutProps(s)), null, 16, ["label", "value", "field", "onValueChange", "onFieldChange", "multiple", "labelOptions", "placeholder", "onSearch"])) : C("", !0),
2401
- n.isDateType(s.type) ? (o(), m(h, _({
2401
+ n.isDateType(s.type) ? (r(), m(c, _({
2402
2402
  key: 1,
2403
2403
  type: s.type,
2404
2404
  label: s.label,
@@ -2406,10 +2406,10 @@ function _l(e, l, t, a, i, n) {
2406
2406
  field: n.computedSearchForm[n.getFieldValue(s, "label")],
2407
2407
  start: n.computedSearchForm[n.getFieldValue(s, "start")],
2408
2408
  end: n.computedSearchForm[n.getFieldValue(s, "end")],
2409
- onFieldChange: (d) => n.handleUpdate(s, d, "label"),
2410
- onValueChange: (d) => n.handleUpdateDate(s, d),
2411
- onStartChange: (d) => n.handleUpdateDate(s, d),
2412
- onEndChange: (d) => n.handleUpdateDate(s, d),
2409
+ onFieldChange: (h) => n.handleUpdate(s, h, "label"),
2410
+ onValueChange: (h) => n.handleUpdateDate(s, h),
2411
+ onStartChange: (h) => n.handleUpdateDate(s, h),
2412
+ onEndChange: (h) => n.handleUpdateDate(s, h),
2413
2413
  labelOptions: s.labelOptions,
2414
2414
  "start-placeholder": s.startPlaceholder,
2415
2415
  "end-placeholder": s.endPlaceholder,
@@ -2427,11 +2427,11 @@ function _l(e, l, t, a, i, n) {
2427
2427
  "past-only": s.pastOnly,
2428
2428
  format: s.format
2429
2429
  }, { ref_for: !0 }, n.getLayoutProps(s)), null, 16, ["type", "label", "value", "field", "start", "end", "onFieldChange", "onValueChange", "onStartChange", "onEndChange", "labelOptions", "start-placeholder", "end-placeholder", "placeholder", "range-separator", "disabled", "clearable", "readonly", "editable", "align", "popper-class", "default-value", "default-time", "shortcuts", "past-only", "format"])) : C("", !0),
2430
- s.type === "select" ? (o(), m(f, _({
2430
+ s.type === "select" ? (r(), m(f, _({
2431
2431
  key: 2,
2432
2432
  label: s.label,
2433
2433
  modelValue: n.computedSearchForm[n.getFieldValue(s, "value")],
2434
- "onUpdate:modelValue": (d) => n.computedSearchForm[n.getFieldValue(s, "value")] = d,
2434
+ "onUpdate:modelValue": (h) => n.computedSearchForm[n.getFieldValue(s, "value")] = h,
2435
2435
  field: n.computedSearchForm[n.getFieldValue(s, "label")],
2436
2436
  options: s.options,
2437
2437
  labelOptions: s.labelOptions,
@@ -2440,12 +2440,12 @@ function _l(e, l, t, a, i, n) {
2440
2440
  "show-check-all": s.checkAll,
2441
2441
  "value-on-clear": s.valueOnClear,
2442
2442
  clearable: s.clearable,
2443
- onFieldChange: (d) => n.handleUpdate(s, d, "label")
2443
+ onFieldChange: (h) => n.handleUpdate(s, h, "label")
2444
2444
  }, { ref_for: !0 }, n.getLayoutProps(s)), null, 16, ["label", "modelValue", "onUpdate:modelValue", "field", "options", "labelOptions", "placeholder", "multiple", "show-check-all", "value-on-clear", "clearable", "onFieldChange"])) : C("", !0),
2445
- s.type === "cascader" ? (o(), m(y, _({
2445
+ s.type === "cascader" ? (r(), m(b, _({
2446
2446
  key: 3,
2447
2447
  modelValue: n.computedSearchForm[n.getFieldValue(s, "value")],
2448
- "onUpdate:modelValue": (d) => n.computedSearchForm[n.getFieldValue(s, "value")] = d,
2448
+ "onUpdate:modelValue": (h) => n.computedSearchForm[n.getFieldValue(s, "value")] = h,
2449
2449
  label: s.label,
2450
2450
  options: s.options,
2451
2451
  labelOptions: s.labelOptions,
@@ -2453,36 +2453,36 @@ function _l(e, l, t, a, i, n) {
2453
2453
  placeholder: s.placeholder,
2454
2454
  "show-check-all": s.checkAll
2455
2455
  }, { ref_for: !0 }, n.getLayoutProps(s)), null, 16, ["modelValue", "onUpdate:modelValue", "label", "options", "labelOptions", "props", "placeholder", "show-check-all"])) : C("", !0),
2456
- s.type === "radio" ? (o(), m(V, _({
2456
+ s.type === "radio" ? (r(), m(V, _({
2457
2457
  key: 4,
2458
2458
  modelValue: n.computedSearchForm[n.getFieldValue(s, "value")],
2459
- "onUpdate:modelValue": (d) => n.computedSearchForm[n.getFieldValue(s, "value")] = d,
2459
+ "onUpdate:modelValue": (h) => n.computedSearchForm[n.getFieldValue(s, "value")] = h,
2460
2460
  label: s.label,
2461
2461
  options: s.options,
2462
2462
  props: s.props
2463
2463
  }, { ref_for: !0 }, n.getLayoutProps(s)), null, 16, ["modelValue", "onUpdate:modelValue", "label", "options", "props"])) : C("", !0),
2464
- s.type === "checkbox" ? (o(), m(O, _({
2464
+ s.type === "checkbox" ? (r(), m(O, _({
2465
2465
  key: 5,
2466
2466
  modelValue: n.computedSearchForm[n.getFieldValue(s, "value")],
2467
- "onUpdate:modelValue": (d) => n.computedSearchForm[n.getFieldValue(s, "value")] = d,
2467
+ "onUpdate:modelValue": (h) => n.computedSearchForm[n.getFieldValue(s, "value")] = h,
2468
2468
  label: s.label,
2469
2469
  options: s.options,
2470
2470
  props: s.props
2471
2471
  }, { ref_for: !0 }, n.getLayoutProps(s)), null, 16, ["modelValue", "onUpdate:modelValue", "label", "options", "props"])) : C("", !0),
2472
- s.type === "switch" ? (o(), m(U, _({
2472
+ s.type === "switch" ? (r(), m(U, _({
2473
2473
  key: 6,
2474
2474
  modelValue: n.computedSearchForm[n.getFieldValue(s, "value")],
2475
- "onUpdate:modelValue": (d) => n.computedSearchForm[n.getFieldValue(s, "value")] = d,
2475
+ "onUpdate:modelValue": (h) => n.computedSearchForm[n.getFieldValue(s, "value")] = h,
2476
2476
  "active-text": s.activeText,
2477
2477
  "inactive-text": s.inactiveText,
2478
2478
  label: s.label,
2479
2479
  "active-color": s.activeColor,
2480
2480
  "inactive-color": s.inactiveColor
2481
2481
  }, { ref_for: !0 }, n.getLayoutProps(s)), null, 16, ["modelValue", "onUpdate:modelValue", "active-text", "inactive-text", "label", "active-color", "inactive-color"])) : C("", !0),
2482
- s.type === "textarea" ? (o(), m(j, _({
2482
+ s.type === "textarea" ? (r(), m(j, _({
2483
2483
  key: 7,
2484
2484
  modelValue: n.computedSearchForm[n.getFieldValue(s, "value")],
2485
- "onUpdate:modelValue": (d) => n.computedSearchForm[n.getFieldValue(s, "value")] = d,
2485
+ "onUpdate:modelValue": (h) => n.computedSearchForm[n.getFieldValue(s, "value")] = h,
2486
2486
  field: n.computedSearchForm[n.getFieldValue(s, "label")],
2487
2487
  label: s.label,
2488
2488
  labelOptions: s.labelOptions,
@@ -2495,32 +2495,32 @@ function _l(e, l, t, a, i, n) {
2495
2495
  disabled: s.disabled,
2496
2496
  resize: s.resize,
2497
2497
  clearable: s.clearable,
2498
- onFieldChange: (d) => n.handleUpdate(s, d, "label")
2498
+ onFieldChange: (h) => n.handleUpdate(s, h, "label")
2499
2499
  }, { ref_for: !0 }, n.getLayoutProps(s)), null, 16, ["modelValue", "onUpdate:modelValue", "field", "label", "labelOptions", "placeholder", "autosize", "maxlength", "minlength", "show-word-limit", "readonly", "disabled", "resize", "clearable", "onFieldChange"])) : C("", !0)
2500
2500
  ]))
2501
- ], 64)) : (o(), b("div", {
2501
+ ], 64)) : (r(), y("div", {
2502
2502
  key: `error-${N}`,
2503
2503
  class: "search-error-message"
2504
2504
  }, " 缺少 fields 配置,无法渲染此组件 "))
2505
2505
  ]))
2506
2506
  ], 64))), 256)) : C("", !0),
2507
- v("div", Cl, [
2507
+ v("div", Si, [
2508
2508
  g(W, {
2509
2509
  type: "primary",
2510
- size: i.getDefaultSize(),
2510
+ size: l.getDefaultSize(),
2511
2511
  onClick: n.handleSearch
2512
2512
  }, {
2513
2513
  default: p(() => [
2514
- z(T(i.t("query")), 1)
2514
+ z(T(l.t("query")), 1)
2515
2515
  ]),
2516
2516
  _: 1
2517
2517
  }, 8, ["size", "onClick"]),
2518
2518
  g(W, {
2519
- size: i.getDefaultSize(),
2519
+ size: l.getDefaultSize(),
2520
2520
  onClick: n.handleReset
2521
2521
  }, {
2522
2522
  default: p(() => [
2523
- z(T(i.t("reset")), 1)
2523
+ z(T(l.t("reset")), 1)
2524
2524
  ]),
2525
2525
  _: 1
2526
2526
  }, 8, ["size", "onClick"])
@@ -2528,7 +2528,7 @@ function _l(e, l, t, a, i, n) {
2528
2528
  ])
2529
2529
  ], 2);
2530
2530
  }
2531
- const ze = /* @__PURE__ */ w(yl, [["render", _l], ["__scopeId", "data-v-be7a7198"]]), Sl = !1, xl = {
2531
+ const ke = /* @__PURE__ */ w(Ci, [["render", xi], ["__scopeId", "data-v-be7a7198"]]), Ti = !1, wi = {
2532
2532
  name: "TablePagination",
2533
2533
  props: {
2534
2534
  current: {
@@ -2550,8 +2550,8 @@ const ze = /* @__PURE__ */ w(yl, [["render", _l], ["__scopeId", "data-v-be7a7198
2550
2550
  },
2551
2551
  data() {
2552
2552
  return {
2553
- isVue2: Sl,
2554
- getCompatSize: K
2553
+ isVue2: Ti,
2554
+ getCompatSize: Q
2555
2555
  };
2556
2556
  },
2557
2557
  methods: {
@@ -2562,26 +2562,29 @@ const ze = /* @__PURE__ */ w(yl, [["render", _l], ["__scopeId", "data-v-be7a7198
2562
2562
  this.$emit("current-change", e);
2563
2563
  }
2564
2564
  }
2565
- }, Tl = { class: "tm-pagination" };
2566
- function wl(e, l, t, a, i, n) {
2567
- const r = u("el-pagination");
2568
- return o(), b("div", Tl, [
2569
- g(r, _(e.$attrs, M(i.isVue2 ? e.$listeners : {}), {
2565
+ }, Vi = { class: "tm-pagination" };
2566
+ function Fi(e, i, t, a, l, n) {
2567
+ const o = u("el-pagination");
2568
+ return r(), y("div", Vi, [
2569
+ v("div", null, [
2570
+ S(e.$slots, "pagination-left", {}, void 0, !0)
2571
+ ]),
2572
+ g(o, _(e.$attrs, M(l.isVue2 ? e.$listeners : {}), {
2570
2573
  style: { "text-align": "right" },
2571
2574
  "current-page": t.current,
2572
2575
  "page-size": t.pageSize,
2573
2576
  total: t.total,
2574
2577
  "page-sizes": [10, 20, 50, 100, 300, 500, 1e3, 2e3],
2575
- size: i.getCompatSize("mini"),
2578
+ size: l.getCompatSize("mini"),
2576
2579
  layout: "total, sizes, prev, pager, next, jumper",
2577
2580
  onSizeChange: n.handleSizeChange,
2578
- "onUpdate:currentPage": l[0] || (l[0] = (c) => e.$emit("update:current", c)),
2579
- "onUpdate:pageSize": l[1] || (l[1] = (c) => e.$emit("update:pageSize", c)),
2581
+ "onUpdate:currentPage": i[0] || (i[0] = (d) => e.$emit("update:current", d)),
2582
+ "onUpdate:pageSize": i[1] || (i[1] = (d) => e.$emit("update:pageSize", d)),
2580
2583
  onCurrentChange: n.handleCurrentChange
2581
2584
  }), null, 16, ["current-page", "page-size", "total", "size", "onSizeChange", "onCurrentChange"])
2582
2585
  ]);
2583
2586
  }
2584
- const Vl = /* @__PURE__ */ w(xl, [["render", wl], ["__scopeId", "data-v-4dbdf6e7"]]), Fl = {
2587
+ const zi = /* @__PURE__ */ w(wi, [["render", Fi], ["__scopeId", "data-v-ee768f31"]]), Li = {
2585
2588
  name: "TmTableMenu",
2586
2589
  props: {
2587
2590
  size: {
@@ -2589,36 +2592,36 @@ const Vl = /* @__PURE__ */ w(xl, [["render", wl], ["__scopeId", "data-v-4dbdf6e7
2589
2592
  default: "mini"
2590
2593
  }
2591
2594
  }
2592
- }, zl = {
2595
+ }, ki = {
2593
2596
  size: "small",
2594
2597
  class: "tm-table-menu",
2595
2598
  inline: ""
2596
- }, Ll = { class: "left" }, kl = { class: "right" };
2597
- function Ol(e, l, t, a, i, n) {
2598
- return o(), b("div", zl, [
2599
- v("div", Ll, [
2599
+ }, Oi = { class: "left" }, Ai = { class: "right" };
2600
+ function Di(e, i, t, a, l, n) {
2601
+ return r(), y("div", ki, [
2602
+ v("div", Oi, [
2600
2603
  S(e.$slots, "left", {}, void 0, !0)
2601
2604
  ]),
2602
- v("div", kl, [
2605
+ v("div", Ai, [
2603
2606
  S(e.$slots, "right", {}, void 0, !0)
2604
2607
  ])
2605
2608
  ]);
2606
2609
  }
2607
- const Al = /* @__PURE__ */ w(Fl, [["render", Ol], ["__scopeId", "data-v-579dd2c3"]]), Y = (e) => e ? e.props || {} : {}, le = (e, l) => {
2608
- e && (e.props || (e.props = {}), typeof l == "object" && Object.assign(e.props, l));
2609
- }, G = {
2610
+ const Mi = /* @__PURE__ */ w(Li, [["render", Di], ["__scopeId", "data-v-579dd2c3"]]), G = (e) => e ? e.props || {} : {}, le = (e, i) => {
2611
+ e && (e.props || (e.props = {}), typeof i == "object" && Object.assign(e.props, i));
2612
+ }, X = {
2610
2613
  // 默认实现:使用localStorage获取配置
2611
2614
  getTableConfig(e) {
2612
2615
  try {
2613
- const l = localStorage.getItem(`tm-table-config-${e}`);
2616
+ const i = localStorage.getItem(`tm-table-config-${e}`);
2614
2617
  return Promise.resolve({
2615
2618
  data: {
2616
2619
  code: 200,
2617
- data: l
2620
+ data: i
2618
2621
  }
2619
2622
  });
2620
- } catch (l) {
2621
- return Promise.reject(l);
2623
+ } catch (i) {
2624
+ return Promise.reject(i);
2622
2625
  }
2623
2626
  },
2624
2627
  // 默认实现:使用localStorage保存配置
@@ -2630,25 +2633,25 @@ const Al = /* @__PURE__ */ w(Fl, [["render", Ol], ["__scopeId", "data-v-579dd2c3
2630
2633
  message: "success"
2631
2634
  }
2632
2635
  });
2633
- } catch (l) {
2634
- return Promise.reject(l);
2636
+ } catch (i) {
2637
+ return Promise.reject(i);
2635
2638
  }
2636
2639
  }
2637
- }, Dl = (e) => G.getTableConfig(e.key), Ml = (e) => G.setTableConfig(e), Hl = (e) => {
2638
- e && (typeof e.getTableConfig == "function" && (G.getTableConfig = e.getTableConfig), typeof e.setTableConfig == "function" && (G.setTableConfig = e.setTableConfig));
2639
- }, { t: Rl } = H(), Il = !1, El = !0, Wl = {
2640
- formatter: (e, l, t, a) => [void 0, null, ""].includes(t) ? "-" : t
2641
- }, Nl = {
2640
+ }, Hi = (e) => X.getTableConfig(e.key), Ri = (e) => X.setTableConfig(e), Ii = (e) => {
2641
+ e && (typeof e.getTableConfig == "function" && (X.getTableConfig = e.getTableConfig), typeof e.setTableConfig == "function" && (X.setTableConfig = e.setTableConfig));
2642
+ }, { t: Ei } = H(), Wi = !1, Ni = !0, Pi = {
2643
+ formatter: (e, i, t, a) => [void 0, null, ""].includes(t) ? "-" : t
2644
+ }, Bi = {
2642
2645
  name: "TmColumnConfig",
2643
2646
  components: {
2644
- MoveIcon: nt,
2645
- FixedLeftIcon: st,
2646
- FixedRightIcon: rt,
2647
- UploadIcon: ot,
2648
- DownloadIcon: ut,
2649
- DeleteIcon: dt,
2650
- MenuIcon: lt,
2651
- tmEllipsisText: $
2647
+ MoveIcon: st,
2648
+ FixedLeftIcon: rt,
2649
+ FixedRightIcon: ut,
2650
+ UploadIcon: dt,
2651
+ DownloadIcon: ht,
2652
+ DeleteIcon: ct,
2653
+ MenuIcon: nt,
2654
+ tmEllipsisText: ee
2652
2655
  },
2653
2656
  props: {
2654
2657
  // 表格列数据,从$slots.default传入
@@ -2685,11 +2688,11 @@ const Al = /* @__PURE__ */ w(Fl, [["render", Ol], ["__scopeId", "data-v-579dd2c3
2685
2688
  },
2686
2689
  data() {
2687
2690
  return {
2688
- t: Rl,
2689
- isVue2: Il,
2690
- isVue3: El,
2691
+ t: Ei,
2692
+ isVue2: Wi,
2693
+ isVue3: Ni,
2691
2694
  getDefaultSize: k,
2692
- getCompatSize: K,
2695
+ getCompatSize: Q,
2693
2696
  buttonType: { link: !0, type: "primary" },
2694
2697
  afterOpenDelay: { "show-after": 300 },
2695
2698
  popoverVisible: !1,
@@ -2759,9 +2762,9 @@ const Al = /* @__PURE__ */ w(Fl, [["render", Ol], ["__scopeId", "data-v-579dd2c3
2759
2762
  * 查找数组中满足条件的最后一个元素的索引
2760
2763
  * 用于兼容旧版JS环境中不支持findLastIndex的情况
2761
2764
  */
2762
- findLastIndex(e, l) {
2765
+ findLastIndex(e, i) {
2763
2766
  for (let t = e.length - 1; t >= 0; t--)
2764
- if (l(e[t], t, e))
2767
+ if (i(e[t], t, e))
2765
2768
  return t;
2766
2769
  return -1;
2767
2770
  },
@@ -2771,7 +2774,7 @@ const Al = /* @__PURE__ */ w(Fl, [["render", Ol], ["__scopeId", "data-v-579dd2c3
2771
2774
  * @returns {string} - 列的label
2772
2775
  */
2773
2776
  getColumnLabel(e) {
2774
- return !e || !this.columnMap[e] ? e || "" : Y(this.columnMap[e]).label || e;
2777
+ return !e || !this.columnMap[e] ? e || "" : G(this.columnMap[e]).label || e;
2775
2778
  },
2776
2779
  // 初始化列配置
2777
2780
  initializeColumnConfig() {
@@ -2780,34 +2783,36 @@ const Al = /* @__PURE__ */ w(Fl, [["render", Ol], ["__scopeId", "data-v-579dd2c3
2780
2783
  // 处理原始列数据
2781
2784
  processOriginalColumns() {
2782
2785
  const e = this.columns || [];
2783
- let l = {};
2786
+ let i = {};
2784
2787
  this.defaultColumnsConfig = e.filter((t) => {
2785
- const a = Y(t);
2788
+ const a = G(t);
2786
2789
  return !(!a.prop || this.ignoredColumnConfigTypes.includes(a.type));
2787
2790
  }).map((t, a) => {
2788
- const i = Y(t), n = x(x({}, Wl), i);
2789
- le(t, n), i.prop && (l[i.prop] = t);
2790
- const r = i.hasOwnProperty("visible") ? i.visible !== !1 : !0;
2791
+ const l = G(t), n = x(x({}, Pi), l);
2792
+ le(t, n), l.prop && (i[l.prop] = t);
2793
+ const o = l.hasOwnProperty("visible") ? l.visible !== !1 : !0;
2791
2794
  return {
2792
- prop: i.prop,
2795
+ prop: l.prop,
2793
2796
  // label: attrs.label, // 移除label,避免国际化导致比较不一致
2794
- fixed: i.fixed || "",
2797
+ fixed: l.fixed || "",
2795
2798
  sort: a,
2796
- cancellable: i.hasOwnProperty("cancellable") ? i.cancellable : !0,
2797
- visible: r
2799
+ cancellable: l.hasOwnProperty("cancellable") ? l.cancellable : !0,
2800
+ visible: o
2798
2801
  };
2799
- }), this.columnMap = l;
2802
+ }), this.columnMap = i;
2800
2803
  },
2801
2804
  // 加载列配置
2802
2805
  loadColumnConfig() {
2803
- Dl({
2806
+ Hi({
2804
2807
  key: this.computedTableKey
2805
2808
  }).then((e) => {
2806
2809
  var t;
2807
2810
  if (e.data.code !== 200) return;
2808
- let l = JSON.parse(((t = e.data) == null ? void 0 : t.data) || null) || {};
2809
- l.columnsConfig && JSON.stringify(this.defaultColumnsConfig) === JSON.stringify(l.defaultColumnsConfig) ? this.tableColumns = l.columnsConfig.map((a) => x({}, a)) : this.tableColumns = this.defaultColumnsConfig.map((a) => x({}, a)), this.processedColumns = this.applyColumnConfig(this.tableColumns), this.isConfigLoaded = !0, this.$emit("complete", {
2811
+ let i = JSON.parse(((t = e.data) == null ? void 0 : t.data) || null) || {};
2812
+ i.columnsConfig && JSON.stringify(this.defaultColumnsConfig) === JSON.stringify(i.defaultColumnsConfig) ? this.tableColumns = i.columnsConfig.map((a) => x({}, a)) : this.tableColumns = this.defaultColumnsConfig.map((a) => x({}, a)), this.processedColumns = this.applyColumnConfig(this.tableColumns), this.isConfigLoaded = !0, this.$emit("complete", {
2810
2813
  columns: this.processedColumns,
2814
+ config: this.tableColumns,
2815
+ // 传递配置元数据
2811
2816
  isInitialLoad: !0
2812
2817
  });
2813
2818
  }).catch(() => {
@@ -2817,31 +2822,31 @@ const Al = /* @__PURE__ */ w(Fl, [["render", Ol], ["__scopeId", "data-v-579dd2c3
2817
2822
  });
2818
2823
  });
2819
2824
  },
2820
- applyColumnConfig(e, l = !1) {
2821
- let t = this.columns.filter((i) => {
2822
- const n = Y(i);
2825
+ applyColumnConfig(e, i = !1) {
2826
+ let t = this.columns.filter((l) => {
2827
+ const n = G(l);
2823
2828
  return this.ignoredColumnConfigTypes.includes(n.type);
2824
2829
  }), a = [];
2825
- return [...e].sort((i, n) => {
2826
- const r = i.sort !== void 0 ? i.sort : 1 / 0, c = n.sort !== void 0 ? n.sort : 1 / 0;
2827
- return r - c;
2828
- }).forEach((i) => {
2829
- if (i.prop) {
2830
- let n = this.columnMap[i.prop];
2830
+ return [...e].sort((l, n) => {
2831
+ const o = l.sort !== void 0 ? l.sort : 1 / 0, d = n.sort !== void 0 ? n.sort : 1 / 0;
2832
+ return o - d;
2833
+ }).forEach((l) => {
2834
+ if (l.prop) {
2835
+ let n = this.columnMap[l.prop];
2831
2836
  n && (le(n, {
2832
- fixed: i.fixed || void 0,
2833
- visible: i.visible
2834
- }), (!l && i.visible || l) && a.push(n));
2837
+ fixed: l.fixed || void 0,
2838
+ visible: l.visible
2839
+ }), (!i && l.visible || i) && a.push(n));
2835
2840
  }
2836
- }), t.forEach((i) => {
2837
- le(i, { visible: !0 });
2841
+ }), t.forEach((l) => {
2842
+ le(l, { visible: !0 });
2838
2843
  }), [...t, ...a];
2839
2844
  },
2840
2845
  crateSortable() {
2841
2846
  const e = this.$refs.sortListRef;
2842
2847
  if (!e) return;
2843
2848
  this.sortable && (this.sortable.destroy(), this.sortable = null);
2844
- const l = new R(e, {
2849
+ const i = new R(e, {
2845
2850
  ghostClass: "blue-background-class",
2846
2851
  animation: 150,
2847
2852
  // 动画持续时间,毫秒
@@ -2858,36 +2863,36 @@ const Al = /* @__PURE__ */ w(Fl, [["render", Ol], ["__scopeId", "data-v-579dd2c3
2858
2863
  group: "columns",
2859
2864
  dragClass: "sortable-drag",
2860
2865
  onStart: ({ item: t }) => {
2861
- const a = t.getAttribute("data-prop"), i = this.sortedTableColumns.find(
2866
+ const a = t.getAttribute("data-prop"), l = this.sortedTableColumns.find(
2862
2867
  (n) => n.prop === a
2863
2868
  );
2864
- this.isDraggingFrozen = i && i.fixed === "left", this.isDraggingFrozenRight = i && i.fixed === "right", this.draggedItemIndex = Array.from(e.children).indexOf(t), t.classList.add("sortable-drag");
2869
+ this.isDraggingFrozen = l && l.fixed === "left", this.isDraggingFrozenRight = l && l.fixed === "right", this.draggedItemIndex = Array.from(e.children).indexOf(t), t.classList.add("sortable-drag");
2865
2870
  },
2866
2871
  onMove: (t) => {
2867
- const { target: a, related: i } = t;
2868
- if (!a || !i)
2872
+ const { target: a, related: l } = t;
2873
+ if (!a || !l)
2869
2874
  return !1;
2870
- const n = i ? i.getAttribute("data-prop") : null, r = n ? this.sortedTableColumns.find((f) => f.prop === n) : null, c = r && r.fixed === "left", h = r && r.fixed === "right";
2871
- return this.isDraggingFrozen && !c || this.isDraggingFrozenRight && !h || !this.isDraggingFrozen && !this.isDraggingFrozenRight && (c || h) ? (a.classList.add("no-drop-zone"), !1) : (document.querySelectorAll(".no-drop-zone").forEach((f) => {
2875
+ const n = l ? l.getAttribute("data-prop") : null, o = n ? this.sortedTableColumns.find((f) => f.prop === n) : null, d = o && o.fixed === "left", c = o && o.fixed === "right";
2876
+ return this.isDraggingFrozen && !d || this.isDraggingFrozenRight && !c || !this.isDraggingFrozen && !this.isDraggingFrozenRight && (d || c) ? (a.classList.add("no-drop-zone"), !1) : (document.querySelectorAll(".no-drop-zone").forEach((f) => {
2872
2877
  f.classList.remove("no-drop-zone");
2873
2878
  }), !0);
2874
2879
  },
2875
- onEnd: ({ item: t, newIndex: a, oldIndex: i }) => {
2876
- if (a === void 0 || i === void 0 || a < 0 || i < 0 || a >= this.sortedTableColumns.length || i >= this.sortedTableColumns.length)
2880
+ onEnd: ({ item: t, newIndex: a, oldIndex: l }) => {
2881
+ if (a === void 0 || l === void 0 || a < 0 || l < 0 || a >= this.sortedTableColumns.length || l >= this.sortedTableColumns.length)
2877
2882
  return;
2878
2883
  document.querySelectorAll(".no-drop-zone").forEach((V) => {
2879
2884
  V.classList.remove("no-drop-zone");
2880
2885
  }), t.classList.remove("sortable-drag");
2881
- const n = this.sortedTableColumns[i], r = n.fixed === "left", c = n.fixed === "right", h = a > 0 ? this.sortedTableColumns[a - 1] : null, f = a < this.sortedTableColumns.length - 1 ? this.sortedTableColumns[a + 1] : null;
2882
- let y = !1;
2883
- if (r ? (h && h.fixed !== "left" || f && f.fixed === "right") && (y = !0) : c ? (h && h.fixed !== "right" || f && f.fixed !== "right") && (y = !0) : (h && h.fixed === "right" || f && f.fixed === "left") && (y = !0), y) {
2886
+ const n = this.sortedTableColumns[l], o = n.fixed === "left", d = n.fixed === "right", c = a > 0 ? this.sortedTableColumns[a - 1] : null, f = a < this.sortedTableColumns.length - 1 ? this.sortedTableColumns[a + 1] : null;
2887
+ let b = !1;
2888
+ if (o ? (c && c.fixed !== "left" || f && f.fixed === "right") && (b = !0) : d ? (c && c.fixed !== "right" || f && f.fixed !== "right") && (b = !0) : (c && c.fixed === "right" || f && f.fixed === "left") && (b = !0), b) {
2884
2889
  this.rollbackSort();
2885
2890
  return;
2886
2891
  }
2887
2892
  this.updateSortAfterDrag();
2888
2893
  }
2889
2894
  });
2890
- this.sortable = l;
2895
+ this.sortable = i;
2891
2896
  },
2892
2897
  rollbackSort() {
2893
2898
  this.sortedTableColumns = JSON.parse(JSON.stringify(this.columnsCopy));
@@ -2896,7 +2901,7 @@ const Al = /* @__PURE__ */ w(Fl, [["render", Ol], ["__scopeId", "data-v-579dd2c3
2896
2901
  const e = this.$refs.sortListRef;
2897
2902
  if (!e) return;
2898
2903
  Array.from(e.children || []).filter((t) => t && t.dataset && t.dataset.prop).map((t) => t.dataset.prop).forEach((t, a) => {
2899
- this.sortedTableColumns.some((i) => i.prop === t ? (i.sort = a, !0) : !1);
2904
+ this.sortedTableColumns.some((l) => l.prop === t ? (l.sort = a, !0) : !1);
2900
2905
  }), this.columnsCopy = JSON.parse(JSON.stringify(this.sortedTableColumns)), this.$emit("on-sort-change", this.sortedTableColumns);
2901
2906
  },
2902
2907
  // 移除了handleSearch方法,改用计算属性filteredSortedTableColumns
@@ -2905,13 +2910,13 @@ const Al = /* @__PURE__ */ w(Fl, [["render", Ol], ["__scopeId", "data-v-579dd2c3
2905
2910
  },
2906
2911
  // 初始化排序后的列数据
2907
2912
  initSortedTableColumns() {
2908
- this.tableColumns.forEach((e, l) => {
2909
- e.sort === void 0 && (e.sort = l);
2910
- }), this.sortedTableColumns = [...this.tableColumns].sort((e, l) => e.fixed === "left" && l.fixed !== "left" ? -1 : e.fixed !== "left" && l.fixed === "left" || e.fixed === "right" && l.fixed !== "right" ? 1 : e.fixed !== "right" && l.fixed === "right" ? -1 : e.sort - l.sort);
2913
+ this.tableColumns.forEach((e, i) => {
2914
+ e.sort === void 0 && (e.sort = i);
2915
+ }), this.sortedTableColumns = [...this.tableColumns].sort((e, i) => e.fixed === "left" && i.fixed !== "left" ? -1 : e.fixed !== "left" && i.fixed === "left" || e.fixed === "right" && i.fixed !== "right" ? 1 : e.fixed !== "right" && i.fixed === "right" ? -1 : e.sort - i.sort);
2911
2916
  },
2912
2917
  setPlacement() {
2913
- const l = this.$refs.operationRef.$el.getBoundingClientRect();
2914
- (window.innerHeight || document.documentElement.clientHeight) - (l.bottom - window.scrollY) > 512 ? this.placement = "bottom" : this.placement = "left";
2918
+ const i = this.$refs.operationRef.$el.getBoundingClientRect();
2919
+ (window.innerHeight || document.documentElement.clientHeight) - (i.bottom - window.scrollY) > 512 ? this.placement = "bottom" : this.placement = "left";
2915
2920
  },
2916
2921
  handleVisibleChange(e) {
2917
2922
  this.popoverVisible = e;
@@ -2923,7 +2928,7 @@ const Al = /* @__PURE__ */ w(Fl, [["render", Ol], ["__scopeId", "data-v-579dd2c3
2923
2928
  "mousemove",
2924
2929
  window.sortableGlobalMouseMove
2925
2930
  );
2926
- } catch (l) {
2931
+ } catch (i) {
2927
2932
  }
2928
2933
  })(), this.$nextTick(() => {
2929
2934
  this.crateSortable();
@@ -2943,99 +2948,99 @@ const Al = /* @__PURE__ */ w(Fl, [["render", Ol], ["__scopeId", "data-v-579dd2c3
2943
2948
  }
2944
2949
  },
2945
2950
  handleSelectAll() {
2946
- const e = this.tableColumns.some((l) => !l.visible);
2947
- this.tableColumns.forEach((l) => {
2948
- l.cancellable && (l.visible = e);
2951
+ const e = this.tableColumns.some((i) => !i.visible);
2952
+ this.tableColumns.forEach((i) => {
2953
+ i.cancellable && (i.visible = e);
2949
2954
  });
2950
2955
  },
2951
2956
  handleRestoreDefault() {
2952
2957
  this.tableColumns = JSON.parse(JSON.stringify(this.defaultColumnsConfig)), this.sortedTableColumns = [...this.tableColumns].sort(
2953
- (e, l) => e.sort - l.sort
2958
+ (e, i) => e.sort - i.sort
2954
2959
  );
2955
2960
  },
2956
2961
  // 判断是否可以置顶
2957
- canMoveTop(e, l) {
2958
- if (l === 0) return !1;
2962
+ canMoveTop(e, i) {
2963
+ if (i === 0) return !1;
2959
2964
  if (e.fixed === "left") {
2960
- const t = this.sortedTableColumns[l - 1];
2965
+ const t = this.sortedTableColumns[i - 1];
2961
2966
  return t && t.fixed === "left";
2962
2967
  }
2963
2968
  if (!e.fixed) {
2964
- const t = this.sortedTableColumns[l - 1];
2969
+ const t = this.sortedTableColumns[i - 1];
2965
2970
  return t && t.fixed === "left" ? !1 : t && !t.fixed;
2966
2971
  }
2967
2972
  return e.fixed === "right";
2968
2973
  },
2969
2974
  // 修改置顶方法,确保右侧固定列置顶时会取消固定
2970
- moveTop(e, l) {
2975
+ moveTop(e, i) {
2971
2976
  const t = this.sortedTableColumns, a = e.prop;
2972
2977
  if (e.fixed === "right" && (e.fixed = ""), e.fixed === "left")
2973
- t.unshift(t.splice(l, 1)[0]);
2978
+ t.unshift(t.splice(i, 1)[0]);
2974
2979
  else {
2975
- const i = this.findLastIndex(
2980
+ const l = this.findLastIndex(
2976
2981
  this.sortedTableColumns,
2977
2982
  (n) => n.fixed === "left"
2978
2983
  );
2979
2984
  t.splice(
2980
- i + 1,
2985
+ l + 1,
2981
2986
  0,
2982
- t.splice(l, 1)[0]
2987
+ t.splice(i, 1)[0]
2983
2988
  );
2984
2989
  }
2985
2990
  this.updateSortValues(), this.columnsCopy = JSON.parse(JSON.stringify(this.sortedTableColumns)), this.$emit("on-sort-change", this.sortedTableColumns), this.$nextTick(() => {
2986
- const i = this.$refs.sortListRef;
2987
- if (i) {
2988
- const n = Array.from(i.children).find(
2989
- (r) => r.dataset && r.dataset.prop === a
2991
+ const l = this.$refs.sortListRef;
2992
+ if (l) {
2993
+ const n = Array.from(l.children).find(
2994
+ (o) => o.dataset && o.dataset.prop === a
2990
2995
  );
2991
2996
  n && n.scrollIntoView({ behavior: "smooth", block: "nearest" });
2992
2997
  }
2993
2998
  });
2994
2999
  },
2995
3000
  frozenLeftHandle(e) {
2996
- const l = this.sortedTableColumns, t = l.splice(e, 1)[0];
3001
+ const i = this.sortedTableColumns, t = i.splice(e, 1)[0];
2997
3002
  if (t.fixed = t.fixed === "left" ? "" : "left", t.fixed === "left") {
2998
3003
  const a = this.findLastIndex(
2999
3004
  this.sortedTableColumns,
3000
- (i) => i.fixed === "left"
3005
+ (l) => l.fixed === "left"
3001
3006
  );
3002
- l.splice(a + 1, 0, t);
3007
+ i.splice(a + 1, 0, t);
3003
3008
  } else {
3004
3009
  const a = this.findLastIndex(
3005
3010
  this.sortedTableColumns,
3006
- (i) => i.fixed === "left"
3011
+ (l) => l.fixed === "left"
3007
3012
  );
3008
- l.splice(a + 1, 0, t);
3013
+ i.splice(a + 1, 0, t);
3009
3014
  }
3010
3015
  this.updateSortValues(), this.columnsCopy = JSON.parse(JSON.stringify(this.sortedTableColumns)), this.$emit("on-sort-change", this.sortedTableColumns);
3011
3016
  },
3012
3017
  frozenRightHandle(e) {
3013
- const l = this.sortedTableColumns, t = l.splice(e, 1)[0];
3018
+ const i = this.sortedTableColumns, t = i.splice(e, 1)[0];
3014
3019
  if (t.fixed = t.fixed === "right" ? "" : "right", t.fixed === "right") {
3015
- const a = l.findIndex(
3016
- (i) => i.fixed === "right"
3020
+ const a = i.findIndex(
3021
+ (l) => l.fixed === "right"
3017
3022
  );
3018
- a === -1 ? l.push(t) : l.splice(a, 0, t);
3023
+ a === -1 ? i.push(t) : i.splice(a, 0, t);
3019
3024
  } else {
3020
- const a = l.findIndex(
3021
- (i) => i.fixed === "right"
3025
+ const a = i.findIndex(
3026
+ (l) => l.fixed === "right"
3022
3027
  );
3023
- a === -1 ? l.push(t) : l.splice(a, 0, t);
3028
+ a === -1 ? i.push(t) : i.splice(a, 0, t);
3024
3029
  }
3025
3030
  this.updateSortValues(), this.columnsCopy = JSON.parse(JSON.stringify(this.sortedTableColumns)), this.$emit("on-sort-change", this.sortedTableColumns);
3026
3031
  },
3027
3032
  onSave() {
3028
- var l;
3033
+ var i;
3029
3034
  this.updateSortValues();
3030
- const e = (l = this.tableColumns) == null ? void 0 : l.map((t) => {
3035
+ const e = (i = this.tableColumns) == null ? void 0 : i.map((t) => {
3031
3036
  const a = this.sortedTableColumns.find(
3032
- (c) => c.prop === t.prop
3037
+ (d) => d.prop === t.prop
3033
3038
  );
3034
3039
  a && (t.sort = a.sort, t.fixed = a.fixed, t.visible = a.visible);
3035
- const r = t, { label: i } = r;
3036
- return ue(r, ["label"]);
3040
+ const o = t, { label: l } = o;
3041
+ return ue(o, ["label"]);
3037
3042
  });
3038
- Ml({
3043
+ Ri({
3039
3044
  key: this.computedTableKey,
3040
3045
  info: JSON.stringify({
3041
3046
  columnsConfig: e,
@@ -3044,14 +3049,16 @@ const Al = /* @__PURE__ */ w(Fl, [["render", Ol], ["__scopeId", "data-v-579dd2c3
3044
3049
  }).then((t) => {
3045
3050
  t.data.code === 200 && (this.processedColumns = this.applyColumnConfig(e, !0), this.$emit("complete", {
3046
3051
  columns: this.processedColumns,
3052
+ config: e,
3053
+ // 传递配置元数据(columns 是保存的配置)
3047
3054
  isInitialLoad: !1
3048
3055
  }), this.$message.success(this.t("saveSuccess")), this.popoverVisible = !1);
3049
3056
  });
3050
3057
  },
3051
3058
  // 直接更新排序值,不依赖DOM结构
3052
3059
  updateSortValues() {
3053
- this.sortedTableColumns.forEach((e, l) => {
3054
- e.sort = l;
3060
+ this.sortedTableColumns.forEach((e, i) => {
3061
+ e.sort = i;
3055
3062
  });
3056
3063
  }
3057
3064
  },
@@ -3066,41 +3073,41 @@ const Al = /* @__PURE__ */ w(Fl, [["render", Ol], ["__scopeId", "data-v-579dd2c3
3066
3073
  } catch (e) {
3067
3074
  }
3068
3075
  }
3069
- }, Pl = {
3076
+ }, Ui = {
3070
3077
  key: 0,
3071
3078
  class: "container"
3072
- }, Bl = { class: "main-container" }, Ul = { class: "left-content" }, jl = { class: "title" }, Jl = { class: "option-list" }, Kl = { style: { height: "100%", "overflow-y": "auto" } }, Ql = { class: "right-content" }, ql = { class: "search-box" }, Yl = {
3079
+ }, ji = { class: "main-container" }, Ji = { class: "left-content" }, Ki = { class: "title" }, Qi = { class: "option-list" }, qi = { style: { height: "100%", "overflow-y": "auto" } }, Yi = { class: "right-content" }, Gi = { class: "search-box" }, Xi = {
3073
3080
  key: 0,
3074
3081
  class: "tips"
3075
- }, Gl = {
3082
+ }, Zi = {
3076
3083
  class: "sort-list",
3077
3084
  ref: "sortListRef"
3078
- }, Xl = ["data-prop"], Zl = {
3085
+ }, $i = ["data-prop"], el = {
3079
3086
  key: 0,
3080
3087
  class: "sort-item"
3081
- }, $l = { class: "row-title" }, ei = { class: "operation-btns" }, ti = { class: "footer" }, li = { class: "footer-left" }, ii = { class: "footer-right" }, ni = { style: { display: "inline-block", "margin-left": "10px" } };
3082
- function ai(e, l, t, a, i, n) {
3083
- const r = u("el-button"), c = u("TmEllipsisText"), h = u("el-checkbox"), f = u("el-input"), y = u("MoveIcon"), V = u("DeleteIcon"), O = u("el-tooltip"), U = u("UploadIcon"), j = u("FixedLeftIcon"), W = u("FixedRightIcon"), s = u("MenuIcon"), N = u("el-popover");
3084
- return o(), m(N, _({ "popper-class": "column-config-popover" }, {
3085
- [i.isVue3 ? "visible" : "value"]: i.popoverVisible
3088
+ }, tl = { class: "row-title" }, il = { class: "operation-btns" }, ll = { class: "footer" }, nl = { class: "footer-left" }, al = { class: "footer-right" }, sl = { style: { display: "inline-block", "margin-left": "10px" } };
3089
+ function ol(e, i, t, a, l, n) {
3090
+ const o = u("el-button"), d = u("TmEllipsisText"), c = u("el-checkbox"), f = u("el-input"), b = u("MoveIcon"), V = u("DeleteIcon"), O = u("el-tooltip"), U = u("UploadIcon"), j = u("FixedLeftIcon"), W = u("FixedRightIcon"), s = u("MenuIcon"), N = u("el-popover");
3091
+ return r(), m(N, _({ "popper-class": "column-config-popover" }, {
3092
+ [l.isVue3 ? "visible" : "value"]: l.popoverVisible
3086
3093
  }, M({
3087
- [i.isVue3 ? "update:visible" : "input"]: n.handleVisibleChange
3094
+ [l.isVue3 ? "update:visible" : "input"]: n.handleVisibleChange
3088
3095
  }), {
3089
3096
  width: 680,
3090
3097
  "show-arrow": !1,
3091
- placement: i.placement,
3098
+ placement: l.placement,
3092
3099
  trigger: "click",
3093
3100
  onShow: n.handlePopoverShow,
3094
3101
  onHide: n.handlePopoverHide
3095
3102
  }), {
3096
3103
  reference: p(() => [
3097
- v("div", ni, [
3104
+ v("div", sl, [
3098
3105
  g(O, _({
3099
- content: i.t("columnSetting")
3100
- }, i.afterOpenDelay, { placement: "top" }), {
3106
+ content: l.t("columnSetting")
3107
+ }, l.afterOpenDelay, { placement: "top" }), {
3101
3108
  default: p(() => [
3102
- g(r, {
3103
- size: i.getDefaultSize(),
3109
+ g(o, {
3110
+ size: l.getDefaultSize(),
3104
3111
  ref: "operationRef",
3105
3112
  circle: ""
3106
3113
  }, {
@@ -3115,37 +3122,37 @@ function ai(e, l, t, a, i, n) {
3115
3122
  ])
3116
3123
  ]),
3117
3124
  default: p(() => [
3118
- i.popoverVisible ? (o(), b("div", Pl, [
3119
- v("div", Bl, [
3120
- v("div", Ul, [
3121
- v("div", jl, [
3122
- v("span", null, T(i.t("SelectableFields")) + "(" + T(i.tableColumns.length) + ")", 1),
3123
- g(r, _({ style: { "margin-left": "10px" } }, i.buttonType, { onClick: n.handleSelectAll }), {
3125
+ l.popoverVisible ? (r(), y("div", Ui, [
3126
+ v("div", ji, [
3127
+ v("div", Ji, [
3128
+ v("div", Ki, [
3129
+ v("span", null, T(l.t("SelectableFields")) + "(" + T(l.tableColumns.length) + ")", 1),
3130
+ g(o, _({ style: { "margin-left": "10px" } }, l.buttonType, { onClick: n.handleSelectAll }), {
3124
3131
  default: p(() => [
3125
- z(T(i.t("all")), 1)
3132
+ z(T(l.t("all")), 1)
3126
3133
  ]),
3127
3134
  _: 1
3128
3135
  }, 16, ["onClick"])
3129
3136
  ]),
3130
- v("div", Jl, [
3131
- v("div", Kl, [
3132
- (o(!0), b(L, null, A(i.tableColumns, (d, P) => (o(), b(L, null, [
3133
- d.prop ? (o(), b("div", {
3137
+ v("div", Qi, [
3138
+ v("div", qi, [
3139
+ (r(!0), y(L, null, A(l.tableColumns, (h, P) => (r(), y(L, null, [
3140
+ h.prop ? (r(), y("div", {
3134
3141
  style: { width: "110px", display: "inline-block" },
3135
- key: P + d.prop
3142
+ key: P + h.prop
3136
3143
  }, [
3137
- g(h, {
3138
- disabled: !d.cancellable,
3144
+ g(c, {
3145
+ disabled: !h.cancellable,
3139
3146
  class: "el-checkbox",
3140
- modelValue: d.visible,
3141
- "onUpdate:modelValue": (J) => d.visible = J,
3142
- label: d.prop,
3143
- value: d.prop
3147
+ modelValue: h.visible,
3148
+ "onUpdate:modelValue": (J) => h.visible = J,
3149
+ label: h.prop,
3150
+ value: h.prop
3144
3151
  }, {
3145
3152
  default: p(() => [
3146
- g(c, {
3153
+ g(d, {
3147
3154
  width: "80px",
3148
- text: n.getColumnLabel(d.prop)
3155
+ text: n.getColumnLabel(h.prop)
3149
3156
  }, null, 8, ["text"])
3150
3157
  ]),
3151
3158
  _: 2
@@ -3155,46 +3162,46 @@ function ai(e, l, t, a, i, n) {
3155
3162
  ])
3156
3163
  ])
3157
3164
  ]),
3158
- v("div", Ql, [
3159
- v("div", ql, [
3165
+ v("div", Yi, [
3166
+ v("div", Gi, [
3160
3167
  g(f, {
3161
- size: i.getCompatSize("small"),
3168
+ size: l.getCompatSize("small"),
3162
3169
  class: "search-input",
3163
3170
  clearable: "",
3164
- placeholder: i.t("search"),
3165
- modelValue: i.keyWord,
3166
- "onUpdate:modelValue": l[0] || (l[0] = (d) => i.keyWord = d)
3171
+ placeholder: l.t("search"),
3172
+ modelValue: l.keyWord,
3173
+ "onUpdate:modelValue": i[0] || (i[0] = (h) => l.keyWord = h)
3167
3174
  }, null, 8, ["size", "placeholder", "modelValue"])
3168
3175
  ]),
3169
- n.showFixedLimitTips ? (o(), b("div", Yl)) : C("", !0),
3170
- v("div", Gl, [
3171
- (o(!0), b(L, null, A(n.filteredSortedTableColumns, (d, P) => (o(), b("div", {
3172
- class: X(["sort-item-wrapper", [
3173
- d.fixed === "left" ? "frozen" : "",
3174
- d.fixed === "right" ? "frozenRight" : "",
3175
- d.fixed ? "" : "noFrozen"
3176
+ n.showFixedLimitTips ? (r(), y("div", Xi)) : C("", !0),
3177
+ v("div", Zi, [
3178
+ (r(!0), y(L, null, A(n.filteredSortedTableColumns, (h, P) => (r(), y("div", {
3179
+ class: Z(["sort-item-wrapper", [
3180
+ h.fixed === "left" ? "frozen" : "",
3181
+ h.fixed === "right" ? "frozenRight" : "",
3182
+ h.fixed ? "" : "noFrozen"
3176
3183
  ]]),
3177
- "data-prop": d.prop,
3178
- key: d.prop
3184
+ "data-prop": h.prop,
3185
+ key: h.prop
3179
3186
  }, [
3180
- d.visible ? (o(), b("div", Zl, [
3181
- v("div", $l, [
3182
- g(y, { style: { "flex-shrink": "0" } }),
3183
- g(c, {
3184
- text: n.getColumnLabel(d.prop)
3187
+ h.visible ? (r(), y("div", el, [
3188
+ v("div", tl, [
3189
+ g(b, { style: { "flex-shrink": "0" } }),
3190
+ g(d, {
3191
+ text: n.getColumnLabel(h.prop)
3185
3192
  }, null, 8, ["text"])
3186
3193
  ]),
3187
- v("div", ei, [
3188
- d.cancellable ? (o(), m(O, _({
3194
+ v("div", il, [
3195
+ h.cancellable ? (r(), m(O, _({
3189
3196
  key: 0,
3190
- content: i.t("cancel"),
3197
+ content: l.t("cancel"),
3191
3198
  placement: "top"
3192
- }, { ref_for: !0 }, i.afterOpenDelay), {
3199
+ }, { ref_for: !0 }, l.afterOpenDelay), {
3193
3200
  default: p(() => [
3194
- g(r, _({ ref_for: !0 }, i.buttonType, {
3195
- size: i.getCompatSize("mini"),
3201
+ g(o, _({ ref_for: !0 }, l.buttonType, {
3202
+ size: l.getCompatSize("mini"),
3196
3203
  class: "iconfont-button delete-button",
3197
- onClick: (J) => d.visible = !1
3204
+ onClick: (J) => h.visible = !1
3198
3205
  }), {
3199
3206
  default: p(() => [
3200
3207
  g(V)
@@ -3204,16 +3211,16 @@ function ai(e, l, t, a, i, n) {
3204
3211
  ]),
3205
3212
  _: 2
3206
3213
  }, 1040, ["content"])) : C("", !0),
3207
- n.canMoveTop(d, P) ? (o(), m(O, _({
3214
+ n.canMoveTop(h, P) ? (r(), m(O, _({
3208
3215
  key: 1,
3209
- content: i.t("top"),
3216
+ content: l.t("top"),
3210
3217
  placement: "top"
3211
- }, { ref_for: !0 }, i.afterOpenDelay), {
3218
+ }, { ref_for: !0 }, l.afterOpenDelay), {
3212
3219
  default: p(() => [
3213
- g(r, _({ ref_for: !0 }, i.buttonType, {
3214
- size: i.getCompatSize("mini"),
3220
+ g(o, _({ ref_for: !0 }, l.buttonType, {
3221
+ size: l.getCompatSize("mini"),
3215
3222
  class: "iconfont-button top-button",
3216
- onClick: (J) => n.moveTop(d, P)
3223
+ onClick: (J) => n.moveTop(h, P)
3217
3224
  }), {
3218
3225
  default: p(() => [
3219
3226
  g(U)
@@ -3223,17 +3230,17 @@ function ai(e, l, t, a, i, n) {
3223
3230
  ]),
3224
3231
  _: 2
3225
3232
  }, 1040, ["content"])) : C("", !0),
3226
- d.fixed !== "right" ? (o(), m(O, _({
3233
+ h.fixed !== "right" ? (r(), m(O, _({
3227
3234
  key: 2,
3228
- content: d.fixed === "left" ? i.t("cancelLeftFixed") : i.t("leftFixed"),
3235
+ content: h.fixed === "left" ? l.t("cancelLeftFixed") : l.t("leftFixed"),
3229
3236
  placement: "top"
3230
- }, { ref_for: !0 }, i.afterOpenDelay), {
3237
+ }, { ref_for: !0 }, l.afterOpenDelay), {
3231
3238
  default: p(() => [
3232
- g(r, _({ ref_for: !0 }, i.buttonType, {
3233
- size: i.getCompatSize("mini"),
3234
- class: ["iconfont-button left-fixed-btn", { "active-fixed": d.fixed === "left" }],
3239
+ g(o, _({ ref_for: !0 }, l.buttonType, {
3240
+ size: l.getCompatSize("mini"),
3241
+ class: ["iconfont-button left-fixed-btn", { "active-fixed": h.fixed === "left" }],
3235
3242
  onClick: (J) => n.frozenLeftHandle(P),
3236
- disabled: d.fixed !== "left" && n.isThanMaxFrozen
3243
+ disabled: h.fixed !== "left" && n.isThanMaxFrozen
3237
3244
  }), {
3238
3245
  default: p(() => [
3239
3246
  g(j)
@@ -3243,17 +3250,17 @@ function ai(e, l, t, a, i, n) {
3243
3250
  ]),
3244
3251
  _: 2
3245
3252
  }, 1040, ["content"])) : C("", !0),
3246
- d.fixed !== "left" ? (o(), m(O, _({
3253
+ h.fixed !== "left" ? (r(), m(O, _({
3247
3254
  key: 3,
3248
- content: d.fixed === "right" ? i.t("cancelRightFixed") : i.t("rightFixed"),
3255
+ content: h.fixed === "right" ? l.t("cancelRightFixed") : l.t("rightFixed"),
3249
3256
  placement: "top"
3250
- }, { ref_for: !0 }, i.afterOpenDelay), {
3257
+ }, { ref_for: !0 }, l.afterOpenDelay), {
3251
3258
  default: p(() => [
3252
- g(r, _({ ref_for: !0 }, i.buttonType, {
3253
- size: i.getCompatSize("mini"),
3254
- class: ["iconfont-button right-fixed-btn", { "active-fixed": d.fixed === "right" }],
3259
+ g(o, _({ ref_for: !0 }, l.buttonType, {
3260
+ size: l.getCompatSize("mini"),
3261
+ class: ["iconfont-button right-fixed-btn", { "active-fixed": h.fixed === "right" }],
3255
3262
  onClick: (J) => n.frozenRightHandle(P),
3256
- disabled: d.fixed !== "right" && n.isThanMaxRightFrozen
3263
+ disabled: h.fixed !== "right" && n.isThanMaxRightFrozen
3257
3264
  }), {
3258
3265
  default: p(() => [
3259
3266
  g(W)
@@ -3265,39 +3272,39 @@ function ai(e, l, t, a, i, n) {
3265
3272
  }, 1040, ["content"])) : C("", !0)
3266
3273
  ])
3267
3274
  ])) : C("", !0)
3268
- ], 10, Xl))), 128))
3275
+ ], 10, $i))), 128))
3269
3276
  ], 512)
3270
3277
  ])
3271
3278
  ]),
3272
- v("div", ti, [
3273
- v("div", li, [
3274
- g(r, {
3275
- size: i.getCompatSize("mini"),
3279
+ v("div", ll, [
3280
+ v("div", nl, [
3281
+ g(o, {
3282
+ size: l.getCompatSize("mini"),
3276
3283
  onClick: n.handleRestoreDefault
3277
3284
  }, {
3278
3285
  default: p(() => [
3279
- z(T(i.t("restoreDefault")), 1)
3286
+ z(T(l.t("restoreDefault")), 1)
3280
3287
  ]),
3281
3288
  _: 1
3282
3289
  }, 8, ["size", "onClick"])
3283
3290
  ]),
3284
- v("div", ii, [
3285
- g(r, {
3286
- size: i.getCompatSize("mini"),
3287
- onClick: l[1] || (l[1] = (d) => i.popoverVisible = !1)
3291
+ v("div", al, [
3292
+ g(o, {
3293
+ size: l.getCompatSize("mini"),
3294
+ onClick: i[1] || (i[1] = (h) => l.popoverVisible = !1)
3288
3295
  }, {
3289
3296
  default: p(() => [
3290
- z(T(i.t("cancel")), 1)
3297
+ z(T(l.t("cancel")), 1)
3291
3298
  ]),
3292
3299
  _: 1
3293
3300
  }, 8, ["size"]),
3294
- g(r, {
3295
- size: i.getCompatSize("mini"),
3301
+ g(o, {
3302
+ size: l.getCompatSize("mini"),
3296
3303
  type: "primary",
3297
3304
  onClick: n.onSave
3298
3305
  }, {
3299
3306
  default: p(() => [
3300
- z(T(i.t("saveAndApply")), 1)
3307
+ z(T(l.t("saveAndApply")), 1)
3301
3308
  ]),
3302
3309
  _: 1
3303
3310
  }, 8, ["size", "onClick"])
@@ -3308,11 +3315,11 @@ function ai(e, l, t, a, i, n) {
3308
3315
  _: 1
3309
3316
  }, 16, ["placement", "onShow", "onHide"]);
3310
3317
  }
3311
- const si = /* @__PURE__ */ w(Nl, [["render", ai], ["__scopeId", "data-v-127cbd33"]]), ri = !1, oi = !0;
3312
- function ne(e) {
3318
+ const rl = /* @__PURE__ */ w(Bi, [["render", ol], ["__scopeId", "data-v-fc286487"]]), be = !1, ye = !0;
3319
+ function K(e) {
3313
3320
  if (!Array.isArray(e))
3314
3321
  return e;
3315
- const l = [];
3322
+ const i = [];
3316
3323
  for (const t of e)
3317
3324
  if (t)
3318
3325
  if (typeof t.type == "symbol" && t.children) {
@@ -3320,24 +3327,24 @@ function ne(e) {
3320
3327
  if (typeof a == "function")
3321
3328
  continue;
3322
3329
  if (Array.isArray(a)) {
3323
- const i = ne(a);
3324
- l.push(...i);
3330
+ const l = K(a);
3331
+ i.push(...l);
3325
3332
  } else {
3326
- const i = ne([a]);
3327
- l.push(...i);
3333
+ const l = K([a]);
3334
+ i.push(...l);
3328
3335
  }
3329
3336
  } else
3330
- l.push(t);
3331
- return l;
3337
+ i.push(t);
3338
+ return i;
3332
3339
  }
3333
- const ui = {
3340
+ const ul = {
3334
3341
  name: "TmTable",
3335
3342
  components: {
3336
- TableSearch: ze,
3337
- TablePagination: Vl,
3338
- TableMenu: Al,
3339
- ColumnConfig: si,
3340
- RefreshIcon: it,
3343
+ TableSearch: ke,
3344
+ TablePagination: zi,
3345
+ TableMenu: Mi,
3346
+ ColumnConfig: rl,
3347
+ RefreshIcon: at,
3341
3348
  // 用于渲染VNode的组件
3342
3349
  ColumnRenderer: {
3343
3350
  props: ["vnode"],
@@ -3447,9 +3454,9 @@ const ui = {
3447
3454
  data() {
3448
3455
  return {
3449
3456
  getDefaultSize: k,
3450
- getCompatSize: K,
3451
- isVue3: oi,
3452
- isVue2: ri,
3457
+ getCompatSize: Q,
3458
+ isVue3: ye,
3459
+ isVue2: be,
3453
3460
  t: H().t,
3454
3461
  tableData: [],
3455
3462
  tableLoading: !1,
@@ -3463,13 +3470,12 @@ const ui = {
3463
3470
  pageSize: 20,
3464
3471
  total: void 0
3465
3472
  },
3466
- // 列配置相关
3467
3473
  originalColumns: [],
3468
- // 原始列定义
3469
3474
  displayColumns: [],
3470
- // 处理后的列,用于展示
3471
3475
  isColumnConfigLoaded: !1,
3472
- // 标记列配置是否已加载
3476
+ savedColumnConfig: null,
3477
+ slotsUpdateTrigger: 0,
3478
+ lastSlotsHash: null,
3473
3479
  afterOpenDelay: { "show-after": 300 }
3474
3480
  };
3475
3481
  },
@@ -3486,6 +3492,13 @@ const ui = {
3486
3492
  },
3487
3493
  computedShowPagination() {
3488
3494
  return this.showPagination && typeof this.data == "function";
3495
+ },
3496
+ slotsHash() {
3497
+ {
3498
+ this.slotsUpdateTrigger;
3499
+ const e = this.$slots.default ? this.$slots.default() : [], i = K(e);
3500
+ return this.getColumnsHash(i);
3501
+ }
3489
3502
  }
3490
3503
  },
3491
3504
  watch: {
@@ -3500,28 +3513,86 @@ const ui = {
3500
3513
  handler() {
3501
3514
  this.getTableHeight();
3502
3515
  }
3516
+ },
3517
+ slotsHash: {
3518
+ handler(e, i) {
3519
+ e && e !== i && this.$nextTick(() => {
3520
+ this.checkAndUpdateColumns();
3521
+ });
3522
+ }
3503
3523
  }
3504
3524
  },
3505
3525
  created() {
3506
- {
3507
- const e = this.$slots.default();
3508
- this.originalColumns = ne(e);
3509
- }
3510
- this.columnSettingButton ? this.columnsLoading = !0 : (this.displayColumns = this.originalColumns, this.isColumnConfigLoaded = !0);
3526
+ this.updateColumns();
3511
3527
  },
3512
3528
  mounted() {
3513
3529
  this.getTableHeight(), window.addEventListener("resize", this.getTableHeight);
3514
3530
  },
3531
+ beforeUpdate() {
3532
+ this.checkAndUpdateColumns();
3533
+ },
3534
+ updated() {
3535
+ this.$nextTick(() => {
3536
+ this.checkAndUpdateColumns();
3537
+ });
3538
+ },
3515
3539
  beforeDestroy() {
3516
3540
  window.removeEventListener("resize", this.getTableHeight);
3517
3541
  },
3518
3542
  methods: {
3543
+ updateColumns() {
3544
+ {
3545
+ const e = this.$slots.default();
3546
+ this.originalColumns = K(e);
3547
+ }
3548
+ this.columnSettingButton ? this.isColumnConfigLoaded || (this.columnsLoading = !0) : (this.displayColumns = this.originalColumns, this.isColumnConfigLoaded = !0);
3549
+ },
3550
+ getColumnsHash(e) {
3551
+ return e.map((i, t) => {
3552
+ var a, l, n, o, d;
3553
+ return i ? i.key || ((l = (a = i.data) == null ? void 0 : a.attrs) == null ? void 0 : l.prop) || ((o = (n = i.componentOptions) == null ? void 0 : n.propsData) == null ? void 0 : o.prop) || ((d = i.props) == null ? void 0 : d.prop) || `index-${t}` : `null-${t}`;
3554
+ }).join(",");
3555
+ },
3556
+ checkAndUpdateColumns() {
3557
+ var e, i;
3558
+ try {
3559
+ const t = be ? this.$slots.default || [] : K(((i = (e = this.$slots).default) == null ? void 0 : i.call(e)) || []), a = this.getColumnsHash(t), l = this.lastSlotsHash || this.getColumnsHash(this.originalColumns);
3560
+ a !== l && (ye && this.slotsUpdateTrigger++, this.lastSlotsHash = a, this.originalColumns = t, !this.columnSettingButton || !this.isColumnConfigLoaded ? this.displayColumns = this.originalColumns : this.reapplyColumnConfig(), this.$nextTick(() => {
3561
+ this.$refs.table && this.$refs.table.doLayout(), this.$forceUpdate();
3562
+ }));
3563
+ } catch (t) {
3564
+ }
3565
+ },
3519
3566
  handleUpdateSearchForm(e) {
3520
3567
  this.$emit("update:search-form", e);
3521
3568
  },
3522
- // 处理列配置事件(加载完成或保存成功)
3523
3569
  handleColumnConfigComplete(e) {
3524
- Array.isArray(e.columns) ? this.displayColumns = [...e.columns] : this.displayColumns = [...this.originalColumns], e.isInitialLoad ? (this.isColumnConfigLoaded = !0, this.columnsLoading = !1, this.firstLoad && typeof this.data == "function" && this.loadData()) : this.reloadTable();
3570
+ Array.isArray(e.columns) ? (this.displayColumns = [...e.columns], this.savedColumnConfig = e.config || null) : (this.displayColumns = [...this.originalColumns], this.savedColumnConfig = null), e.isInitialLoad ? (this.isColumnConfigLoaded = !0, this.columnsLoading = !1, this.firstLoad && typeof this.data == "function" && this.loadData()) : this.reloadTable();
3571
+ },
3572
+ // 重新应用列配置(当 originalColumns 变化时)
3573
+ reapplyColumnConfig() {
3574
+ if (!this.columnSettingButton || !this.isColumnConfigLoaded || !this.savedColumnConfig)
3575
+ return;
3576
+ const e = (l) => l.props || {}, i = {};
3577
+ this.originalColumns.forEach((l) => {
3578
+ const n = e(l);
3579
+ n.prop && (i[n.prop] = l);
3580
+ });
3581
+ const t = [];
3582
+ this.originalColumns.forEach((l) => {
3583
+ e(l).type === "selection" && t.push(l);
3584
+ }), [...this.savedColumnConfig].sort((l, n) => {
3585
+ const o = l.sort !== void 0 ? l.sort : 1 / 0, d = n.sort !== void 0 ? n.sort : 1 / 0;
3586
+ return o - d;
3587
+ }).forEach((l) => {
3588
+ l.prop && i[l.prop] && l.visible !== !1 && t.push(i[l.prop]);
3589
+ }), this.originalColumns.forEach((l) => {
3590
+ const n = e(l), o = n.prop, d = n.type;
3591
+ if (o && d !== "selection") {
3592
+ const c = this.savedColumnConfig.some((b) => b.prop === o), f = t.find((b) => e(b).prop === o);
3593
+ !c && !f && t.push(l);
3594
+ }
3595
+ }), this.displayColumns = t;
3525
3596
  },
3526
3597
  // 判断是否为自动高度
3527
3598
  isAutoHeight() {
@@ -3544,10 +3615,10 @@ const ui = {
3544
3615
  current: this.paginationInfo.current
3545
3616
  },
3546
3617
  params: this.searchForm
3547
- }), { list: l, total: t, pageSize: a, current: i } = e;
3548
- this.tableData = l;
3618
+ }), { list: i, total: t, pageSize: a, current: l } = e;
3619
+ this.tableData = i;
3549
3620
  let n = x({}, this.paginationInfo);
3550
- t !== void 0 && (n.total = t), i !== void 0 && (n.current = i), a !== void 0 && (n.pageSize = a), this.paginationInfo = n;
3621
+ t !== void 0 && (n.total = t), l !== void 0 && (n.current = l), a !== void 0 && (n.pageSize = a), this.paginationInfo = n;
3551
3622
  } catch (e) {
3552
3623
  } finally {
3553
3624
  this.tableLoading = !1;
@@ -3557,9 +3628,9 @@ const ui = {
3557
3628
  // 获取表格高度
3558
3629
  getTableHeight() {
3559
3630
  this.isAutoHeight() ? this.$nextTick(() => {
3560
- const e = this.$refs.table, l = this.$refs.tmPagination;
3631
+ const e = this.$refs.table, i = this.$refs.tmPagination;
3561
3632
  if (!e) return;
3562
- const t = e.$el, a = l && l.$el && l.$el.offsetHeight || 0;
3633
+ const t = e.$el, a = i && i.$el && i.$el.offsetHeight || 0;
3563
3634
  this.tableHeight = document.documentElement.clientHeight - t.offsetTop - a - this.calcHeight;
3564
3635
  }) : this.tableHeight = this.height, this.refreshTable();
3565
3636
  },
@@ -3594,14 +3665,14 @@ const ui = {
3594
3665
  this.tableReload++;
3595
3666
  }
3596
3667
  }
3597
- }, di = {
3668
+ }, dl = {
3598
3669
  class: "tm-table",
3599
3670
  ref: "tablePage"
3600
3671
  };
3601
- function hi(e, l, t, a, i, n) {
3602
- const r = u("table-search"), c = u("RefreshIcon"), h = u("el-button"), f = u("el-tooltip"), y = u("ColumnConfig"), V = u("table-menu"), O = u("columnRenderer"), U = u("el-table"), j = u("table-pagination"), W = Pe("loading");
3603
- return o(), b("div", di, [
3604
- t.searchColumns && t.searchColumns.length > 0 ? (o(), m(r, {
3672
+ function hl(e, i, t, a, l, n) {
3673
+ const o = u("table-search"), d = u("RefreshIcon"), c = u("el-button"), f = u("el-tooltip"), b = u("ColumnConfig"), V = u("table-menu"), O = u("columnRenderer"), U = u("el-table"), j = u("table-pagination"), W = Ue("loading");
3674
+ return r(), y("div", dl, [
3675
+ t.searchColumns && t.searchColumns.length > 0 ? (r(), m(o, {
3605
3676
  key: 0,
3606
3677
  ref: "search",
3607
3678
  onSearch: n.search,
@@ -3621,54 +3692,54 @@ function hi(e, l, t, a, i, n) {
3621
3692
  _: 3
3622
3693
  }, 8, ["onSearch", "onReset", "onUpdate:searchForm", "disabled", "search-columns", "search-form", "label-width", "input-width", "direction", "label-align"])) : C("", !0),
3623
3694
  S(e.$slots, "between-search-menu", {}, void 0, !0),
3624
- t.showMenu ? (o(), m(V, { key: 1 }, {
3695
+ t.showMenu ? (r(), m(V, { key: 1 }, {
3625
3696
  left: p(() => [
3626
3697
  S(e.$slots, "menu-left", {}, void 0, !0)
3627
3698
  ]),
3628
3699
  right: p(() => [
3629
3700
  S(e.$slots, "menu-right", {}, void 0, !0),
3630
- t.refreshButton && typeof t.data == "function" ? (o(), m(f, _({
3701
+ t.refreshButton && typeof t.data == "function" ? (r(), m(f, _({
3631
3702
  key: 0,
3632
- content: i.t("refresh"),
3703
+ content: l.t("refresh"),
3633
3704
  placement: "top"
3634
- }, i.afterOpenDelay), {
3705
+ }, l.afterOpenDelay), {
3635
3706
  default: p(() => [
3636
- g(h, {
3707
+ g(c, {
3637
3708
  onClick: n.handleRefresh,
3638
3709
  circle: "",
3639
- size: i.getDefaultSize()
3710
+ size: l.getDefaultSize()
3640
3711
  }, {
3641
3712
  default: p(() => [
3642
- g(c)
3713
+ g(d)
3643
3714
  ]),
3644
3715
  _: 1
3645
3716
  }, 8, ["onClick", "size"])
3646
3717
  ]),
3647
3718
  _: 1
3648
3719
  }, 16, ["content"])) : C("", !0),
3649
- t.columnSettingButton ? (o(), m(y, {
3720
+ t.columnSettingButton ? (r(), m(b, {
3650
3721
  key: 1,
3651
3722
  maxFixedLeftQuantity: t.maxFixedLeftQuantity,
3652
3723
  maxFixedRightQuantity: t.maxFixedRightQuantity,
3653
3724
  tableKey: n.computedTableKey,
3654
- columns: i.originalColumns,
3725
+ columns: l.originalColumns,
3655
3726
  onComplete: n.handleColumnConfigComplete
3656
3727
  }, null, 8, ["maxFixedLeftQuantity", "maxFixedRightQuantity", "tableKey", "columns", "onComplete"])) : C("", !0)
3657
3728
  ]),
3658
3729
  _: 3
3659
3730
  })) : C("", !0),
3660
3731
  S(e.$slots, "between-menu-table", {}, void 0, !0),
3661
- Be((o(), m(U, _({ ref: "table" }, I(x({}, e.$attrs), { border: t.border }), M(i.isVue2 ? e.$listeners : {}), {
3662
- data: i.tableData,
3663
- height: i.tableHeight,
3664
- size: i.getCompatSize("mini"),
3732
+ je((r(), m(U, _({ ref: "table" }, I(x({}, e.$attrs), { border: t.border }), M(l.isVue2 ? e.$listeners : {}), {
3733
+ data: l.tableData,
3734
+ height: l.tableHeight,
3735
+ size: l.getCompatSize("mini"),
3665
3736
  onSelectionChange: n.handleSelectionChange,
3666
- key: i.tableReload
3737
+ key: l.tableReload
3667
3738
  }), {
3668
3739
  default: p(() => [
3669
- (o(!0), b(L, null, A(i.displayColumns, (s) => (o(), m(O, {
3740
+ (r(!0), y(L, null, A(l.displayColumns, (s) => (r(), m(O, {
3670
3741
  vnode: s,
3671
- key: i.isVue3 ? s.id : s.data.attrs.prop
3742
+ key: `${l.isVue3 ? s.id : s.data.attrs.prop}-${l.slotsUpdateTrigger}`
3672
3743
  }, null, 8, ["vnode"]))), 128))
3673
3744
  ]),
3674
3745
  _: 1
@@ -3676,20 +3747,25 @@ function hi(e, l, t, a, i, n) {
3676
3747
  [W, n.pageLoading]
3677
3748
  ]),
3678
3749
  S(e.$slots, "between-table-pagination", {}, void 0, !0),
3679
- n.computedShowPagination ? (o(), m(j, {
3750
+ n.computedShowPagination ? (r(), m(j, {
3680
3751
  key: 2,
3681
3752
  ref: "tmPagination",
3682
- "page-size": i.paginationInfo.pageSize,
3683
- current: i.paginationInfo.current,
3684
- total: i.paginationInfo.total,
3685
- disabled: i.tableLoading,
3753
+ "page-size": l.paginationInfo.pageSize,
3754
+ current: l.paginationInfo.current,
3755
+ total: l.paginationInfo.total,
3756
+ disabled: l.tableLoading,
3686
3757
  onSizeChange: n.handleSizeChange,
3687
3758
  onCurrentChange: n.handleCurrentChange
3688
- }, null, 8, ["page-size", "current", "total", "disabled", "onSizeChange", "onCurrentChange"])) : C("", !0),
3759
+ }, {
3760
+ "pagination-left": p(() => [
3761
+ S(e.$slots, "pagination-left", {}, void 0, !0)
3762
+ ]),
3763
+ _: 3
3764
+ }, 8, ["page-size", "current", "total", "disabled", "onSizeChange", "onCurrentChange"])) : C("", !0),
3689
3765
  S(e.$slots, "after-pagination", {}, void 0, !0)
3690
3766
  ], 512);
3691
3767
  }
3692
- const Le = /* @__PURE__ */ w(ui, [["render", hi], ["__scopeId", "data-v-020e8134"]]), ci = !1, fi = !0, pi = {
3768
+ const Oe = /* @__PURE__ */ w(ul, [["render", hl], ["__scopeId", "data-v-732947c2"]]), cl = !1, fl = !0, pl = {
3693
3769
  name: "TmTableColumn",
3694
3770
  inheritAttrs: !1,
3695
3771
  computed: {
@@ -3702,8 +3778,8 @@ const Le = /* @__PURE__ */ w(ui, [["render", hi], ["__scopeId", "data-v-020e8134
3702
3778
  },
3703
3779
  data() {
3704
3780
  return {
3705
- isVue2: ci,
3706
- isVue3: fi
3781
+ isVue2: cl,
3782
+ isVue3: fl
3707
3783
  };
3708
3784
  },
3709
3785
  created() {
@@ -3713,21 +3789,21 @@ const Le = /* @__PURE__ */ w(ui, [["render", hi], ["__scopeId", "data-v-020e8134
3713
3789
  });
3714
3790
  }
3715
3791
  };
3716
- function mi(e, l, t, a, i, n) {
3717
- const r = u("el-table-column");
3718
- return n.isVisible ? (o(), m(r, _({ key: 0 }, e.$attrs, M(i.isVue2 ? e.$listeners : {})), ye({ _: 2 }, [
3719
- A(n.slots, (c, h) => ({
3720
- name: h,
3792
+ function ml(e, i, t, a, l, n) {
3793
+ const o = u("el-table-column");
3794
+ return n.isVisible ? (r(), m(o, _({ key: 0 }, e.$attrs, M(l.isVue2 ? e.$listeners : {})), Ce({ _: 2 }, [
3795
+ A(n.slots, (d, c) => ({
3796
+ name: c,
3721
3797
  fn: p((f) => [
3722
- S(e.$slots, h, Ue(je(f)))
3798
+ S(e.$slots, c, Je(Ke(f)))
3723
3799
  ])
3724
3800
  }))
3725
3801
  ]), 1040)) : C("", !0);
3726
3802
  }
3727
- const ke = /* @__PURE__ */ w(pi, [["render", mi]]), { t: ie } = H(), gi = {
3803
+ const Ae = /* @__PURE__ */ w(pl, [["render", ml]]), { t: ne } = H(), gl = {
3728
3804
  name: "TmAdvancedEllipsisText",
3729
3805
  components: {
3730
- CopyIcon: ve
3806
+ CopyIcon: _e
3731
3807
  },
3732
3808
  props: {
3733
3809
  rows: {
@@ -3844,7 +3920,7 @@ const ke = /* @__PURE__ */ w(pi, [["render", mi]]), { t: ie } = H(), gi = {
3844
3920
  },
3845
3921
  handleCopy() {
3846
3922
  navigator.clipboard && window.isSecureContext ? navigator.clipboard.writeText(this.originalText).then(() => {
3847
- this.$message.success(ie("copySuccess"));
3923
+ this.$message.success(ne("copySuccess"));
3848
3924
  }).catch(() => {
3849
3925
  this.fallbackCopy();
3850
3926
  }) : this.fallbackCopy();
@@ -3853,23 +3929,23 @@ const ke = /* @__PURE__ */ w(pi, [["render", mi]]), { t: ie } = H(), gi = {
3853
3929
  const e = document.createElement("textarea");
3854
3930
  e.value = this.originalText, e.style.position = "fixed", e.style.left = "-999999px", e.style.top = "-999999px", document.body.appendChild(e), e.focus(), e.select();
3855
3931
  try {
3856
- document.execCommand("copy"), this.$message.success(ie("copySuccess"));
3857
- } catch (l) {
3858
- this.$message.error(ie("copyFailed"));
3932
+ document.execCommand("copy"), this.$message.success(ne("copySuccess"));
3933
+ } catch (i) {
3934
+ this.$message.error(ne("copyFailed"));
3859
3935
  }
3860
3936
  document.body.removeChild(e);
3861
3937
  },
3862
3938
  getTextContent() {
3863
3939
  if (this.$slots.default) {
3864
3940
  const e = this.$slots.default;
3865
- return e().map((l) => typeof l.children == "string" ? l.children : Array.isArray(l.children) ? l.children.map((t) => t.children || "").join("") : "").join("");
3941
+ return e().map((i) => typeof i.children == "string" ? i.children : Array.isArray(i.children) ? i.children.map((t) => t.children || "").join("") : "").join("");
3866
3942
  }
3867
3943
  return this.text || "";
3868
3944
  },
3869
3945
  calculateLineHeight() {
3870
3946
  const e = this.$refs.containerRef;
3871
3947
  if (!e) return;
3872
- const l = window.getComputedStyle(e);
3948
+ const i = window.getComputedStyle(e);
3873
3949
  this.containerWidth = e.offsetWidth;
3874
3950
  const t = this.$refs.measureRef;
3875
3951
  if (t) {
@@ -3881,12 +3957,12 @@ const ke = /* @__PURE__ */ w(pi, [["render", mi]]), { t: ie } = H(), gi = {
3881
3957
  const a = t.offsetHeight;
3882
3958
  t.innerHTML = "", this.lineHeight = a;
3883
3959
  } else {
3884
- const a = l.lineHeight;
3960
+ const a = i.lineHeight;
3885
3961
  if (a && a !== "normal")
3886
3962
  this.lineHeight = parseInt(a);
3887
3963
  else {
3888
- const i = parseInt(l.fontSize);
3889
- this.lineHeight = i * 1.2;
3964
+ const l = parseInt(i.fontSize);
3965
+ this.lineHeight = l * 1.2;
3890
3966
  }
3891
3967
  }
3892
3968
  },
@@ -3908,43 +3984,43 @@ const ke = /* @__PURE__ */ w(pi, [["render", mi]]), { t: ie } = H(), gi = {
3908
3984
  if (this.rows === 1)
3909
3985
  this.frontLines = [], this.lastLineText = e, this.isLastLineEllipsis = this.checkIfTextOverflows(e);
3910
3986
  else {
3911
- const l = this.lineHeight;
3912
- if (this.getTextHeight(e) <= l)
3987
+ const i = this.lineHeight;
3988
+ if (this.getTextHeight(e) <= i)
3913
3989
  this.frontLines = [], this.lastLineText = e, this.isLastLineEllipsis = this.checkIfTextOverflows(e);
3914
3990
  else {
3915
- const a = this.lineHeight * (this.rows - 1), i = this.findTextForHeight(e, a);
3916
- this.frontLines = this.splitTextToLines(i);
3917
- const n = e.substring(i.length);
3991
+ const a = this.lineHeight * (this.rows - 1), l = this.findTextForHeight(e, a);
3992
+ this.frontLines = this.splitTextToLines(l);
3993
+ const n = e.substring(l.length);
3918
3994
  this.lastLineText = n, this.isLastLineEllipsis = n.length > 0 && this.checkIfTextOverflows(n);
3919
3995
  }
3920
3996
  }
3921
3997
  this.isCalculating = !1;
3922
3998
  },
3923
- findTextForHeight(e, l) {
3924
- if (this.getTextHeight(e) <= l)
3999
+ findTextForHeight(e, i) {
4000
+ if (this.getTextHeight(e) <= i)
3925
4001
  return e;
3926
- let t = 0, a = e.length, i = "";
4002
+ let t = 0, a = e.length, l = "";
3927
4003
  for (; t <= a; ) {
3928
- const n = Math.floor((t + a) / 2), r = e.substring(0, n);
3929
- this.getTextHeight(r) <= l ? (i = r, t = n + 1) : a = n - 1;
4004
+ const n = Math.floor((t + a) / 2), o = e.substring(0, n);
4005
+ this.getTextHeight(o) <= i ? (l = o, t = n + 1) : a = n - 1;
3930
4006
  }
3931
- return i;
4007
+ return l;
3932
4008
  },
3933
4009
  splitTextToLines(e) {
3934
4010
  if (!e) return [];
3935
- const l = [];
4011
+ const i = [];
3936
4012
  let t = e;
3937
4013
  for (; t.length > 0; ) {
3938
4014
  const a = this.findTextForHeight(t, this.lineHeight);
3939
4015
  if (a.length === 0) break;
3940
- l.push(a), t = t.substring(a.length);
4016
+ i.push(a), t = t.substring(a.length);
3941
4017
  }
3942
- return l;
4018
+ return i;
3943
4019
  },
3944
4020
  checkIfTextOverflows(e) {
3945
4021
  if (!e) return !1;
3946
- const l = this.getTextWidth(e), t = this.shouldShowToolbar && this.hasToolbarContent ? this.getToolbarWidth() : 0, a = this.containerWidth - t - 5;
3947
- return l > a;
4022
+ const i = this.getTextWidth(e), t = this.shouldShowToolbar && this.hasToolbarContent ? this.getToolbarWidth() : 0, a = this.containerWidth - t - 5;
4023
+ return i > a;
3948
4024
  },
3949
4025
  getToolbarWidth() {
3950
4026
  let e = 0;
@@ -3960,18 +4036,18 @@ const ke = /* @__PURE__ */ w(pi, [["render", mi]]), { t: ie } = H(), gi = {
3960
4036
  getTextWidth(e) {
3961
4037
  return this.measureText(e, { whiteSpace: "nowrap" });
3962
4038
  },
3963
- measureText(e, l = {}) {
4039
+ measureText(e, i = {}) {
3964
4040
  if (!this.$refs.containerRef || !this.$refs.measureRef)
3965
4041
  return 0;
3966
4042
  const t = this.$refs.measureRef, a = t.style.cssText;
3967
- this.setMeasureElementStyle(t, l), t.textContent = e, t.offsetHeight;
3968
- const i = l.whiteSpace === "nowrap" ? t.offsetWidth : t.offsetHeight;
3969
- return t.style.cssText = a, t.innerHTML = "", i;
4043
+ this.setMeasureElementStyle(t, i), t.textContent = e, t.offsetHeight;
4044
+ const l = i.whiteSpace === "nowrap" ? t.offsetWidth : t.offsetHeight;
4045
+ return t.style.cssText = a, t.innerHTML = "", l;
3970
4046
  },
3971
- setMeasureElementStyle(e, l = {}) {
4047
+ setMeasureElementStyle(e, i = {}) {
3972
4048
  const t = window.getComputedStyle(this.$refs.containerRef);
3973
- e.style.cssText = "", e.style.position = "absolute", e.style.left = "-9999px", e.style.top = "-9999px", e.style.visibility = "hidden", e.style.pointerEvents = "none", e.style.zIndex = "-1", e.style.fontSize = t.fontSize, e.style.fontFamily = t.fontFamily, e.style.fontWeight = t.fontWeight, e.style.lineHeight = t.lineHeight, e.style.letterSpacing = t.letterSpacing, e.style.wordSpacing = t.wordSpacing, e.style.padding = "0", e.style.margin = "0", e.style.border = "none", e.style.boxSizing = "border-box", Object.entries(l).forEach(([a, i]) => {
3974
- e.style[a] = i;
4049
+ e.style.cssText = "", e.style.position = "absolute", e.style.left = "-9999px", e.style.top = "-9999px", e.style.visibility = "hidden", e.style.pointerEvents = "none", e.style.zIndex = "-1", e.style.fontSize = t.fontSize, e.style.fontFamily = t.fontFamily, e.style.fontWeight = t.fontWeight, e.style.lineHeight = t.lineHeight, e.style.letterSpacing = t.letterSpacing, e.style.wordSpacing = t.wordSpacing, e.style.padding = "0", e.style.margin = "0", e.style.border = "none", e.style.boxSizing = "border-box", Object.entries(i).forEach(([a, l]) => {
4050
+ e.style[a] = l;
3975
4051
  });
3976
4052
  },
3977
4053
  handleMouseEnter() {
@@ -3982,9 +4058,9 @@ const ke = /* @__PURE__ */ w(pi, [["render", mi]]), { t: ie } = H(), gi = {
3982
4058
  },
3983
4059
  setupResizeObserver() {
3984
4060
  typeof ResizeObserver != "undefined" && (this.resizeObserver = new ResizeObserver((e) => {
3985
- const l = e[0];
3986
- if (l) {
3987
- const t = l.contentRect.width;
4061
+ const i = e[0];
4062
+ if (i) {
4063
+ const t = i.contentRect.width;
3988
4064
  Math.abs(t - this.containerWidth) > 1 && requestAnimationFrame(() => {
3989
4065
  this.calculateLineHeight(), this.calculateLayout();
3990
4066
  });
@@ -4009,49 +4085,49 @@ const ke = /* @__PURE__ */ w(pi, [["render", mi]]), { t: ie } = H(), gi = {
4009
4085
  this.tableRowElement && (this.tableRowElement.removeEventListener("mouseenter", this.handleMouseEnter), this.tableRowElement.removeEventListener("mouseleave", this.handleMouseLeave), this.tableRowElement = null);
4010
4086
  }
4011
4087
  }
4012
- }, bi = { class: "tm-ellipsis-text-wrapper" }, yi = ["innerHTML"], vi = { class: "tm-ellipsis-last-line" }, Ci = ["innerHTML"], _i = {
4088
+ }, bl = { class: "tm-ellipsis-text-wrapper" }, yl = ["innerHTML"], vl = { class: "tm-ellipsis-last-line" }, Cl = ["innerHTML"], _l = {
4013
4089
  key: 0,
4014
4090
  class: "tm-ellipsis-toolbar-part"
4015
- }, Si = {
4091
+ }, Sl = {
4016
4092
  key: 1,
4017
4093
  class: "tm-ellipsis-text-wrapper"
4018
- }, xi = ["innerHTML"], Ti = { class: "tm-ellipsis-last-line" }, wi = ["innerHTML"], Vi = {
4094
+ }, xl = ["innerHTML"], Tl = { class: "tm-ellipsis-last-line" }, wl = ["innerHTML"], Vl = {
4019
4095
  key: 0,
4020
4096
  class: "tm-ellipsis-toolbar-part"
4021
- }, Fi = {
4097
+ }, Fl = {
4022
4098
  ref: "measureRef",
4023
4099
  class: "tm-ellipsis-measure"
4024
4100
  };
4025
- function zi(e, l, t, a, i, n) {
4026
- const r = u("CopyIcon"), c = u("el-tooltip");
4027
- return o(), b("div", {
4101
+ function zl(e, i, t, a, l, n) {
4102
+ const o = u("CopyIcon"), d = u("el-tooltip");
4103
+ return r(), y("div", {
4028
4104
  ref: "containerRef",
4029
4105
  style: B(n.containerStyle),
4030
4106
  class: "tm-ellipsis-text",
4031
- onMouseenter: l[0] || (l[0] = (...h) => n.handleMouseEnter && n.handleMouseEnter(...h)),
4032
- onMouseleave: l[1] || (l[1] = (...h) => n.handleMouseLeave && n.handleMouseLeave(...h))
4107
+ onMouseenter: i[0] || (i[0] = (...c) => n.handleMouseEnter && n.handleMouseEnter(...c)),
4108
+ onMouseleave: i[1] || (i[1] = (...c) => n.handleMouseLeave && n.handleMouseLeave(...c))
4033
4109
  }, [
4034
- t.showTooltip && i.isLastLineEllipsis ? (o(), m(c, _({
4110
+ t.showTooltip && l.isLastLineEllipsis ? (r(), m(d, _({
4035
4111
  key: 0,
4036
- content: i.originalText,
4037
- disabled: !t.showTooltip || !i.isLastLineEllipsis
4112
+ content: l.originalText,
4113
+ disabled: !t.showTooltip || !l.isLastLineEllipsis
4038
4114
  }, {
4039
- [i.isVue2 ? "open-delay" : "show-after"]: 300
4115
+ [l.isVue2 ? "open-delay" : "show-after"]: 300
4040
4116
  }, { placement: "top" }), {
4041
4117
  default: p(() => [
4042
- v("div", bi, [
4043
- (o(!0), b(L, null, A(i.frontLines, (h, f) => (o(), b("div", {
4118
+ v("div", bl, [
4119
+ (r(!0), y(L, null, A(l.frontLines, (c, f) => (r(), y("div", {
4044
4120
  key: "front-" + f,
4045
4121
  class: "tm-ellipsis-line",
4046
- innerHTML: h
4047
- }, null, 8, yi))), 128)),
4048
- v("div", vi, [
4122
+ innerHTML: c
4123
+ }, null, 8, yl))), 128)),
4124
+ v("div", vl, [
4049
4125
  v("div", {
4050
4126
  class: "tm-ellipsis-text-part",
4051
- innerHTML: i.lastLineText
4052
- }, null, 8, Ci),
4053
- n.shouldShowToolbar && n.hasToolbarContent ? (o(), b("div", _i, [
4054
- t.copyable ? (o(), m(r, {
4127
+ innerHTML: l.lastLineText
4128
+ }, null, 8, Cl),
4129
+ n.shouldShowToolbar && n.hasToolbarContent ? (r(), y("div", _l, [
4130
+ t.copyable ? (r(), m(o, {
4055
4131
  key: 0,
4056
4132
  class: "icon-item",
4057
4133
  onClick: n.handleCopy
@@ -4062,19 +4138,19 @@ function zi(e, l, t, a, i, n) {
4062
4138
  ])
4063
4139
  ]),
4064
4140
  _: 3
4065
- }, 16, ["content", "disabled"])) : (o(), b("div", Si, [
4066
- (o(!0), b(L, null, A(i.frontLines, (h, f) => (o(), b("div", {
4141
+ }, 16, ["content", "disabled"])) : (r(), y("div", Sl, [
4142
+ (r(!0), y(L, null, A(l.frontLines, (c, f) => (r(), y("div", {
4067
4143
  key: "front-" + f,
4068
4144
  class: "tm-ellipsis-line",
4069
- innerHTML: h
4070
- }, null, 8, xi))), 128)),
4071
- v("div", Ti, [
4145
+ innerHTML: c
4146
+ }, null, 8, xl))), 128)),
4147
+ v("div", Tl, [
4072
4148
  v("div", {
4073
4149
  class: "tm-ellipsis-text-part",
4074
- innerHTML: i.lastLineText
4075
- }, null, 8, wi),
4076
- n.shouldShowToolbar && n.hasToolbarContent ? (o(), b("div", Vi, [
4077
- t.copyable ? (o(), m(r, {
4150
+ innerHTML: l.lastLineText
4151
+ }, null, 8, wl),
4152
+ n.shouldShowToolbar && n.hasToolbarContent ? (r(), y("div", Vl, [
4153
+ t.copyable ? (r(), m(o, {
4078
4154
  key: 0,
4079
4155
  class: "icon-item",
4080
4156
  onClick: n.handleCopy
@@ -4083,47 +4159,47 @@ function zi(e, l, t, a, i, n) {
4083
4159
  ])) : C("", !0)
4084
4160
  ])
4085
4161
  ])),
4086
- v("div", Fi, null, 512)
4162
+ v("div", Fl, null, 512)
4087
4163
  ], 36);
4088
4164
  }
4089
- const Oe = /* @__PURE__ */ w(gi, [["render", zi], ["__scopeId", "data-v-14f27c2e"]]), Li = {
4090
- install(e, l = {}) {
4091
- [Le, ke, $, Oe].forEach((t) => e.component(t.name, t)), l.tableConfigProvider && Hl(l.tableConfigProvider), l.lang && ae(l.lang || "zh-CN");
4165
+ const De = /* @__PURE__ */ w(gl, [["render", zl], ["__scopeId", "data-v-14f27c2e"]]), Ll = {
4166
+ install(e, i = {}) {
4167
+ [Oe, Ae, ee, De].forEach((t) => e.component(t.name, t)), i.tableConfigProvider && Ii(i.tableConfigProvider), i.lang && ae(i.lang || "zh-CN");
4092
4168
  }
4093
- }, ki = {
4094
- install: Li.install,
4095
- Table: Le,
4096
- Column: ke,
4097
- Search: ze,
4098
- Select: Ce,
4099
- Input: _e,
4100
- Date: Se,
4101
- Cascader: xe,
4102
- Radio: Te,
4103
- Checkbox: we,
4104
- Switch: Ve,
4105
- Textarea: Fe,
4106
- EllipsisText: $,
4107
- AdvancedEllipsisText: Oe,
4169
+ }, kl = {
4170
+ install: Ll.install,
4171
+ Table: Oe,
4172
+ Column: Ae,
4173
+ Search: ke,
4174
+ Select: Se,
4175
+ Input: xe,
4176
+ Date: Te,
4177
+ Cascader: we,
4178
+ Radio: Ve,
4179
+ Checkbox: Fe,
4180
+ Switch: ze,
4181
+ Textarea: Le,
4182
+ EllipsisText: ee,
4183
+ AdvancedEllipsisText: De,
4108
4184
  setLang: ae,
4109
4185
  useLocale: H
4110
4186
  };
4111
- typeof window != "undefined" && window.Vue && ki.install(window.Vue);
4187
+ typeof window != "undefined" && window.Vue && kl.install(window.Vue);
4112
4188
  export {
4113
- Oe as AdvancedEllipsisText,
4114
- xe as Cascader,
4115
- we as Checkbox,
4116
- ke as Column,
4117
- Se as Date,
4118
- $ as EllipsisText,
4119
- _e as Input,
4120
- Te as Radio,
4121
- ze as Search,
4122
- Ce as Select,
4123
- Ve as Switch,
4124
- Le as Table,
4125
- Fe as Textarea,
4126
- ki as default,
4189
+ De as AdvancedEllipsisText,
4190
+ we as Cascader,
4191
+ Fe as Checkbox,
4192
+ Ae as Column,
4193
+ Te as Date,
4194
+ ee as EllipsisText,
4195
+ xe as Input,
4196
+ Ve as Radio,
4197
+ ke as Search,
4198
+ Se as Select,
4199
+ ze as Switch,
4200
+ Oe as Table,
4201
+ Le as Textarea,
4202
+ kl as default,
4127
4203
  ae as setLang,
4128
4204
  H as useLocale
4129
4205
  };