tm-table 1.2.8 → 1.2.11

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,27 +1,27 @@
1
- var te = Object.defineProperty, ie = Object.defineProperties;
2
- var se = Object.getOwnPropertyDescriptors;
1
+ var ie = Object.defineProperty, se = Object.defineProperties;
2
+ var ae = Object.getOwnPropertyDescriptors;
3
3
  var S = Object.getOwnPropertySymbols;
4
- var D = Object.prototype.hasOwnProperty, R = Object.prototype.propertyIsEnumerable;
5
- var A = (t, e, i) => e in t ? te(t, e, { enumerable: !0, configurable: !0, writable: !0, value: i }) : t[e] = i, u = (t, e) => {
4
+ var R = Object.prototype.hasOwnProperty, M = Object.prototype.propertyIsEnumerable;
5
+ var D = (t, e, i) => e in t ? ie(t, e, { enumerable: !0, configurable: !0, writable: !0, value: i }) : t[e] = i, c = (t, e) => {
6
6
  for (var i in e || (e = {}))
7
- D.call(e, i) && A(t, i, e[i]);
7
+ R.call(e, i) && D(t, i, e[i]);
8
8
  if (S)
9
9
  for (var i of S(e))
10
- R.call(e, i) && A(t, i, e[i]);
10
+ M.call(e, i) && D(t, i, e[i]);
11
11
  return t;
12
- }, g = (t, e) => ie(t, se(e));
13
- var M = (t, e) => {
12
+ }, b = (t, e) => se(t, ae(e));
13
+ var H = (t, e) => {
14
14
  var i = {};
15
15
  for (var s in t)
16
- D.call(t, s) && e.indexOf(s) < 0 && (i[s] = t[s]);
16
+ R.call(t, s) && e.indexOf(s) < 0 && (i[s] = t[s]);
17
17
  if (t != null && S)
18
18
  for (var s of S(t))
19
- e.indexOf(s) < 0 && R.call(t, s) && (i[s] = t[s]);
19
+ e.indexOf(s) < 0 && M.call(t, s) && (i[s] = t[s]);
20
20
  return i;
21
21
  };
22
22
  import "vue";
23
23
  import y from "sortablejs";
24
- const x = (t) => t, f = () => "mini", ae = {
24
+ const x = (t) => t, f = () => "mini", le = {
25
25
  today: "今天",
26
26
  yesterday: "昨天",
27
27
  last7days: "最近7天",
@@ -60,7 +60,7 @@ const x = (t) => t, f = () => "mini", ae = {
60
60
  cancelTop: "取消置顶",
61
61
  copySuccess: "复制成功",
62
62
  copyFailed: "复制失败"
63
- }, le = {
63
+ }, ne = {
64
64
  today: "Today",
65
65
  yesterday: "Yesterday",
66
66
  last7days: "Last 7 days",
@@ -100,38 +100,38 @@ const x = (t) => t, f = () => "mini", ae = {
100
100
  copySuccess: "Copy successfully",
101
101
  copyFailed: "Copy failed"
102
102
  };
103
- var H;
104
- const ne = {
105
- "zh-CN": ae,
106
- "en-US": le
103
+ var E;
104
+ const re = {
105
+ "zh-CN": le,
106
+ "en-US": ne
107
107
  };
108
108
  let C = { value: "zh-CN" };
109
109
  {
110
110
  const t = require("vue");
111
- t.observable || (H = t.default) != null && H.observable ? C = t.default.observable(C) : C = new t({
111
+ t.observable || (E = t.default) != null && E.observable ? C = t.default.observable(C) : C = new t({
112
112
  data() {
113
113
  return { currentLang: C };
114
114
  }
115
115
  }).$data.currentLang;
116
116
  }
117
- const re = (t) => {
117
+ const oe = (t) => {
118
118
  var e;
119
- return ((e = ne[C.value]) == null ? void 0 : e[t]) || t;
119
+ return ((e = re[C.value]) == null ? void 0 : e[t]) || t;
120
120
  }, O = (t) => {
121
121
  C.value = t;
122
- }, b = () => ({
123
- t: re,
122
+ }, m = () => ({
123
+ t: oe,
124
124
  setLang: O,
125
125
  currentLang: C
126
126
  });
127
- function d(t, e, i, s, a, l, n, r) {
128
- var o = typeof t == "function" ? t.options : t;
129
- return e && (o.render = e, o.staticRenderFns = i, o._compiled = !0), l && (o._scopeId = "data-v-" + l), {
127
+ function d(t, e, i, s, a, l, n, o) {
128
+ var r = typeof t == "function" ? t.options : t;
129
+ return e && (r.render = e, r.staticRenderFns = i, r._compiled = !0), l && (r._scopeId = "data-v-" + l), {
130
130
  exports: t,
131
- options: o
131
+ options: r
132
132
  };
133
133
  }
134
- const oe = {
134
+ const ue = {
135
135
  name: "BaseIcon",
136
136
  props: {
137
137
  path: {
@@ -150,18 +150,18 @@ const oe = {
150
150
  }
151
151
  }
152
152
  };
153
- var ue = function() {
153
+ var ce = function() {
154
154
  var e = this, i = e._self._c;
155
155
  return i("i", { staticClass: "tm-icon", on: { click: e.handleClick } }, [i("svg", { style: { color: e.color }, attrs: { width: e.size, height: e.size, viewBox: "0 0 1024 1024", xmlns: "http://www.w3.org/2000/svg" } }, [i("path", { attrs: { d: e.path } })])]);
156
- }, de = [], ce = /* @__PURE__ */ d(
157
- oe,
156
+ }, de = [], he = /* @__PURE__ */ d(
158
157
  ue,
158
+ ce,
159
159
  de,
160
160
  !1,
161
161
  null,
162
162
  "1c30ca93"
163
163
  );
164
- const he = ce.exports, pe = {
164
+ const pe = he.exports, fe = {
165
165
  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",
166
166
  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",
167
167
  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",
@@ -173,7 +173,7 @@ const he = ce.exports, pe = {
173
173
  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",
174
174
  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",
175
175
  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"
176
- }, m = Object.entries(pe).reduce((t, [e, i]) => {
176
+ }, g = Object.entries(fe).reduce((t, [e, i]) => {
177
177
  const s = `${e}Icon`, a = {
178
178
  name: s,
179
179
  props: {
@@ -189,7 +189,7 @@ const he = ce.exports, pe = {
189
189
  }
190
190
  },
191
191
  render(l) {
192
- return l(he, {
192
+ return l(pe, {
193
193
  props: this.$props,
194
194
  on: {
195
195
  click: () => this.$emit("click")
@@ -200,12 +200,12 @@ const he = ce.exports, pe = {
200
200
  return a.install = (l) => {
201
201
  l.component(s, a);
202
202
  }, t[e] = a, t;
203
- }, {}), fe = m.menu, me = m.refresh, ge = m.move;
204
- m["column-setting"];
205
- const be = m.more, ye = m["fixed-left"], ve = m["fixed-right"], Ce = m.upload, _e = m.download, xe = m.delete, N = m.copy, { t: V } = b(), Se = !0, $e = !1, Te = {
203
+ }, {}), me = g.menu, ge = g.refresh, be = g.move;
204
+ g["column-setting"];
205
+ const ye = g.more, ve = g["fixed-left"], Ce = g["fixed-right"], _e = g.upload, xe = g.download, Se = g.delete, P = g.copy, { t: V } = m(), $e = !0, Te = !1, we = {
206
206
  name: "TmEllipsisText",
207
207
  components: {
208
- CopyIcon: N
208
+ CopyIcon: P
209
209
  },
210
210
  props: {
211
211
  text: {
@@ -242,8 +242,8 @@ const be = m.more, ye = m["fixed-left"], ve = m["fixed-right"], Ce = m.upload, _
242
242
  },
243
243
  data() {
244
244
  return {
245
- isVue2: Se,
246
- isVue3: $e,
245
+ isVue2: $e,
246
+ isVue3: Te,
247
247
  isOverflow: !1,
248
248
  currentLines: 1,
249
249
  resizeObserver: null,
@@ -294,7 +294,7 @@ const be = m.more, ye = m["fixed-left"], ve = m["fixed-right"], Ce = m.upload, _
294
294
  }));
295
295
  },
296
296
  performOverflowCheck() {
297
- var c;
297
+ var u;
298
298
  const t = this.$refs.textEl;
299
299
  if (!t) return;
300
300
  const e = getComputedStyle(t);
@@ -305,16 +305,16 @@ const be = m.more, ye = m["fixed-left"], ve = m["fixed-right"], Ce = m.upload, _
305
305
  return;
306
306
  }
307
307
  this.checkRetryCount = 0;
308
- const i = t.scrollHeight, s = t.scrollWidth, a = t.clientHeight, l = t.clientWidth, n = 1, r = i > a + n, o = s > l + n;
309
- if (r || o) {
308
+ const i = t.scrollHeight, s = t.scrollWidth, a = t.clientHeight, l = t.clientWidth, n = 1, o = i > a + n, r = s > l + n;
309
+ if (o || r) {
310
310
  this.isOverflow = !0;
311
311
  const p = parseFloat(e.lineHeight) || 16;
312
312
  this.currentLines = Math.ceil(i / p);
313
313
  } else {
314
- const p = t.getBoundingClientRect(), _ = (c = t.parentElement) == null ? void 0 : c.getBoundingClientRect();
314
+ const p = t.getBoundingClientRect(), _ = (u = t.parentElement) == null ? void 0 : u.getBoundingClientRect();
315
315
  if (_) {
316
- const ee = p.height > _.height || p.width > _.width;
317
- this.isOverflow = ee;
316
+ const te = p.height > _.height || p.width > _.width;
317
+ this.isOverflow = te;
318
318
  } else
319
319
  this.isOverflow = !1;
320
320
  this.currentLines = 1;
@@ -364,20 +364,20 @@ const be = m.more, ye = m["fixed-left"], ve = m["fixed-right"], Ce = m.upload, _
364
364
  }
365
365
  }
366
366
  };
367
- var we = function() {
367
+ var Fe = function() {
368
368
  var e = this, i = e._self._c;
369
369
  return i("el-tooltip", e._b({ attrs: { disabled: e.tooltipDisabled, content: e.text, effect: "dark", placement: "top" } }, "el-tooltip", {
370
370
  [e.isVue2 ? "open-delay" : "show-after"]: 300
371
371
  }, !1), [i("div", { staticClass: "ellipsis-text-container" }, [i("div", { ref: "textEl", staticClass: "ellipsis-text", style: e.textStyle }, [e._v(" " + e._s(e.text) + " ")]), i("div", { staticClass: "toolbar", class: { multiline: e.currentLines > 1 && e.lines > 1 } }, [e.copyable ? i("CopyIcon", { staticClass: "icon-item", on: { click: e.handleCopy } }) : e._e()], 1)])]);
372
- }, Fe = [], Ve = /* @__PURE__ */ d(
373
- Te,
372
+ }, Ve = [], ke = /* @__PURE__ */ d(
374
373
  we,
375
374
  Fe,
375
+ Ve,
376
376
  !1,
377
377
  null,
378
378
  "a18ee09f"
379
379
  );
380
- const F = Ve.exports, ze = {
380
+ const F = ke.exports, Le = {
381
381
  name: "RenderVue2",
382
382
  inheritAttrs: !1,
383
383
  props: {
@@ -394,13 +394,13 @@ const F = Ve.exports, ze = {
394
394
  try {
395
395
  if (!this.renderFn || typeof this.renderFn != "function")
396
396
  return console.warn("[RenderComponent] renderFn must be a function"), null;
397
- const e = g(u({}, this.data || {}), {
397
+ const e = b(c({}, this.data || {}), {
398
398
  $attrs: this.$attrs,
399
399
  $listeners: this.$listeners
400
400
  }), i = this.renderFn.toString(), s = /\(\s*h\s*[,)]/.test(i) || this.renderFn.length >= 1;
401
401
  process.env.NODE_ENV;
402
402
  let a;
403
- return s ? a = this.renderFn(t, e) : a = this.renderFn(g(u({}, e), { h: t })), a;
403
+ return s ? a = this.renderFn(t, e) : a = this.renderFn(b(c({}, e), { h: t })), a;
404
404
  } catch (e) {
405
405
  return console.error("[RenderComponent] Error in render function:", e), process.env.NODE_ENV === "development" ? t("div", {
406
406
  style: {
@@ -413,20 +413,20 @@ const F = Ve.exports, ze = {
413
413
  }, `RenderComponent Error: ${e.message}`) : null;
414
414
  }
415
415
  }
416
- }, Le = null, ke = null;
416
+ }, ze = null, Ae = null;
417
417
  var Oe = /* @__PURE__ */ d(
418
- ze,
419
418
  Le,
420
- ke,
419
+ ze,
420
+ Ae,
421
421
  !1,
422
422
  null,
423
423
  null
424
424
  );
425
- const Ae = Oe.exports, De = !0, Re = !1, Me = {
425
+ const De = Oe.exports, Re = !0, Me = !1, He = {
426
426
  name: "FormItemLayout",
427
427
  components: {
428
428
  EllipsisText: F,
429
- RenderComponent: Ae
429
+ RenderComponent: De
430
430
  },
431
431
  props: {
432
432
  // 布局方向
@@ -466,9 +466,9 @@ const Ae = Oe.exports, De = !0, Re = !1, Me = {
466
466
  },
467
467
  data() {
468
468
  return {
469
- t: b().t,
470
- isVue2: De,
471
- isVue3: Re,
469
+ t: m().t,
470
+ isVue2: Re,
471
+ isVue3: Me,
472
472
  getDefaultSize: f
473
473
  };
474
474
  },
@@ -529,7 +529,7 @@ const Ae = Oe.exports, De = !0, Re = !1, Me = {
529
529
  }
530
530
  }
531
531
  };
532
- var He = function() {
532
+ var Ee = function() {
533
533
  var e = this, i = e._self._c;
534
534
  return i("div", { staticClass: "form-item-layout", class: {
535
535
  "form-item-layout--horizontal": e.direction === "horizontal",
@@ -539,15 +539,15 @@ var He = function() {
539
539
  }, expression: "fieldValue" } }, e._l(e.labelOptions, function(s) {
540
540
  return i("el-option", { key: s.value, attrs: { label: s.label, value: s.value } });
541
541
  }), 1) : e.label ? [typeof e.label == "string" ? i("div", { staticClass: "label-text" }, [i("EllipsisText", { attrs: { text: e.label, lines: 2, width: e.labelWidth - 4, "text-align": e.labelAlign } })], 1) : typeof e.label == "function" ? i("div", { staticClass: "label-render" }, [i("RenderComponent", { attrs: { "render-fn": e.label } })], 1) : e._e()] : e._e()], 2) : e._e(), i("div", { staticClass: "form-item-input", style: e.inputStyle }, [e._t("default")], 2)]);
542
- }, Ee = [], We = /* @__PURE__ */ d(
543
- Me,
542
+ }, We = [], Ie = /* @__PURE__ */ d(
544
543
  He,
545
544
  Ee,
545
+ We,
546
546
  !1,
547
547
  null,
548
548
  "b85a63e1"
549
549
  );
550
- const v = We.exports, Ie = !0, Ne = !1, $ = "value", Pe = "input", Be = {
550
+ const v = Ie.exports, Ne = !0, Pe = !1, $ = "value", Be = "input", je = {
551
551
  name: "TmSelectFilter",
552
552
  components: {
553
553
  FormItemLayout: v
@@ -630,9 +630,9 @@ const v = We.exports, Ie = !0, Ne = !1, $ = "value", Pe = "input", Be = {
630
630
  },
631
631
  data() {
632
632
  return {
633
- t: b().t,
634
- isVue2: Ie,
635
- isVue3: Ne,
633
+ t: m().t,
634
+ isVue2: Ne,
635
+ isVue3: Pe,
636
636
  getDefaultSize: f,
637
637
  optionsList: [],
638
638
  loading: !1,
@@ -651,7 +651,7 @@ const v = We.exports, Ie = !0, Ne = !1, $ = "value", Pe = "input", Be = {
651
651
  const i = this[$];
652
652
  Array.isArray(i) && i.length > 0 && (e = typeof this.valueOnClear == "function" ? this.valueOnClear() : this.valueOnClear);
653
653
  }
654
- this.$emit(Pe, e), this.$emit("change", e);
654
+ this.$emit(Be, e), this.$emit("change", e);
655
655
  }
656
656
  },
657
657
  propMap() {
@@ -702,7 +702,7 @@ const v = We.exports, Ie = !0, Ne = !1, $ = "value", Pe = "input", Be = {
702
702
  }
703
703
  }
704
704
  };
705
- var je = function() {
705
+ var Ue = function() {
706
706
  var e = this, i = e._self._c;
707
707
  return i("FormItemLayout", { attrs: { label: e.label, "label-options": e.labelOptions, field: e.field, "label-width": e.labelWidth, "input-width": e.inputWidth, direction: e.direction, "label-align": e.labelAlign }, on: { "field-change": e.handleFieldChange } }, [i("el-select", e._g(e._b({ ref: "select", staticClass: "select", attrs: { loading: e.loading }, on: { clear: e.handleClear }, scopedSlots: e._u([{ key: "header", fn: function() {
708
708
  return [e.isVue3 && e.multiple && e.showCheckAll ? i("el-checkbox", { staticStyle: { width: "100%", height: "20px", "padding-left": "10px" }, attrs: { indeterminate: e.indeterminate, size: e.getDefaultSize() }, on: { change: e.handleCheckAll }, model: { value: e.checkAll, callback: function(s) {
@@ -710,7 +710,7 @@ var je = function() {
710
710
  }, expression: "checkAll" } }, [e._v(e._s(e.t("all")))]) : e._e()];
711
711
  }, proxy: !0 }]), model: { value: e.computedValue, callback: function(s) {
712
712
  e.computedValue = s;
713
- }, expression: "computedValue" } }, "el-select", g(u({}, e.$attrs), {
713
+ }, expression: "computedValue" } }, "el-select", b(c({}, e.$attrs), {
714
714
  size: e.getDefaultSize(),
715
715
  filterable: e.filterable,
716
716
  clearable: e.clearable,
@@ -725,18 +725,18 @@ var je = function() {
725
725
  return [e._v(e._s(s[e.propMap.label]))];
726
726
  }, { item: s })], 2);
727
727
  })], 2)], 1);
728
- }, Ue = [], Je = /* @__PURE__ */ d(
729
- Be,
728
+ }, Je = [], Ke = /* @__PURE__ */ d(
730
729
  je,
731
730
  Ue,
731
+ Je,
732
732
  !1,
733
733
  null,
734
734
  "ef8f7987"
735
735
  );
736
- const P = Je.exports, Ke = {
736
+ const B = Ke.exports, qe = {
737
737
  name: "TmInputFilter",
738
738
  components: {
739
- MoreIcon: be,
739
+ MoreIcon: ye,
740
740
  FormItemLayout: v
741
741
  },
742
742
  props: {
@@ -786,7 +786,7 @@ const P = Je.exports, Ke = {
786
786
  },
787
787
  data() {
788
788
  return {
789
- t: b().t,
789
+ t: m().t,
790
790
  getDefaultSize: f,
791
791
  getCompatSize: x,
792
792
  exactValue: "",
@@ -851,7 +851,7 @@ const P = Je.exports, Ke = {
851
851
  this.updateCurrentOptionMultiple();
852
852
  }
853
853
  };
854
- var qe = function() {
854
+ var Qe = function() {
855
855
  var e = this, i = e._self._c;
856
856
  return i("FormItemLayout", { attrs: { label: e.label, "label-options": e.labelOptions, field: e.field, "label-width": e.labelWidth, "input-width": e.inputWidth, direction: e.direction, "label-align": e.labelAlign }, on: { "field-change": e.handlefieldChange } }, [i("el-input", { staticClass: "tm-input", attrs: { size: e.getDefaultSize(), placeholder: e.placeholder, clearable: "" }, nativeOn: { keyup: function(s) {
857
857
  return !s.type.indexOf("key") && e._k(s.keyCode, "enter", 13, s.key, "Enter") ? null : e.handleEnter.apply(null, arguments);
@@ -860,15 +860,15 @@ var qe = function() {
860
860
  }, expression: "inputValue" } }, [e.shouldShowMultiple ? i("el-popover", { attrs: { slot: "append", value: e.isExactMode, placement: "bottom-end", width: 260, trigger: "click" }, on: { input: e.handleVisibleChange }, slot: "append" }, [i("div", { staticClass: "popover-content" }, [i("p", { staticClass: "popover-subtitle" }, [e._v(e._s(e.t("accurateSearchTips")))]), i("el-input", { staticStyle: { "font-size": "12px" }, attrs: { size: e.getDefaultSize(), type: "textarea", rows: 8, placeholder: e.t("accurateSearchPlaceholder") }, model: { value: e.exactValue, callback: function(s) {
861
861
  e.exactValue = s;
862
862
  }, expression: "exactValue" } }), i("div", { staticClass: "popover-footer" }, [i("el-button", { staticStyle: { float: "left" }, attrs: { size: e.getCompatSize("mini") }, on: { click: e.handleClear } }, [e._v(e._s(e.t("clear")))]), i("el-button", { attrs: { size: e.getCompatSize("mini") }, on: { click: e.handlePopoverClose } }, [e._v(e._s(e.t("cancel")))]), i("el-button", { attrs: { type: "primary", size: e.getCompatSize("mini") }, on: { click: e.handleExactSearch } }, [e._v(e._s(e.t("search")))])], 1)], 1), i("template", { slot: "reference" }, [i("MoreIcon", { staticStyle: { cursor: "pointer" } })], 1)], 2) : e._e()], 1)], 1);
863
- }, Qe = [], Ge = /* @__PURE__ */ d(
864
- Ke,
863
+ }, Ge = [], Ye = /* @__PURE__ */ d(
865
864
  qe,
866
865
  Qe,
866
+ Ge,
867
867
  !1,
868
868
  null,
869
869
  "28e573ff"
870
870
  );
871
- const B = Ge.exports, { t: h } = b(), Ye = !0, Xe = !1, Ze = "value", et = {
871
+ const j = Ye.exports, { t: h } = m(), Xe = !0, Ze = !1, et = "value", tt = {
872
872
  name: "TmDateFilter",
873
873
  components: {
874
874
  FormItemLayout: v
@@ -1166,10 +1166,10 @@ const B = Ge.exports, { t: h } = b(), Ye = !0, Xe = !1, Ze = "value", et = {
1166
1166
  data() {
1167
1167
  return {
1168
1168
  t: h,
1169
- isVue2: Ye,
1170
- isVue3: Xe,
1169
+ isVue2: Xe,
1170
+ isVue3: Ze,
1171
1171
  getDefaultSize: f,
1172
- valueField: Ze
1172
+ valueField: et
1173
1173
  };
1174
1174
  },
1175
1175
  methods: {
@@ -1191,24 +1191,26 @@ const B = Ge.exports, { t: h } = b(), Ye = !0, Xe = !1, Ze = "value", et = {
1191
1191
  }
1192
1192
  }
1193
1193
  };
1194
- var tt = function() {
1194
+ var it = function() {
1195
1195
  var e = this, i = e._self._c;
1196
1196
  return i("FormItemLayout", { attrs: { label: e.label, "label-options": e.labelOptions, field: e.field, "label-width": e.labelWidth, "input-width": e.inputWidth, direction: e.direction, "label-align": e.labelAlign }, on: { "field-change": e.handleFieldChange } }, [i("el-date-picker", { staticClass: "date-picker", attrs: { value: e.dateValue, type: e.type, size: e.getDefaultSize(), "range-separator": e.rangeSeparator, "start-placeholder": e.computedStartPlaceholder, "end-placeholder": e.computedEndPlaceholder, placeholder: e.placeholder, "picker-options": e.computedPickerOptions, format: e.computedFormat, "value-format": e.computedFormat, disabled: e.disabled, clearable: e.clearable, readonly: e.readonly, editable: e.editable, align: e.align, "popper-class": e.popperClass, "default-value": e.defaultValue, "default-time": e.computedDefaultTime }, on: { input: e.handleDateChange, change: e.handleDateChange, blur: e.handleBlur, focus: e.handleFocus } })], 1);
1197
- }, it = [], st = /* @__PURE__ */ d(
1198
- et,
1197
+ }, st = [], at = /* @__PURE__ */ d(
1199
1198
  tt,
1200
1199
  it,
1200
+ st,
1201
1201
  !1,
1202
1202
  null,
1203
1203
  "2de48d4b"
1204
1204
  );
1205
- const j = st.exports, at = !0, lt = {
1205
+ const U = at.exports, lt = !0, k = "value", nt = "input";
1206
+ let rt = 0;
1207
+ const ot = {
1206
1208
  name: "TmCascaderFilter",
1207
1209
  components: {
1208
1210
  FormItemLayout: v
1209
1211
  },
1210
1212
  props: {
1211
- value: {
1213
+ [k]: {
1212
1214
  type: [String, Number, Array],
1213
1215
  default: ""
1214
1216
  },
@@ -1245,6 +1247,10 @@ const j = st.exports, at = !0, lt = {
1245
1247
  type: Boolean,
1246
1248
  default: !0
1247
1249
  },
1250
+ showCheckAll: {
1251
+ type: Boolean,
1252
+ default: !1
1253
+ },
1248
1254
  placeholder: {
1249
1255
  type: String,
1250
1256
  default: ""
@@ -1271,11 +1277,15 @@ const j = st.exports, at = !0, lt = {
1271
1277
  },
1272
1278
  data() {
1273
1279
  return {
1274
- isVue2: at,
1280
+ t: m().t,
1281
+ isVue2: lt,
1275
1282
  getDefaultSize: f,
1276
- selectedValue: this.value,
1283
+ selectedValue: this[k],
1277
1284
  optionsList: [],
1278
- loading: !1
1285
+ loading: !1,
1286
+ checkAll: !1,
1287
+ indeterminate: !1,
1288
+ popperUid: `tm-cascader-popper-${++rt}`
1279
1289
  };
1280
1290
  },
1281
1291
  computed: {
@@ -1287,16 +1297,36 @@ const j = st.exports, at = !0, lt = {
1287
1297
  };
1288
1298
  },
1289
1299
  cascaderProps() {
1290
- return g(u({}, this.props), {
1300
+ return b(c({}, this.props), {
1291
1301
  expandTrigger: this.props.expandTrigger || "hover"
1292
1302
  });
1303
+ },
1304
+ isMultiple() {
1305
+ return !!this.cascaderProps.multiple;
1306
+ },
1307
+ checkAllEnabled() {
1308
+ return this.showCheckAll && this.isMultiple;
1309
+ },
1310
+ computedPopperClass() {
1311
+ return [this.$attrs["popper-class"] || this.$attrs.popperClass || "", this.popperUid].filter(Boolean).join(" ");
1312
+ },
1313
+ allLeafPaths() {
1314
+ const t = [], { value: e, children: i } = this.propMap, s = (a, l) => {
1315
+ if (Array.isArray(a))
1316
+ for (const n of a) {
1317
+ if (n.disabled) continue;
1318
+ const o = n[e], r = [...l, o], u = n[i];
1319
+ Array.isArray(u) && u.length ? s(u, r) : t.push(r);
1320
+ }
1321
+ };
1322
+ return s(this.optionsList, []), t;
1293
1323
  }
1294
1324
  },
1295
1325
  watch: {
1296
- value: {
1326
+ [k]: {
1297
1327
  immediate: !0,
1298
1328
  handler(t) {
1299
- this.selectedValue = t;
1329
+ this.selectedValue = t, this.syncCheckAllState(t);
1300
1330
  }
1301
1331
  },
1302
1332
  options: {
@@ -1305,8 +1335,11 @@ const j = st.exports, at = !0, lt = {
1305
1335
  this.initOptions(t);
1306
1336
  }
1307
1337
  },
1338
+ optionsList() {
1339
+ this.syncCheckAllState(this.selectedValue);
1340
+ },
1308
1341
  selectedValue(t) {
1309
- this.$emit("input", t), this.$emit("change", t);
1342
+ this.$emit(nt, t), this.$emit("change", t), this.syncCheckAllState(t);
1310
1343
  }
1311
1344
  },
1312
1345
  methods: {
@@ -1322,18 +1355,44 @@ const j = st.exports, at = !0, lt = {
1322
1355
  this.loading = !1;
1323
1356
  }
1324
1357
  else Array.isArray(t) && (this.optionsList = t);
1358
+ },
1359
+ syncCheckAllState(t) {
1360
+ if (!this.checkAllEnabled) return;
1361
+ const e = this.allLeafPaths.length, i = Array.isArray(t) ? t.length : 0;
1362
+ e === 0 || i === 0 ? (this.checkAll = !1, this.indeterminate = !1) : i >= e ? (this.checkAll = !0, this.indeterminate = !1) : (this.checkAll = !1, this.indeterminate = !0);
1363
+ },
1364
+ handleCheckAll(t) {
1365
+ if (this.indeterminate = !1, t) {
1366
+ const e = this.cascaderProps.emitPath !== !1;
1367
+ this.selectedValue = e ? this.allLeafPaths.map((i) => i.slice()) : this.allLeafPaths.map((i) => i[i.length - 1]);
1368
+ } else
1369
+ this.selectedValue = [];
1370
+ },
1371
+ handleVisibleChange(t) {
1372
+ this.checkAllEnabled && t && this.$nextTick(() => this.mountCheckAll());
1373
+ },
1374
+ mountCheckAll() {
1375
+ if (typeof document == "undefined") return;
1376
+ const t = this.$refs.checkAllHost;
1377
+ if (!t) return;
1378
+ const e = t.firstElementChild;
1379
+ if (!e) return;
1380
+ const i = document.querySelector(`.${this.popperUid}`);
1381
+ if (!i) return;
1382
+ const s = i.querySelector(".el-cascader-panel");
1383
+ s && (e.parentNode !== i || s.previousSibling !== e) && i.insertBefore(e, s);
1325
1384
  }
1326
1385
  }
1327
1386
  };
1328
- var nt = function() {
1387
+ var ut = function() {
1329
1388
  var e = this, i = e._self._c;
1330
- return i("FormItemLayout", { attrs: { label: e.label, "label-width": e.labelWidth, "input-width": e.inputWidth, direction: e.direction, "label-align": e.labelAlign } }, [i("div", { staticClass: "cascader" }, [i("el-cascader", e._g(e._b({ ref: "cascader", scopedSlots: e._u([{ key: "default", fn: function({ node: s, data: a }) {
1389
+ return i("FormItemLayout", { attrs: { label: e.label, "label-width": e.labelWidth, "input-width": e.inputWidth, direction: e.direction, "label-align": e.labelAlign } }, [i("div", { staticClass: "cascader" }, [i("el-cascader", e._g(e._b({ ref: "cascader", on: { "visible-change": e.handleVisibleChange }, scopedSlots: e._u([{ key: "default", fn: function({ node: s, data: a }) {
1331
1390
  return [e._t("default", function() {
1332
1391
  return [i("span", [e._v(e._s(a[e.propMap.label]))])];
1333
1392
  }, { node: s, data: a })];
1334
1393
  } }], null, !0), model: { value: e.selectedValue, callback: function(s) {
1335
1394
  e.selectedValue = s;
1336
- }, expression: "selectedValue" } }, "el-cascader", g(u({}, e.$attrs), {
1395
+ }, expression: "selectedValue" } }, "el-cascader", b(c({}, e.$attrs), {
1337
1396
  size: e.getDefaultSize(),
1338
1397
  filterable: e.filterable,
1339
1398
  clearable: e.clearable,
@@ -1342,17 +1401,20 @@ var nt = function() {
1342
1401
  props: e.cascaderProps,
1343
1402
  placeholder: e.placeholder,
1344
1403
  options: e.optionsList,
1345
- loading: e.loading
1346
- }), !1), e.isVue2 ? e.$listeners : {}))], 1)]);
1347
- }, rt = [], ot = /* @__PURE__ */ d(
1348
- lt,
1349
- nt,
1350
- rt,
1404
+ loading: e.loading,
1405
+ popperClass: e.computedPopperClass
1406
+ }), !1), e.isVue2 ? e.$listeners : {})), e.checkAllEnabled ? i("div", { ref: "checkAllHost", staticClass: "tm-cascader-check-all-host" }, [i("div", { staticClass: "tm-cascader-check-all" }, [i("el-checkbox", { attrs: { indeterminate: e.indeterminate, size: e.getDefaultSize(), disabled: !e.allLeafPaths.length }, on: { change: e.handleCheckAll }, model: { value: e.checkAll, callback: function(s) {
1407
+ e.checkAll = s;
1408
+ }, expression: "checkAll" } }, [e._v(e._s(e.t("all")))])], 1)]) : e._e()], 1)]);
1409
+ }, ct = [], dt = /* @__PURE__ */ d(
1410
+ ot,
1411
+ ut,
1412
+ ct,
1351
1413
  !1,
1352
1414
  null,
1353
- "be6225d9"
1415
+ "85c2c0b5"
1354
1416
  );
1355
- const U = ot.exports, ut = !0, dt = !1, ct = {
1417
+ const J = dt.exports, ht = !0, pt = !1, ft = {
1356
1418
  name: "TmRadioFilter",
1357
1419
  components: {
1358
1420
  FormItemLayout: v
@@ -1408,8 +1470,8 @@ const U = ot.exports, ut = !0, dt = !1, ct = {
1408
1470
  },
1409
1471
  data() {
1410
1472
  return {
1411
- isVue2: ut,
1412
- isVue3: dt,
1473
+ isVue2: ht,
1474
+ isVue3: pt,
1413
1475
  getDefaultSize: f,
1414
1476
  selectedValue: this.value,
1415
1477
  optionsList: [],
@@ -1457,11 +1519,11 @@ const U = ot.exports, ut = !0, dt = !1, ct = {
1457
1519
  }
1458
1520
  }
1459
1521
  };
1460
- var ht = function() {
1522
+ var mt = function() {
1461
1523
  var e = this, i = e._self._c;
1462
1524
  return i("FormItemLayout", { attrs: { label: e.label, "label-width": e.labelWidth, "input-width": e.inputWidth, direction: e.direction, "label-align": e.labelAlign } }, [i("el-radio-group", e._g(e._b({ ref: "radioGroup", staticClass: "radio-group", model: { value: e.selectedValue, callback: function(s) {
1463
1525
  e.selectedValue = s;
1464
- }, expression: "selectedValue" } }, "el-radio-group", g(u({}, e.$attrs), {
1526
+ }, expression: "selectedValue" } }, "el-radio-group", b(c({}, e.$attrs), {
1465
1527
  size: e.getDefaultSize()
1466
1528
  }), !1), e.isVue2 ? e.$listeners : {}), [e.$slots.default ? [e._t("default")] : e._l(e.optionsList, function(s) {
1467
1529
  return i("el-radio-button", e._b({ key: s[e.propMap.value], staticStyle: { flex: "1" } }, "el-radio-button", {
@@ -1471,15 +1533,15 @@ var ht = function() {
1471
1533
  return [e._v(e._s(s[e.propMap.label]))];
1472
1534
  }, { item: s })], 2);
1473
1535
  })], 2)], 1);
1474
- }, pt = [], ft = /* @__PURE__ */ d(
1475
- ct,
1476
- ht,
1477
- pt,
1536
+ }, gt = [], bt = /* @__PURE__ */ d(
1537
+ ft,
1538
+ mt,
1539
+ gt,
1478
1540
  !1,
1479
1541
  null,
1480
1542
  "49789913"
1481
1543
  );
1482
- const J = ft.exports, mt = !0, gt = !1, bt = {
1544
+ const K = bt.exports, yt = !0, vt = !1, Ct = {
1483
1545
  name: "TmCheckboxFilter",
1484
1546
  components: {
1485
1547
  FormItemLayout: v
@@ -1530,8 +1592,8 @@ const J = ft.exports, mt = !0, gt = !1, bt = {
1530
1592
  },
1531
1593
  data() {
1532
1594
  return {
1533
- isVue2: mt,
1534
- isVue3: gt,
1595
+ isVue2: yt,
1596
+ isVue3: vt,
1535
1597
  getDefaultSize: f,
1536
1598
  selectedValue: this.value || [],
1537
1599
  optionsList: [],
@@ -1579,11 +1641,11 @@ const J = ft.exports, mt = !0, gt = !1, bt = {
1579
1641
  }
1580
1642
  }
1581
1643
  };
1582
- var yt = function() {
1644
+ var _t = function() {
1583
1645
  var e = this, i = e._self._c;
1584
1646
  return i("FormItemLayout", { attrs: { label: e.label, "label-width": e.labelWidth, "input-width": e.inputWidth, direction: e.direction, "label-align": e.labelAlign } }, [i("div", { staticClass: "checkbox-content" }, [i("el-checkbox-group", e._g(e._b({ ref: "checkboxGroup", model: { value: e.selectedValue, callback: function(s) {
1585
1647
  e.selectedValue = s;
1586
- }, expression: "selectedValue" } }, "el-checkbox-group", g(u({}, e.$attrs), {
1648
+ }, expression: "selectedValue" } }, "el-checkbox-group", b(c({}, e.$attrs), {
1587
1649
  size: e.getDefaultSize()
1588
1650
  }), !1), e.isVue2 ? e.$listeners : {}), [e.$slots.default ? [e._t("default")] : e._l(e.optionsList, function(s) {
1589
1651
  return i("el-checkbox-button", e._b({ key: s[e.propMap.value], staticStyle: { flex: "1" } }, "el-checkbox-button", {
@@ -1593,15 +1655,15 @@ var yt = function() {
1593
1655
  return [e._v(e._s(s[e.propMap.label]))];
1594
1656
  }, { item: s })], 2);
1595
1657
  })], 2)], 1)]);
1596
- }, vt = [], Ct = /* @__PURE__ */ d(
1597
- bt,
1598
- yt,
1599
- vt,
1658
+ }, xt = [], St = /* @__PURE__ */ d(
1659
+ Ct,
1660
+ _t,
1661
+ xt,
1600
1662
  !1,
1601
1663
  null,
1602
1664
  "c1549ec0"
1603
1665
  );
1604
- const K = Ct.exports, _t = !0, xt = {
1666
+ const q = St.exports, $t = !0, Tt = {
1605
1667
  name: "TmSwitchFilter",
1606
1668
  components: {
1607
1669
  FormItemLayout: v
@@ -1637,7 +1699,7 @@ const K = Ct.exports, _t = !0, xt = {
1637
1699
  },
1638
1700
  data() {
1639
1701
  return {
1640
- isVue2: _t,
1702
+ isVue2: $t,
1641
1703
  getDefaultSize: f,
1642
1704
  switchValue: this.value
1643
1705
  };
@@ -1654,20 +1716,20 @@ const K = Ct.exports, _t = !0, xt = {
1654
1716
  }
1655
1717
  }
1656
1718
  };
1657
- var St = function() {
1719
+ var wt = function() {
1658
1720
  var e = this, i = e._self._c;
1659
1721
  return i("FormItemLayout", { attrs: { label: e.label, "label-width": e.labelWidth, "input-width": e.inputWidth, direction: e.direction, "label-align": e.labelAlign } }, [i("div", { staticClass: "switch-content" }, [i("el-switch", e._g(e._b({ ref: "switch", attrs: { size: e.getDefaultSize() }, model: { value: e.switchValue, callback: function(s) {
1660
1722
  e.switchValue = s;
1661
1723
  }, expression: "switchValue" } }, "el-switch", e.$attrs, !1), e.isVue2 ? e.$listeners : {}))], 1)]);
1662
- }, $t = [], Tt = /* @__PURE__ */ d(
1663
- xt,
1664
- St,
1665
- $t,
1724
+ }, Ft = [], Vt = /* @__PURE__ */ d(
1725
+ Tt,
1726
+ wt,
1727
+ Ft,
1666
1728
  !1,
1667
1729
  null,
1668
1730
  "7455db21"
1669
1731
  );
1670
- const q = Tt.exports, wt = !0, Ft = !1, E = "value", z = "input", Vt = {
1732
+ const Q = Vt.exports, kt = !0, Lt = !1, W = "value", L = "input", zt = {
1671
1733
  name: "TmTextareaFilter",
1672
1734
  components: {
1673
1735
  FormItemLayout: v
@@ -1677,7 +1739,7 @@ const q = Tt.exports, wt = !0, Ft = !1, E = "value", z = "input", Vt = {
1677
1739
  type: [String, Function, Object, Array],
1678
1740
  default: ""
1679
1741
  },
1680
- [E]: {
1742
+ [W]: {
1681
1743
  type: String,
1682
1744
  default: ""
1683
1745
  },
@@ -1760,8 +1822,8 @@ const q = Tt.exports, wt = !0, Ft = !1, E = "value", z = "input", Vt = {
1760
1822
  },
1761
1823
  data() {
1762
1824
  return {
1763
- isVue2: wt,
1764
- isVue3: Ft,
1825
+ isVue2: kt,
1826
+ isVue3: Lt,
1765
1827
  getDefaultSize: f,
1766
1828
  inputValue: this.value
1767
1829
  };
@@ -1772,19 +1834,19 @@ const q = Tt.exports, wt = !0, Ft = !1, E = "value", z = "input", Vt = {
1772
1834
  }
1773
1835
  },
1774
1836
  watch: {
1775
- [E]: {
1837
+ [W]: {
1776
1838
  immediate: !0,
1777
1839
  handler(t) {
1778
1840
  this.inputValue = t;
1779
1841
  }
1780
1842
  },
1781
1843
  inputValue(t) {
1782
- this.$emit(z, t);
1844
+ this.$emit(L, t);
1783
1845
  }
1784
1846
  },
1785
1847
  methods: {
1786
1848
  handleInput(t) {
1787
- this.inputValue = t, this.$emit(z, t);
1849
+ this.inputValue = t, this.$emit(L, t);
1788
1850
  },
1789
1851
  handleChange(t) {
1790
1852
  this.$emit("change", t);
@@ -1796,7 +1858,7 @@ const q = Tt.exports, wt = !0, Ft = !1, E = "value", z = "input", Vt = {
1796
1858
  this.$emit("blur", t);
1797
1859
  },
1798
1860
  handleClear() {
1799
- this.inputValue = "", this.$emit(z, ""), this.$emit("clear");
1861
+ this.inputValue = "", this.$emit(L, ""), this.$emit("clear");
1800
1862
  },
1801
1863
  handleFieldChange(t) {
1802
1864
  this.$emit("field-change", t);
@@ -1813,20 +1875,20 @@ const q = Tt.exports, wt = !0, Ft = !1, E = "value", z = "input", Vt = {
1813
1875
  }
1814
1876
  }
1815
1877
  };
1816
- var zt = function() {
1878
+ var At = function() {
1817
1879
  var e = this, i = e._self._c;
1818
1880
  return i("FormItemLayout", { attrs: { label: e.label, "label-options": e.labelOptions, field: e.field, "label-width": e.labelWidth, "input-width": e.inputWidth, direction: e.direction, "label-align": e.labelAlign }, on: { "field-change": e.handleFieldChange } }, [i("div", { staticClass: "textarea" }, [i("el-input", e._g(e._b({ ref: "textarea", staticClass: "textarea-input", attrs: { size: e.getDefaultSize(), placeholder: e.placeholder, type: "textarea", autosize: e.autosize, maxlength: e.maxlength, minlength: e.minlength, "show-word-limit": e.showWordLimit, readonly: e.readonly, disabled: e.disabled, resize: e.resize, tabindex: e.tabindex, "validate-event": e.validateEvent }, on: { input: e.handleInput, change: e.handleChange, focus: e.handleFocus, blur: e.handleBlur, clear: e.handleClear }, model: { value: e.inputValue, callback: function(s) {
1819
1881
  e.inputValue = s;
1820
1882
  }, expression: "inputValue" } }, "el-input", e.$attrs, !1), e.isVue2 ? e.$listeners : {})), e.clearable && e.inputValue ? i("i", { staticClass: "textarea-clear-icon el-input__icon el-icon-circle-close", on: { click: e.handleClear } }) : e._e()], 1)]);
1821
- }, Lt = [], kt = /* @__PURE__ */ d(
1822
- Vt,
1883
+ }, Ot = [], Dt = /* @__PURE__ */ d(
1823
1884
  zt,
1824
- Lt,
1885
+ At,
1886
+ Ot,
1825
1887
  !1,
1826
1888
  null,
1827
1889
  "e903b851"
1828
1890
  );
1829
- const Q = kt.exports, Ot = {
1891
+ const G = Dt.exports, Rt = {
1830
1892
  name: "DynamicSlot",
1831
1893
  props: {
1832
1894
  name: {
@@ -1841,15 +1903,15 @@ const Q = kt.exports, Ot = {
1841
1903
  render(t) {
1842
1904
  var a;
1843
1905
  const e = (l) => {
1844
- var n, r;
1906
+ var n, o;
1845
1907
  if (!l) return null;
1846
1908
  {
1847
- let o = (n = l.$scopedSlots) == null ? void 0 : n[this.name];
1848
- if (!o && ((r = l.$slots) != null && r[this.name])) {
1849
- const c = l.$slots[this.name];
1850
- o = () => c;
1909
+ let r = (n = l.$scopedSlots) == null ? void 0 : n[this.name];
1910
+ if (!r && ((o = l.$slots) != null && o[this.name])) {
1911
+ const u = l.$slots[this.name];
1912
+ r = () => u;
1851
1913
  }
1852
- return o;
1914
+ return r;
1853
1915
  }
1854
1916
  }, i = (l) => {
1855
1917
  var n;
@@ -1872,9 +1934,9 @@ const Q = kt.exports, Ot = {
1872
1934
  if (!l) return null;
1873
1935
  if (Array.isArray(l)) {
1874
1936
  const n = l.filter(
1875
- (r) => {
1876
- var o;
1877
- return r && !r.isComment && (r.tag || ((o = r.text) == null ? void 0 : o.trim()));
1937
+ (o) => {
1938
+ var r;
1939
+ return o && !o.isComment && (o.tag || ((r = o.text) == null ? void 0 : r.trim()));
1878
1940
  }
1879
1941
  );
1880
1942
  return n.length === 0 ? null : n.length === 1 ? n[0] : t("div", { style: { display: "contents" } }, n);
@@ -1884,16 +1946,16 @@ const Q = kt.exports, Ot = {
1884
1946
  }
1885
1947
  return null;
1886
1948
  }
1887
- }, At = null, Dt = null;
1888
- var Rt = /* @__PURE__ */ d(
1889
- Ot,
1890
- At,
1891
- Dt,
1949
+ }, Mt = null, Ht = null;
1950
+ var Et = /* @__PURE__ */ d(
1951
+ Rt,
1952
+ Mt,
1953
+ Ht,
1892
1954
  !1,
1893
1955
  null,
1894
1956
  null
1895
1957
  );
1896
- const Mt = Rt.exports, { t: Ht } = b(), Et = !0, Wt = !1, It = [
1958
+ const Wt = Et.exports, { t: It } = m(), Nt = !0, Pt = !1, Bt = [
1897
1959
  "date",
1898
1960
  "daterange",
1899
1961
  "datetime",
@@ -1905,18 +1967,18 @@ const Mt = Rt.exports, { t: Ht } = b(), Et = !0, Wt = !1, It = [
1905
1967
  "years",
1906
1968
  "week",
1907
1969
  "monthrange"
1908
- ], Nt = {
1970
+ ], jt = {
1909
1971
  name: "TmTableSearch",
1910
1972
  components: {
1911
- TmSelect: P,
1912
- TmInput: B,
1913
- TmDate: j,
1914
- TmCascader: U,
1915
- TmRadio: J,
1916
- TmCheckbox: K,
1917
- TmSwitch: q,
1918
- TmTextarea: Q,
1919
- DynamicSlot: Mt
1973
+ TmSelect: B,
1974
+ TmInput: j,
1975
+ TmDate: U,
1976
+ TmCascader: J,
1977
+ TmRadio: K,
1978
+ TmCheckbox: q,
1979
+ TmSwitch: Q,
1980
+ TmTextarea: G,
1981
+ DynamicSlot: Wt
1920
1982
  },
1921
1983
  props: {
1922
1984
  disabled: {
@@ -1953,12 +2015,12 @@ const Mt = Rt.exports, { t: Ht } = b(), Et = !0, Wt = !1, It = [
1953
2015
  },
1954
2016
  data() {
1955
2017
  return {
1956
- t: Ht,
1957
- isVue2: Et,
1958
- isVue3: Wt,
2018
+ t: It,
2019
+ isVue2: Nt,
2020
+ isVue3: Pt,
1959
2021
  getCompatSize: x,
1960
2022
  getDefaultSize: f,
1961
- DATE_TYPES: It,
2023
+ DATE_TYPES: Bt,
1962
2024
  // 用于存储初始默认值,重置时恢复
1963
2025
  defaultValues: {}
1964
2026
  };
@@ -1994,13 +2056,13 @@ const Mt = Rt.exports, { t: Ht } = b(), Et = !0, Wt = !1, It = [
1994
2056
  },
1995
2057
  handleUpdate(t, e, i) {
1996
2058
  const s = this.getFieldValue(t, i);
1997
- s && this.$emit("update:search-form", g(u({}, this.computedSearchForm), {
2059
+ s && this.$emit("update:search-form", b(c({}, this.computedSearchForm), {
1998
2060
  [s]: e
1999
2061
  }));
2000
2062
  },
2001
2063
  handleUpdateDate(t, e) {
2002
2064
  const i = e || [], s = this.getFieldValue(t, "start"), a = this.getFieldValue(t, "end"), l = this.getFieldValue(t, "value"), n = {};
2003
- s && (n[s] = i[0]), a && (n[a] = i[1]), l && (n[l] = i), this.$emit("update:search-form", u(u({}, this.computedSearchForm), n));
2065
+ s && (n[s] = i[0]), a && (n[a] = i[1]), l && (n[l] = i), this.$emit("update:search-form", c(c({}, this.computedSearchForm), n));
2004
2066
  },
2005
2067
  getFieldValue(t, e) {
2006
2068
  if (typeof t == "string")
@@ -2077,10 +2139,10 @@ const Mt = Rt.exports, { t: Ht } = b(), Et = !0, Wt = !1, It = [
2077
2139
  }
2078
2140
  const a = this.getFieldDefault(e, "value");
2079
2141
  if (i && a !== void 0 && !(i in this.computedSearchForm) ? this.isDateType(e.type) && !Array.isArray(a) ? t[i] = [] : e.type === "checkbox" && !Array.isArray(a) ? t[i] = a ? [a] : [] : e.type === "switch" && typeof a != "boolean" ? t[i] = !!a : t[i] = a : i && !(i in this.computedSearchForm) && (e.type === "checkbox" ? t[i] = [] : e.type === "switch" && (t[i] = !1)), this.isDateType(e.type)) {
2080
- const l = this.getFieldValue(e, "start"), n = this.getFieldValue(e, "end"), r = this.getFieldDefault(e, "start"), o = this.getFieldDefault(e, "end");
2081
- l && r !== void 0 && !(l in this.computedSearchForm) && (t[l] = r), n && o !== void 0 && !(n in this.computedSearchForm) && (t[n] = o);
2142
+ const l = this.getFieldValue(e, "start"), n = this.getFieldValue(e, "end"), o = this.getFieldDefault(e, "start"), r = this.getFieldDefault(e, "end");
2143
+ l && o !== void 0 && !(l in this.computedSearchForm) && (t[l] = o), n && r !== void 0 && !(n in this.computedSearchForm) && (t[n] = r);
2082
2144
  }
2083
- }), this.defaultValues = t, this.$emit("update:search-form", u(u({}, t), this.computedSearchForm));
2145
+ }), this.defaultValues = t, this.$emit("update:search-form", c(c({}, t), this.computedSearchForm));
2084
2146
  },
2085
2147
  // 获取表单数据
2086
2148
  getSearchForm() {
@@ -2094,11 +2156,11 @@ const Mt = Rt.exports, { t: Ht } = b(), Et = !0, Wt = !1, It = [
2094
2156
  },
2095
2157
  // 处理重置
2096
2158
  handleReset() {
2097
- this.$emit("update:search-form", u({}, this.defaultValues)), this.$emit("reset");
2159
+ this.$emit("update:search-form", c({}, this.defaultValues)), this.$emit("reset");
2098
2160
  }
2099
2161
  }
2100
2162
  };
2101
- var Pt = function() {
2163
+ var Ut = function() {
2102
2164
  var e = this, i = e._self._c;
2103
2165
  return i("div", { staticClass: "table-search", class: `table-search--${e.isVue2 ? "v2" : "v3"}` }, [i("div", { staticClass: "search-content" }, [e.hasDefaultSlot() ? e._t("default") : e.searchColumns && e.searchColumns.length ? [e._l(e.searchColumns, function(s, a) {
2104
2166
  return [typeof s == "string" ? i("div", { key: `str-${s}-${a}`, staticClass: "search-item" }, [i("dynamic-slot", { key: s, attrs: { name: `search-${s}`, "slot-props": { searchForm: e.searchForm } } })], 1) : i("div", { key: `obj-${a}`, staticClass: "search-item" }, [s.fields ? [e.hasSearchSlot(`search-${e.getFieldValue(s, "value")}`) ? [i("dynamic-slot", { key: e.getFieldValue(s, "value"), attrs: { name: `search-${e.getFieldValue(s, "value")}`, "slot-props": { searchForm: e.searchForm, col: s } } })] : [i("div", { key: e.getFieldValue(s, "value") || `col-${a}`, staticStyle: { display: "flex" } }, [s.type === "input" ? i("tm-Input", e._b({ attrs: { label: s.label, value: e.computedSearchForm[e.getFieldValue(s, "value")], field: e.computedSearchForm[e.getFieldValue(s, "label")], multiple: s.multiple, labelOptions: s.labelOptions, placeholder: s.placeholder }, on: { "value-change": (l) => e.handleUpdate(s, l, "value"), "field-change": (l) => e.handleUpdate(s, l, "label"), search: e.handleSearch } }, "tm-Input", e.getLayoutProps(s), !1)) : e._e(), e.isDateType(s.type) ? i("tm-date", e._b({ attrs: { type: s.type, label: s.label, value: e.computedSearchForm[e.getFieldValue(s, "value")], field: e.computedSearchForm[e.getFieldValue(s, "label")], start: e.computedSearchForm[e.getFieldValue(s, "start")], end: e.computedSearchForm[e.getFieldValue(s, "end")], labelOptions: s.labelOptions, "start-placeholder": s.startPlaceholder, "end-placeholder": s.endPlaceholder, placeholder: s.placeholder, "range-separator": s.rangeSeparator, disabled: s.disabled, clearable: s.clearable, readonly: s.readonly, editable: s.editable, align: s.align, "popper-class": s.popperClass, "default-value": s.defaultValue, "default-time": s.defaultTime, shortcuts: s.shortcuts, "past-only": s.pastOnly, format: s.format }, on: { "field-change": (l) => e.handleUpdate(s, l, "label"), "value-change": (l) => e.handleUpdateDate(s, l), "start-change": (l) => e.handleUpdateDate(s, l), "end-change": (l) => e.handleUpdateDate(s, l) } }, "tm-date", e.getLayoutProps(s), !1)) : e._e(), s.type === "select" ? i("tm-select", e._b({ attrs: { label: s.label, field: e.computedSearchForm[e.getFieldValue(s, "label")], options: s.options, labelOptions: s.labelOptions, placeholder: s.placeholder, multiple: s.multiple, "show-check-all": s.checkAll, "value-on-clear": s.valueOnClear, clearable: s.clearable }, on: { "field-change": (l) => e.handleUpdate(s, l, "label") }, model: { value: e.computedSearchForm[e.getFieldValue(s, "value")], callback: function(l) {
@@ -2115,15 +2177,15 @@ var Pt = function() {
2115
2177
  e.$set(e.computedSearchForm, e.getFieldValue(s, "value"), l);
2116
2178
  }, expression: "computedSearchForm[getFieldValue(col, 'value')]" } }, "tm-textarea", e.getLayoutProps(s), !1)) : e._e()], 1)]] : [i("div", { key: `error-${a}`, staticClass: "search-error-message" }, [e._v(" 缺少 fields 配置,无法渲染此组件 ")])]], 2)];
2117
2179
  })] : e._e(), i("div", { staticClass: "search-actions" }, [i("el-button", { attrs: { type: "primary", size: e.getDefaultSize() }, on: { click: e.handleSearch } }, [e._v(e._s(e.t("query")))]), i("el-button", { attrs: { size: e.getDefaultSize() }, on: { click: e.handleReset } }, [e._v(e._s(e.t("reset")))])], 1)], 2)]);
2118
- }, Bt = [], jt = /* @__PURE__ */ d(
2119
- Nt,
2120
- Pt,
2121
- Bt,
2180
+ }, Jt = [], Kt = /* @__PURE__ */ d(
2181
+ jt,
2182
+ Ut,
2183
+ Jt,
2122
2184
  !1,
2123
2185
  null,
2124
2186
  "8cd0172a"
2125
2187
  );
2126
- const G = jt.exports, Ut = !0, Jt = {
2188
+ const Y = Kt.exports, qt = !0, Qt = {
2127
2189
  name: "TablePagination",
2128
2190
  props: {
2129
2191
  current: {
@@ -2145,7 +2207,7 @@ const G = jt.exports, Ut = !0, Jt = {
2145
2207
  },
2146
2208
  data() {
2147
2209
  return {
2148
- isVue2: Ut,
2210
+ isVue2: qt,
2149
2211
  getCompatSize: x
2150
2212
  };
2151
2213
  },
@@ -2158,22 +2220,22 @@ const G = jt.exports, Ut = !0, Jt = {
2158
2220
  }
2159
2221
  }
2160
2222
  };
2161
- var Kt = function() {
2223
+ var Gt = function() {
2162
2224
  var e = this, i = e._self._c;
2163
2225
  return i("div", { staticClass: "tm-pagination" }, [i("div", [e._t("pagination-left")], 2), i("el-pagination", e._g(e._b({ staticStyle: { "text-align": "right" }, attrs: { "current-page": e.current, "page-size": e.pageSize, total: e.total, "page-sizes": [10, 20, 50, 100, 300, 500, 1e3, 2e3], size: e.getCompatSize("mini"), layout: "total, sizes, prev, pager, next, jumper" }, on: { "size-change": e.handleSizeChange, "update:current-page": function(s) {
2164
2226
  return e.$emit("update:current", s);
2165
2227
  }, "update:page-size": function(s) {
2166
2228
  return e.$emit("update:pageSize", s);
2167
2229
  }, "current-change": e.handleCurrentChange } }, "el-pagination", e.$attrs, !1), e.isVue2 ? e.$listeners : {}))], 1);
2168
- }, qt = [], Qt = /* @__PURE__ */ d(
2169
- Jt,
2170
- Kt,
2171
- qt,
2230
+ }, Yt = [], Xt = /* @__PURE__ */ d(
2231
+ Qt,
2232
+ Gt,
2233
+ Yt,
2172
2234
  !1,
2173
2235
  null,
2174
2236
  "ee768f31"
2175
2237
  );
2176
- const Gt = Qt.exports, Yt = {
2238
+ const Zt = Xt.exports, ei = {
2177
2239
  name: "TmTableMenu",
2178
2240
  props: {
2179
2241
  size: {
@@ -2182,18 +2244,18 @@ const Gt = Qt.exports, Yt = {
2182
2244
  }
2183
2245
  }
2184
2246
  };
2185
- var Xt = function() {
2247
+ var ti = function() {
2186
2248
  var e = this, i = e._self._c;
2187
2249
  return i("div", { staticClass: "tm-table-menu", attrs: { size: "small", inline: "" } }, [i("div", { staticClass: "left" }, [e._t("left")], 2), i("div", { staticClass: "right" }, [e._t("right")], 2)]);
2188
- }, Zt = [], ei = /* @__PURE__ */ d(
2189
- Yt,
2190
- Xt,
2191
- Zt,
2250
+ }, ii = [], si = /* @__PURE__ */ d(
2251
+ ei,
2252
+ ti,
2253
+ ii,
2192
2254
  !1,
2193
2255
  null,
2194
2256
  "579dd2c3"
2195
2257
  );
2196
- const ti = ei.exports, T = (t) => t ? t.data && t.data.attrs || {} : {}, L = (t, e) => {
2258
+ const ai = si.exports, T = (t) => t ? t.data && t.data.attrs || {} : {}, z = (t, e) => {
2197
2259
  t && (t.data || (t.data = {}), t.data.attrs || (t.data.attrs = {}), typeof e == "object" && Object.assign(t.data.attrs, e));
2198
2260
  }, w = {
2199
2261
  // 默认实现:使用localStorage获取配置
@@ -2223,20 +2285,20 @@ const ti = ei.exports, T = (t) => t ? t.data && t.data.attrs || {} : {}, L = (t,
2223
2285
  return Promise.reject(e);
2224
2286
  }
2225
2287
  }
2226
- }, ii = (t) => w.getTableConfig(t.key), si = (t) => w.setTableConfig(t), ai = (t) => {
2288
+ }, li = (t) => w.getTableConfig(t.key), ni = (t) => w.setTableConfig(t), ri = (t) => {
2227
2289
  t && (typeof t.getTableConfig == "function" && (w.getTableConfig = t.getTableConfig), typeof t.setTableConfig == "function" && (w.setTableConfig = t.setTableConfig));
2228
- }, { t: li } = b(), ni = !0, ri = !1, oi = {
2290
+ }, { t: oi } = m(), ui = !0, ci = !1, di = {
2229
2291
  formatter: (t, e, i, s) => [void 0, null, ""].includes(i) ? "-" : i
2230
- }, ui = {
2292
+ }, hi = {
2231
2293
  name: "TmColumnConfig",
2232
2294
  components: {
2233
- MoveIcon: ge,
2234
- FixedLeftIcon: ye,
2235
- FixedRightIcon: ve,
2236
- UploadIcon: Ce,
2237
- DownloadIcon: _e,
2238
- DeleteIcon: xe,
2239
- MenuIcon: fe,
2295
+ MoveIcon: be,
2296
+ FixedLeftIcon: ve,
2297
+ FixedRightIcon: Ce,
2298
+ UploadIcon: _e,
2299
+ DownloadIcon: xe,
2300
+ DeleteIcon: Se,
2301
+ MenuIcon: me,
2240
2302
  tmEllipsisText: F
2241
2303
  },
2242
2304
  props: {
@@ -2274,9 +2336,9 @@ const ti = ei.exports, T = (t) => t ? t.data && t.data.attrs || {} : {}, L = (t,
2274
2336
  },
2275
2337
  data() {
2276
2338
  return {
2277
- t: li,
2278
- isVue2: ni,
2279
- isVue3: ri,
2339
+ t: oi,
2340
+ isVue2: ui,
2341
+ isVue3: ci,
2280
2342
  getDefaultSize: f,
2281
2343
  getCompatSize: x,
2282
2344
  buttonType: { type: "text" },
@@ -2374,8 +2436,8 @@ const ti = ei.exports, T = (t) => t ? t.data && t.data.attrs || {} : {}, L = (t,
2374
2436
  const s = T(i);
2375
2437
  return !(!s.prop || this.ignoredColumnConfigTypes.includes(s.type));
2376
2438
  }).map((i, s) => {
2377
- const a = T(i), l = u(u({}, oi), a);
2378
- L(i, l), a.prop && (e[a.prop] = i);
2439
+ const a = T(i), l = c(c({}, di), a);
2440
+ z(i, l), a.prop && (e[a.prop] = i);
2379
2441
  const n = a.hasOwnProperty("visible") ? a.visible !== !1 : !0;
2380
2442
  return {
2381
2443
  prop: a.prop,
@@ -2389,20 +2451,20 @@ const ti = ei.exports, T = (t) => t ? t.data && t.data.attrs || {} : {}, L = (t,
2389
2451
  },
2390
2452
  // 加载列配置
2391
2453
  loadColumnConfig() {
2392
- ii({
2454
+ li({
2393
2455
  key: this.computedTableKey
2394
2456
  }).then((t) => {
2395
2457
  var i;
2396
2458
  if (t.data.code !== 200) return;
2397
2459
  let e = JSON.parse(((i = t.data) == null ? void 0 : i.data) || null) || {};
2398
- e.columnsConfig && JSON.stringify(this.defaultColumnsConfig) === JSON.stringify(e.defaultColumnsConfig) ? this.tableColumns = e.columnsConfig.map((s) => u({}, s)) : this.tableColumns = this.defaultColumnsConfig.map((s) => u({}, s)), this.processedColumns = this.applyColumnConfig(this.tableColumns), this.isConfigLoaded = !0, this.$emit("complete", {
2460
+ e.columnsConfig && JSON.stringify(this.defaultColumnsConfig) === JSON.stringify(e.defaultColumnsConfig) ? this.tableColumns = e.columnsConfig.map((s) => c({}, s)) : this.tableColumns = this.defaultColumnsConfig.map((s) => c({}, s)), this.processedColumns = this.applyColumnConfig(this.tableColumns), this.isConfigLoaded = !0, this.$emit("complete", {
2399
2461
  columns: this.processedColumns,
2400
2462
  config: this.tableColumns,
2401
2463
  // 传递配置元数据
2402
2464
  isInitialLoad: !0
2403
2465
  });
2404
2466
  }).catch(() => {
2405
- this.tableColumns = this.defaultColumnsConfig.map((t) => u({}, t)), this.processedColumns = this.applyColumnConfig(this.tableColumns), this.isConfigLoaded = !0, this.$emit("complete", {
2467
+ this.tableColumns = this.defaultColumnsConfig.map((t) => c({}, t)), this.processedColumns = this.applyColumnConfig(this.tableColumns), this.isConfigLoaded = !0, this.$emit("complete", {
2406
2468
  columns: this.processedColumns,
2407
2469
  isInitialLoad: !0
2408
2470
  });
@@ -2414,18 +2476,18 @@ const ti = ei.exports, T = (t) => t ? t.data && t.data.attrs || {} : {}, L = (t,
2414
2476
  return this.ignoredColumnConfigTypes.includes(l.type);
2415
2477
  }), s = [];
2416
2478
  return [...t].sort((a, l) => {
2417
- const n = a.sort !== void 0 ? a.sort : 1 / 0, r = l.sort !== void 0 ? l.sort : 1 / 0;
2418
- return n - r;
2479
+ const n = a.sort !== void 0 ? a.sort : 1 / 0, o = l.sort !== void 0 ? l.sort : 1 / 0;
2480
+ return n - o;
2419
2481
  }).forEach((a) => {
2420
2482
  if (a.prop) {
2421
2483
  let l = this.columnMap[a.prop];
2422
- l && (L(l, {
2484
+ l && (z(l, {
2423
2485
  fixed: a.fixed || void 0,
2424
2486
  visible: a.visible
2425
2487
  }), (!e && a.visible || e) && s.push(l));
2426
2488
  }
2427
2489
  }), i.forEach((a) => {
2428
- L(a, { visible: !0 });
2490
+ z(a, { visible: !0 });
2429
2491
  }), [...i, ...s];
2430
2492
  },
2431
2493
  crateSortable() {
@@ -2458,9 +2520,9 @@ const ti = ei.exports, T = (t) => t ? t.data && t.data.attrs || {} : {}, L = (t,
2458
2520
  const { target: s, related: a } = i;
2459
2521
  if (!s || !a)
2460
2522
  return !1;
2461
- const l = a ? a.getAttribute("data-prop") : null, n = l ? this.sortedTableColumns.find((c) => c.prop === l) : null, r = n && n.fixed === "left", o = n && n.fixed === "right";
2462
- return this.isDraggingFrozen && !r || this.isDraggingFrozenRight && !o || !this.isDraggingFrozen && !this.isDraggingFrozenRight && (r || o) ? (s.classList.add("no-drop-zone"), !1) : (document.querySelectorAll(".no-drop-zone").forEach((c) => {
2463
- c.classList.remove("no-drop-zone");
2523
+ const l = a ? a.getAttribute("data-prop") : null, n = l ? this.sortedTableColumns.find((u) => u.prop === l) : null, o = n && n.fixed === "left", r = n && n.fixed === "right";
2524
+ return this.isDraggingFrozen && !o || this.isDraggingFrozenRight && !r || !this.isDraggingFrozen && !this.isDraggingFrozenRight && (o || r) ? (s.classList.add("no-drop-zone"), !1) : (document.querySelectorAll(".no-drop-zone").forEach((u) => {
2525
+ u.classList.remove("no-drop-zone");
2464
2526
  }), !0);
2465
2527
  },
2466
2528
  onEnd: ({ item: i, newIndex: s, oldIndex: a }) => {
@@ -2469,9 +2531,9 @@ const ti = ei.exports, T = (t) => t ? t.data && t.data.attrs || {} : {}, L = (t,
2469
2531
  document.querySelectorAll(".no-drop-zone").forEach((_) => {
2470
2532
  _.classList.remove("no-drop-zone");
2471
2533
  }), i.classList.remove("sortable-drag");
2472
- const l = this.sortedTableColumns[a], n = l.fixed === "left", r = l.fixed === "right", o = s > 0 ? this.sortedTableColumns[s - 1] : null, c = s < this.sortedTableColumns.length - 1 ? this.sortedTableColumns[s + 1] : null;
2534
+ const l = this.sortedTableColumns[a], n = l.fixed === "left", o = l.fixed === "right", r = s > 0 ? this.sortedTableColumns[s - 1] : null, u = s < this.sortedTableColumns.length - 1 ? this.sortedTableColumns[s + 1] : null;
2473
2535
  let p = !1;
2474
- if (n ? (o && o.fixed !== "left" || c && c.fixed === "right") && (p = !0) : r ? (o && o.fixed !== "right" || c && c.fixed !== "right") && (p = !0) : (o && o.fixed === "right" || c && c.fixed === "left") && (p = !0), p) {
2536
+ if (n ? (r && r.fixed !== "left" || u && u.fixed === "right") && (p = !0) : o ? (r && r.fixed !== "right" || u && u.fixed !== "right") && (p = !0) : (r && r.fixed === "right" || u && u.fixed === "left") && (p = !0), p) {
2475
2537
  this.rollbackSort();
2476
2538
  return;
2477
2539
  }
@@ -2620,13 +2682,13 @@ const ti = ei.exports, T = (t) => t ? t.data && t.data.attrs || {} : {}, L = (t,
2620
2682
  this.updateSortValues();
2621
2683
  const t = (e = this.tableColumns) == null ? void 0 : e.map((i) => {
2622
2684
  const s = this.sortedTableColumns.find(
2623
- (r) => r.prop === i.prop
2685
+ (o) => o.prop === i.prop
2624
2686
  );
2625
2687
  s && (i.sort = s.sort, i.fixed = s.fixed, i.visible = s.visible);
2626
2688
  const n = i, { label: a } = n;
2627
- return M(n, ["label"]);
2689
+ return H(n, ["label"]);
2628
2690
  });
2629
- si({
2691
+ ni({
2630
2692
  key: this.computedTableKey,
2631
2693
  info: JSON.stringify({
2632
2694
  columnsConfig: t,
@@ -2660,7 +2722,7 @@ const ti = ei.exports, T = (t) => t ? t.data && t.data.attrs || {} : {}, L = (t,
2660
2722
  }
2661
2723
  }
2662
2724
  };
2663
- var di = function() {
2725
+ var pi = function() {
2664
2726
  var e = this, i = e._self._c;
2665
2727
  return i("el-popover", e._g(e._b({ attrs: { "popper-class": "column-config-popover", width: 680, "show-arrow": !1, placement: e.placement, trigger: "click" }, on: { show: e.handlePopoverShow, hide: e.handlePopoverHide }, scopedSlots: e._u([{ key: "reference", fn: function() {
2666
2728
  return [i("div", { staticStyle: { display: "inline-block", "margin-left": "10px" } }, [i("el-tooltip", e._b({ attrs: { content: e.t("columnSetting"), placement: "top" } }, "el-tooltip", e.afterOpenDelay, !1), [i("el-button", { ref: "operationRef", attrs: { size: e.getDefaultSize(), circle: "" } }, [i("MenuIcon")], 1)], 1)], 1)];
@@ -2691,23 +2753,23 @@ var di = function() {
2691
2753
  }), 0)])]), i("div", { staticClass: "footer" }, [i("div", { staticClass: "footer-left" }, [i("el-button", { attrs: { size: e.getCompatSize("mini") }, on: { click: e.handleRestoreDefault } }, [e._v(e._s(e.t("restoreDefault")))])], 1), i("div", { staticClass: "footer-right" }, [i("el-button", { attrs: { size: e.getCompatSize("mini") }, on: { click: function(s) {
2692
2754
  e.popoverVisible = !1;
2693
2755
  } } }, [e._v(e._s(e.t("cancel")))]), i("el-button", { attrs: { size: e.getCompatSize("mini"), type: "primary" }, on: { click: e.onSave } }, [e._v(e._s(e.t("saveAndApply")))])], 1)])]) : e._e()]);
2694
- }, ci = [], hi = /* @__PURE__ */ d(
2695
- ui,
2696
- di,
2697
- ci,
2756
+ }, fi = [], mi = /* @__PURE__ */ d(
2757
+ hi,
2758
+ pi,
2759
+ fi,
2698
2760
  !1,
2699
2761
  null,
2700
2762
  "fc286487"
2701
2763
  );
2702
- const pi = hi.exports, W = !0, I = !1;
2703
- const fi = {
2764
+ const gi = mi.exports, I = !0, N = !1;
2765
+ const bi = {
2704
2766
  name: "TmTable",
2705
2767
  components: {
2706
- TableSearch: G,
2707
- TablePagination: Gt,
2708
- TableMenu: ti,
2709
- ColumnConfig: pi,
2710
- RefreshIcon: me,
2768
+ TableSearch: Y,
2769
+ TablePagination: Zt,
2770
+ TableMenu: ai,
2771
+ ColumnConfig: gi,
2772
+ RefreshIcon: ge,
2711
2773
  // 用于渲染VNode的组件
2712
2774
  ColumnRenderer: {
2713
2775
  props: ["vnode"],
@@ -2822,9 +2884,9 @@ const fi = {
2822
2884
  return {
2823
2885
  getDefaultSize: f,
2824
2886
  getCompatSize: x,
2825
- isVue3: I,
2826
- isVue2: W,
2827
- t: b().t,
2887
+ isVue3: N,
2888
+ isVue2: I,
2889
+ t: m().t,
2828
2890
  tableData: [],
2829
2891
  tableLoading: !1,
2830
2892
  columnsLoading: !1,
@@ -2904,14 +2966,14 @@ const fi = {
2904
2966
  },
2905
2967
  getColumnsHash(t) {
2906
2968
  return t.map((e, i) => {
2907
- var s, a, l, n, r;
2908
- return e ? e.key || ((a = (s = e.data) == null ? void 0 : s.attrs) == null ? void 0 : a.prop) || ((n = (l = e.componentOptions) == null ? void 0 : l.propsData) == null ? void 0 : n.prop) || ((r = e.props) == null ? void 0 : r.prop) || `index-${i}` : `null-${i}`;
2969
+ var s, a, l, n, o;
2970
+ return e ? e.key || ((a = (s = e.data) == null ? void 0 : s.attrs) == null ? void 0 : a.prop) || ((n = (l = e.componentOptions) == null ? void 0 : l.propsData) == null ? void 0 : n.prop) || ((o = e.props) == null ? void 0 : o.prop) || `index-${i}` : `null-${i}`;
2909
2971
  }).join(",");
2910
2972
  },
2911
2973
  checkAndUpdateColumns() {
2912
2974
  var t, e;
2913
2975
  try {
2914
- const i = W ? this.$slots.default || [] : ((e = (t = this.$slots).default) == null ? void 0 : e.call(t)) || [], s = this.getColumnsHash(i), a = this.lastSlotsHash || this.getColumnsHash(this.originalColumns);
2976
+ const i = I ? this.$slots.default || [] : ((e = (t = this.$slots).default) == null ? void 0 : e.call(t)) || [], s = this.getColumnsHash(i), a = this.lastSlotsHash || this.getColumnsHash(this.originalColumns);
2915
2977
  s !== a && (this.lastSlotsHash = s, this.originalColumns = i, !this.columnSettingButton || !this.isColumnConfigLoaded ? this.displayColumns = this.originalColumns : this.reapplyColumnConfig(), this.$nextTick(() => {
2916
2978
  this.$refs.table && this.$refs.table.doLayout(), this.$forceUpdate();
2917
2979
  }));
@@ -2940,15 +3002,15 @@ const fi = {
2940
3002
  this.originalColumns.forEach((a) => {
2941
3003
  t(a).type === "selection" && i.push(a);
2942
3004
  }), [...this.savedColumnConfig].sort((a, l) => {
2943
- const n = a.sort !== void 0 ? a.sort : 1 / 0, r = l.sort !== void 0 ? l.sort : 1 / 0;
2944
- return n - r;
3005
+ const n = a.sort !== void 0 ? a.sort : 1 / 0, o = l.sort !== void 0 ? l.sort : 1 / 0;
3006
+ return n - o;
2945
3007
  }).forEach((a) => {
2946
3008
  a.prop && e[a.prop] && a.visible !== !1 && i.push(e[a.prop]);
2947
3009
  }), this.originalColumns.forEach((a) => {
2948
- const l = t(a), n = l.prop, r = l.type;
2949
- if (n && r !== "selection") {
2950
- const o = this.savedColumnConfig.some((p) => p.prop === n), c = i.find((p) => t(p).prop === n);
2951
- !o && !c && i.push(a);
3010
+ const l = t(a), n = l.prop, o = l.type;
3011
+ if (n && o !== "selection") {
3012
+ const r = this.savedColumnConfig.some((p) => p.prop === n), u = i.find((p) => t(p).prop === n);
3013
+ !r && !u && i.push(a);
2952
3014
  }
2953
3015
  }), this.displayColumns = i;
2954
3016
  },
@@ -2975,7 +3037,7 @@ const fi = {
2975
3037
  params: this.searchForm
2976
3038
  }), { list: e, total: i, pageSize: s, current: a } = t;
2977
3039
  this.tableData = e;
2978
- let l = u({}, this.paginationInfo);
3040
+ let l = c({}, this.paginationInfo);
2979
3041
  i !== void 0 && (l.total = i), a !== void 0 && (l.current = a), s !== void 0 && (l.pageSize = s), this.paginationInfo = l;
2980
3042
  } catch (t) {
2981
3043
  } finally {
@@ -3021,29 +3083,33 @@ const fi = {
3021
3083
  // 重新加载表格
3022
3084
  reloadTable() {
3023
3085
  this.tableReload++;
3086
+ },
3087
+ // 获取 el-table 实例,用于调用 el-table 的所有方法
3088
+ getTableRef() {
3089
+ return this.$refs.table;
3024
3090
  }
3025
3091
  }
3026
3092
  };
3027
- var mi = function() {
3093
+ var yi = function() {
3028
3094
  var e = this, i = e._self._c;
3029
3095
  return i("div", { ref: "tablePage", staticClass: "tm-table" }, [e.searchColumns && e.searchColumns.length > 0 ? i("table-search", { ref: "search", attrs: { disabled: e.pageLoading, "search-columns": e.searchColumns, "search-form": e.searchForm, "label-width": e.labelWidth, "input-width": e.inputWidth, direction: e.direction, "label-align": e.labelAlign }, on: { search: e.search, reset: e.reset, "update:search-form": e.handleUpdateSearchForm } }, [e._t("search")], 2) : e._e(), e._t("between-search-menu"), e.showMenu ? i("table-menu", { scopedSlots: e._u([{ key: "left", fn: function() {
3030
3096
  return [e._t("menu-left")];
3031
3097
  }, proxy: !0 }, { key: "right", fn: function() {
3032
3098
  return [e._t("menu-right"), e.refreshButton && typeof e.data == "function" ? i("el-tooltip", e._b({ attrs: { content: e.t("refresh"), placement: "top" } }, "el-tooltip", e.afterOpenDelay, !1), [i("el-button", { attrs: { circle: "", size: e.getDefaultSize() }, on: { click: e.handleRefresh } }, [i("RefreshIcon")], 1)], 1) : e._e(), e.columnSettingButton ? i("ColumnConfig", { attrs: { maxFixedLeftQuantity: e.maxFixedLeftQuantity, maxFixedRightQuantity: e.maxFixedRightQuantity, tableKey: e.computedTableKey, columns: e.originalColumns }, on: { complete: e.handleColumnConfigComplete } }) : e._e()];
3033
- }, proxy: !0 }], null, !0) }) : e._e(), e._t("between-menu-table"), i("el-table", e._g(e._b({ directives: [{ name: "loading", rawName: "v-loading", value: e.pageLoading, expression: "pageLoading" }], key: e.tableReload, ref: "table", attrs: { data: e.tableData, height: e.tableHeight, size: e.getCompatSize("mini") }, on: { "selection-change": e.handleSelectionChange } }, "el-table", g(u({}, e.$attrs), { border: e.border }), !1), e.isVue2 ? e.$listeners : {}), e._l(e.displayColumns, function(s) {
3099
+ }, proxy: !0 }], null, !0) }) : e._e(), e._t("between-menu-table"), i("el-table", e._g(e._b({ directives: [{ name: "loading", rawName: "v-loading", value: e.pageLoading, expression: "pageLoading" }], key: e.tableReload, ref: "table", attrs: { data: e.tableData, height: e.tableHeight, size: e.getCompatSize("mini") }, on: { "selection-change": e.handleSelectionChange } }, "el-table", b(c({}, e.$attrs), { border: e.border }), !1), e.isVue2 ? e.$listeners : {}), e._l(e.displayColumns, function(s) {
3034
3100
  return i("columnRenderer", { key: `${e.isVue3 ? s.id : s.data.attrs.prop}-${e.slotsUpdateTrigger}`, attrs: { vnode: s } });
3035
3101
  }), 1), e._t("between-table-pagination"), e.computedShowPagination ? i("table-pagination", { ref: "tmPagination", attrs: { "page-size": e.paginationInfo.pageSize, current: e.paginationInfo.current, total: e.paginationInfo.total, disabled: e.tableLoading }, on: { "size-change": e.handleSizeChange, "current-change": e.handleCurrentChange }, scopedSlots: e._u([{ key: "pagination-left", fn: function() {
3036
3102
  return [e._t("pagination-left")];
3037
3103
  }, proxy: !0 }], null, !0) }) : e._e(), e._t("after-pagination")], 2);
3038
- }, gi = [], bi = /* @__PURE__ */ d(
3039
- fi,
3040
- mi,
3041
- gi,
3104
+ }, vi = [], Ci = /* @__PURE__ */ d(
3105
+ bi,
3106
+ yi,
3107
+ vi,
3042
3108
  !1,
3043
3109
  null,
3044
- "cd1d8396"
3110
+ "70e1ea9a"
3045
3111
  );
3046
- const Y = bi.exports, yi = !0, vi = !1, Ci = {
3112
+ const X = Ci.exports, _i = !0, xi = !1, Si = {
3047
3113
  name: "TmTableColumn",
3048
3114
  inheritAttrs: !1,
3049
3115
  computed: {
@@ -3056,8 +3122,8 @@ const Y = bi.exports, yi = !0, vi = !1, Ci = {
3056
3122
  },
3057
3123
  data() {
3058
3124
  return {
3059
- isVue2: yi,
3060
- isVue3: vi
3125
+ isVue2: _i,
3126
+ isVue3: xi
3061
3127
  };
3062
3128
  },
3063
3129
  created() {
@@ -3067,25 +3133,25 @@ const Y = bi.exports, yi = !0, vi = !1, Ci = {
3067
3133
  });
3068
3134
  }
3069
3135
  };
3070
- var _i = function() {
3136
+ var $i = function() {
3071
3137
  var e = this, i = e._self._c;
3072
3138
  return e.isVisible ? i("el-table-column", e._g(e._b({ scopedSlots: e._u([e._l(e.slots, function(s, a) {
3073
3139
  return { key: a, fn: function(l) {
3074
3140
  return [e._t(a, null, null, l)];
3075
3141
  } };
3076
3142
  })], null, !0) }, "el-table-column", e.$attrs, !1), e.isVue2 ? e.$listeners : {})) : e._e();
3077
- }, xi = [], Si = /* @__PURE__ */ d(
3078
- Ci,
3079
- _i,
3080
- xi,
3143
+ }, Ti = [], wi = /* @__PURE__ */ d(
3144
+ Si,
3145
+ $i,
3146
+ Ti,
3081
3147
  !1,
3082
3148
  null,
3083
3149
  null
3084
3150
  );
3085
- const X = Si.exports, { t: k } = b(), $i = {
3151
+ const Z = wi.exports, { t: A } = m(), Fi = {
3086
3152
  name: "TmAdvancedEllipsisText",
3087
3153
  components: {
3088
- CopyIcon: N
3154
+ CopyIcon: P
3089
3155
  },
3090
3156
  props: {
3091
3157
  rows: {
@@ -3202,7 +3268,7 @@ const X = Si.exports, { t: k } = b(), $i = {
3202
3268
  },
3203
3269
  handleCopy() {
3204
3270
  navigator.clipboard && window.isSecureContext ? navigator.clipboard.writeText(this.originalText).then(() => {
3205
- this.$message.success(k("copySuccess"));
3271
+ this.$message.success(A("copySuccess"));
3206
3272
  }).catch(() => {
3207
3273
  this.fallbackCopy();
3208
3274
  }) : this.fallbackCopy();
@@ -3211,9 +3277,9 @@ const X = Si.exports, { t: k } = b(), $i = {
3211
3277
  const t = document.createElement("textarea");
3212
3278
  t.value = this.originalText, t.style.position = "fixed", t.style.left = "-999999px", t.style.top = "-999999px", document.body.appendChild(t), t.focus(), t.select();
3213
3279
  try {
3214
- document.execCommand("copy"), this.$message.success(k("copySuccess"));
3280
+ document.execCommand("copy"), this.$message.success(A("copySuccess"));
3215
3281
  } catch (e) {
3216
- this.$message.error(k("copyFailed"));
3282
+ this.$message.error(A("copyFailed"));
3217
3283
  }
3218
3284
  document.body.removeChild(t);
3219
3285
  },
@@ -3364,7 +3430,7 @@ const X = Si.exports, { t: k } = b(), $i = {
3364
3430
  }
3365
3431
  }
3366
3432
  };
3367
- var Ti = function() {
3433
+ var Vi = function() {
3368
3434
  var e = this, i = e._self._c;
3369
3435
  return i("div", { ref: "containerRef", staticClass: "tm-ellipsis-text", style: e.containerStyle, on: { mouseenter: e.handleMouseEnter, mouseleave: e.handleMouseLeave } }, [e.showTooltip && e.isLastLineEllipsis ? i("el-tooltip", e._b({ attrs: { content: e.originalText, disabled: !e.showTooltip || !e.isLastLineEllipsis, placement: "top" } }, "el-tooltip", {
3370
3436
  [e.isVue2 ? "open-delay" : "show-after"]: 300
@@ -3373,52 +3439,52 @@ var Ti = function() {
3373
3439
  }), i("div", { staticClass: "tm-ellipsis-last-line" }, [i("div", { staticClass: "tm-ellipsis-text-part", domProps: { innerHTML: e._s(e.lastLineText) } }), e.shouldShowToolbar && e.hasToolbarContent ? i("div", { staticClass: "tm-ellipsis-toolbar-part" }, [e.copyable ? i("CopyIcon", { staticClass: "icon-item", on: { click: e.handleCopy } }) : e._e(), e._t("toolbar")], 2) : e._e()])], 2)]) : i("div", { staticClass: "tm-ellipsis-text-wrapper" }, [e._l(e.frontLines, function(s, a) {
3374
3440
  return i("div", { key: "front-" + a, staticClass: "tm-ellipsis-line", domProps: { innerHTML: e._s(s) } });
3375
3441
  }), i("div", { staticClass: "tm-ellipsis-last-line" }, [i("div", { staticClass: "tm-ellipsis-text-part", domProps: { innerHTML: e._s(e.lastLineText) } }), e.shouldShowToolbar && e.hasToolbarContent ? i("div", { staticClass: "tm-ellipsis-toolbar-part" }, [e.copyable ? i("CopyIcon", { staticClass: "icon-item", on: { click: e.handleCopy } }) : e._e(), e._t("toolbar")], 2) : e._e()])], 2), i("div", { ref: "measureRef", staticClass: "tm-ellipsis-measure" })], 1);
3376
- }, wi = [], Fi = /* @__PURE__ */ d(
3377
- $i,
3378
- Ti,
3379
- wi,
3442
+ }, ki = [], Li = /* @__PURE__ */ d(
3443
+ Fi,
3444
+ Vi,
3445
+ ki,
3380
3446
  !1,
3381
3447
  null,
3382
3448
  "14f27c2e"
3383
3449
  );
3384
- const Z = Fi.exports, Vi = {
3450
+ const ee = Li.exports, zi = {
3385
3451
  install(t, e = {}) {
3386
- [Y, X, F, Z].forEach((i) => t.component(i.name, i)), e.tableConfigProvider && ai(e.tableConfigProvider), e.lang && O(e.lang || "zh-CN");
3452
+ [X, Z, F, ee].forEach((i) => t.component(i.name, i)), e.tableConfigProvider && ri(e.tableConfigProvider), e.lang && O(e.lang || "zh-CN");
3387
3453
  }
3388
- }, zi = {
3389
- install: Vi.install,
3390
- Table: Y,
3391
- Column: X,
3392
- Search: G,
3393
- Select: P,
3394
- Input: B,
3395
- Date: j,
3396
- Cascader: U,
3397
- Radio: J,
3398
- Checkbox: K,
3399
- Switch: q,
3400
- Textarea: Q,
3454
+ }, Ai = {
3455
+ install: zi.install,
3456
+ Table: X,
3457
+ Column: Z,
3458
+ Search: Y,
3459
+ Select: B,
3460
+ Input: j,
3461
+ Date: U,
3462
+ Cascader: J,
3463
+ Radio: K,
3464
+ Checkbox: q,
3465
+ Switch: Q,
3466
+ Textarea: G,
3401
3467
  EllipsisText: F,
3402
- AdvancedEllipsisText: Z,
3468
+ AdvancedEllipsisText: ee,
3403
3469
  setLang: O,
3404
- useLocale: b
3470
+ useLocale: m
3405
3471
  };
3406
- typeof window != "undefined" && window.Vue && zi.install(window.Vue);
3472
+ typeof window != "undefined" && window.Vue && Ai.install(window.Vue);
3407
3473
  export {
3408
- Z as AdvancedEllipsisText,
3409
- U as Cascader,
3410
- K as Checkbox,
3411
- X as Column,
3412
- j as Date,
3474
+ ee as AdvancedEllipsisText,
3475
+ J as Cascader,
3476
+ q as Checkbox,
3477
+ Z as Column,
3478
+ U as Date,
3413
3479
  F as EllipsisText,
3414
- B as Input,
3415
- J as Radio,
3416
- G as Search,
3417
- P as Select,
3418
- q as Switch,
3419
- Y as Table,
3420
- Q as Textarea,
3421
- zi as default,
3480
+ j as Input,
3481
+ K as Radio,
3482
+ Y as Search,
3483
+ B as Select,
3484
+ Q as Switch,
3485
+ X as Table,
3486
+ G as Textarea,
3487
+ Ai as default,
3422
3488
  O as setLang,
3423
- b as useLocale
3489
+ m as useLocale
3424
3490
  };