tm-table 1.2.0 → 1.2.2

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,32 +1,33 @@
1
- var Le = Object.defineProperty, ke = Object.defineProperties;
2
- var Oe = Object.getOwnPropertyDescriptors;
1
+ var Ae = Object.defineProperty, De = Object.defineProperties;
2
+ var Me = Object.getOwnPropertyDescriptors;
3
3
  var Q = Object.getOwnPropertySymbols;
4
- var ae = Object.prototype.hasOwnProperty, oe = Object.prototype.propertyIsEnumerable;
5
- var ne = (e, i, t) => i in e ? Le(e, i, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[i] = t, T = (e, i) => {
6
- for (var t in i || (i = {}))
7
- ae.call(i, t) && ne(e, t, i[t]);
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
8
  if (Q)
9
- for (var t of Q(i))
10
- oe.call(i, t) && ne(e, t, i[t]);
9
+ for (var t of Q(l))
10
+ oe.call(l, t) && se(e, t, l[t]);
11
11
  return e;
12
- }, W = (e, i) => ke(e, Oe(i));
13
- var re = (e, i) => {
12
+ }, I = (e, l) => De(e, Me(l));
13
+ var ue = (e, l) => {
14
14
  var t = {};
15
- for (var n in e)
16
- ae.call(e, n) && i.indexOf(n) < 0 && (t[n] = e[n]);
15
+ for (var a in e)
16
+ re.call(e, a) && l.indexOf(a) < 0 && (t[a] = e[a]);
17
17
  if (e != null && Q)
18
- for (var n of Q(e))
19
- i.indexOf(n) < 0 && oe.call(e, n) && (t[n] = e[n]);
18
+ for (var a of Q(e))
19
+ l.indexOf(a) < 0 && oe.call(e, a) && (t[a] = e[a]);
20
20
  return t;
21
21
  };
22
- import { ref as De, createElementBlock as g, openBlock as r, normalizeStyle as U, createElementVNode as b, h as me, resolveComponent as u, createBlock as m, mergeProps as _, withCtx as f, toDisplayString as w, normalizeClass as X, createCommentVNode as v, defineComponent as Me, useAttrs as Ae, useSlots as He, computed as ue, resolveDynamicComponent as Re, Fragment as k, renderList as D, createVNode as p, renderSlot as x, toHandlers as I, createTextVNode as L, withKeys as Ee, createSlots as ge, resolveDirective as Ie, withDirectives as We, normalizeProps as Pe, guardReactiveProps as Ne } from "vue";
23
- import E from "sortablejs";
24
- const de = {
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";
24
+ import R from "sortablejs";
25
+ const he = {
25
26
  mini: "small",
26
27
  small: "small",
27
28
  default: "default",
28
29
  large: "large"
29
- }, K = (e) => de[e] || de.default, M = () => "default", Be = {
30
+ }, K = (e) => he[e] || he.default, k = () => "default", Ke = {
30
31
  today: "今天",
31
32
  yesterday: "昨天",
32
33
  last7days: "最近7天",
@@ -65,7 +66,7 @@ const de = {
65
66
  cancelTop: "取消置顶",
66
67
  copySuccess: "复制成功",
67
68
  copyFailed: "复制失败"
68
- }, Ue = {
69
+ }, Qe = {
69
70
  today: "Today",
70
71
  yesterday: "Yesterday",
71
72
  last7days: "Last 7 days",
@@ -104,27 +105,27 @@ const de = {
104
105
  cancelTop: "Cancel top",
105
106
  copySuccess: "Copy successfully",
106
107
  copyFailed: "Copy failed"
107
- }, je = {
108
- "zh-CN": Be,
109
- "en-US": Ue
108
+ }, qe = {
109
+ "zh-CN": Ke,
110
+ "en-US": Qe
110
111
  };
111
112
  let Z = { value: "zh-CN" };
112
- Z = De("zh-CN");
113
- const Je = (e) => {
114
- var i;
115
- return ((i = je[Z.value]) == null ? void 0 : i[e]) || e;
116
- }, se = (e) => {
113
+ Z = He("zh-CN");
114
+ const Ye = (e) => {
115
+ var l;
116
+ return ((l = qe[Z.value]) == null ? void 0 : l[e]) || e;
117
+ }, ae = (e) => {
117
118
  Z.value = e;
118
- }, R = () => ({
119
- t: Je,
120
- setLang: se,
119
+ }, H = () => ({
120
+ t: Ye,
121
+ setLang: ae,
121
122
  currentLang: Z
122
- }), V = (e, i) => {
123
+ }), w = (e, l) => {
123
124
  const t = e.__vccOpts || e;
124
- for (const [n, l] of i)
125
- t[n] = l;
125
+ for (const [a, i] of l)
126
+ t[a] = i;
126
127
  return t;
127
- }, Ke = {
128
+ }, Ge = {
128
129
  name: "BaseIcon",
129
130
  props: {
130
131
  path: {
@@ -141,24 +142,24 @@ const Je = (e) => {
141
142
  handleClick() {
142
143
  }
143
144
  }
144
- }, Qe = ["width", "height"], qe = ["d"];
145
- function Ye(e, i, t, n, l, s) {
146
- return r(), g("i", {
145
+ }, Xe = ["width", "height"], Ze = ["d"];
146
+ function $e(e, l, t, a, i, n) {
147
+ return o(), b("i", {
147
148
  class: "tm-icon",
148
- onClick: i[0] || (i[0] = (...o) => s.handleClick && s.handleClick(...o))
149
+ onClick: l[0] || (l[0] = (...r) => n.handleClick && n.handleClick(...r))
149
150
  }, [
150
- (r(), g("svg", {
151
+ (o(), b("svg", {
151
152
  width: t.size,
152
153
  height: t.size,
153
- style: U({ color: t.color }),
154
+ style: B({ color: t.color }),
154
155
  viewBox: "0 0 1024 1024",
155
156
  xmlns: "http://www.w3.org/2000/svg"
156
157
  }, [
157
- b("path", { d: t.path }, null, 8, qe)
158
- ], 12, Qe))
158
+ v("path", { d: t.path }, null, 8, Ze)
159
+ ], 12, Xe))
159
160
  ]);
160
161
  }
161
- const Ge = /* @__PURE__ */ V(Ke, [["render", Ye], ["__scopeId", "data-v-1c30ca93"]]), Xe = {
162
+ const et = /* @__PURE__ */ w(Ge, [["render", $e], ["__scopeId", "data-v-1c30ca93"]]), tt = {
162
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",
163
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",
164
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",
@@ -170,9 +171,9 @@ const Ge = /* @__PURE__ */ V(Ke, [["render", Ye], ["__scopeId", "data-v-1c30ca93
170
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",
171
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",
172
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"
173
- }, A = Object.entries(Xe).reduce((e, [i, t]) => {
174
- const n = `${i}Icon`, l = {
175
- name: n,
174
+ }, D = Object.entries(tt).reduce((e, [l, t]) => {
175
+ const a = `${l}Icon`, i = {
176
+ name: a,
176
177
  props: {
177
178
  path: {
178
179
  type: String,
@@ -185,19 +186,19 @@ const Ge = /* @__PURE__ */ V(Ke, [["render", Ye], ["__scopeId", "data-v-1c30ca93
185
186
  type: String
186
187
  }
187
188
  },
188
- render(s) {
189
- return me(Ge, this.$props);
189
+ render(n) {
190
+ return be(et, this.$props);
190
191
  }
191
192
  };
192
- return l.install = (s) => {
193
- s.component(n, l);
194
- }, e[i] = l, e;
195
- }, {}), Ze = A.menu, $e = A.refresh, et = A.move;
196
- A["column-setting"];
197
- const tt = A.more, it = A["fixed-left"], lt = A["fixed-right"], st = A.upload, nt = A.download, at = A.delete, be = A.copy, { t: ee } = R(), ot = !1, rt = !0, ut = {
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;
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
199
  name: "TmEllipsisText",
199
200
  components: {
200
- CopyIcon: be
201
+ CopyIcon: ve
201
202
  },
202
203
  props: {
203
204
  text: {
@@ -226,12 +227,16 @@ const tt = A.more, it = A["fixed-left"], lt = A["fixed-right"], st = A.upload, n
226
227
  copyable: {
227
228
  type: Boolean,
228
229
  default: !1
230
+ },
231
+ textAlign: {
232
+ type: String,
233
+ default: "left"
229
234
  }
230
235
  },
231
236
  data() {
232
237
  return {
233
- isVue2: ot,
234
- isVue3: rt,
238
+ isVue2: ht,
239
+ isVue3: ct,
235
240
  isOverflow: !1,
236
241
  currentLines: 1,
237
242
  resizeObserver: null
@@ -242,15 +247,16 @@ const tt = A.more, it = A["fixed-left"], lt = A["fixed-right"], st = A.upload, n
242
247
  return !this.showTooltip || !this.isOverflow;
243
248
  },
244
249
  textStyle() {
245
- const e = typeof this.width == "number" ? `${this.width}px` : this.width, i = typeof this.maxWidth == "number" ? `${this.maxWidth}px` : this.maxWidth;
250
+ const e = typeof this.width == "number" ? `${this.width}px` : this.width, l = typeof this.maxWidth == "number" ? `${this.maxWidth}px` : this.maxWidth;
246
251
  return {
247
252
  width: e,
248
- maxWidth: i,
253
+ maxWidth: l,
249
254
  lineHeight: this.lineHeight,
250
255
  display: "-webkit-inline-box",
251
256
  overflow: "hidden",
252
257
  WebkitBoxOrient: "vertical",
253
- WebkitLineClamp: this.lines
258
+ WebkitLineClamp: this.lines,
259
+ textAlign: this.textAlign
254
260
  };
255
261
  }
256
262
  },
@@ -277,25 +283,25 @@ const tt = A.more, it = A["fixed-left"], lt = A["fixed-right"], st = A.upload, n
277
283
  });
278
284
  },
279
285
  performOverflowCheck() {
280
- var h;
286
+ var f;
281
287
  const e = this.$refs.textEl;
282
288
  if (!e) return;
283
- const i = getComputedStyle(e);
284
- if (!i.width || i.width === "0px") {
289
+ const l = getComputedStyle(e);
290
+ if (!l.width || l.width === "0px") {
285
291
  this.$nextTick(() => {
286
292
  this.performOverflowCheck();
287
293
  });
288
294
  return;
289
295
  }
290
- const t = e.scrollHeight, n = e.scrollWidth, l = e.clientHeight, s = e.clientWidth, o = 1, c = t > l + o, d = n > s + o;
291
- if (c || d) {
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) {
292
298
  this.isOverflow = !0;
293
- const y = parseFloat(i.lineHeight) || 16;
299
+ const y = parseFloat(l.lineHeight) || 16;
294
300
  this.currentLines = Math.ceil(t / y);
295
301
  } else {
296
- const y = e.getBoundingClientRect(), F = (h = e.parentElement) == null ? void 0 : h.getBoundingClientRect();
297
- if (F) {
298
- const O = y.height > F.height || y.width > F.width;
302
+ const y = e.getBoundingClientRect(), V = (f = e.parentElement) == null ? void 0 : f.getBoundingClientRect();
303
+ if (V) {
304
+ const O = y.height > V.height || y.width > V.width;
299
305
  this.isOverflow = O;
300
306
  } else
301
307
  this.isOverflow = !1;
@@ -339,83 +345,83 @@ const tt = A.more, it = A["fixed-left"], lt = A["fixed-right"], st = A.upload, n
339
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();
340
346
  try {
341
347
  document.execCommand("copy"), this.$message.success(ee("copySuccess"));
342
- } catch (i) {
348
+ } catch (l) {
343
349
  this.$message.error(ee("copyFailed"));
344
350
  }
345
351
  document.body.removeChild(e);
346
352
  }
347
353
  }
348
- }, dt = { class: "ellipsis-text-container" };
349
- function ct(e, i, t, n, l, s) {
350
- const o = u("CopyIcon"), c = u("el-tooltip");
351
- return r(), m(c, _({
352
- disabled: s.tooltipDisabled,
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, _({
358
+ disabled: n.tooltipDisabled,
353
359
  content: t.text,
354
360
  effect: "dark",
355
361
  placement: "top"
356
362
  }, {
357
- [l.isVue2 ? "open-delay" : "show-after"]: 300
363
+ [i.isVue2 ? "open-delay" : "show-after"]: 300
358
364
  }), {
359
- default: f(() => [
360
- b("div", dt, [
361
- b("div", {
365
+ default: p(() => [
366
+ v("div", pt, [
367
+ v("div", {
362
368
  ref: "textEl",
363
369
  class: "ellipsis-text",
364
- style: U(s.textStyle)
365
- }, w(t.text), 5),
366
- b("div", {
367
- class: X(["toolbar", { multiline: l.currentLines > 1 && t.lines > 1 }])
370
+ style: B(n.textStyle)
371
+ }, T(t.text), 5),
372
+ v("div", {
373
+ class: X(["toolbar", { multiline: i.currentLines > 1 && t.lines > 1 }])
368
374
  }, [
369
- t.copyable ? (r(), m(o, {
375
+ t.copyable ? (o(), m(r, {
370
376
  key: 0,
371
377
  class: "icon-item",
372
- onClick: s.handleCopy
373
- }, null, 8, ["onClick"])) : v("", !0)
378
+ onClick: n.handleCopy
379
+ }, null, 8, ["onClick"])) : C("", !0)
374
380
  ], 2)
375
381
  ])
376
382
  ]),
377
383
  _: 1
378
384
  }, 16, ["disabled", "content"]);
379
385
  }
380
- const $ = /* @__PURE__ */ V(ut, [["render", ct], ["__scopeId", "data-v-a51a2011"]]);
381
- var ht = Object.defineProperty, ft = Object.defineProperties, pt = Object.getOwnPropertyDescriptors, ce = Object.getOwnPropertySymbols, mt = Object.prototype.hasOwnProperty, gt = Object.prototype.propertyIsEnumerable, he = (e, i, t) => i in e ? ht(e, i, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[i] = t, fe = (e, i) => {
382
- for (var t in i || (i = {}))
383
- mt.call(i, t) && he(e, t, i[t]);
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]);
384
390
  if (ce)
385
- for (var t of ce(i))
386
- gt.call(i, t) && he(e, t, i[t]);
391
+ for (var t of ce(l))
392
+ Ct.call(l, t) && fe(e, t, l[t]);
387
393
  return e;
388
- }, pe = (e, i) => ft(e, pt(i));
389
- const bt = {
394
+ }, me = (e, l) => bt(e, yt(l));
395
+ const _t = {
390
396
  name: "RenderVue3",
391
397
  inheritAttrs: !1
392
- }, yt = /* @__PURE__ */ Me(pe(fe({}, bt), {
398
+ }, St = /* @__PURE__ */ Re(me(pe({}, _t), {
393
399
  props: {
394
400
  renderFn: { type: Function },
395
401
  data: {}
396
402
  },
397
403
  setup(e) {
398
- const i = e, t = Ae(), n = He(), l = ue(() => pe(fe({}, i.data || {}), {
404
+ const l = e, t = Ie(), a = Ee(), i = de(() => me(pe({}, l.data || {}), {
399
405
  $attrs: t,
400
- $slots: n
401
- })), s = ue(() => {
406
+ $slots: a
407
+ })), n = de(() => {
402
408
  try {
403
- if (!i.renderFn || typeof i.renderFn != "function")
409
+ if (!l.renderFn || typeof l.renderFn != "function")
404
410
  return console.warn("[RenderComponent] renderFn must be a function"), null;
405
- const o = i.renderFn.toString(), c = /\(\s*h\s*[,)]/.test(o) || i.renderFn.length >= 1;
406
- let d;
407
- return c ? d = i.renderFn(me, l.value) : d = i.renderFn(l.value), d;
408
- } catch (o) {
409
- return console.error("[RenderComponent] Error in render function:", o), 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;
410
416
  }
411
417
  });
412
- return (o, c) => (r(), m(Re(s.value)));
418
+ return (r, c) => (o(), m(We(n.value)));
413
419
  }
414
- })), vt = !1, Ct = !0, _t = {
420
+ })), xt = !1, Tt = !0, wt = {
415
421
  name: "FormItemLayout",
416
422
  components: {
417
423
  EllipsisText: $,
418
- RenderComponent: yt
424
+ RenderComponent: St
419
425
  },
420
426
  props: {
421
427
  // 布局方向
@@ -446,14 +452,19 @@ const bt = {
446
452
  field: {
447
453
  type: [String, Number],
448
454
  default: ""
455
+ },
456
+ labelAlign: {
457
+ type: String,
458
+ default: "right",
459
+ validator: (e) => ["left", "right", "center"].includes(e)
449
460
  }
450
461
  },
451
462
  data() {
452
463
  return {
453
- t: R().t,
454
- isVue2: vt,
455
- isVue3: Ct,
456
- getDefaultSize: M
464
+ t: H().t,
465
+ isVue2: xt,
466
+ isVue3: Tt,
467
+ getDefaultSize: k
457
468
  };
458
469
  },
459
470
  computed: {
@@ -464,8 +475,8 @@ const bt = {
464
475
  containerStyle() {
465
476
  const e = {};
466
477
  if (this.direction === "horizontal") {
467
- const i = this.hasLabel ? this.parsedLabelWidth + this.parsedInputWidth : this.parsedInputWidth;
468
- e.width = `${i}px`;
478
+ const l = this.hasLabel ? this.parsedLabelWidth + this.parsedInputWidth : this.parsedInputWidth;
479
+ e.width = `${l}px`;
469
480
  } else
470
481
  e.width = `${this.parsedInputWidth}px`;
471
482
  return e;
@@ -512,67 +523,69 @@ const bt = {
512
523
  this.$emit("field-change", e);
513
524
  }
514
525
  }
515
- }, St = {
526
+ }, Vt = {
516
527
  key: 0,
517
528
  class: "label-text"
518
- }, xt = {
529
+ }, Ft = {
519
530
  key: 1,
520
531
  class: "label-render"
521
532
  };
522
- function Tt(e, i, t, n, l, s) {
523
- const o = u("el-option"), c = u("el-select"), d = u("EllipsisText"), h = u("RenderComponent");
524
- return r(), g("div", {
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", {
525
536
  class: X(["form-item-layout", {
526
537
  "form-item-layout--horizontal": t.direction === "horizontal",
527
538
  "form-item-layout--vertical": t.direction === "vertical"
528
539
  }]),
529
- style: U(s.containerStyle)
540
+ style: B(n.containerStyle)
530
541
  }, [
531
- s.hasLabel ? (r(), g("div", {
542
+ n.hasLabel ? (o(), b("div", {
532
543
  key: 0,
533
544
  class: "form-item-label",
534
- style: U(s.labelStyle)
545
+ style: B(n.labelStyle)
535
546
  }, [
536
- t.labelOptions && t.labelOptions.length ? (r(), m(c, {
547
+ t.labelOptions && t.labelOptions.length ? (o(), m(c, {
537
548
  key: 0,
538
- modelValue: s.fieldValue,
539
- "onUpdate:modelValue": i[0] || (i[0] = (y) => s.fieldValue = y),
540
- placeholder: l.t("selectPlaceholder"),
541
- size: l.getDefaultSize(),
549
+ modelValue: n.fieldValue,
550
+ "onUpdate:modelValue": l[0] || (l[0] = (y) => n.fieldValue = y),
551
+ placeholder: i.t("selectPlaceholder"),
552
+ size: i.getDefaultSize(),
542
553
  class: "label-select",
543
- onChange: s.handleFieldChange
554
+ onChange: n.handleFieldChange
544
555
  }, {
545
- default: f(() => [
546
- (r(!0), g(k, null, D(t.labelOptions, (y) => (r(), m(o, {
556
+ default: p(() => [
557
+ (o(!0), b(L, null, A(t.labelOptions, (y) => (o(), m(r, {
547
558
  key: y.value,
548
559
  label: y.label,
549
560
  value: y.value
550
561
  }, null, 8, ["label", "value"]))), 128))
551
562
  ]),
552
563
  _: 1
553
- }, 8, ["modelValue", "placeholder", "size", "onChange"])) : t.label ? (r(), g(k, { key: 1 }, [
554
- typeof t.label == "string" ? (r(), g("div", St, [
555
- p(d, {
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, {
556
567
  text: t.label,
557
- lines: 2
558
- }, null, 8, ["text"])
559
- ])) : typeof t.label == "function" ? (r(), g("div", xt, [
560
- p(h, { "render-fn": t.label }, null, 8, ["render-fn"])
561
- ])) : v("", !0)
562
- ], 64)) : v("", !0)
563
- ], 4)) : v("", !0),
564
- b("div", {
568
+ lines: 2,
569
+ width: t.labelWidth - 4,
570
+ "text-align": t.labelAlign
571
+ }, null, 8, ["text", "width", "text-align"])
572
+ ])) : typeof t.label == "function" ? (o(), b("div", Ft, [
573
+ g(f, { "render-fn": t.label }, null, 8, ["render-fn"])
574
+ ])) : C("", !0)
575
+ ], 64)) : C("", !0)
576
+ ], 4)) : C("", !0),
577
+ v("div", {
565
578
  class: "form-item-input",
566
- style: U(s.inputStyle)
579
+ style: B(n.inputStyle)
567
580
  }, [
568
- x(e.$slots, "default", {}, void 0, !0)
581
+ S(e.$slots, "default", {}, void 0, !0)
569
582
  ], 4)
570
583
  ], 6);
571
584
  }
572
- const P = /* @__PURE__ */ V(_t, [["render", Tt], ["__scopeId", "data-v-e75cd736"]]), wt = !1, Vt = !0, q = "modelValue", Ft = "update:modelValue", zt = {
585
+ const E = /* @__PURE__ */ w(wt, [["render", zt], ["__scopeId", "data-v-57462da5"]]), Lt = !1, kt = !0, q = "modelValue", Ot = "update:modelValue", At = {
573
586
  name: "TmSelectFilter",
574
587
  components: {
575
- FormItemLayout: P
588
+ FormItemLayout: E
576
589
  },
577
590
  props: {
578
591
  [q]: {
@@ -643,14 +656,19 @@ const P = /* @__PURE__ */ V(_t, [["render", Tt], ["__scopeId", "data-v-e75cd736"
643
656
  type: String,
644
657
  default: void 0,
645
658
  validator: (e) => !e || ["horizontal", "vertical"].includes(e)
659
+ },
660
+ labelAlign: {
661
+ type: String,
662
+ default: "right",
663
+ validator: (e) => ["left", "right", "center"].includes(e)
646
664
  }
647
665
  },
648
666
  data() {
649
667
  return {
650
- t: R().t,
651
- isVue2: wt,
652
- isVue3: Vt,
653
- getDefaultSize: M,
668
+ t: H().t,
669
+ isVue2: Lt,
670
+ isVue3: kt,
671
+ getDefaultSize: k,
654
672
  optionsList: [],
655
673
  loading: !1,
656
674
  indeterminate: !1,
@@ -663,12 +681,12 @@ const P = /* @__PURE__ */ V(_t, [["render", Tt], ["__scopeId", "data-v-e75cd736"
663
681
  return this[q];
664
682
  },
665
683
  set(e) {
666
- let i = e;
684
+ let l = e;
667
685
  if (this.multiple && Array.isArray(e) && e.length === 0 && this.valueOnClear !== void 0) {
668
686
  const t = this[q];
669
- Array.isArray(t) && t.length > 0 && (i = typeof this.valueOnClear == "function" ? this.valueOnClear() : this.valueOnClear);
687
+ Array.isArray(t) && t.length > 0 && (l = typeof this.valueOnClear == "function" ? this.valueOnClear() : this.valueOnClear);
670
688
  }
671
- this.$emit(Ft, i), this.$emit("change", i);
689
+ this.$emit(Ot, l), this.$emit("change", l);
672
690
  }
673
691
  },
674
692
  propMap() {
@@ -706,8 +724,8 @@ const P = /* @__PURE__ */ V(_t, [["render", Tt], ["__scopeId", "data-v-e75cd736"
706
724
  },
707
725
  handleCheckAll(e) {
708
726
  this.indeterminate = !1;
709
- let i = [];
710
- e && (i = this.optionsList.map((t) => t[this.propMap.value])), this.computedValue = i;
727
+ let l = [];
728
+ e && (l = this.optionsList.map((t) => t[this.propMap.value])), this.computedValue = l;
711
729
  },
712
730
  handleClear() {
713
731
  if (this.valueOnClear !== void 0) {
@@ -718,78 +736,79 @@ const P = /* @__PURE__ */ V(_t, [["render", Tt], ["__scopeId", "data-v-e75cd736"
718
736
  }
719
737
  }
720
738
  }
721
- }, Lt = {
739
+ }, Dt = {
722
740
  key: 0,
723
741
  class: "check-all-option"
724
742
  };
725
- function kt(e, i, t, n, l, s) {
726
- const o = u("el-checkbox"), c = u("el-option"), d = u("el-select"), h = u("FormItemLayout");
727
- return r(), m(h, {
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, {
728
746
  label: t.label,
729
747
  "label-options": t.labelOptions,
730
748
  field: t.field,
731
- onFieldChange: s.handleFieldChange,
749
+ onFieldChange: n.handleFieldChange,
732
750
  "label-width": t.labelWidth,
733
751
  "input-width": t.inputWidth,
734
- direction: t.direction
752
+ direction: t.direction,
753
+ "label-align": t.labelAlign
735
754
  }, {
736
- default: f(() => [
737
- p(d, _({
755
+ default: p(() => [
756
+ g(h, _({
738
757
  ref: "select",
739
758
  class: "select",
740
- onClear: s.handleClear,
741
- modelValue: s.computedValue,
742
- "onUpdate:modelValue": i[2] || (i[2] = (y) => s.computedValue = y)
743
- }, W(T({}, e.$attrs), {
744
- size: l.getDefaultSize(),
759
+ onClear: n.handleClear,
760
+ modelValue: n.computedValue,
761
+ "onUpdate:modelValue": l[2] || (l[2] = (y) => n.computedValue = y)
762
+ }, I(x({}, e.$attrs), {
763
+ size: i.getDefaultSize(),
745
764
  filterable: t.filterable,
746
765
  clearable: t.clearable,
747
766
  collapseTags: t.collapseTags,
748
767
  multiple: t.multiple,
749
768
  placeholder: t.placeholder,
750
- loading: l.loading
751
- }), I(l.isVue2 ? e.$listeners : {}), { loading: l.loading }), {
752
- header: f(() => [
753
- l.isVue3 && t.multiple && t.showCheckAll ? (r(), m(o, {
769
+ loading: i.loading
770
+ }), M(i.isVue2 ? e.$listeners : {}), { loading: i.loading }), {
771
+ header: p(() => [
772
+ i.isVue3 && t.multiple && t.showCheckAll ? (o(), m(r, {
754
773
  key: 0,
755
- modelValue: l.checkAll,
756
- "onUpdate:modelValue": i[1] || (i[1] = (y) => l.checkAll = y),
757
- indeterminate: l.indeterminate,
758
- size: l.getDefaultSize(),
759
- onChange: s.handleCheckAll,
774
+ modelValue: i.checkAll,
775
+ "onUpdate:modelValue": l[1] || (l[1] = (y) => i.checkAll = y),
776
+ indeterminate: i.indeterminate,
777
+ size: i.getDefaultSize(),
778
+ onChange: n.handleCheckAll,
760
779
  style: { width: "100%", height: "20px", "padding-left": "10px" }
761
780
  }, {
762
- default: f(() => [
763
- L(w(l.t("all")), 1)
781
+ default: p(() => [
782
+ z(T(i.t("all")), 1)
764
783
  ]),
765
784
  _: 1
766
- }, 8, ["modelValue", "indeterminate", "size", "onChange"])) : v("", !0)
785
+ }, 8, ["modelValue", "indeterminate", "size", "onChange"])) : C("", !0)
767
786
  ]),
768
- default: f(() => [
769
- l.isVue2 && t.multiple && t.showCheckAll ? (r(), g("div", Lt, [
770
- p(o, {
787
+ default: p(() => [
788
+ i.isVue2 && t.multiple && t.showCheckAll ? (o(), b("div", Dt, [
789
+ g(r, {
771
790
  style: { width: "100%" },
772
- modelValue: l.checkAll,
773
- "onUpdate:modelValue": i[0] || (i[0] = (y) => l.checkAll = y),
774
- indeterminate: l.indeterminate,
775
- size: l.getDefaultSize(),
776
- onChange: s.handleCheckAll
791
+ modelValue: i.checkAll,
792
+ "onUpdate:modelValue": l[0] || (l[0] = (y) => i.checkAll = y),
793
+ indeterminate: i.indeterminate,
794
+ size: i.getDefaultSize(),
795
+ onChange: n.handleCheckAll
777
796
  }, {
778
- default: f(() => [
779
- L(w(l.t("all")), 1)
797
+ default: p(() => [
798
+ z(T(i.t("all")), 1)
780
799
  ]),
781
800
  _: 1
782
801
  }, 8, ["modelValue", "indeterminate", "size", "onChange"])
783
- ])) : v("", !0),
784
- (r(!0), g(k, null, D(l.optionsList, (y) => (r(), m(c, {
785
- key: y[s.propMap.value],
786
- label: y[s.propMap.label],
787
- value: y[s.propMap.value],
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],
788
807
  disabled: y.disabled
789
808
  }, {
790
- default: f(() => [
791
- x(e.$slots, "option", { item: y }, () => [
792
- L(w(y[s.propMap.label]), 1)
809
+ default: p(() => [
810
+ S(e.$slots, "option", { item: y }, () => [
811
+ z(T(y[n.propMap.label]), 1)
793
812
  ], !0)
794
813
  ]),
795
814
  _: 2
@@ -799,13 +818,13 @@ function kt(e, i, t, n, l, s) {
799
818
  }, 16, ["onClear", "modelValue", "loading"])
800
819
  ]),
801
820
  _: 3
802
- }, 8, ["label", "label-options", "field", "onFieldChange", "label-width", "input-width", "direction"]);
821
+ }, 8, ["label", "label-options", "field", "onFieldChange", "label-width", "input-width", "direction", "label-align"]);
803
822
  }
804
- const ye = /* @__PURE__ */ V(zt, [["render", kt], ["__scopeId", "data-v-b85e9ccb"]]), Ot = {
805
- name: "TmAdvancedInputFilter",
823
+ const Ce = /* @__PURE__ */ w(At, [["render", Mt], ["__scopeId", "data-v-ef8f7987"]]), Ht = {
824
+ name: "TmInputFilter",
806
825
  components: {
807
- MoreIcon: tt,
808
- FormItemLayout: P
826
+ MoreIcon: at,
827
+ FormItemLayout: E
809
828
  },
810
829
  props: {
811
830
  label: {
@@ -845,12 +864,17 @@ const ye = /* @__PURE__ */ V(zt, [["render", kt], ["__scopeId", "data-v-b85e9ccb
845
864
  type: String,
846
865
  default: void 0,
847
866
  validator: (e) => !e || ["horizontal", "vertical"].includes(e)
867
+ },
868
+ labelAlign: {
869
+ type: String,
870
+ default: "right",
871
+ validator: (e) => ["left", "right", "center"].includes(e)
848
872
  }
849
873
  },
850
874
  data() {
851
875
  return {
852
- t: R().t,
853
- getDefaultSize: M,
876
+ t: H().t,
877
+ getDefaultSize: k,
854
878
  getCompatSize: K,
855
879
  exactValue: "",
856
880
  inputValue: "",
@@ -913,80 +937,81 @@ const ye = /* @__PURE__ */ V(zt, [["render", kt], ["__scopeId", "data-v-b85e9ccb
913
937
  created() {
914
938
  this.updateCurrentOptionMultiple();
915
939
  }
916
- }, Dt = { class: "popover-content" }, Mt = { class: "popover-subtitle" }, At = { class: "popover-footer" };
917
- function Ht(e, i, t, n, l, s) {
918
- const o = u("el-input"), c = u("el-button"), d = u("MoreIcon"), h = u("el-popover"), y = u("FormItemLayout");
919
- return r(), m(y, {
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, {
920
944
  label: t.label,
921
945
  "label-options": t.labelOptions,
922
946
  field: t.field,
923
- onFieldChange: s.handlefieldChange,
947
+ onFieldChange: n.handlefieldChange,
924
948
  "label-width": t.labelWidth,
925
949
  "input-width": t.inputWidth,
926
- direction: t.direction
950
+ direction: t.direction,
951
+ "label-align": t.labelAlign
927
952
  }, {
928
- default: f(() => [
929
- p(o, {
930
- modelValue: l.inputValue,
931
- "onUpdate:modelValue": i[1] || (i[1] = (F) => l.inputValue = F),
932
- size: l.getDefaultSize(),
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(),
933
958
  placeholder: t.placeholder,
934
- onKeyup: Ee(s.handleEnter, ["enter", "native"]),
959
+ onKeyup: Ne(n.handleEnter, ["enter", "native"]),
935
960
  clearable: "",
936
- class: "advanced-input"
937
- }, ge({ _: 2 }, [
938
- s.shouldShowMultiple ? {
961
+ class: "tm-input"
962
+ }, ye({ _: 2 }, [
963
+ n.shouldShowMultiple ? {
939
964
  name: "append",
940
- fn: f(() => [
941
- p(h, {
942
- visible: l.isExactMode,
965
+ fn: p(() => [
966
+ g(f, {
967
+ visible: i.isExactMode,
943
968
  placement: "bottom-end",
944
969
  width: 260,
945
970
  trigger: "click",
946
- "onUpdate:visible": s.handleVisibleChange
971
+ "onUpdate:visible": n.handleVisibleChange
947
972
  }, {
948
- reference: f(() => [
949
- p(d, { style: { cursor: "pointer" } })
973
+ reference: p(() => [
974
+ g(h, { style: { cursor: "pointer" } })
950
975
  ]),
951
- default: f(() => [
952
- b("div", Dt, [
953
- b("p", Mt, w(l.t("accurateSearchTips")), 1),
954
- p(o, {
955
- size: l.getDefaultSize(),
976
+ default: p(() => [
977
+ v("div", Rt, [
978
+ v("p", It, T(i.t("accurateSearchTips")), 1),
979
+ g(r, {
980
+ size: i.getDefaultSize(),
956
981
  type: "textarea",
957
982
  rows: 8,
958
- modelValue: l.exactValue,
959
- "onUpdate:modelValue": i[0] || (i[0] = (F) => l.exactValue = F),
960
- placeholder: l.t("accurateSearchPlaceholder"),
983
+ modelValue: i.exactValue,
984
+ "onUpdate:modelValue": l[0] || (l[0] = (V) => i.exactValue = V),
985
+ placeholder: i.t("accurateSearchPlaceholder"),
961
986
  style: { "font-size": "12px" }
962
987
  }, null, 8, ["size", "modelValue", "placeholder"]),
963
- b("div", At, [
964
- p(c, {
988
+ v("div", Et, [
989
+ g(c, {
965
990
  style: { float: "left" },
966
- size: l.getCompatSize("mini"),
967
- onClick: s.handleClear
991
+ size: i.getCompatSize("mini"),
992
+ onClick: n.handleClear
968
993
  }, {
969
- default: f(() => [
970
- L(w(l.t("clear")), 1)
994
+ default: p(() => [
995
+ z(T(i.t("clear")), 1)
971
996
  ]),
972
997
  _: 1
973
998
  }, 8, ["size", "onClick"]),
974
- p(c, {
975
- size: l.getCompatSize("mini"),
976
- onClick: s.handlePopoverClose
999
+ g(c, {
1000
+ size: i.getCompatSize("mini"),
1001
+ onClick: n.handlePopoverClose
977
1002
  }, {
978
- default: f(() => [
979
- L(w(l.t("cancel")), 1)
1003
+ default: p(() => [
1004
+ z(T(i.t("cancel")), 1)
980
1005
  ]),
981
1006
  _: 1
982
1007
  }, 8, ["size", "onClick"]),
983
- p(c, {
1008
+ g(c, {
984
1009
  type: "primary",
985
- size: l.getCompatSize("mini"),
986
- onClick: s.handleExactSearch
1010
+ size: i.getCompatSize("mini"),
1011
+ onClick: n.handleExactSearch
987
1012
  }, {
988
- default: f(() => [
989
- L(w(l.t("search")), 1)
1013
+ default: p(() => [
1014
+ z(T(i.t("search")), 1)
990
1015
  ]),
991
1016
  _: 1
992
1017
  }, 8, ["size", "onClick"])
@@ -1001,12 +1026,12 @@ function Ht(e, i, t, n, l, s) {
1001
1026
  ]), 1032, ["modelValue", "size", "placeholder", "onKeyup"])
1002
1027
  ]),
1003
1028
  _: 1
1004
- }, 8, ["label", "label-options", "field", "onFieldChange", "label-width", "input-width", "direction"]);
1029
+ }, 8, ["label", "label-options", "field", "onFieldChange", "label-width", "input-width", "direction", "label-align"]);
1005
1030
  }
1006
- const ve = /* @__PURE__ */ V(Ot, [["render", Ht], ["__scopeId", "data-v-1a69f415"]]), { t: z } = R(), Rt = !1, Et = !0, It = "modelValue", Wt = {
1007
- name: "TmAdvancedDateFilter",
1031
+ const _e = /* @__PURE__ */ w(Ht, [["render", Wt], ["__scopeId", "data-v-90ce9bc0"]]), { t: F } = H(), Nt = !1, Pt = !0, Bt = "modelValue", Ut = {
1032
+ name: "TmDateFilter",
1008
1033
  components: {
1009
- FormItemLayout: P
1034
+ FormItemLayout: E
1010
1035
  },
1011
1036
  props: {
1012
1037
  value: {
@@ -1127,6 +1152,11 @@ const ve = /* @__PURE__ */ V(Ot, [["render", Ht], ["__scopeId", "data-v-1a69f415
1127
1152
  type: String,
1128
1153
  default: void 0,
1129
1154
  validator: (e) => !e || ["horizontal", "vertical"].includes(e)
1155
+ },
1156
+ labelAlign: {
1157
+ type: String,
1158
+ default: "right",
1159
+ validator: (e) => ["left", "right", "center"].includes(e)
1130
1160
  }
1131
1161
  },
1132
1162
  computed: {
@@ -1137,12 +1167,12 @@ const ve = /* @__PURE__ */ V(Ot, [["render", Ht], ["__scopeId", "data-v-1a69f415
1137
1167
  // 计算开始占位符
1138
1168
  computedStartPlaceholder() {
1139
1169
  if (this.isRangeType)
1140
- return this.startPlaceholder !== void 0 ? this.startPlaceholder : z("startDate");
1170
+ return this.startPlaceholder !== void 0 ? this.startPlaceholder : F("startDate");
1141
1171
  },
1142
1172
  // 计算结束占位符
1143
1173
  computedEndPlaceholder() {
1144
1174
  if (this.isRangeType)
1145
- return this.endPlaceholder !== void 0 ? this.endPlaceholder : z("endDate");
1175
+ return this.endPlaceholder !== void 0 ? this.endPlaceholder : F("endDate");
1146
1176
  },
1147
1177
  computedFormat() {
1148
1178
  const e = "YYYY";
@@ -1150,49 +1180,49 @@ const ve = /* @__PURE__ */ V(Ot, [["render", Ht], ["__scopeId", "data-v-1a69f415
1150
1180
  },
1151
1181
  computedPickerOptions() {
1152
1182
  const e = {};
1153
- if (this.pastOnly && (e.disabledDate = (i) => i.getTime() > Date.now()), ["daterange", "datetimerange"].includes(this.type)) {
1154
- const i = this.type === "datetimerange";
1183
+ if (this.pastOnly && (e.disabledDate = (l) => l.getTime() > Date.now()), ["daterange", "datetimerange"].includes(this.type)) {
1184
+ const l = this.type === "datetimerange";
1155
1185
  e.shortcuts = this.shortcuts.length > 0 ? this.shortcuts : [
1156
1186
  {
1157
- text: z("today"),
1187
+ text: F("today"),
1158
1188
  onClick(t) {
1159
- const n = /* @__PURE__ */ new Date(), l = /* @__PURE__ */ new Date();
1160
- i && (l.setHours(0, 0, 0, 0), n.setHours(23, 59, 59, 999)), t.$emit("pick", [l, n]);
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]);
1161
1191
  }
1162
1192
  },
1163
1193
  {
1164
- text: z("yesterday"),
1194
+ text: F("yesterday"),
1165
1195
  onClick(t) {
1166
- const n = /* @__PURE__ */ new Date(), l = /* @__PURE__ */ new Date();
1167
- l.setTime(l.getTime() - 3600 * 1e3 * 24), n.setTime(n.getTime() - 3600 * 1e3 * 24), i && (l.setHours(0, 0, 0, 0), n.setHours(23, 59, 59, 999)), t.$emit("pick", [l, n]);
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]);
1168
1198
  }
1169
1199
  },
1170
1200
  {
1171
- text: z("last7days"),
1201
+ text: F("last7days"),
1172
1202
  onClick(t) {
1173
- const n = /* @__PURE__ */ new Date(), l = /* @__PURE__ */ new Date();
1174
- l.setTime(l.getTime() - 3600 * 1e3 * 24 * 7), i && (l.setHours(0, 0, 0, 0), n.setHours(23, 59, 59, 999)), t.$emit("pick", [l, n]);
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]);
1175
1205
  }
1176
1206
  },
1177
1207
  {
1178
- text: z("last30days"),
1208
+ text: F("last30days"),
1179
1209
  onClick(t) {
1180
- const n = /* @__PURE__ */ new Date(), l = /* @__PURE__ */ new Date();
1181
- l.setTime(l.getTime() - 3600 * 1e3 * 24 * 30), i && (l.setHours(0, 0, 0, 0), n.setHours(23, 59, 59, 999)), t.$emit("pick", [l, n]);
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]);
1182
1212
  }
1183
1213
  },
1184
1214
  {
1185
- text: z("thisMonth"),
1215
+ text: F("thisMonth"),
1186
1216
  onClick(t) {
1187
- const n = /* @__PURE__ */ new Date(), l = /* @__PURE__ */ new Date();
1188
- l.setDate(1), i && (l.setHours(0, 0, 0, 0), n.setHours(23, 59, 59, 999)), t.$emit("pick", [l, n]);
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]);
1189
1219
  }
1190
1220
  },
1191
1221
  {
1192
- text: z("lastMonth"),
1222
+ text: F("lastMonth"),
1193
1223
  onClick(t) {
1194
- const n = /* @__PURE__ */ new Date(), l = /* @__PURE__ */ new Date();
1195
- l.setMonth(l.getMonth() - 1), l.setDate(1), n.setDate(0), i && (l.setHours(0, 0, 0, 0), n.setHours(23, 59, 59, 999)), t.$emit("pick", [l, n]);
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]);
1196
1226
  }
1197
1227
  }
1198
1228
  ];
@@ -1207,45 +1237,45 @@ const ve = /* @__PURE__ */ V(Ot, [["render", Ht], ["__scopeId", "data-v-1a69f415
1207
1237
  const e = this.type === "datetimerange";
1208
1238
  return [
1209
1239
  {
1210
- text: z("today"),
1240
+ text: F("today"),
1211
1241
  value: () => {
1212
- const i = /* @__PURE__ */ new Date(), t = /* @__PURE__ */ new Date();
1213
- return e && (t.setHours(0, 0, 0, 0), i.setHours(23, 59, 59, 999)), [t, i];
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];
1214
1244
  }
1215
1245
  },
1216
1246
  {
1217
- text: z("yesterday"),
1247
+ text: F("yesterday"),
1218
1248
  value: () => {
1219
- const i = /* @__PURE__ */ new Date(), t = /* @__PURE__ */ new Date();
1220
- 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];
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];
1221
1251
  }
1222
1252
  },
1223
1253
  {
1224
- text: z("last7days"),
1254
+ text: F("last7days"),
1225
1255
  value: () => {
1226
- const i = /* @__PURE__ */ new Date(), t = /* @__PURE__ */ new Date();
1227
- return t.setTime(t.getTime() - 3600 * 1e3 * 24 * 7), e && (t.setHours(0, 0, 0, 0), i.setHours(23, 59, 59, 999)), [t, i];
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];
1228
1258
  }
1229
1259
  },
1230
1260
  {
1231
- text: z("last30days"),
1261
+ text: F("last30days"),
1232
1262
  value: () => {
1233
- const i = /* @__PURE__ */ new Date(), t = /* @__PURE__ */ new Date();
1234
- return t.setTime(t.getTime() - 3600 * 1e3 * 24 * 30), e && (t.setHours(0, 0, 0, 0), i.setHours(23, 59, 59, 999)), [t, i];
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];
1235
1265
  }
1236
1266
  },
1237
1267
  {
1238
- text: z("thisMonth"),
1268
+ text: F("thisMonth"),
1239
1269
  value: () => {
1240
- const i = /* @__PURE__ */ new Date(), t = /* @__PURE__ */ new Date();
1241
- return t.setDate(1), e && (t.setHours(0, 0, 0, 0), i.setHours(23, 59, 59, 999)), [t, i];
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];
1242
1272
  }
1243
1273
  },
1244
1274
  {
1245
- text: z("lastMonth"),
1275
+ text: F("lastMonth"),
1246
1276
  value: () => {
1247
- const i = /* @__PURE__ */ new Date(), t = /* @__PURE__ */ new Date();
1248
- 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];
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];
1249
1279
  }
1250
1280
  }
1251
1281
  ];
@@ -1261,29 +1291,29 @@ const ve = /* @__PURE__ */ V(Ot, [["render", Ht], ["__scopeId", "data-v-1a69f415
1261
1291
  return e;
1262
1292
  if (e) {
1263
1293
  if (this.type === "datetimerange" && Array.isArray(e))
1264
- return e.map((i) => {
1265
- if (typeof i == "string") {
1266
- const t = /* @__PURE__ */ new Date(), [n, l, s] = i.split(":").map(Number);
1294
+ return e.map((l) => {
1295
+ if (typeof l == "string") {
1296
+ const t = /* @__PURE__ */ new Date(), [a, i, n] = l.split(":").map(Number);
1267
1297
  return new Date(
1268
1298
  t.getFullYear(),
1269
1299
  t.getMonth(),
1270
1300
  t.getDate(),
1271
- n,
1272
- l,
1273
- s || 0
1301
+ a,
1302
+ i,
1303
+ n || 0
1274
1304
  );
1275
1305
  }
1276
- return i;
1306
+ return l;
1277
1307
  });
1278
1308
  if (this.type === "datetime" && typeof e == "string") {
1279
- const i = /* @__PURE__ */ new Date(), [t, n, l] = e.split(":").map(Number);
1309
+ const l = /* @__PURE__ */ new Date(), [t, a, i] = e.split(":").map(Number);
1280
1310
  return new Date(
1281
- i.getFullYear(),
1282
- i.getMonth(),
1283
- i.getDate(),
1311
+ l.getFullYear(),
1312
+ l.getMonth(),
1313
+ l.getDate(),
1284
1314
  t,
1285
- n,
1286
- l || 0
1315
+ a,
1316
+ i || 0
1287
1317
  );
1288
1318
  }
1289
1319
  return e;
@@ -1295,11 +1325,11 @@ const ve = /* @__PURE__ */ V(Ot, [["render", Ht], ["__scopeId", "data-v-1a69f415
1295
1325
  },
1296
1326
  data() {
1297
1327
  return {
1298
- t: z,
1299
- isVue2: Rt,
1300
- isVue3: Et,
1301
- getDefaultSize: M,
1302
- valueField: It
1328
+ t: F,
1329
+ isVue2: Nt,
1330
+ isVue3: Pt,
1331
+ getDefaultSize: k,
1332
+ valueField: Bt
1303
1333
  };
1304
1334
  },
1305
1335
  methods: {
@@ -1321,31 +1351,32 @@ const ve = /* @__PURE__ */ V(Ot, [["render", Ht], ["__scopeId", "data-v-1a69f415
1321
1351
  }
1322
1352
  }
1323
1353
  };
1324
- function Pt(e, i, t, n, l, s) {
1325
- const o = u("el-date-picker"), c = u("FormItemLayout");
1326
- return r(), m(c, {
1354
+ function jt(e, l, t, a, i, n) {
1355
+ const r = u("el-date-picker"), c = u("FormItemLayout");
1356
+ return o(), m(c, {
1327
1357
  label: t.label,
1328
1358
  "label-options": t.labelOptions,
1329
1359
  field: t.field,
1330
- onFieldChange: s.handleFieldChange,
1360
+ onFieldChange: n.handleFieldChange,
1331
1361
  "label-width": t.labelWidth,
1332
1362
  "input-width": t.inputWidth,
1333
- direction: t.direction
1363
+ direction: t.direction,
1364
+ "label-align": t.labelAlign
1334
1365
  }, {
1335
- default: f(() => [
1336
- p(o, {
1337
- "model-value": s.dateValue,
1366
+ default: p(() => [
1367
+ g(r, {
1368
+ "model-value": n.dateValue,
1338
1369
  type: t.type,
1339
- size: l.getDefaultSize(),
1370
+ size: i.getDefaultSize(),
1340
1371
  "range-separator": t.rangeSeparator,
1341
- "start-placeholder": s.computedStartPlaceholder,
1342
- "end-placeholder": s.computedEndPlaceholder,
1372
+ "start-placeholder": n.computedStartPlaceholder,
1373
+ "end-placeholder": n.computedEndPlaceholder,
1343
1374
  placeholder: t.placeholder,
1344
- shortcuts: s.computedShortcuts,
1345
- "disabled-date": s.computedDisabledDate,
1375
+ shortcuts: n.computedShortcuts,
1376
+ "disabled-date": n.computedDisabledDate,
1346
1377
  class: "date-picker",
1347
- format: s.computedFormat,
1348
- "value-format": s.computedFormat,
1378
+ format: n.computedFormat,
1379
+ "value-format": n.computedFormat,
1349
1380
  disabled: t.disabled,
1350
1381
  clearable: t.clearable,
1351
1382
  readonly: t.readonly,
@@ -1353,20 +1384,20 @@ function Pt(e, i, t, n, l, s) {
1353
1384
  teleported: !1,
1354
1385
  "popper-class": t.popperClass,
1355
1386
  "default-value": t.defaultValue,
1356
- "default-time": s.computedDefaultTime,
1357
- "onUpdate:modelValue": s.handleDateChange,
1358
- onChange: s.handleDateChange,
1359
- onBlur: s.handleBlur,
1360
- onFocus: s.handleFocus
1387
+ "default-time": n.computedDefaultTime,
1388
+ "onUpdate:modelValue": n.handleDateChange,
1389
+ onChange: n.handleDateChange,
1390
+ onBlur: n.handleBlur,
1391
+ onFocus: n.handleFocus
1361
1392
  }, null, 8, ["model-value", "type", "size", "range-separator", "start-placeholder", "end-placeholder", "placeholder", "shortcuts", "disabled-date", "format", "value-format", "disabled", "clearable", "readonly", "editable", "popper-class", "default-value", "default-time", "onUpdate:modelValue", "onChange", "onBlur", "onFocus"])
1362
1393
  ]),
1363
1394
  _: 1
1364
- }, 8, ["label", "label-options", "field", "onFieldChange", "label-width", "input-width", "direction"]);
1395
+ }, 8, ["label", "label-options", "field", "onFieldChange", "label-width", "input-width", "direction", "label-align"]);
1365
1396
  }
1366
- const Ce = /* @__PURE__ */ V(Wt, [["render", Pt], ["__scopeId", "data-v-6d9d8fa1"]]), Nt = !1, Bt = {
1397
+ const Se = /* @__PURE__ */ w(Ut, [["render", jt], ["__scopeId", "data-v-cd8a2978"]]), Jt = !1, Kt = {
1367
1398
  name: "TmCascaderFilter",
1368
1399
  components: {
1369
- FormItemLayout: P
1400
+ FormItemLayout: E
1370
1401
  },
1371
1402
  props: {
1372
1403
  value: {
@@ -1423,12 +1454,17 @@ const Ce = /* @__PURE__ */ V(Wt, [["render", Pt], ["__scopeId", "data-v-6d9d8fa1
1423
1454
  type: String,
1424
1455
  default: void 0,
1425
1456
  validator: (e) => !e || ["horizontal", "vertical"].includes(e)
1457
+ },
1458
+ labelAlign: {
1459
+ type: String,
1460
+ default: "right",
1461
+ validator: (e) => ["left", "right", "center"].includes(e)
1426
1462
  }
1427
1463
  },
1428
1464
  data() {
1429
1465
  return {
1430
- isVue2: Nt,
1431
- getDefaultSize: M,
1466
+ isVue2: Jt,
1467
+ getDefaultSize: k,
1432
1468
  selectedValue: this.value,
1433
1469
  optionsList: [],
1434
1470
  loading: !1
@@ -1443,7 +1479,7 @@ const Ce = /* @__PURE__ */ V(Wt, [["render", Pt], ["__scopeId", "data-v-6d9d8fa1
1443
1479
  };
1444
1480
  },
1445
1481
  cascaderProps() {
1446
- return W(T({}, this.props), {
1482
+ return I(x({}, this.props), {
1447
1483
  expandTrigger: this.props.expandTrigger || "hover"
1448
1484
  });
1449
1485
  }
@@ -1470,48 +1506,49 @@ const Ce = /* @__PURE__ */ V(Wt, [["render", Pt], ["__scopeId", "data-v-6d9d8fa1
1470
1506
  if (typeof e == "function")
1471
1507
  try {
1472
1508
  this.loading = !0;
1473
- const i = await e();
1474
- Array.isArray(i) && (this.optionsList = i);
1475
- } catch (i) {
1476
- console.error(i);
1509
+ const l = await e();
1510
+ Array.isArray(l) && (this.optionsList = l);
1511
+ } catch (l) {
1512
+ console.error(l);
1477
1513
  } finally {
1478
1514
  this.loading = !1;
1479
1515
  }
1480
1516
  else Array.isArray(e) && (this.optionsList = e);
1481
1517
  }
1482
1518
  }
1483
- }, Ut = { class: "cascader" };
1484
- function jt(e, i, t, n, l, s) {
1485
- const o = u("el-cascader"), c = u("FormItemLayout");
1486
- return r(), m(c, {
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, {
1487
1523
  label: t.label,
1488
1524
  "label-width": t.labelWidth,
1489
1525
  "input-width": t.inputWidth,
1490
- direction: t.direction
1526
+ direction: t.direction,
1527
+ "label-align": t.labelAlign
1491
1528
  }, {
1492
- default: f(() => [
1493
- b("div", Ut, [
1494
- p(o, _({
1529
+ default: p(() => [
1530
+ v("div", Qt, [
1531
+ g(r, _({
1495
1532
  ref: "cascader",
1496
- modelValue: l.selectedValue,
1497
- "onUpdate:modelValue": i[0] || (i[0] = (d) => l.selectedValue = d)
1498
- }, W(T({}, e.$attrs), {
1499
- size: l.getDefaultSize(),
1533
+ modelValue: i.selectedValue,
1534
+ "onUpdate:modelValue": l[0] || (l[0] = (h) => i.selectedValue = h)
1535
+ }, I(x({}, e.$attrs), {
1536
+ size: i.getDefaultSize(),
1500
1537
  filterable: t.filterable,
1501
1538
  clearable: t.clearable,
1502
1539
  collapseTags: t.collapseTags,
1503
1540
  collapseTagsTooltip: t.collapseTagsTooltip,
1504
- props: s.cascaderProps,
1541
+ props: n.cascaderProps,
1505
1542
  placeholder: t.placeholder,
1506
- options: l.optionsList,
1507
- loading: l.loading
1508
- }), I(l.isVue2 ? e.$listeners : {})), {
1509
- default: f(({ node: d, data: h }) => [
1510
- x(e.$slots, "default", {
1511
- node: d,
1512
- data: h
1543
+ options: i.optionsList,
1544
+ loading: i.loading
1545
+ }), M(i.isVue2 ? e.$listeners : {})), {
1546
+ default: p(({ node: h, data: f }) => [
1547
+ S(e.$slots, "default", {
1548
+ node: h,
1549
+ data: f
1513
1550
  }, () => [
1514
- b("span", null, w(h[s.propMap.label]), 1)
1551
+ v("span", null, T(f[n.propMap.label]), 1)
1515
1552
  ], !0)
1516
1553
  ]),
1517
1554
  _: 3
@@ -1519,12 +1556,12 @@ function jt(e, i, t, n, l, s) {
1519
1556
  ])
1520
1557
  ]),
1521
1558
  _: 3
1522
- }, 8, ["label", "label-width", "input-width", "direction"]);
1559
+ }, 8, ["label", "label-width", "input-width", "direction", "label-align"]);
1523
1560
  }
1524
- const _e = /* @__PURE__ */ V(Bt, [["render", jt], ["__scopeId", "data-v-7cde104c"]]), Jt = !1, Kt = !0, Qt = {
1561
+ const xe = /* @__PURE__ */ w(Kt, [["render", qt], ["__scopeId", "data-v-7c915d17"]]), Yt = !1, Gt = !0, Xt = {
1525
1562
  name: "TmRadioFilter",
1526
1563
  components: {
1527
- FormItemLayout: P
1564
+ FormItemLayout: E
1528
1565
  },
1529
1566
  props: {
1530
1567
  value: {
@@ -1568,13 +1605,18 @@ const _e = /* @__PURE__ */ V(Bt, [["render", jt], ["__scopeId", "data-v-7cde104c
1568
1605
  type: String,
1569
1606
  default: void 0,
1570
1607
  validator: (e) => !e || ["horizontal", "vertical"].includes(e)
1608
+ },
1609
+ labelAlign: {
1610
+ type: String,
1611
+ default: "right",
1612
+ validator: (e) => ["left", "right", "center"].includes(e)
1571
1613
  }
1572
1614
  },
1573
1615
  data() {
1574
1616
  return {
1575
- isVue2: Jt,
1576
- isVue3: Kt,
1577
- getDefaultSize: M,
1617
+ isVue2: Yt,
1618
+ isVue3: Gt,
1619
+ getDefaultSize: k,
1578
1620
  selectedValue: this.value,
1579
1621
  optionsList: [],
1580
1622
  loading: !1
@@ -1610,10 +1652,10 @@ const _e = /* @__PURE__ */ V(Bt, [["render", jt], ["__scopeId", "data-v-7cde104c
1610
1652
  if (typeof e == "function")
1611
1653
  try {
1612
1654
  this.loading = !0;
1613
- const i = await e();
1614
- Array.isArray(i) && (this.optionsList = i);
1615
- } catch (i) {
1616
- console.error(i);
1655
+ const l = await e();
1656
+ Array.isArray(l) && (this.optionsList = l);
1657
+ } catch (l) {
1658
+ console.error(l);
1617
1659
  } finally {
1618
1660
  this.loading = !1;
1619
1661
  }
@@ -1621,33 +1663,34 @@ const _e = /* @__PURE__ */ V(Bt, [["render", jt], ["__scopeId", "data-v-7cde104c
1621
1663
  }
1622
1664
  }
1623
1665
  };
1624
- function qt(e, i, t, n, l, s) {
1625
- const o = u("el-radio-button"), c = u("el-radio-group"), d = u("FormItemLayout");
1626
- return r(), m(d, {
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, {
1627
1669
  label: t.label,
1628
1670
  "label-width": t.labelWidth,
1629
1671
  "input-width": t.inputWidth,
1630
- direction: t.direction
1672
+ direction: t.direction,
1673
+ "label-align": t.labelAlign
1631
1674
  }, {
1632
- default: f(() => [
1633
- p(c, _({
1675
+ default: p(() => [
1676
+ g(c, _({
1634
1677
  ref: "radioGroup",
1635
- modelValue: l.selectedValue,
1636
- "onUpdate:modelValue": i[0] || (i[0] = (h) => l.selectedValue = h)
1637
- }, W(T({}, e.$attrs), {
1638
- size: l.getDefaultSize()
1639
- }), { class: "radio-group" }, I(l.isVue2 ? e.$listeners : {})), {
1640
- default: f(() => [
1641
- e.$slots.default ? x(e.$slots, "default", { key: 0 }, void 0, !0) : (r(!0), g(k, { key: 1 }, D(l.optionsList, (h) => (r(), m(o, _({ ref_for: !0 }, {
1642
- [l.isVue3 ? "value" : "label"]: h[s.propMap.value],
1643
- disabled: h.disabled
1678
+ modelValue: i.selectedValue,
1679
+ "onUpdate:modelValue": l[0] || (l[0] = (f) => i.selectedValue = f)
1680
+ }, I(x({}, e.$attrs), {
1681
+ size: i.getDefaultSize()
1682
+ }), { class: "radio-group" }, M(i.isVue2 ? e.$listeners : {})), {
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],
1686
+ disabled: f.disabled
1644
1687
  }, {
1645
1688
  style: { flex: "1" },
1646
- key: h[s.propMap.value]
1689
+ key: f[n.propMap.value]
1647
1690
  }), {
1648
- default: f(() => [
1649
- x(e.$slots, "option", { item: h }, () => [
1650
- L(w(h[s.propMap.label]), 1)
1691
+ default: p(() => [
1692
+ S(e.$slots, "option", { item: f }, () => [
1693
+ z(T(f[n.propMap.label]), 1)
1651
1694
  ], !0)
1652
1695
  ]),
1653
1696
  _: 2
@@ -1657,12 +1700,12 @@ function qt(e, i, t, n, l, s) {
1657
1700
  }, 16, ["modelValue"])
1658
1701
  ]),
1659
1702
  _: 3
1660
- }, 8, ["label", "label-width", "input-width", "direction"]);
1703
+ }, 8, ["label", "label-width", "input-width", "direction", "label-align"]);
1661
1704
  }
1662
- const Se = /* @__PURE__ */ V(Qt, [["render", qt], ["__scopeId", "data-v-44b00fff"]]), Yt = !1, Gt = !0, Xt = {
1705
+ const Te = /* @__PURE__ */ w(Xt, [["render", Zt], ["__scopeId", "data-v-210a44fd"]]), $t = !1, el = !0, tl = {
1663
1706
  name: "TmCheckboxFilter",
1664
1707
  components: {
1665
- FormItemLayout: P
1708
+ FormItemLayout: E
1666
1709
  },
1667
1710
  props: {
1668
1711
  value: {
@@ -1701,13 +1744,18 @@ const Se = /* @__PURE__ */ V(Qt, [["render", qt], ["__scopeId", "data-v-44b00fff
1701
1744
  type: String,
1702
1745
  default: void 0,
1703
1746
  validator: (e) => !e || ["horizontal", "vertical"].includes(e)
1747
+ },
1748
+ labelAlign: {
1749
+ type: String,
1750
+ default: "right",
1751
+ validator: (e) => ["left", "right", "center"].includes(e)
1704
1752
  }
1705
1753
  },
1706
1754
  data() {
1707
1755
  return {
1708
- isVue2: Yt,
1709
- isVue3: Gt,
1710
- getDefaultSize: M,
1756
+ isVue2: $t,
1757
+ isVue3: el,
1758
+ getDefaultSize: k,
1711
1759
  selectedValue: this.value || [],
1712
1760
  optionsList: [],
1713
1761
  loading: !1
@@ -1743,44 +1791,45 @@ const Se = /* @__PURE__ */ V(Qt, [["render", qt], ["__scopeId", "data-v-44b00fff
1743
1791
  if (typeof e == "function")
1744
1792
  try {
1745
1793
  this.loading = !0;
1746
- const i = await e();
1747
- Array.isArray(i) && (this.optionsList = i);
1748
- } catch (i) {
1749
- console.error(i);
1794
+ const l = await e();
1795
+ Array.isArray(l) && (this.optionsList = l);
1796
+ } catch (l) {
1797
+ console.error(l);
1750
1798
  } finally {
1751
1799
  this.loading = !1;
1752
1800
  }
1753
1801
  else Array.isArray(e) && (this.optionsList = e);
1754
1802
  }
1755
1803
  }
1756
- }, Zt = { class: "checkbox-content" };
1757
- function $t(e, i, t, n, l, s) {
1758
- const o = u("el-checkbox-button"), c = u("el-checkbox-group"), d = u("FormItemLayout");
1759
- return r(), m(d, {
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, {
1760
1808
  label: t.label,
1761
1809
  "label-width": t.labelWidth,
1762
1810
  "input-width": t.inputWidth,
1763
- direction: t.direction
1811
+ direction: t.direction,
1812
+ "label-align": t.labelAlign
1764
1813
  }, {
1765
- default: f(() => [
1766
- b("div", Zt, [
1767
- p(c, _({
1814
+ default: p(() => [
1815
+ v("div", ll, [
1816
+ g(c, _({
1768
1817
  ref: "checkboxGroup",
1769
- modelValue: l.selectedValue,
1770
- "onUpdate:modelValue": i[0] || (i[0] = (h) => l.selectedValue = h)
1771
- }, W(T({}, e.$attrs), {
1772
- size: l.getDefaultSize()
1773
- }), I(l.isVue2 ? e.$listeners : {})), {
1774
- default: f(() => [
1775
- e.$slots.default ? x(e.$slots, "default", { key: 0 }, void 0, !0) : (r(!0), g(k, { key: 1 }, D(l.optionsList, (h) => (r(), m(o, _({
1776
- key: h[s.propMap.value]
1818
+ modelValue: i.selectedValue,
1819
+ "onUpdate:modelValue": l[0] || (l[0] = (f) => i.selectedValue = f)
1820
+ }, I(x({}, e.$attrs), {
1821
+ size: i.getDefaultSize()
1822
+ }), M(i.isVue2 ? e.$listeners : {})), {
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, _({
1825
+ key: f[n.propMap.value]
1777
1826
  }, { ref_for: !0 }, {
1778
- [l.isVue3 ? "value" : "label"]: h[s.propMap.value],
1779
- disabled: h.disabled
1827
+ [i.isVue3 ? "value" : "label"]: f[n.propMap.value],
1828
+ disabled: f.disabled
1780
1829
  }, { style: { flex: "1" } }), {
1781
- default: f(() => [
1782
- x(e.$slots, "option", { item: h }, () => [
1783
- L(w(h[s.propMap.label]), 1)
1830
+ default: p(() => [
1831
+ S(e.$slots, "option", { item: f }, () => [
1832
+ z(T(f[n.propMap.label]), 1)
1784
1833
  ], !0)
1785
1834
  ]),
1786
1835
  _: 2
@@ -1791,12 +1840,12 @@ function $t(e, i, t, n, l, s) {
1791
1840
  ])
1792
1841
  ]),
1793
1842
  _: 3
1794
- }, 8, ["label", "label-width", "input-width", "direction"]);
1843
+ }, 8, ["label", "label-width", "input-width", "direction", "label-align"]);
1795
1844
  }
1796
- const xe = /* @__PURE__ */ V(Xt, [["render", $t], ["__scopeId", "data-v-d9e8a314"]]), ei = !1, ti = {
1845
+ const we = /* @__PURE__ */ w(tl, [["render", il], ["__scopeId", "data-v-39ef0641"]]), nl = !1, al = {
1797
1846
  name: "TmSwitchFilter",
1798
1847
  components: {
1799
- FormItemLayout: P
1848
+ FormItemLayout: E
1800
1849
  },
1801
1850
  props: {
1802
1851
  value: {
@@ -1820,12 +1869,17 @@ const xe = /* @__PURE__ */ V(Xt, [["render", $t], ["__scopeId", "data-v-d9e8a314
1820
1869
  type: String,
1821
1870
  default: void 0,
1822
1871
  validator: (e) => !e || ["horizontal", "vertical"].includes(e)
1872
+ },
1873
+ labelAlign: {
1874
+ type: String,
1875
+ default: "right",
1876
+ validator: (e) => ["left", "right", "center"].includes(e)
1823
1877
  }
1824
1878
  },
1825
1879
  data() {
1826
1880
  return {
1827
- isVue2: ei,
1828
- getDefaultSize: M,
1881
+ isVue2: nl,
1882
+ getDefaultSize: k,
1829
1883
  switchValue: this.value
1830
1884
  };
1831
1885
  },
@@ -1840,30 +1894,231 @@ const xe = /* @__PURE__ */ V(Xt, [["render", $t], ["__scopeId", "data-v-d9e8a314
1840
1894
  this.$emit("input", e), this.$emit("change", e);
1841
1895
  }
1842
1896
  }
1843
- }, ii = { class: "switch-content" };
1844
- function li(e, i, t, n, l, s) {
1845
- const o = u("el-switch"), c = u("FormItemLayout");
1846
- return r(), m(c, {
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, {
1847
1901
  label: t.label,
1848
1902
  "label-width": t.labelWidth,
1849
1903
  "input-width": t.inputWidth,
1850
- direction: t.direction
1904
+ direction: t.direction,
1905
+ "label-align": t.labelAlign
1851
1906
  }, {
1852
- default: f(() => [
1853
- b("div", ii, [
1854
- p(o, _({
1907
+ default: p(() => [
1908
+ v("div", sl, [
1909
+ g(r, _({
1855
1910
  ref: "switch",
1856
- modelValue: l.switchValue,
1857
- "onUpdate:modelValue": i[0] || (i[0] = (d) => l.switchValue = d)
1858
- }, e.$attrs, I(l.isVue2 ? e.$listeners : {}), {
1859
- size: l.getDefaultSize()
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()
1860
1915
  }), null, 16, ["modelValue", "size"])
1861
1916
  ])
1862
1917
  ]),
1863
1918
  _: 1
1864
- }, 8, ["label", "label-width", "input-width", "direction"]);
1919
+ }, 8, ["label", "label-width", "input-width", "direction", "label-align"]);
1920
+ }
1921
+ const Ve = /* @__PURE__ */ w(al, [["render", rl], ["__scopeId", "data-v-7455db21"]]), ol = !1, ul = !0, ge = "modelValue", te = "update:modelValue", dl = {
1922
+ name: "TmTextareaFilter",
1923
+ components: {
1924
+ FormItemLayout: E,
1925
+ CircleClose: Je
1926
+ },
1927
+ props: {
1928
+ label: {
1929
+ type: [String, Function, Object, Array],
1930
+ default: ""
1931
+ },
1932
+ [ge]: {
1933
+ type: String,
1934
+ default: ""
1935
+ },
1936
+ field: {
1937
+ type: [String, Number],
1938
+ default: ""
1939
+ },
1940
+ placeholder: {
1941
+ type: String,
1942
+ default: ""
1943
+ },
1944
+ labelOptions: {
1945
+ type: Array,
1946
+ default: () => []
1947
+ },
1948
+ // 不再支持rows配置,autosize已有默认配置,和该属性冲突
1949
+ autosize: {
1950
+ type: [Boolean, Object],
1951
+ default: () => ({
1952
+ minRows: 1,
1953
+ maxRows: 10
1954
+ })
1955
+ },
1956
+ maxlength: {
1957
+ type: [String, Number],
1958
+ default: ""
1959
+ },
1960
+ minlength: {
1961
+ type: [String, Number],
1962
+ default: ""
1963
+ },
1964
+ showWordLimit: {
1965
+ type: Boolean,
1966
+ default: !1
1967
+ },
1968
+ readonly: {
1969
+ type: Boolean,
1970
+ default: !1
1971
+ },
1972
+ disabled: {
1973
+ type: Boolean,
1974
+ default: !1
1975
+ },
1976
+ resize: {
1977
+ type: String,
1978
+ default: "vertical",
1979
+ validator: (e) => ["none", "both", "horizontal", "vertical"].includes(e)
1980
+ },
1981
+ tabindex: {
1982
+ type: [String, Number],
1983
+ default: ""
1984
+ },
1985
+ validateEvent: {
1986
+ type: Boolean,
1987
+ default: !0
1988
+ },
1989
+ clearable: {
1990
+ type: Boolean,
1991
+ default: !0
1992
+ },
1993
+ // FormItemLayout 配置参数
1994
+ labelWidth: {
1995
+ type: [String, Number],
1996
+ default: void 0
1997
+ },
1998
+ inputWidth: {
1999
+ type: [String, Number],
2000
+ default: void 0
2001
+ },
2002
+ direction: {
2003
+ type: String,
2004
+ default: void 0,
2005
+ validator: (e) => !e || ["horizontal", "vertical"].includes(e)
2006
+ },
2007
+ labelAlign: {
2008
+ type: String,
2009
+ default: "right",
2010
+ validator: (e) => ["left", "right", "center"].includes(e)
2011
+ }
2012
+ },
2013
+ data() {
2014
+ return {
2015
+ isVue2: ol,
2016
+ isVue3: ul,
2017
+ getDefaultSize: k,
2018
+ inputValue: this.value
2019
+ };
2020
+ },
2021
+ computed: {
2022
+ selectedOption() {
2023
+ return !this.labelOptions || !this.labelOptions.length || !this.field ? null : this.labelOptions.find((e) => e.value === this.field);
2024
+ }
2025
+ },
2026
+ watch: {
2027
+ [ge]: {
2028
+ immediate: !0,
2029
+ handler(e) {
2030
+ this.inputValue = e;
2031
+ }
2032
+ },
2033
+ inputValue(e) {
2034
+ this.$emit(te, e);
2035
+ }
2036
+ },
2037
+ methods: {
2038
+ handleInput(e) {
2039
+ this.inputValue = e, this.$emit(te, e);
2040
+ },
2041
+ handleChange(e) {
2042
+ this.$emit("change", e);
2043
+ },
2044
+ handleFocus(e) {
2045
+ this.$emit("focus", e);
2046
+ },
2047
+ handleBlur(e) {
2048
+ this.$emit("blur", e);
2049
+ },
2050
+ handleClear() {
2051
+ this.inputValue = "", this.$emit(te, ""), this.$emit("clear");
2052
+ },
2053
+ handleFieldChange(e) {
2054
+ this.$emit("field-change", e);
2055
+ },
2056
+ // 暴露的方法
2057
+ focus() {
2058
+ this.$refs.textarea.focus();
2059
+ },
2060
+ blur() {
2061
+ this.$refs.textarea.blur();
2062
+ },
2063
+ select() {
2064
+ this.$refs.textarea.select();
2065
+ }
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, {
2071
+ label: t.label,
2072
+ "label-options": t.labelOptions,
2073
+ field: t.field,
2074
+ onFieldChange: n.handleFieldChange,
2075
+ "label-width": t.labelWidth,
2076
+ "input-width": t.inputWidth,
2077
+ direction: t.direction,
2078
+ "label-align": t.labelAlign
2079
+ }, {
2080
+ default: p(() => [
2081
+ v("div", hl, [
2082
+ g(r, _({
2083
+ ref: "textarea",
2084
+ modelValue: i.inputValue,
2085
+ "onUpdate:modelValue": l[0] || (l[0] = (y) => i.inputValue = y),
2086
+ size: i.getDefaultSize(),
2087
+ placeholder: t.placeholder,
2088
+ type: "textarea",
2089
+ autosize: t.autosize,
2090
+ maxlength: t.maxlength,
2091
+ minlength: t.minlength,
2092
+ "show-word-limit": t.showWordLimit,
2093
+ readonly: t.readonly,
2094
+ disabled: t.disabled,
2095
+ resize: t.resize,
2096
+ tabindex: t.tabindex,
2097
+ "validate-event": t.validateEvent
2098
+ }, e.$attrs, M(i.isVue2 ? e.$listeners : {}), {
2099
+ onInput: n.handleInput,
2100
+ onChange: n.handleChange,
2101
+ onFocus: n.handleFocus,
2102
+ onBlur: n.handleBlur,
2103
+ onClear: n.handleClear,
2104
+ class: "textarea-input"
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, {
2107
+ key: 0,
2108
+ class: "textarea-clear-icon",
2109
+ onClick: n.handleClear
2110
+ }, {
2111
+ default: p(() => [
2112
+ g(c)
2113
+ ]),
2114
+ _: 1
2115
+ }, 8, ["onClick"])) : C("", !0)
2116
+ ])
2117
+ ]),
2118
+ _: 1
2119
+ }, 8, ["label", "label-options", "field", "onFieldChange", "label-width", "input-width", "direction", "label-align"]);
1865
2120
  }
1866
- const Te = /* @__PURE__ */ V(ti, [["render", li], ["__scopeId", "data-v-5ca0dc56"]]), si = {
2121
+ const Fe = /* @__PURE__ */ w(dl, [["render", cl], ["__scopeId", "data-v-9b0ae8e6"]]), fl = {
1867
2122
  name: "DynamicSlot",
1868
2123
  props: {
1869
2124
  name: {
@@ -1876,28 +2131,28 @@ const Te = /* @__PURE__ */ V(ti, [["render", li], ["__scopeId", "data-v-5ca0dc56
1876
2131
  }
1877
2132
  },
1878
2133
  render(e) {
1879
- var l;
1880
- const i = (s) => {
1881
- var o;
1882
- return s ? (o = s.$slots) == null ? void 0 : o[this.name] : null;
1883
- }, t = (s) => {
1884
- var o, c, d, h;
1885
- return s ? ((c = (o = s.$) == null ? void 0 : o.type) == null ? void 0 : c.name) === "TmTable" || ((h = (d = s.$) == null ? void 0 : d.type) == null ? void 0 : h.__name) === "TmTable" : !1;
2134
+ var i;
2135
+ const l = (n) => {
2136
+ var r;
2137
+ return n ? (r = n.$slots) == null ? void 0 : r[this.name] : null;
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;
1886
2141
  };
1887
- let n = i(this.$parent);
1888
- if (!n) {
1889
- let s = (l = this.$parent) == null ? void 0 : l.$parent;
1890
- for (; s && !n; ) {
1891
- if (t(s)) {
1892
- n = i(s);
2142
+ let a = l(this.$parent);
2143
+ if (!a) {
2144
+ let n = (i = this.$parent) == null ? void 0 : i.$parent;
2145
+ for (; n && !a; ) {
2146
+ if (t(n)) {
2147
+ a = l(n);
1893
2148
  break;
1894
2149
  }
1895
- s = s.$parent;
2150
+ n = n.$parent;
1896
2151
  }
1897
2152
  }
1898
- return n ? typeof n == "function" ? n(this.slotProps) : n : null;
2153
+ return a ? typeof a == "function" ? a(this.slotProps) : a : null;
1899
2154
  }
1900
- }, { t: ni } = R(), ai = !1, oi = !0, ri = [
2155
+ }, { t: pl } = H(), ml = !1, gl = !0, bl = [
1901
2156
  "date",
1902
2157
  "daterange",
1903
2158
  "datetime",
@@ -1909,17 +2164,18 @@ const Te = /* @__PURE__ */ V(ti, [["render", li], ["__scopeId", "data-v-5ca0dc56
1909
2164
  "years",
1910
2165
  "week",
1911
2166
  "monthrange"
1912
- ], ui = {
2167
+ ], yl = {
1913
2168
  name: "TmTableSearch",
1914
2169
  components: {
1915
- TmSelect: ye,
1916
- TmAdvancedInput: ve,
1917
- TmAdvancedDate: Ce,
1918
- TmCascader: _e,
1919
- TmRadio: Se,
1920
- TmCheckbox: xe,
1921
- TmSwitch: Te,
1922
- DynamicSlot: si
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
1923
2179
  },
1924
2180
  props: {
1925
2181
  disabled: {
@@ -1947,16 +2203,21 @@ const Te = /* @__PURE__ */ V(ti, [["render", li], ["__scopeId", "data-v-5ca0dc56
1947
2203
  type: String,
1948
2204
  default: void 0,
1949
2205
  validator: (e) => !e || ["horizontal", "vertical"].includes(e)
2206
+ },
2207
+ labelAlign: {
2208
+ type: String,
2209
+ default: "right",
2210
+ validator: (e) => ["left", "right", "center"].includes(e)
1950
2211
  }
1951
2212
  },
1952
2213
  data() {
1953
2214
  return {
1954
- t: ni,
1955
- isVue2: ai,
1956
- isVue3: oi,
2215
+ t: pl,
2216
+ isVue2: ml,
2217
+ isVue3: gl,
1957
2218
  getCompatSize: K,
1958
- getDefaultSize: M,
1959
- DATE_TYPES: ri,
2219
+ getDefaultSize: k,
2220
+ DATE_TYPES: bl,
1960
2221
  // 用于存储初始默认值,重置时恢复
1961
2222
  defaultValues: {}
1962
2223
  };
@@ -1973,8 +2234,8 @@ const Te = /* @__PURE__ */ V(ti, [["render", li], ["__scopeId", "data-v-5ca0dc56
1973
2234
  // 合并参数的方法:单独配置 > 全局配置 > 默认值
1974
2235
  getLayoutProps() {
1975
2236
  return (e) => {
1976
- const i = {};
1977
- 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), i;
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;
1978
2239
  };
1979
2240
  }
1980
2241
  },
@@ -1990,21 +2251,21 @@ const Te = /* @__PURE__ */ V(ti, [["render", li], ["__scopeId", "data-v-5ca0dc56
1990
2251
  const e = this.$slots.default;
1991
2252
  return e ? this.isVue2 ? !!e : e()[0].children.length > 0 : !1;
1992
2253
  },
1993
- handleUpdate(e, i, t) {
1994
- const n = this.getFieldValue(e, t);
1995
- n && this.$emit("update:search-form", W(T({}, this.computedSearchForm), {
1996
- [n]: i
2254
+ handleUpdate(e, l, t) {
2255
+ const a = this.getFieldValue(e, t);
2256
+ a && this.$emit("update:search-form", I(x({}, this.computedSearchForm), {
2257
+ [a]: l
1997
2258
  }));
1998
2259
  },
1999
- handleUpdateDate(e, i) {
2000
- const t = i || [], n = this.getFieldValue(e, "start"), l = this.getFieldValue(e, "end"), s = this.getFieldValue(e, "value"), o = {};
2001
- n && (o[n] = t[0]), l && (o[l] = t[1]), s && (o[s] = t), this.$emit("update:search-form", T(T({}, this.computedSearchForm), o));
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));
2002
2263
  },
2003
- getFieldValue(e, i) {
2264
+ getFieldValue(e, l) {
2004
2265
  if (typeof e == "string")
2005
2266
  return e;
2006
- if (e.fields && i in e.fields) {
2007
- const t = e.fields[i];
2267
+ if (e.fields && l in e.fields) {
2268
+ const t = e.fields[l];
2008
2269
  if (typeof t == "string")
2009
2270
  return t;
2010
2271
  if (Array.isArray(t))
@@ -2014,9 +2275,9 @@ const Te = /* @__PURE__ */ V(ti, [["render", li], ["__scopeId", "data-v-5ca0dc56
2014
2275
  }
2015
2276
  },
2016
2277
  // 获取字段默认值(仅支持新的fields结构)
2017
- getFieldDefault(e, i) {
2018
- if (e.fields && i in e.fields) {
2019
- const t = e.fields[i];
2278
+ getFieldDefault(e, l) {
2279
+ if (e.fields && l in e.fields) {
2280
+ const t = e.fields[l];
2020
2281
  if (Array.isArray(t) && t.length > 1)
2021
2282
  return t[1];
2022
2283
  if (t && typeof t == "object" && "default" in t)
@@ -2025,15 +2286,15 @@ const Te = /* @__PURE__ */ V(ti, [["render", li], ["__scopeId", "data-v-5ca0dc56
2025
2286
  },
2026
2287
  // 检查是否存在对应名称的插槽
2027
2288
  hasSearchSlot(e) {
2028
- const i = "$slots";
2029
- if (this[i][e])
2289
+ const l = "$slots";
2290
+ if (this[l][e])
2030
2291
  return !0;
2031
- let n = this.$parent;
2032
- for (; n; ) {
2033
- const l = n[i];
2034
- if (n.$options.name === "TmTable" && (l != null && l[e]))
2292
+ let a = this.$parent;
2293
+ for (; a; ) {
2294
+ const i = a[l];
2295
+ if (a.$options.name === "TmTable" && (i != null && i[e]))
2035
2296
  return !0;
2036
- n = n.$parent;
2297
+ a = a.$parent;
2037
2298
  }
2038
2299
  return !1;
2039
2300
  },
@@ -2041,44 +2302,44 @@ const Te = /* @__PURE__ */ V(ti, [["render", li], ["__scopeId", "data-v-5ca0dc56
2041
2302
  initDefaultValues() {
2042
2303
  if (!this.searchColumns || !this.searchColumns.length) return;
2043
2304
  const e = {};
2044
- this.searchColumns.forEach((i) => {
2045
- if (typeof i == "string" || !i.fields) return;
2046
- const t = this.getFieldValue(i, "value"), n = this.getFieldValue(i, "label");
2047
- if (i.type === "input" && i.labelOptions && i.labelOptions.length > 0) {
2048
- const s = i.labelOptions[0];
2049
- if (n)
2050
- if (n in this.computedSearchForm)
2051
- e[n] = this.computedSearchForm[n];
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];
2310
+ if (a)
2311
+ if (a in this.computedSearchForm)
2312
+ e[a] = this.computedSearchForm[a];
2052
2313
  else {
2053
- const o = this.getFieldDefault(i, "label");
2054
- o !== void 0 ? e[n] = o : s && s.value !== void 0 && (e[n] = s.value);
2314
+ const r = this.getFieldDefault(l, "label");
2315
+ r !== void 0 ? e[a] = r : n && n.value !== void 0 && (e[a] = n.value);
2055
2316
  }
2056
2317
  t && !(t in this.computedSearchForm) && (e[t] = "");
2057
- } else if (this.isDateType(i.type) && i.labelOptions && i.labelOptions.length > 0) {
2058
- const s = i.labelOptions[0];
2059
- if (t && !(t in this.computedSearchForm) && (e[t] = []), n)
2060
- if (n in this.computedSearchForm)
2061
- e[n] = this.computedSearchForm[n];
2318
+ } else if (this.isDateType(l.type) && l.labelOptions && l.labelOptions.length > 0) {
2319
+ const n = l.labelOptions[0];
2320
+ if (t && !(t in this.computedSearchForm) && (e[t] = []), a)
2321
+ if (a in this.computedSearchForm)
2322
+ e[a] = this.computedSearchForm[a];
2062
2323
  else {
2063
- const o = this.getFieldDefault(i, "label");
2064
- o !== void 0 ? e[n] = o : s && s.value !== void 0 && (e[n] = s.value);
2324
+ const r = this.getFieldDefault(l, "label");
2325
+ r !== void 0 ? e[a] = r : n && n.value !== void 0 && (e[a] = n.value);
2065
2326
  }
2066
- } else if (i.type === "select" && i.labelOptions && i.labelOptions.length > 0) {
2067
- const s = i.labelOptions[0];
2068
- if (t && !(t in this.computedSearchForm) && (e[t] = i.multiple ? [] : ""), n)
2069
- if (n in this.computedSearchForm)
2070
- e[n] = this.computedSearchForm[n];
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)
2330
+ if (a in this.computedSearchForm)
2331
+ e[a] = this.computedSearchForm[a];
2071
2332
  else {
2072
- const o = this.getFieldDefault(i, "label");
2073
- o !== void 0 ? e[n] = o : s && s.value !== void 0 && (e[n] = s.value);
2333
+ const r = this.getFieldDefault(l, "label");
2334
+ r !== void 0 ? e[a] = r : n && n.value !== void 0 && (e[a] = n.value);
2074
2335
  }
2075
2336
  }
2076
- const l = this.getFieldDefault(i, "value");
2077
- 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)) {
2078
- const s = this.getFieldValue(i, "start"), o = this.getFieldValue(i, "end"), c = this.getFieldDefault(i, "start"), d = this.getFieldDefault(i, "end");
2079
- s && c !== void 0 && !(s in this.computedSearchForm) && (e[s] = c), o && d !== void 0 && !(o in this.computedSearchForm) && (e[o] = d);
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);
2080
2341
  }
2081
- }), this.defaultValues = e, this.$emit("update:search-form", T(T({}, e), this.computedSearchForm));
2342
+ }), this.defaultValues = e, this.$emit("update:search-form", x(x({}, e), this.computedSearchForm));
2082
2343
  },
2083
2344
  // 获取表单数据
2084
2345
  getSearchForm() {
@@ -2092,156 +2353,174 @@ const Te = /* @__PURE__ */ V(ti, [["render", li], ["__scopeId", "data-v-5ca0dc56
2092
2353
  },
2093
2354
  // 处理重置
2094
2355
  handleReset() {
2095
- this.$emit("update:search-form", T({}, this.defaultValues)), this.$emit("reset");
2356
+ this.$emit("update:search-form", x({}, this.defaultValues)), this.$emit("reset");
2096
2357
  }
2097
2358
  }
2098
- }, di = { class: "search-content" }, ci = { class: "search-actions" };
2099
- function hi(e, i, t, n, l, s) {
2100
- const o = u("dynamic-slot"), c = u("tm-advanced-input"), d = u("tm-advanced-date"), h = u("tm-select"), y = u("tm-cascader"), F = u("tm-radio"), O = u("tm-checkbox"), j = u("tm-switch"), N = u("el-button");
2101
- return r(), g("div", {
2102
- class: X(["table-search", `table-search--${l.isVue2 ? "v2" : "v3"}`])
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"}`])
2103
2364
  }, [
2104
- b("div", di, [
2105
- s.hasDefaultSlot() ? x(e.$slots, "default", { key: 0 }, void 0, !0) : t.searchColumns && t.searchColumns.length ? (r(!0), g(k, { key: 1 }, D(t.searchColumns, (a, H) => (r(), g(k, null, [
2106
- typeof a == "string" ? (r(), g("div", {
2107
- key: `str-${a}-${H}`,
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", {
2368
+ key: `str-${s}-${N}`,
2108
2369
  class: "search-item"
2109
2370
  }, [
2110
- (r(), m(o, {
2111
- name: `search-${a}`,
2371
+ (o(), m(r, {
2372
+ name: `search-${s}`,
2112
2373
  "slot-props": { searchForm: t.searchForm },
2113
- key: a
2374
+ key: s
2114
2375
  }, null, 8, ["name", "slot-props"]))
2115
- ])) : (r(), g("div", {
2116
- key: `obj-${H}`,
2376
+ ])) : (o(), b("div", {
2377
+ key: `obj-${N}`,
2117
2378
  class: "search-item"
2118
2379
  }, [
2119
- a.fields ? (r(), g(k, { key: 0 }, [
2120
- s.hasSearchSlot(`search-${s.getFieldValue(a, "value")}`) ? (r(), m(o, {
2121
- name: `search-${s.getFieldValue(a, "value")}`,
2122
- "slot-props": { searchForm: t.searchForm, col: a },
2123
- key: s.getFieldValue(a, "value")
2124
- }, null, 8, ["name", "slot-props"])) : (r(), g("div", {
2380
+ s.fields ? (o(), b(L, { key: 0 }, [
2381
+ n.hasSearchSlot(`search-${n.getFieldValue(s, "value")}`) ? (o(), m(r, {
2382
+ name: `search-${n.getFieldValue(s, "value")}`,
2383
+ "slot-props": { searchForm: t.searchForm, col: s },
2384
+ key: n.getFieldValue(s, "value")
2385
+ }, null, 8, ["name", "slot-props"])) : (o(), b("div", {
2125
2386
  style: { display: "flex" },
2126
- key: s.getFieldValue(a, "value") || `col-${H}`
2387
+ key: n.getFieldValue(s, "value") || `col-${N}`
2127
2388
  }, [
2128
- a.type === "input" ? (r(), m(c, _({
2389
+ s.type === "input" ? (o(), m(c, _({
2129
2390
  key: 0,
2130
- label: a.label,
2131
- value: s.computedSearchForm[s.getFieldValue(a, "value")],
2132
- field: s.computedSearchForm[s.getFieldValue(a, "label")],
2133
- onValueChange: (S) => s.handleUpdate(a, S, "value"),
2134
- onFieldChange: (S) => s.handleUpdate(a, S, "label"),
2135
- multiple: a.multiple,
2136
- labelOptions: a.labelOptions,
2137
- placeholder: a.placeholder,
2138
- onSearch: s.handleSearch
2139
- }, { ref_for: !0 }, s.getLayoutProps(a)), null, 16, ["label", "value", "field", "onValueChange", "onFieldChange", "multiple", "labelOptions", "placeholder", "onSearch"])) : v("", !0),
2140
- s.isDateType(a.type) ? (r(), m(d, _({
2391
+ label: s.label,
2392
+ value: n.computedSearchForm[n.getFieldValue(s, "value")],
2393
+ field: n.computedSearchForm[n.getFieldValue(s, "label")],
2394
+ onValueChange: (d) => n.handleUpdate(s, d, "value"),
2395
+ onFieldChange: (d) => n.handleUpdate(s, d, "label"),
2396
+ multiple: s.multiple,
2397
+ labelOptions: s.labelOptions,
2398
+ placeholder: s.placeholder,
2399
+ onSearch: n.handleSearch
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, _({
2141
2402
  key: 1,
2142
- type: a.type,
2143
- label: a.label,
2144
- value: s.computedSearchForm[s.getFieldValue(a, "value")],
2145
- field: s.computedSearchForm[s.getFieldValue(a, "label")],
2146
- start: s.computedSearchForm[s.getFieldValue(a, "start")],
2147
- end: s.computedSearchForm[s.getFieldValue(a, "end")],
2148
- onFieldChange: (S) => s.handleUpdate(a, S, "label"),
2149
- onValueChange: (S) => s.handleUpdateDate(a, S),
2150
- onStartChange: (S) => s.handleUpdateDate(a, S),
2151
- onEndChange: (S) => s.handleUpdateDate(a, S),
2152
- labelOptions: a.labelOptions,
2153
- "start-placeholder": a.startPlaceholder,
2154
- "end-placeholder": a.endPlaceholder,
2155
- placeholder: a.placeholder,
2156
- "range-separator": a.rangeSeparator,
2157
- disabled: a.disabled,
2158
- clearable: a.clearable,
2159
- readonly: a.readonly,
2160
- editable: a.editable,
2161
- align: a.align,
2162
- "popper-class": a.popperClass,
2163
- "default-value": a.defaultValue,
2164
- "default-time": a.defaultTime,
2165
- shortcuts: a.shortcuts,
2166
- "past-only": a.pastOnly,
2167
- format: a.format
2168
- }, { ref_for: !0 }, s.getLayoutProps(a)), 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"])) : v("", !0),
2169
- a.type === "select" ? (r(), m(h, _({
2403
+ type: s.type,
2404
+ label: s.label,
2405
+ value: n.computedSearchForm[n.getFieldValue(s, "value")],
2406
+ field: n.computedSearchForm[n.getFieldValue(s, "label")],
2407
+ start: n.computedSearchForm[n.getFieldValue(s, "start")],
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),
2413
+ labelOptions: s.labelOptions,
2414
+ "start-placeholder": s.startPlaceholder,
2415
+ "end-placeholder": s.endPlaceholder,
2416
+ placeholder: s.placeholder,
2417
+ "range-separator": s.rangeSeparator,
2418
+ disabled: s.disabled,
2419
+ clearable: s.clearable,
2420
+ readonly: s.readonly,
2421
+ editable: s.editable,
2422
+ align: s.align,
2423
+ "popper-class": s.popperClass,
2424
+ "default-value": s.defaultValue,
2425
+ "default-time": s.defaultTime,
2426
+ shortcuts: s.shortcuts,
2427
+ "past-only": s.pastOnly,
2428
+ format: s.format
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, _({
2170
2431
  key: 2,
2171
- label: a.label,
2172
- modelValue: s.computedSearchForm[s.getFieldValue(a, "value")],
2173
- "onUpdate:modelValue": (S) => s.computedSearchForm[s.getFieldValue(a, "value")] = S,
2174
- field: s.computedSearchForm[s.getFieldValue(a, "label")],
2175
- options: a.options,
2176
- labelOptions: a.labelOptions,
2177
- placeholder: a.placeholder,
2178
- multiple: a.multiple,
2179
- "show-check-all": a.checkAll,
2180
- "value-on-clear": a.valueOnClear,
2181
- clearable: a.clearable,
2182
- onFieldChange: (S) => s.handleUpdate(a, S, "label")
2183
- }, { ref_for: !0 }, s.getLayoutProps(a)), null, 16, ["label", "modelValue", "onUpdate:modelValue", "field", "options", "labelOptions", "placeholder", "multiple", "show-check-all", "value-on-clear", "clearable", "onFieldChange"])) : v("", !0),
2184
- a.type === "cascader" ? (r(), m(y, _({
2432
+ label: s.label,
2433
+ modelValue: n.computedSearchForm[n.getFieldValue(s, "value")],
2434
+ "onUpdate:modelValue": (d) => n.computedSearchForm[n.getFieldValue(s, "value")] = d,
2435
+ field: n.computedSearchForm[n.getFieldValue(s, "label")],
2436
+ options: s.options,
2437
+ labelOptions: s.labelOptions,
2438
+ placeholder: s.placeholder,
2439
+ multiple: s.multiple,
2440
+ "show-check-all": s.checkAll,
2441
+ "value-on-clear": s.valueOnClear,
2442
+ clearable: s.clearable,
2443
+ onFieldChange: (d) => n.handleUpdate(s, d, "label")
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, _({
2185
2446
  key: 3,
2186
- modelValue: s.computedSearchForm[s.getFieldValue(a, "value")],
2187
- "onUpdate:modelValue": (S) => s.computedSearchForm[s.getFieldValue(a, "value")] = S,
2188
- label: a.label,
2189
- options: a.options,
2190
- labelOptions: a.labelOptions,
2191
- props: a.props,
2192
- placeholder: a.placeholder,
2193
- "show-check-all": a.checkAll
2194
- }, { ref_for: !0 }, s.getLayoutProps(a)), null, 16, ["modelValue", "onUpdate:modelValue", "label", "options", "labelOptions", "props", "placeholder", "show-check-all"])) : v("", !0),
2195
- a.type === "radio" ? (r(), m(F, _({
2447
+ modelValue: n.computedSearchForm[n.getFieldValue(s, "value")],
2448
+ "onUpdate:modelValue": (d) => n.computedSearchForm[n.getFieldValue(s, "value")] = d,
2449
+ label: s.label,
2450
+ options: s.options,
2451
+ labelOptions: s.labelOptions,
2452
+ props: s.props,
2453
+ placeholder: s.placeholder,
2454
+ "show-check-all": s.checkAll
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, _({
2196
2457
  key: 4,
2197
- modelValue: s.computedSearchForm[s.getFieldValue(a, "value")],
2198
- "onUpdate:modelValue": (S) => s.computedSearchForm[s.getFieldValue(a, "value")] = S,
2199
- label: a.label,
2200
- options: a.options,
2201
- props: a.props
2202
- }, { ref_for: !0 }, s.getLayoutProps(a)), null, 16, ["modelValue", "onUpdate:modelValue", "label", "options", "props"])) : v("", !0),
2203
- a.type === "checkbox" ? (r(), m(O, _({
2458
+ modelValue: n.computedSearchForm[n.getFieldValue(s, "value")],
2459
+ "onUpdate:modelValue": (d) => n.computedSearchForm[n.getFieldValue(s, "value")] = d,
2460
+ label: s.label,
2461
+ options: s.options,
2462
+ props: s.props
2463
+ }, { ref_for: !0 }, n.getLayoutProps(s)), null, 16, ["modelValue", "onUpdate:modelValue", "label", "options", "props"])) : C("", !0),
2464
+ s.type === "checkbox" ? (o(), m(O, _({
2204
2465
  key: 5,
2205
- modelValue: s.computedSearchForm[s.getFieldValue(a, "value")],
2206
- "onUpdate:modelValue": (S) => s.computedSearchForm[s.getFieldValue(a, "value")] = S,
2207
- label: a.label,
2208
- options: a.options,
2209
- props: a.props
2210
- }, { ref_for: !0 }, s.getLayoutProps(a)), null, 16, ["modelValue", "onUpdate:modelValue", "label", "options", "props"])) : v("", !0),
2211
- a.type === "switch" ? (r(), m(j, _({
2466
+ modelValue: n.computedSearchForm[n.getFieldValue(s, "value")],
2467
+ "onUpdate:modelValue": (d) => n.computedSearchForm[n.getFieldValue(s, "value")] = d,
2468
+ label: s.label,
2469
+ options: s.options,
2470
+ props: s.props
2471
+ }, { ref_for: !0 }, n.getLayoutProps(s)), null, 16, ["modelValue", "onUpdate:modelValue", "label", "options", "props"])) : C("", !0),
2472
+ s.type === "switch" ? (o(), m(U, _({
2212
2473
  key: 6,
2213
- modelValue: s.computedSearchForm[s.getFieldValue(a, "value")],
2214
- "onUpdate:modelValue": (S) => s.computedSearchForm[s.getFieldValue(a, "value")] = S,
2215
- "active-text": a.activeText,
2216
- "inactive-text": a.inactiveText,
2217
- label: a.label,
2218
- "active-color": a.activeColor,
2219
- "inactive-color": a.inactiveColor
2220
- }, { ref_for: !0 }, s.getLayoutProps(a)), null, 16, ["modelValue", "onUpdate:modelValue", "active-text", "inactive-text", "label", "active-color", "inactive-color"])) : v("", !0)
2474
+ modelValue: n.computedSearchForm[n.getFieldValue(s, "value")],
2475
+ "onUpdate:modelValue": (d) => n.computedSearchForm[n.getFieldValue(s, "value")] = d,
2476
+ "active-text": s.activeText,
2477
+ "inactive-text": s.inactiveText,
2478
+ label: s.label,
2479
+ "active-color": s.activeColor,
2480
+ "inactive-color": s.inactiveColor
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, _({
2483
+ key: 7,
2484
+ modelValue: n.computedSearchForm[n.getFieldValue(s, "value")],
2485
+ "onUpdate:modelValue": (d) => n.computedSearchForm[n.getFieldValue(s, "value")] = d,
2486
+ field: n.computedSearchForm[n.getFieldValue(s, "label")],
2487
+ label: s.label,
2488
+ labelOptions: s.labelOptions,
2489
+ placeholder: s.placeholder,
2490
+ autosize: s.autosize,
2491
+ maxlength: s.maxlength,
2492
+ minlength: s.minlength,
2493
+ "show-word-limit": s.showWordLimit,
2494
+ readonly: s.readonly,
2495
+ disabled: s.disabled,
2496
+ resize: s.resize,
2497
+ clearable: s.clearable,
2498
+ onFieldChange: (d) => n.handleUpdate(s, d, "label")
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)
2221
2500
  ]))
2222
- ], 64)) : (r(), g("div", {
2223
- key: `error-${H}`,
2501
+ ], 64)) : (o(), b("div", {
2502
+ key: `error-${N}`,
2224
2503
  class: "search-error-message"
2225
2504
  }, " 缺少 fields 配置,无法渲染此组件 "))
2226
2505
  ]))
2227
- ], 64))), 256)) : v("", !0),
2228
- b("div", ci, [
2229
- p(N, {
2506
+ ], 64))), 256)) : C("", !0),
2507
+ v("div", Cl, [
2508
+ g(W, {
2230
2509
  type: "primary",
2231
- size: l.getDefaultSize(),
2232
- onClick: s.handleSearch
2510
+ size: i.getDefaultSize(),
2511
+ onClick: n.handleSearch
2233
2512
  }, {
2234
- default: f(() => [
2235
- L(w(l.t("query")), 1)
2513
+ default: p(() => [
2514
+ z(T(i.t("query")), 1)
2236
2515
  ]),
2237
2516
  _: 1
2238
2517
  }, 8, ["size", "onClick"]),
2239
- p(N, {
2240
- size: l.getDefaultSize(),
2241
- onClick: s.handleReset
2518
+ g(W, {
2519
+ size: i.getDefaultSize(),
2520
+ onClick: n.handleReset
2242
2521
  }, {
2243
- default: f(() => [
2244
- L(w(l.t("reset")), 1)
2522
+ default: p(() => [
2523
+ z(T(i.t("reset")), 1)
2245
2524
  ]),
2246
2525
  _: 1
2247
2526
  }, 8, ["size", "onClick"])
@@ -2249,7 +2528,7 @@ function hi(e, i, t, n, l, s) {
2249
2528
  ])
2250
2529
  ], 2);
2251
2530
  }
2252
- const we = /* @__PURE__ */ V(ui, [["render", hi], ["__scopeId", "data-v-4c4fd376"]]), fi = !1, pi = {
2531
+ const ze = /* @__PURE__ */ w(yl, [["render", _l], ["__scopeId", "data-v-be7a7198"]]), Sl = !1, xl = {
2253
2532
  name: "TablePagination",
2254
2533
  props: {
2255
2534
  current: {
@@ -2271,7 +2550,7 @@ const we = /* @__PURE__ */ V(ui, [["render", hi], ["__scopeId", "data-v-4c4fd376
2271
2550
  },
2272
2551
  data() {
2273
2552
  return {
2274
- isVue2: fi,
2553
+ isVue2: Sl,
2275
2554
  getCompatSize: K
2276
2555
  };
2277
2556
  },
@@ -2283,26 +2562,26 @@ const we = /* @__PURE__ */ V(ui, [["render", hi], ["__scopeId", "data-v-4c4fd376
2283
2562
  this.$emit("current-change", e);
2284
2563
  }
2285
2564
  }
2286
- }, mi = { class: "tm-pagination" };
2287
- function gi(e, i, t, n, l, s) {
2288
- const o = u("el-pagination");
2289
- return r(), g("div", mi, [
2290
- p(o, _(e.$attrs, I(l.isVue2 ? e.$listeners : {}), {
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 : {}), {
2291
2570
  style: { "text-align": "right" },
2292
2571
  "current-page": t.current,
2293
2572
  "page-size": t.pageSize,
2294
2573
  total: t.total,
2295
2574
  "page-sizes": [10, 20, 50, 100, 300, 500, 1e3, 2e3],
2296
- size: l.getCompatSize("mini"),
2575
+ size: i.getCompatSize("mini"),
2297
2576
  layout: "total, sizes, prev, pager, next, jumper",
2298
- onSizeChange: s.handleSizeChange,
2299
- "onUpdate:currentPage": i[0] || (i[0] = (c) => e.$emit("update:current", c)),
2300
- "onUpdate:pageSize": i[1] || (i[1] = (c) => e.$emit("update:pageSize", c)),
2301
- onCurrentChange: s.handleCurrentChange
2577
+ 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)),
2580
+ onCurrentChange: n.handleCurrentChange
2302
2581
  }), null, 16, ["current-page", "page-size", "total", "size", "onSizeChange", "onCurrentChange"])
2303
2582
  ]);
2304
2583
  }
2305
- const bi = /* @__PURE__ */ V(pi, [["render", gi], ["__scopeId", "data-v-4dbdf6e7"]]), yi = {
2584
+ const Vl = /* @__PURE__ */ w(xl, [["render", wl], ["__scopeId", "data-v-4dbdf6e7"]]), Fl = {
2306
2585
  name: "TmTableMenu",
2307
2586
  props: {
2308
2587
  size: {
@@ -2310,36 +2589,36 @@ const bi = /* @__PURE__ */ V(pi, [["render", gi], ["__scopeId", "data-v-4dbdf6e7
2310
2589
  default: "mini"
2311
2590
  }
2312
2591
  }
2313
- }, vi = {
2592
+ }, zl = {
2314
2593
  size: "small",
2315
2594
  class: "tm-table-menu",
2316
2595
  inline: ""
2317
- }, Ci = { class: "left" }, _i = { class: "right" };
2318
- function Si(e, i, t, n, l, s) {
2319
- return r(), g("div", vi, [
2320
- b("div", Ci, [
2321
- x(e.$slots, "left", {}, void 0, !0)
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, [
2600
+ S(e.$slots, "left", {}, void 0, !0)
2322
2601
  ]),
2323
- b("div", _i, [
2324
- x(e.$slots, "right", {}, void 0, !0)
2602
+ v("div", kl, [
2603
+ S(e.$slots, "right", {}, void 0, !0)
2325
2604
  ])
2326
2605
  ]);
2327
2606
  }
2328
- const xi = /* @__PURE__ */ V(yi, [["render", Si], ["__scopeId", "data-v-579dd2c3"]]), Y = (e) => e ? e.props || {} : {}, te = (e, i) => {
2329
- e && (e.props || (e.props = {}), typeof i == "object" && Object.assign(e.props, i));
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));
2330
2609
  }, G = {
2331
2610
  // 默认实现:使用localStorage获取配置
2332
2611
  getTableConfig(e) {
2333
2612
  try {
2334
- const i = localStorage.getItem(`tm-table-config-${e}`);
2613
+ const l = localStorage.getItem(`tm-table-config-${e}`);
2335
2614
  return Promise.resolve({
2336
2615
  data: {
2337
2616
  code: 200,
2338
- data: i
2617
+ data: l
2339
2618
  }
2340
2619
  });
2341
- } catch (i) {
2342
- return Promise.reject(i);
2620
+ } catch (l) {
2621
+ return Promise.reject(l);
2343
2622
  }
2344
2623
  },
2345
2624
  // 默认实现:使用localStorage保存配置
@@ -2351,24 +2630,24 @@ const xi = /* @__PURE__ */ V(yi, [["render", Si], ["__scopeId", "data-v-579dd2c3
2351
2630
  message: "success"
2352
2631
  }
2353
2632
  });
2354
- } catch (i) {
2355
- return Promise.reject(i);
2633
+ } catch (l) {
2634
+ return Promise.reject(l);
2356
2635
  }
2357
2636
  }
2358
- }, Ti = (e) => G.getTableConfig(e.key), wi = (e) => G.setTableConfig(e), Vi = (e) => {
2637
+ }, Dl = (e) => G.getTableConfig(e.key), Ml = (e) => G.setTableConfig(e), Hl = (e) => {
2359
2638
  e && (typeof e.getTableConfig == "function" && (G.getTableConfig = e.getTableConfig), typeof e.setTableConfig == "function" && (G.setTableConfig = e.setTableConfig));
2360
- }, { t: Fi } = R(), zi = !1, Li = !0, ki = {
2361
- formatter: (e, i, t, n) => [void 0, null, ""].includes(t) ? "-" : t
2362
- }, Oi = {
2639
+ }, { t: Rl } = H(), Il = !1, El = !0, Wl = {
2640
+ formatter: (e, l, t, a) => [void 0, null, ""].includes(t) ? "-" : t
2641
+ }, Nl = {
2363
2642
  name: "TmColumnConfig",
2364
2643
  components: {
2365
- MoveIcon: et,
2366
- FixedLeftIcon: it,
2367
- FixedRightIcon: lt,
2368
- UploadIcon: st,
2369
- DownloadIcon: nt,
2370
- DeleteIcon: at,
2371
- MenuIcon: Ze,
2644
+ MoveIcon: nt,
2645
+ FixedLeftIcon: st,
2646
+ FixedRightIcon: rt,
2647
+ UploadIcon: ot,
2648
+ DownloadIcon: ut,
2649
+ DeleteIcon: dt,
2650
+ MenuIcon: lt,
2372
2651
  tmEllipsisText: $
2373
2652
  },
2374
2653
  props: {
@@ -2406,10 +2685,10 @@ const xi = /* @__PURE__ */ V(yi, [["render", Si], ["__scopeId", "data-v-579dd2c3
2406
2685
  },
2407
2686
  data() {
2408
2687
  return {
2409
- t: Fi,
2410
- isVue2: zi,
2411
- isVue3: Li,
2412
- getDefaultSize: M,
2688
+ t: Rl,
2689
+ isVue2: Il,
2690
+ isVue3: El,
2691
+ getDefaultSize: k,
2413
2692
  getCompatSize: K,
2414
2693
  buttonType: { link: !0, type: "primary" },
2415
2694
  afterOpenDelay: { "show-after": 300 },
@@ -2480,9 +2759,9 @@ const xi = /* @__PURE__ */ V(yi, [["render", Si], ["__scopeId", "data-v-579dd2c3
2480
2759
  * 查找数组中满足条件的最后一个元素的索引
2481
2760
  * 用于兼容旧版JS环境中不支持findLastIndex的情况
2482
2761
  */
2483
- findLastIndex(e, i) {
2762
+ findLastIndex(e, l) {
2484
2763
  for (let t = e.length - 1; t >= 0; t--)
2485
- if (i(e[t], t, e))
2764
+ if (l(e[t], t, e))
2486
2765
  return t;
2487
2766
  return -1;
2488
2767
  },
@@ -2501,68 +2780,68 @@ const xi = /* @__PURE__ */ V(yi, [["render", Si], ["__scopeId", "data-v-579dd2c3
2501
2780
  // 处理原始列数据
2502
2781
  processOriginalColumns() {
2503
2782
  const e = this.columns || [];
2504
- let i = {};
2783
+ let l = {};
2505
2784
  this.defaultColumnsConfig = e.filter((t) => {
2506
- const n = Y(t);
2507
- return !(!n.prop || this.ignoredColumnConfigTypes.includes(n.type));
2508
- }).map((t, n) => {
2509
- const l = Y(t), s = T(T({}, ki), l);
2510
- te(t, s), l.prop && (i[l.prop] = t);
2511
- const o = l.hasOwnProperty("visible") ? l.visible !== !1 : !0;
2785
+ const a = Y(t);
2786
+ return !(!a.prop || this.ignoredColumnConfigTypes.includes(a.type));
2787
+ }).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;
2512
2791
  return {
2513
- prop: l.prop,
2792
+ prop: i.prop,
2514
2793
  // label: attrs.label, // 移除label,避免国际化导致比较不一致
2515
- fixed: l.fixed || "",
2516
- sort: n,
2517
- cancellable: l.hasOwnProperty("cancellable") ? l.cancellable : !0,
2518
- visible: o
2794
+ fixed: i.fixed || "",
2795
+ sort: a,
2796
+ cancellable: i.hasOwnProperty("cancellable") ? i.cancellable : !0,
2797
+ visible: r
2519
2798
  };
2520
- }), this.columnMap = i;
2799
+ }), this.columnMap = l;
2521
2800
  },
2522
2801
  // 加载列配置
2523
2802
  loadColumnConfig() {
2524
- Ti({
2803
+ Dl({
2525
2804
  key: this.computedTableKey
2526
2805
  }).then((e) => {
2527
2806
  var t;
2528
2807
  if (e.data.code !== 200) return;
2529
- let i = JSON.parse(((t = e.data) == null ? void 0 : t.data) || null) || {};
2530
- i.columnsConfig && JSON.stringify(this.defaultColumnsConfig) === JSON.stringify(i.defaultColumnsConfig) ? this.tableColumns = i.columnsConfig.map((n) => T({}, n)) : this.tableColumns = this.defaultColumnsConfig.map((n) => T({}, n)), this.processedColumns = this.applyColumnConfig(this.tableColumns), this.isConfigLoaded = !0, this.$emit("complete", {
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", {
2531
2810
  columns: this.processedColumns,
2532
2811
  isInitialLoad: !0
2533
2812
  });
2534
2813
  }).catch(() => {
2535
- this.tableColumns = this.defaultColumnsConfig.map((e) => T({}, e)), this.processedColumns = this.applyColumnConfig(this.tableColumns), this.isConfigLoaded = !0, this.$emit("complete", {
2814
+ this.tableColumns = this.defaultColumnsConfig.map((e) => x({}, e)), this.processedColumns = this.applyColumnConfig(this.tableColumns), this.isConfigLoaded = !0, this.$emit("complete", {
2536
2815
  columns: this.processedColumns,
2537
2816
  isInitialLoad: !0
2538
2817
  });
2539
2818
  });
2540
2819
  },
2541
- applyColumnConfig(e, i = !1) {
2542
- let t = this.columns.filter((l) => {
2543
- const s = Y(l);
2544
- return this.ignoredColumnConfigTypes.includes(s.type);
2545
- }), n = [];
2546
- return [...e].sort((l, s) => {
2547
- const o = l.sort !== void 0 ? l.sort : 1 / 0, c = s.sort !== void 0 ? s.sort : 1 / 0;
2548
- return o - c;
2549
- }).forEach((l) => {
2550
- if (l.prop) {
2551
- let s = this.columnMap[l.prop];
2552
- s && (te(s, {
2553
- fixed: l.fixed || void 0,
2554
- visible: l.visible
2555
- }), (!i && l.visible || i) && n.push(s));
2820
+ applyColumnConfig(e, l = !1) {
2821
+ let t = this.columns.filter((i) => {
2822
+ const n = Y(i);
2823
+ return this.ignoredColumnConfigTypes.includes(n.type);
2824
+ }), 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];
2831
+ n && (le(n, {
2832
+ fixed: i.fixed || void 0,
2833
+ visible: i.visible
2834
+ }), (!l && i.visible || l) && a.push(n));
2556
2835
  }
2557
- }), t.forEach((l) => {
2558
- te(l, { visible: !0 });
2559
- }), [...t, ...n];
2836
+ }), t.forEach((i) => {
2837
+ le(i, { visible: !0 });
2838
+ }), [...t, ...a];
2560
2839
  },
2561
2840
  crateSortable() {
2562
2841
  const e = this.$refs.sortListRef;
2563
2842
  if (!e) return;
2564
2843
  this.sortable && (this.sortable.destroy(), this.sortable = null);
2565
- const i = new E(e, {
2844
+ const l = new R(e, {
2566
2845
  ghostClass: "blue-background-class",
2567
2846
  animation: 150,
2568
2847
  // 动画持续时间,毫秒
@@ -2579,36 +2858,36 @@ const xi = /* @__PURE__ */ V(yi, [["render", Si], ["__scopeId", "data-v-579dd2c3
2579
2858
  group: "columns",
2580
2859
  dragClass: "sortable-drag",
2581
2860
  onStart: ({ item: t }) => {
2582
- const n = t.getAttribute("data-prop"), l = this.sortedTableColumns.find(
2583
- (s) => s.prop === n
2861
+ const a = t.getAttribute("data-prop"), i = this.sortedTableColumns.find(
2862
+ (n) => n.prop === a
2584
2863
  );
2585
- 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");
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");
2586
2865
  },
2587
2866
  onMove: (t) => {
2588
- const { target: n, related: l } = t;
2589
- if (!n || !l)
2867
+ const { target: a, related: i } = t;
2868
+ if (!a || !i)
2590
2869
  return !1;
2591
- const s = l ? l.getAttribute("data-prop") : null, o = s ? this.sortedTableColumns.find((h) => h.prop === s) : null, c = o && o.fixed === "left", d = o && o.fixed === "right";
2592
- return this.isDraggingFrozen && !c || this.isDraggingFrozenRight && !d || !this.isDraggingFrozen && !this.isDraggingFrozenRight && (c || d) ? (n.classList.add("no-drop-zone"), !1) : (document.querySelectorAll(".no-drop-zone").forEach((h) => {
2593
- h.classList.remove("no-drop-zone");
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) => {
2872
+ f.classList.remove("no-drop-zone");
2594
2873
  }), !0);
2595
2874
  },
2596
- onEnd: ({ item: t, newIndex: n, oldIndex: l }) => {
2597
- if (n === void 0 || l === void 0 || n < 0 || l < 0 || n >= this.sortedTableColumns.length || l >= this.sortedTableColumns.length)
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)
2598
2877
  return;
2599
- document.querySelectorAll(".no-drop-zone").forEach((F) => {
2600
- F.classList.remove("no-drop-zone");
2878
+ document.querySelectorAll(".no-drop-zone").forEach((V) => {
2879
+ V.classList.remove("no-drop-zone");
2601
2880
  }), t.classList.remove("sortable-drag");
2602
- const s = this.sortedTableColumns[l], o = s.fixed === "left", c = s.fixed === "right", d = n > 0 ? this.sortedTableColumns[n - 1] : null, h = n < this.sortedTableColumns.length - 1 ? this.sortedTableColumns[n + 1] : null;
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;
2603
2882
  let y = !1;
2604
- if (o ? (d && d.fixed !== "left" || h && h.fixed === "right") && (y = !0) : c ? (d && d.fixed !== "right" || h && h.fixed !== "right") && (y = !0) : (d && d.fixed === "right" || h && h.fixed === "left") && (y = !0), y) {
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) {
2605
2884
  this.rollbackSort();
2606
2885
  return;
2607
2886
  }
2608
2887
  this.updateSortAfterDrag();
2609
2888
  }
2610
2889
  });
2611
- this.sortable = i;
2890
+ this.sortable = l;
2612
2891
  },
2613
2892
  rollbackSort() {
2614
2893
  this.sortedTableColumns = JSON.parse(JSON.stringify(this.columnsCopy));
@@ -2616,8 +2895,8 @@ const xi = /* @__PURE__ */ V(yi, [["render", Si], ["__scopeId", "data-v-579dd2c3
2616
2895
  updateSortAfterDrag() {
2617
2896
  const e = this.$refs.sortListRef;
2618
2897
  if (!e) return;
2619
- Array.from(e.children || []).filter((t) => t && t.dataset && t.dataset.prop).map((t) => t.dataset.prop).forEach((t, n) => {
2620
- this.sortedTableColumns.some((l) => l.prop === t ? (l.sort = n, !0) : !1);
2898
+ 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);
2621
2900
  }), this.columnsCopy = JSON.parse(JSON.stringify(this.sortedTableColumns)), this.$emit("on-sort-change", this.sortedTableColumns);
2622
2901
  },
2623
2902
  // 移除了handleSearch方法,改用计算属性filteredSortedTableColumns
@@ -2626,13 +2905,13 @@ const xi = /* @__PURE__ */ V(yi, [["render", Si], ["__scopeId", "data-v-579dd2c3
2626
2905
  },
2627
2906
  // 初始化排序后的列数据
2628
2907
  initSortedTableColumns() {
2629
- this.tableColumns.forEach((e, i) => {
2630
- e.sort === void 0 && (e.sort = i);
2631
- }), 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);
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);
2632
2911
  },
2633
2912
  setPlacement() {
2634
- const i = this.$refs.operationRef.$el.getBoundingClientRect();
2635
- (window.innerHeight || document.documentElement.clientHeight) - (i.bottom - window.scrollY) > 512 ? this.placement = "bottom" : this.placement = "left";
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";
2636
2915
  },
2637
2916
  handleVisibleChange(e) {
2638
2917
  this.popoverVisible = e;
@@ -2644,7 +2923,7 @@ const xi = /* @__PURE__ */ V(yi, [["render", Si], ["__scopeId", "data-v-579dd2c3
2644
2923
  "mousemove",
2645
2924
  window.sortableGlobalMouseMove
2646
2925
  );
2647
- } catch (i) {
2926
+ } catch (l) {
2648
2927
  }
2649
2928
  })(), this.$nextTick(() => {
2650
2929
  this.crateSortable();
@@ -2656,107 +2935,107 @@ const xi = /* @__PURE__ */ V(yi, [["render", Si], ["__scopeId", "data-v-579dd2c3
2656
2935
  document.removeEventListener("mouseup", window.sortableGlobalMouseUp), document.removeEventListener(
2657
2936
  "mousemove",
2658
2937
  window.sortableGlobalMouseMove
2659
- ), typeof E != "undefined" && E.utils && (document.removeEventListener(
2938
+ ), typeof R != "undefined" && R.utils && (document.removeEventListener(
2660
2939
  "mousemove",
2661
- E.utils.throttleCall
2662
- ), document.removeEventListener("mouseup", E.utils.throttleCall));
2940
+ R.utils.throttleCall
2941
+ ), document.removeEventListener("mouseup", R.utils.throttleCall));
2663
2942
  } catch (e) {
2664
2943
  }
2665
2944
  },
2666
2945
  handleSelectAll() {
2667
- const e = this.tableColumns.some((i) => !i.visible);
2668
- this.tableColumns.forEach((i) => {
2669
- i.cancellable && (i.visible = e);
2946
+ const e = this.tableColumns.some((l) => !l.visible);
2947
+ this.tableColumns.forEach((l) => {
2948
+ l.cancellable && (l.visible = e);
2670
2949
  });
2671
2950
  },
2672
2951
  handleRestoreDefault() {
2673
2952
  this.tableColumns = JSON.parse(JSON.stringify(this.defaultColumnsConfig)), this.sortedTableColumns = [...this.tableColumns].sort(
2674
- (e, i) => e.sort - i.sort
2953
+ (e, l) => e.sort - l.sort
2675
2954
  );
2676
2955
  },
2677
2956
  // 判断是否可以置顶
2678
- canMoveTop(e, i) {
2679
- if (i === 0) return !1;
2957
+ canMoveTop(e, l) {
2958
+ if (l === 0) return !1;
2680
2959
  if (e.fixed === "left") {
2681
- const t = this.sortedTableColumns[i - 1];
2960
+ const t = this.sortedTableColumns[l - 1];
2682
2961
  return t && t.fixed === "left";
2683
2962
  }
2684
2963
  if (!e.fixed) {
2685
- const t = this.sortedTableColumns[i - 1];
2964
+ const t = this.sortedTableColumns[l - 1];
2686
2965
  return t && t.fixed === "left" ? !1 : t && !t.fixed;
2687
2966
  }
2688
2967
  return e.fixed === "right";
2689
2968
  },
2690
2969
  // 修改置顶方法,确保右侧固定列置顶时会取消固定
2691
- moveTop(e, i) {
2692
- const t = this.sortedTableColumns, n = e.prop;
2970
+ moveTop(e, l) {
2971
+ const t = this.sortedTableColumns, a = e.prop;
2693
2972
  if (e.fixed === "right" && (e.fixed = ""), e.fixed === "left")
2694
- t.unshift(t.splice(i, 1)[0]);
2973
+ t.unshift(t.splice(l, 1)[0]);
2695
2974
  else {
2696
- const l = this.findLastIndex(
2975
+ const i = this.findLastIndex(
2697
2976
  this.sortedTableColumns,
2698
- (s) => s.fixed === "left"
2977
+ (n) => n.fixed === "left"
2699
2978
  );
2700
2979
  t.splice(
2701
- l + 1,
2980
+ i + 1,
2702
2981
  0,
2703
- t.splice(i, 1)[0]
2982
+ t.splice(l, 1)[0]
2704
2983
  );
2705
2984
  }
2706
2985
  this.updateSortValues(), this.columnsCopy = JSON.parse(JSON.stringify(this.sortedTableColumns)), this.$emit("on-sort-change", this.sortedTableColumns), this.$nextTick(() => {
2707
- const l = this.$refs.sortListRef;
2708
- if (l) {
2709
- const s = Array.from(l.children).find(
2710
- (o) => o.dataset && o.dataset.prop === n
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
2711
2990
  );
2712
- s && s.scrollIntoView({ behavior: "smooth", block: "nearest" });
2991
+ n && n.scrollIntoView({ behavior: "smooth", block: "nearest" });
2713
2992
  }
2714
2993
  });
2715
2994
  },
2716
2995
  frozenLeftHandle(e) {
2717
- const i = this.sortedTableColumns, t = i.splice(e, 1)[0];
2996
+ const l = this.sortedTableColumns, t = l.splice(e, 1)[0];
2718
2997
  if (t.fixed = t.fixed === "left" ? "" : "left", t.fixed === "left") {
2719
- const n = this.findLastIndex(
2998
+ const a = this.findLastIndex(
2720
2999
  this.sortedTableColumns,
2721
- (l) => l.fixed === "left"
3000
+ (i) => i.fixed === "left"
2722
3001
  );
2723
- i.splice(n + 1, 0, t);
3002
+ l.splice(a + 1, 0, t);
2724
3003
  } else {
2725
- const n = this.findLastIndex(
3004
+ const a = this.findLastIndex(
2726
3005
  this.sortedTableColumns,
2727
- (l) => l.fixed === "left"
3006
+ (i) => i.fixed === "left"
2728
3007
  );
2729
- i.splice(n + 1, 0, t);
3008
+ l.splice(a + 1, 0, t);
2730
3009
  }
2731
3010
  this.updateSortValues(), this.columnsCopy = JSON.parse(JSON.stringify(this.sortedTableColumns)), this.$emit("on-sort-change", this.sortedTableColumns);
2732
3011
  },
2733
3012
  frozenRightHandle(e) {
2734
- const i = this.sortedTableColumns, t = i.splice(e, 1)[0];
3013
+ const l = this.sortedTableColumns, t = l.splice(e, 1)[0];
2735
3014
  if (t.fixed = t.fixed === "right" ? "" : "right", t.fixed === "right") {
2736
- const n = i.findIndex(
2737
- (l) => l.fixed === "right"
3015
+ const a = l.findIndex(
3016
+ (i) => i.fixed === "right"
2738
3017
  );
2739
- n === -1 ? i.push(t) : i.splice(n, 0, t);
3018
+ a === -1 ? l.push(t) : l.splice(a, 0, t);
2740
3019
  } else {
2741
- const n = i.findIndex(
2742
- (l) => l.fixed === "right"
3020
+ const a = l.findIndex(
3021
+ (i) => i.fixed === "right"
2743
3022
  );
2744
- n === -1 ? i.push(t) : i.splice(n, 0, t);
3023
+ a === -1 ? l.push(t) : l.splice(a, 0, t);
2745
3024
  }
2746
3025
  this.updateSortValues(), this.columnsCopy = JSON.parse(JSON.stringify(this.sortedTableColumns)), this.$emit("on-sort-change", this.sortedTableColumns);
2747
3026
  },
2748
3027
  onSave() {
2749
- var i;
3028
+ var l;
2750
3029
  this.updateSortValues();
2751
- const e = (i = this.tableColumns) == null ? void 0 : i.map((t) => {
2752
- const n = this.sortedTableColumns.find(
3030
+ const e = (l = this.tableColumns) == null ? void 0 : l.map((t) => {
3031
+ const a = this.sortedTableColumns.find(
2753
3032
  (c) => c.prop === t.prop
2754
3033
  );
2755
- n && (t.sort = n.sort, t.fixed = n.fixed, t.visible = n.visible);
2756
- const o = t, { label: l } = o;
2757
- return re(o, ["label"]);
3034
+ 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"]);
2758
3037
  });
2759
- wi({
3038
+ Ml({
2760
3039
  key: this.computedTableKey,
2761
3040
  info: JSON.stringify({
2762
3041
  columnsConfig: e,
@@ -2771,8 +3050,8 @@ const xi = /* @__PURE__ */ V(yi, [["render", Si], ["__scopeId", "data-v-579dd2c3
2771
3050
  },
2772
3051
  // 直接更新排序值,不依赖DOM结构
2773
3052
  updateSortValues() {
2774
- this.sortedTableColumns.forEach((e, i) => {
2775
- e.sort = i;
3053
+ this.sortedTableColumns.forEach((e, l) => {
3054
+ e.sort = l;
2776
3055
  });
2777
3056
  }
2778
3057
  },
@@ -2783,50 +3062,50 @@ const xi = /* @__PURE__ */ V(yi, [["render", Si], ["__scopeId", "data-v-579dd2c3
2783
3062
  beforeDestroy() {
2784
3063
  this.sortable && (this.sortable.destroy(), this.sortable = null);
2785
3064
  try {
2786
- document.removeEventListener("mouseup", window.sortableGlobalMouseUp), document.removeEventListener("mousemove", window.sortableGlobalMouseMove), typeof E != "undefined" && E.utils && (document.removeEventListener("mousemove", E.utils.throttleCall), document.removeEventListener("mouseup", E.utils.throttleCall));
3065
+ document.removeEventListener("mouseup", window.sortableGlobalMouseUp), document.removeEventListener("mousemove", window.sortableGlobalMouseMove), typeof R != "undefined" && R.utils && (document.removeEventListener("mousemove", R.utils.throttleCall), document.removeEventListener("mouseup", R.utils.throttleCall));
2787
3066
  } catch (e) {
2788
3067
  }
2789
3068
  }
2790
- }, Di = {
3069
+ }, Pl = {
2791
3070
  key: 0,
2792
3071
  class: "container"
2793
- }, Mi = { class: "main-container" }, Ai = { class: "left-content" }, Hi = { class: "title" }, Ri = { class: "option-list" }, Ei = { style: { height: "100%", "overflow-y": "auto" } }, Ii = { class: "right-content" }, Wi = { class: "search-box" }, Pi = {
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 = {
2794
3073
  key: 0,
2795
3074
  class: "tips"
2796
- }, Ni = {
3075
+ }, Gl = {
2797
3076
  class: "sort-list",
2798
3077
  ref: "sortListRef"
2799
- }, Bi = ["data-prop"], Ui = {
3078
+ }, Xl = ["data-prop"], Zl = {
2800
3079
  key: 0,
2801
3080
  class: "sort-item"
2802
- }, ji = { class: "row-title" }, Ji = { class: "operation-btns" }, Ki = { class: "footer" }, Qi = { class: "footer-left" }, qi = { class: "footer-right" }, Yi = { style: { display: "inline-block", "margin-left": "10px" } };
2803
- function Gi(e, i, t, n, l, s) {
2804
- const o = u("el-button"), c = u("TmEllipsisText"), d = u("el-checkbox"), h = u("el-input"), y = u("MoveIcon"), F = u("DeleteIcon"), O = u("el-tooltip"), j = u("UploadIcon"), N = u("FixedLeftIcon"), a = u("FixedRightIcon"), H = u("MenuIcon"), S = u("el-popover");
2805
- return r(), m(S, _({ "popper-class": "column-config-popover" }, {
2806
- [l.isVue3 ? "visible" : "value"]: l.popoverVisible
2807
- }, I({
2808
- [l.isVue3 ? "update:visible" : "input"]: s.handleVisibleChange
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
3086
+ }, M({
3087
+ [i.isVue3 ? "update:visible" : "input"]: n.handleVisibleChange
2809
3088
  }), {
2810
3089
  width: 680,
2811
3090
  "show-arrow": !1,
2812
- placement: l.placement,
3091
+ placement: i.placement,
2813
3092
  trigger: "click",
2814
- onShow: s.handlePopoverShow,
2815
- onHide: s.handlePopoverHide
3093
+ onShow: n.handlePopoverShow,
3094
+ onHide: n.handlePopoverHide
2816
3095
  }), {
2817
- reference: f(() => [
2818
- b("div", Yi, [
2819
- p(O, _({
2820
- content: l.t("columnSetting")
2821
- }, l.afterOpenDelay, { placement: "top" }), {
2822
- default: f(() => [
2823
- p(o, {
2824
- size: l.getDefaultSize(),
3096
+ reference: p(() => [
3097
+ v("div", ni, [
3098
+ g(O, _({
3099
+ content: i.t("columnSetting")
3100
+ }, i.afterOpenDelay, { placement: "top" }), {
3101
+ default: p(() => [
3102
+ g(r, {
3103
+ size: i.getDefaultSize(),
2825
3104
  ref: "operationRef",
2826
3105
  circle: ""
2827
3106
  }, {
2828
- default: f(() => [
2829
- p(H)
3107
+ default: p(() => [
3108
+ g(s)
2830
3109
  ]),
2831
3110
  _: 1
2832
3111
  }, 8, ["size"])
@@ -2835,230 +3114,230 @@ function Gi(e, i, t, n, l, s) {
2835
3114
  }, 16, ["content"])
2836
3115
  ])
2837
3116
  ]),
2838
- default: f(() => [
2839
- l.popoverVisible ? (r(), g("div", Di, [
2840
- b("div", Mi, [
2841
- b("div", Ai, [
2842
- b("div", Hi, [
2843
- b("span", null, w(l.t("SelectableFields")) + "(" + w(l.tableColumns.length) + ")", 1),
2844
- p(o, _({ style: { "margin-left": "10px" } }, l.buttonType, { onClick: s.handleSelectAll }), {
2845
- default: f(() => [
2846
- L(w(l.t("all")), 1)
3117
+ 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 }), {
3124
+ default: p(() => [
3125
+ z(T(i.t("all")), 1)
2847
3126
  ]),
2848
3127
  _: 1
2849
3128
  }, 16, ["onClick"])
2850
3129
  ]),
2851
- b("div", Ri, [
2852
- b("div", Ei, [
2853
- (r(!0), g(k, null, D(l.tableColumns, (C, B) => (r(), g(k, null, [
2854
- C.prop ? (r(), g("div", {
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", {
2855
3134
  style: { width: "110px", display: "inline-block" },
2856
- key: B + C.prop
3135
+ key: P + d.prop
2857
3136
  }, [
2858
- p(d, {
2859
- disabled: !C.cancellable,
3137
+ g(h, {
3138
+ disabled: !d.cancellable,
2860
3139
  class: "el-checkbox",
2861
- modelValue: C.visible,
2862
- "onUpdate:modelValue": (J) => C.visible = J,
2863
- label: C.prop,
2864
- value: C.prop
3140
+ modelValue: d.visible,
3141
+ "onUpdate:modelValue": (J) => d.visible = J,
3142
+ label: d.prop,
3143
+ value: d.prop
2865
3144
  }, {
2866
- default: f(() => [
2867
- p(c, {
3145
+ default: p(() => [
3146
+ g(c, {
2868
3147
  width: "80px",
2869
- text: s.getColumnLabel(C.prop)
3148
+ text: n.getColumnLabel(d.prop)
2870
3149
  }, null, 8, ["text"])
2871
3150
  ]),
2872
3151
  _: 2
2873
3152
  }, 1032, ["disabled", "modelValue", "onUpdate:modelValue", "label", "value"])
2874
- ])) : v("", !0)
3153
+ ])) : C("", !0)
2875
3154
  ], 64))), 256))
2876
3155
  ])
2877
3156
  ])
2878
3157
  ]),
2879
- b("div", Ii, [
2880
- b("div", Wi, [
2881
- p(h, {
2882
- size: l.getCompatSize("small"),
3158
+ v("div", Ql, [
3159
+ v("div", ql, [
3160
+ g(f, {
3161
+ size: i.getCompatSize("small"),
2883
3162
  class: "search-input",
2884
3163
  clearable: "",
2885
- placeholder: l.t("search"),
2886
- modelValue: l.keyWord,
2887
- "onUpdate:modelValue": i[0] || (i[0] = (C) => l.keyWord = C)
3164
+ placeholder: i.t("search"),
3165
+ modelValue: i.keyWord,
3166
+ "onUpdate:modelValue": l[0] || (l[0] = (d) => i.keyWord = d)
2888
3167
  }, null, 8, ["size", "placeholder", "modelValue"])
2889
3168
  ]),
2890
- s.showFixedLimitTips ? (r(), g("div", Pi)) : v("", !0),
2891
- b("div", Ni, [
2892
- (r(!0), g(k, null, D(s.filteredSortedTableColumns, (C, B) => (r(), g("div", {
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", {
2893
3172
  class: X(["sort-item-wrapper", [
2894
- C.fixed === "left" ? "frozen" : "",
2895
- C.fixed === "right" ? "frozenRight" : "",
2896
- C.fixed ? "" : "noFrozen"
3173
+ d.fixed === "left" ? "frozen" : "",
3174
+ d.fixed === "right" ? "frozenRight" : "",
3175
+ d.fixed ? "" : "noFrozen"
2897
3176
  ]]),
2898
- "data-prop": C.prop,
2899
- key: C.prop
3177
+ "data-prop": d.prop,
3178
+ key: d.prop
2900
3179
  }, [
2901
- C.visible ? (r(), g("div", Ui, [
2902
- b("div", ji, [
2903
- p(y, { style: { "flex-shrink": "0" } }),
2904
- p(c, {
2905
- text: s.getColumnLabel(C.prop)
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)
2906
3185
  }, null, 8, ["text"])
2907
3186
  ]),
2908
- b("div", Ji, [
2909
- C.cancellable ? (r(), m(O, _({
3187
+ v("div", ei, [
3188
+ d.cancellable ? (o(), m(O, _({
2910
3189
  key: 0,
2911
- content: l.t("cancel"),
3190
+ content: i.t("cancel"),
2912
3191
  placement: "top"
2913
- }, { ref_for: !0 }, l.afterOpenDelay), {
2914
- default: f(() => [
2915
- p(o, _({ ref_for: !0 }, l.buttonType, {
2916
- size: l.getCompatSize("mini"),
3192
+ }, { ref_for: !0 }, i.afterOpenDelay), {
3193
+ default: p(() => [
3194
+ g(r, _({ ref_for: !0 }, i.buttonType, {
3195
+ size: i.getCompatSize("mini"),
2917
3196
  class: "iconfont-button delete-button",
2918
- onClick: (J) => C.visible = !1
3197
+ onClick: (J) => d.visible = !1
2919
3198
  }), {
2920
- default: f(() => [
2921
- p(F)
3199
+ default: p(() => [
3200
+ g(V)
2922
3201
  ]),
2923
3202
  _: 2
2924
3203
  }, 1040, ["size", "onClick"])
2925
3204
  ]),
2926
3205
  _: 2
2927
- }, 1040, ["content"])) : v("", !0),
2928
- s.canMoveTop(C, B) ? (r(), m(O, _({
3206
+ }, 1040, ["content"])) : C("", !0),
3207
+ n.canMoveTop(d, P) ? (o(), m(O, _({
2929
3208
  key: 1,
2930
- content: l.t("top"),
3209
+ content: i.t("top"),
2931
3210
  placement: "top"
2932
- }, { ref_for: !0 }, l.afterOpenDelay), {
2933
- default: f(() => [
2934
- p(o, _({ ref_for: !0 }, l.buttonType, {
2935
- size: l.getCompatSize("mini"),
3211
+ }, { ref_for: !0 }, i.afterOpenDelay), {
3212
+ default: p(() => [
3213
+ g(r, _({ ref_for: !0 }, i.buttonType, {
3214
+ size: i.getCompatSize("mini"),
2936
3215
  class: "iconfont-button top-button",
2937
- onClick: (J) => s.moveTop(C, B)
3216
+ onClick: (J) => n.moveTop(d, P)
2938
3217
  }), {
2939
- default: f(() => [
2940
- p(j)
3218
+ default: p(() => [
3219
+ g(U)
2941
3220
  ]),
2942
3221
  _: 2
2943
3222
  }, 1040, ["size", "onClick"])
2944
3223
  ]),
2945
3224
  _: 2
2946
- }, 1040, ["content"])) : v("", !0),
2947
- C.fixed !== "right" ? (r(), m(O, _({
3225
+ }, 1040, ["content"])) : C("", !0),
3226
+ d.fixed !== "right" ? (o(), m(O, _({
2948
3227
  key: 2,
2949
- content: C.fixed === "left" ? l.t("cancelLeftFixed") : l.t("leftFixed"),
3228
+ content: d.fixed === "left" ? i.t("cancelLeftFixed") : i.t("leftFixed"),
2950
3229
  placement: "top"
2951
- }, { ref_for: !0 }, l.afterOpenDelay), {
2952
- default: f(() => [
2953
- p(o, _({ ref_for: !0 }, l.buttonType, {
2954
- size: l.getCompatSize("mini"),
2955
- class: ["iconfont-button left-fixed-btn", { "active-fixed": C.fixed === "left" }],
2956
- onClick: (J) => s.frozenLeftHandle(B),
2957
- disabled: C.fixed !== "left" && s.isThanMaxFrozen
3230
+ }, { ref_for: !0 }, i.afterOpenDelay), {
3231
+ 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" }],
3235
+ onClick: (J) => n.frozenLeftHandle(P),
3236
+ disabled: d.fixed !== "left" && n.isThanMaxFrozen
2958
3237
  }), {
2959
- default: f(() => [
2960
- p(N)
3238
+ default: p(() => [
3239
+ g(j)
2961
3240
  ]),
2962
3241
  _: 2
2963
3242
  }, 1040, ["size", "class", "onClick", "disabled"])
2964
3243
  ]),
2965
3244
  _: 2
2966
- }, 1040, ["content"])) : v("", !0),
2967
- C.fixed !== "left" ? (r(), m(O, _({
3245
+ }, 1040, ["content"])) : C("", !0),
3246
+ d.fixed !== "left" ? (o(), m(O, _({
2968
3247
  key: 3,
2969
- content: C.fixed === "right" ? l.t("cancelRightFixed") : l.t("rightFixed"),
3248
+ content: d.fixed === "right" ? i.t("cancelRightFixed") : i.t("rightFixed"),
2970
3249
  placement: "top"
2971
- }, { ref_for: !0 }, l.afterOpenDelay), {
2972
- default: f(() => [
2973
- p(o, _({ ref_for: !0 }, l.buttonType, {
2974
- size: l.getCompatSize("mini"),
2975
- class: ["iconfont-button right-fixed-btn", { "active-fixed": C.fixed === "right" }],
2976
- onClick: (J) => s.frozenRightHandle(B),
2977
- disabled: C.fixed !== "right" && s.isThanMaxRightFrozen
3250
+ }, { ref_for: !0 }, i.afterOpenDelay), {
3251
+ 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" }],
3255
+ onClick: (J) => n.frozenRightHandle(P),
3256
+ disabled: d.fixed !== "right" && n.isThanMaxRightFrozen
2978
3257
  }), {
2979
- default: f(() => [
2980
- p(a)
3258
+ default: p(() => [
3259
+ g(W)
2981
3260
  ]),
2982
3261
  _: 2
2983
3262
  }, 1040, ["size", "class", "onClick", "disabled"])
2984
3263
  ]),
2985
3264
  _: 2
2986
- }, 1040, ["content"])) : v("", !0)
3265
+ }, 1040, ["content"])) : C("", !0)
2987
3266
  ])
2988
- ])) : v("", !0)
2989
- ], 10, Bi))), 128))
3267
+ ])) : C("", !0)
3268
+ ], 10, Xl))), 128))
2990
3269
  ], 512)
2991
3270
  ])
2992
3271
  ]),
2993
- b("div", Ki, [
2994
- b("div", Qi, [
2995
- p(o, {
2996
- size: l.getCompatSize("mini"),
2997
- onClick: s.handleRestoreDefault
3272
+ v("div", ti, [
3273
+ v("div", li, [
3274
+ g(r, {
3275
+ size: i.getCompatSize("mini"),
3276
+ onClick: n.handleRestoreDefault
2998
3277
  }, {
2999
- default: f(() => [
3000
- L(w(l.t("restoreDefault")), 1)
3278
+ default: p(() => [
3279
+ z(T(i.t("restoreDefault")), 1)
3001
3280
  ]),
3002
3281
  _: 1
3003
3282
  }, 8, ["size", "onClick"])
3004
3283
  ]),
3005
- b("div", qi, [
3006
- p(o, {
3007
- size: l.getCompatSize("mini"),
3008
- onClick: i[1] || (i[1] = (C) => l.popoverVisible = !1)
3284
+ v("div", ii, [
3285
+ g(r, {
3286
+ size: i.getCompatSize("mini"),
3287
+ onClick: l[1] || (l[1] = (d) => i.popoverVisible = !1)
3009
3288
  }, {
3010
- default: f(() => [
3011
- L(w(l.t("cancel")), 1)
3289
+ default: p(() => [
3290
+ z(T(i.t("cancel")), 1)
3012
3291
  ]),
3013
3292
  _: 1
3014
3293
  }, 8, ["size"]),
3015
- p(o, {
3016
- size: l.getCompatSize("mini"),
3294
+ g(r, {
3295
+ size: i.getCompatSize("mini"),
3017
3296
  type: "primary",
3018
- onClick: s.onSave
3297
+ onClick: n.onSave
3019
3298
  }, {
3020
- default: f(() => [
3021
- L(w(l.t("saveAndApply")), 1)
3299
+ default: p(() => [
3300
+ z(T(i.t("saveAndApply")), 1)
3022
3301
  ]),
3023
3302
  _: 1
3024
3303
  }, 8, ["size", "onClick"])
3025
3304
  ])
3026
3305
  ])
3027
- ])) : v("", !0)
3306
+ ])) : C("", !0)
3028
3307
  ]),
3029
3308
  _: 1
3030
3309
  }, 16, ["placement", "onShow", "onHide"]);
3031
3310
  }
3032
- const Xi = /* @__PURE__ */ V(Oi, [["render", Gi], ["__scopeId", "data-v-127cbd33"]]), Zi = !1, $i = !0;
3033
- function le(e) {
3311
+ const si = /* @__PURE__ */ w(Nl, [["render", ai], ["__scopeId", "data-v-127cbd33"]]), ri = !1, oi = !0;
3312
+ function ne(e) {
3034
3313
  if (!Array.isArray(e))
3035
3314
  return e;
3036
- const i = [];
3315
+ const l = [];
3037
3316
  for (const t of e)
3038
3317
  if (t)
3039
3318
  if (typeof t.type == "symbol" && t.children) {
3040
- let n = t.children;
3041
- if (typeof n == "function")
3319
+ let a = t.children;
3320
+ if (typeof a == "function")
3042
3321
  continue;
3043
- if (Array.isArray(n)) {
3044
- const l = le(n);
3045
- i.push(...l);
3322
+ if (Array.isArray(a)) {
3323
+ const i = ne(a);
3324
+ l.push(...i);
3046
3325
  } else {
3047
- const l = le([n]);
3048
- i.push(...l);
3326
+ const i = ne([a]);
3327
+ l.push(...i);
3049
3328
  }
3050
3329
  } else
3051
- i.push(t);
3052
- return i;
3330
+ l.push(t);
3331
+ return l;
3053
3332
  }
3054
- const el = {
3333
+ const ui = {
3055
3334
  name: "TmTable",
3056
3335
  components: {
3057
- TableSearch: we,
3058
- TablePagination: bi,
3059
- TableMenu: xi,
3060
- ColumnConfig: Xi,
3061
- RefreshIcon: $e,
3336
+ TableSearch: ze,
3337
+ TablePagination: Vl,
3338
+ TableMenu: Al,
3339
+ ColumnConfig: si,
3340
+ RefreshIcon: it,
3062
3341
  // 用于渲染VNode的组件
3063
3342
  ColumnRenderer: {
3064
3343
  props: ["vnode"],
@@ -3158,15 +3437,20 @@ const el = {
3158
3437
  type: String,
3159
3438
  default: void 0,
3160
3439
  validator: (e) => !e || ["horizontal", "vertical"].includes(e)
3440
+ },
3441
+ labelAlign: {
3442
+ type: String,
3443
+ default: "right",
3444
+ validator: (e) => ["left", "right", "center"].includes(e)
3161
3445
  }
3162
3446
  },
3163
3447
  data() {
3164
3448
  return {
3165
- getDefaultSize: M,
3449
+ getDefaultSize: k,
3166
3450
  getCompatSize: K,
3167
- isVue3: $i,
3168
- isVue2: Zi,
3169
- t: R().t,
3451
+ isVue3: oi,
3452
+ isVue2: ri,
3453
+ t: H().t,
3170
3454
  tableData: [],
3171
3455
  tableLoading: !1,
3172
3456
  columnsLoading: !1,
@@ -3221,7 +3505,7 @@ const el = {
3221
3505
  created() {
3222
3506
  {
3223
3507
  const e = this.$slots.default();
3224
- this.originalColumns = le(e);
3508
+ this.originalColumns = ne(e);
3225
3509
  }
3226
3510
  this.columnSettingButton ? this.columnsLoading = !0 : (this.displayColumns = this.originalColumns, this.isColumnConfigLoaded = !0);
3227
3511
  },
@@ -3260,10 +3544,10 @@ const el = {
3260
3544
  current: this.paginationInfo.current
3261
3545
  },
3262
3546
  params: this.searchForm
3263
- }), { list: i, total: t, pageSize: n, current: l } = e;
3264
- this.tableData = i;
3265
- let s = T({}, this.paginationInfo);
3266
- t !== void 0 && (s.total = t), l !== void 0 && (s.current = l), n !== void 0 && (s.pageSize = n), this.paginationInfo = s;
3547
+ }), { list: l, total: t, pageSize: a, current: i } = e;
3548
+ this.tableData = l;
3549
+ 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;
3267
3551
  } catch (e) {
3268
3552
  } finally {
3269
3553
  this.tableLoading = !1;
@@ -3273,10 +3557,10 @@ const el = {
3273
3557
  // 获取表格高度
3274
3558
  getTableHeight() {
3275
3559
  this.isAutoHeight() ? this.$nextTick(() => {
3276
- const e = this.$refs.table, i = this.$refs.tmPagination;
3560
+ const e = this.$refs.table, l = this.$refs.tmPagination;
3277
3561
  if (!e) return;
3278
- const t = e.$el, n = i && i.$el && i.$el.offsetHeight || 0;
3279
- this.tableHeight = document.documentElement.clientHeight - t.offsetTop - n - this.calcHeight;
3562
+ const t = e.$el, a = l && l.$el && l.$el.offsetHeight || 0;
3563
+ this.tableHeight = document.documentElement.clientHeight - t.offsetTop - a - this.calcHeight;
3280
3564
  }) : this.tableHeight = this.height, this.refreshTable();
3281
3565
  },
3282
3566
  // 处理查询
@@ -3310,101 +3594,102 @@ const el = {
3310
3594
  this.tableReload++;
3311
3595
  }
3312
3596
  }
3313
- }, tl = {
3597
+ }, di = {
3314
3598
  class: "tm-table",
3315
3599
  ref: "tablePage"
3316
3600
  };
3317
- function il(e, i, t, n, l, s) {
3318
- const o = u("table-search"), c = u("RefreshIcon"), d = u("el-button"), h = u("el-tooltip"), y = u("ColumnConfig"), F = u("table-menu"), O = u("columnRenderer"), j = u("el-table"), N = u("table-pagination"), a = Ie("loading");
3319
- return r(), g("div", tl, [
3320
- t.searchColumns && t.searchColumns.length > 0 ? (r(), m(o, {
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, {
3321
3605
  key: 0,
3322
3606
  ref: "search",
3323
- onSearch: s.search,
3324
- onReset: s.reset,
3325
- "onUpdate:searchForm": s.handleUpdateSearchForm,
3326
- disabled: s.pageLoading,
3607
+ onSearch: n.search,
3608
+ onReset: n.reset,
3609
+ "onUpdate:searchForm": n.handleUpdateSearchForm,
3610
+ disabled: n.pageLoading,
3327
3611
  "search-columns": t.searchColumns,
3328
3612
  "search-form": t.searchForm,
3329
3613
  "label-width": t.labelWidth,
3330
3614
  "input-width": t.inputWidth,
3331
- direction: t.direction
3615
+ direction: t.direction,
3616
+ "label-align": t.labelAlign
3332
3617
  }, {
3333
- default: f(() => [
3334
- x(e.$slots, "search", {}, void 0, !0)
3618
+ default: p(() => [
3619
+ S(e.$slots, "search", {}, void 0, !0)
3335
3620
  ]),
3336
3621
  _: 3
3337
- }, 8, ["onSearch", "onReset", "onUpdate:searchForm", "disabled", "search-columns", "search-form", "label-width", "input-width", "direction"])) : v("", !0),
3338
- x(e.$slots, "between-search-menu", {}, void 0, !0),
3339
- t.showMenu ? (r(), m(F, { key: 1 }, {
3340
- left: f(() => [
3341
- x(e.$slots, "menu-left", {}, void 0, !0)
3622
+ }, 8, ["onSearch", "onReset", "onUpdate:searchForm", "disabled", "search-columns", "search-form", "label-width", "input-width", "direction", "label-align"])) : C("", !0),
3623
+ S(e.$slots, "between-search-menu", {}, void 0, !0),
3624
+ t.showMenu ? (o(), m(V, { key: 1 }, {
3625
+ left: p(() => [
3626
+ S(e.$slots, "menu-left", {}, void 0, !0)
3342
3627
  ]),
3343
- right: f(() => [
3344
- x(e.$slots, "menu-right", {}, void 0, !0),
3345
- t.refreshButton && typeof t.data == "function" ? (r(), m(h, _({
3628
+ right: p(() => [
3629
+ S(e.$slots, "menu-right", {}, void 0, !0),
3630
+ t.refreshButton && typeof t.data == "function" ? (o(), m(f, _({
3346
3631
  key: 0,
3347
- content: l.t("refresh"),
3632
+ content: i.t("refresh"),
3348
3633
  placement: "top"
3349
- }, l.afterOpenDelay), {
3350
- default: f(() => [
3351
- p(d, {
3352
- onClick: s.handleRefresh,
3634
+ }, i.afterOpenDelay), {
3635
+ default: p(() => [
3636
+ g(h, {
3637
+ onClick: n.handleRefresh,
3353
3638
  circle: "",
3354
- size: l.getDefaultSize()
3639
+ size: i.getDefaultSize()
3355
3640
  }, {
3356
- default: f(() => [
3357
- p(c)
3641
+ default: p(() => [
3642
+ g(c)
3358
3643
  ]),
3359
3644
  _: 1
3360
3645
  }, 8, ["onClick", "size"])
3361
3646
  ]),
3362
3647
  _: 1
3363
- }, 16, ["content"])) : v("", !0),
3364
- t.columnSettingButton ? (r(), m(y, {
3648
+ }, 16, ["content"])) : C("", !0),
3649
+ t.columnSettingButton ? (o(), m(y, {
3365
3650
  key: 1,
3366
3651
  maxFixedLeftQuantity: t.maxFixedLeftQuantity,
3367
3652
  maxFixedRightQuantity: t.maxFixedRightQuantity,
3368
- tableKey: s.computedTableKey,
3369
- columns: l.originalColumns,
3370
- onComplete: s.handleColumnConfigComplete
3371
- }, null, 8, ["maxFixedLeftQuantity", "maxFixedRightQuantity", "tableKey", "columns", "onComplete"])) : v("", !0)
3653
+ tableKey: n.computedTableKey,
3654
+ columns: i.originalColumns,
3655
+ onComplete: n.handleColumnConfigComplete
3656
+ }, null, 8, ["maxFixedLeftQuantity", "maxFixedRightQuantity", "tableKey", "columns", "onComplete"])) : C("", !0)
3372
3657
  ]),
3373
3658
  _: 3
3374
- })) : v("", !0),
3375
- x(e.$slots, "between-menu-table", {}, void 0, !0),
3376
- We((r(), m(j, _({ ref: "table" }, W(T({}, e.$attrs), { border: t.border }), I(l.isVue2 ? e.$listeners : {}), {
3377
- data: l.tableData,
3378
- height: l.tableHeight,
3379
- size: l.getCompatSize("mini"),
3380
- onSelectionChange: s.handleSelectionChange,
3381
- key: l.tableReload
3659
+ })) : C("", !0),
3660
+ 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"),
3665
+ onSelectionChange: n.handleSelectionChange,
3666
+ key: i.tableReload
3382
3667
  }), {
3383
- default: f(() => [
3384
- (r(!0), g(k, null, D(l.displayColumns, (H) => (r(), m(O, {
3385
- vnode: H,
3386
- key: l.isVue3 ? H.id : H.data.attrs.prop
3668
+ default: p(() => [
3669
+ (o(!0), b(L, null, A(i.displayColumns, (s) => (o(), m(O, {
3670
+ vnode: s,
3671
+ key: i.isVue3 ? s.id : s.data.attrs.prop
3387
3672
  }, null, 8, ["vnode"]))), 128))
3388
3673
  ]),
3389
3674
  _: 1
3390
3675
  }, 16, ["data", "height", "size", "onSelectionChange"])), [
3391
- [a, s.pageLoading]
3676
+ [W, n.pageLoading]
3392
3677
  ]),
3393
- x(e.$slots, "between-table-pagination", {}, void 0, !0),
3394
- s.computedShowPagination ? (r(), m(N, {
3678
+ S(e.$slots, "between-table-pagination", {}, void 0, !0),
3679
+ n.computedShowPagination ? (o(), m(j, {
3395
3680
  key: 2,
3396
3681
  ref: "tmPagination",
3397
- "page-size": l.paginationInfo.pageSize,
3398
- current: l.paginationInfo.current,
3399
- total: l.paginationInfo.total,
3400
- disabled: l.tableLoading,
3401
- onSizeChange: s.handleSizeChange,
3402
- onCurrentChange: s.handleCurrentChange
3403
- }, null, 8, ["page-size", "current", "total", "disabled", "onSizeChange", "onCurrentChange"])) : v("", !0),
3404
- x(e.$slots, "after-pagination", {}, void 0, !0)
3682
+ "page-size": i.paginationInfo.pageSize,
3683
+ current: i.paginationInfo.current,
3684
+ total: i.paginationInfo.total,
3685
+ disabled: i.tableLoading,
3686
+ onSizeChange: n.handleSizeChange,
3687
+ onCurrentChange: n.handleCurrentChange
3688
+ }, null, 8, ["page-size", "current", "total", "disabled", "onSizeChange", "onCurrentChange"])) : C("", !0),
3689
+ S(e.$slots, "after-pagination", {}, void 0, !0)
3405
3690
  ], 512);
3406
3691
  }
3407
- const Ve = /* @__PURE__ */ V(el, [["render", il], ["__scopeId", "data-v-5c3f3820"]]), ll = !1, sl = !0, nl = {
3692
+ const Le = /* @__PURE__ */ w(ui, [["render", hi], ["__scopeId", "data-v-020e8134"]]), ci = !1, fi = !0, pi = {
3408
3693
  name: "TmTableColumn",
3409
3694
  inheritAttrs: !1,
3410
3695
  computed: {
@@ -3417,8 +3702,8 @@ const Ve = /* @__PURE__ */ V(el, [["render", il], ["__scopeId", "data-v-5c3f3820
3417
3702
  },
3418
3703
  data() {
3419
3704
  return {
3420
- isVue2: ll,
3421
- isVue3: sl
3705
+ isVue2: ci,
3706
+ isVue3: fi
3422
3707
  };
3423
3708
  },
3424
3709
  created() {
@@ -3428,21 +3713,21 @@ const Ve = /* @__PURE__ */ V(el, [["render", il], ["__scopeId", "data-v-5c3f3820
3428
3713
  });
3429
3714
  }
3430
3715
  };
3431
- function al(e, i, t, n, l, s) {
3432
- const o = u("el-table-column");
3433
- return s.isVisible ? (r(), m(o, _({ key: 0 }, e.$attrs, I(l.isVue2 ? e.$listeners : {})), ge({ _: 2 }, [
3434
- D(s.slots, (c, d) => ({
3435
- name: d,
3436
- fn: f((h) => [
3437
- x(e.$slots, d, Pe(Ne(h)))
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,
3721
+ fn: p((f) => [
3722
+ S(e.$slots, h, Ue(je(f)))
3438
3723
  ])
3439
3724
  }))
3440
- ]), 1040)) : v("", !0);
3725
+ ]), 1040)) : C("", !0);
3441
3726
  }
3442
- const Fe = /* @__PURE__ */ V(nl, [["render", al]]), { t: ie } = R(), ol = {
3727
+ const ke = /* @__PURE__ */ w(pi, [["render", mi]]), { t: ie } = H(), gi = {
3443
3728
  name: "TmAdvancedEllipsisText",
3444
3729
  components: {
3445
- CopyIcon: be
3730
+ CopyIcon: ve
3446
3731
  },
3447
3732
  props: {
3448
3733
  rows: {
@@ -3569,7 +3854,7 @@ const Fe = /* @__PURE__ */ V(nl, [["render", al]]), { t: ie } = R(), ol = {
3569
3854
  e.value = this.originalText, e.style.position = "fixed", e.style.left = "-999999px", e.style.top = "-999999px", document.body.appendChild(e), e.focus(), e.select();
3570
3855
  try {
3571
3856
  document.execCommand("copy"), this.$message.success(ie("copySuccess"));
3572
- } catch (i) {
3857
+ } catch (l) {
3573
3858
  this.$message.error(ie("copyFailed"));
3574
3859
  }
3575
3860
  document.body.removeChild(e);
@@ -3577,14 +3862,14 @@ const Fe = /* @__PURE__ */ V(nl, [["render", al]]), { t: ie } = R(), ol = {
3577
3862
  getTextContent() {
3578
3863
  if (this.$slots.default) {
3579
3864
  const e = this.$slots.default;
3580
- return e().map((i) => typeof i.children == "string" ? i.children : Array.isArray(i.children) ? i.children.map((t) => t.children || "").join("") : "").join("");
3865
+ return e().map((l) => typeof l.children == "string" ? l.children : Array.isArray(l.children) ? l.children.map((t) => t.children || "").join("") : "").join("");
3581
3866
  }
3582
3867
  return this.text || "";
3583
3868
  },
3584
3869
  calculateLineHeight() {
3585
3870
  const e = this.$refs.containerRef;
3586
3871
  if (!e) return;
3587
- const i = window.getComputedStyle(e);
3872
+ const l = window.getComputedStyle(e);
3588
3873
  this.containerWidth = e.offsetWidth;
3589
3874
  const t = this.$refs.measureRef;
3590
3875
  if (t) {
@@ -3593,15 +3878,15 @@ const Fe = /* @__PURE__ */ V(nl, [["render", al]]), { t: ie } = R(), ol = {
3593
3878
  wordBreak: "break-all",
3594
3879
  whiteSpace: "normal"
3595
3880
  }), t.textContent = "测", t.offsetHeight;
3596
- const n = t.offsetHeight;
3597
- t.innerHTML = "", this.lineHeight = n;
3881
+ const a = t.offsetHeight;
3882
+ t.innerHTML = "", this.lineHeight = a;
3598
3883
  } else {
3599
- const n = i.lineHeight;
3600
- if (n && n !== "normal")
3601
- this.lineHeight = parseInt(n);
3884
+ const a = l.lineHeight;
3885
+ if (a && a !== "normal")
3886
+ this.lineHeight = parseInt(a);
3602
3887
  else {
3603
- const l = parseInt(i.fontSize);
3604
- this.lineHeight = l * 1.2;
3888
+ const i = parseInt(l.fontSize);
3889
+ this.lineHeight = i * 1.2;
3605
3890
  }
3606
3891
  }
3607
3892
  },
@@ -3623,43 +3908,43 @@ const Fe = /* @__PURE__ */ V(nl, [["render", al]]), { t: ie } = R(), ol = {
3623
3908
  if (this.rows === 1)
3624
3909
  this.frontLines = [], this.lastLineText = e, this.isLastLineEllipsis = this.checkIfTextOverflows(e);
3625
3910
  else {
3626
- const i = this.lineHeight;
3627
- if (this.getTextHeight(e) <= i)
3911
+ const l = this.lineHeight;
3912
+ if (this.getTextHeight(e) <= l)
3628
3913
  this.frontLines = [], this.lastLineText = e, this.isLastLineEllipsis = this.checkIfTextOverflows(e);
3629
3914
  else {
3630
- const n = this.lineHeight * (this.rows - 1), l = this.findTextForHeight(e, n);
3631
- this.frontLines = this.splitTextToLines(l);
3632
- const s = e.substring(l.length);
3633
- this.lastLineText = s, this.isLastLineEllipsis = s.length > 0 && this.checkIfTextOverflows(s);
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);
3918
+ this.lastLineText = n, this.isLastLineEllipsis = n.length > 0 && this.checkIfTextOverflows(n);
3634
3919
  }
3635
3920
  }
3636
3921
  this.isCalculating = !1;
3637
3922
  },
3638
- findTextForHeight(e, i) {
3639
- if (this.getTextHeight(e) <= i)
3923
+ findTextForHeight(e, l) {
3924
+ if (this.getTextHeight(e) <= l)
3640
3925
  return e;
3641
- let t = 0, n = e.length, l = "";
3642
- for (; t <= n; ) {
3643
- const s = Math.floor((t + n) / 2), o = e.substring(0, s);
3644
- this.getTextHeight(o) <= i ? (l = o, t = s + 1) : n = s - 1;
3926
+ let t = 0, a = e.length, i = "";
3927
+ 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;
3645
3930
  }
3646
- return l;
3931
+ return i;
3647
3932
  },
3648
3933
  splitTextToLines(e) {
3649
3934
  if (!e) return [];
3650
- const i = [];
3935
+ const l = [];
3651
3936
  let t = e;
3652
3937
  for (; t.length > 0; ) {
3653
- const n = this.findTextForHeight(t, this.lineHeight);
3654
- if (n.length === 0) break;
3655
- i.push(n), t = t.substring(n.length);
3938
+ const a = this.findTextForHeight(t, this.lineHeight);
3939
+ if (a.length === 0) break;
3940
+ l.push(a), t = t.substring(a.length);
3656
3941
  }
3657
- return i;
3942
+ return l;
3658
3943
  },
3659
3944
  checkIfTextOverflows(e) {
3660
3945
  if (!e) return !1;
3661
- const i = this.getTextWidth(e), t = this.shouldShowToolbar && this.hasToolbarContent ? this.getToolbarWidth() : 0, n = this.containerWidth - t - 5;
3662
- return i > n;
3946
+ const l = this.getTextWidth(e), t = this.shouldShowToolbar && this.hasToolbarContent ? this.getToolbarWidth() : 0, a = this.containerWidth - t - 5;
3947
+ return l > a;
3663
3948
  },
3664
3949
  getToolbarWidth() {
3665
3950
  let e = 0;
@@ -3675,18 +3960,18 @@ const Fe = /* @__PURE__ */ V(nl, [["render", al]]), { t: ie } = R(), ol = {
3675
3960
  getTextWidth(e) {
3676
3961
  return this.measureText(e, { whiteSpace: "nowrap" });
3677
3962
  },
3678
- measureText(e, i = {}) {
3963
+ measureText(e, l = {}) {
3679
3964
  if (!this.$refs.containerRef || !this.$refs.measureRef)
3680
3965
  return 0;
3681
- const t = this.$refs.measureRef, n = t.style.cssText;
3682
- this.setMeasureElementStyle(t, i), t.textContent = e, t.offsetHeight;
3683
- const l = i.whiteSpace === "nowrap" ? t.offsetWidth : t.offsetHeight;
3684
- return t.style.cssText = n, t.innerHTML = "", l;
3966
+ 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;
3685
3970
  },
3686
- setMeasureElementStyle(e, i = {}) {
3971
+ setMeasureElementStyle(e, l = {}) {
3687
3972
  const t = window.getComputedStyle(this.$refs.containerRef);
3688
- 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(([n, l]) => {
3689
- e.style[n] = l;
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;
3690
3975
  });
3691
3976
  },
3692
3977
  handleMouseEnter() {
@@ -3697,9 +3982,9 @@ const Fe = /* @__PURE__ */ V(nl, [["render", al]]), { t: ie } = R(), ol = {
3697
3982
  },
3698
3983
  setupResizeObserver() {
3699
3984
  typeof ResizeObserver != "undefined" && (this.resizeObserver = new ResizeObserver((e) => {
3700
- const i = e[0];
3701
- if (i) {
3702
- const t = i.contentRect.width;
3985
+ const l = e[0];
3986
+ if (l) {
3987
+ const t = l.contentRect.width;
3703
3988
  Math.abs(t - this.containerWidth) > 1 && requestAnimationFrame(() => {
3704
3989
  this.calculateLineHeight(), this.calculateLayout();
3705
3990
  });
@@ -3724,119 +4009,121 @@ const Fe = /* @__PURE__ */ V(nl, [["render", al]]), { t: ie } = R(), ol = {
3724
4009
  this.tableRowElement && (this.tableRowElement.removeEventListener("mouseenter", this.handleMouseEnter), this.tableRowElement.removeEventListener("mouseleave", this.handleMouseLeave), this.tableRowElement = null);
3725
4010
  }
3726
4011
  }
3727
- }, rl = { class: "tm-ellipsis-text-wrapper" }, ul = ["innerHTML"], dl = { class: "tm-ellipsis-last-line" }, cl = ["innerHTML"], hl = {
4012
+ }, bi = { class: "tm-ellipsis-text-wrapper" }, yi = ["innerHTML"], vi = { class: "tm-ellipsis-last-line" }, Ci = ["innerHTML"], _i = {
3728
4013
  key: 0,
3729
4014
  class: "tm-ellipsis-toolbar-part"
3730
- }, fl = {
4015
+ }, Si = {
3731
4016
  key: 1,
3732
4017
  class: "tm-ellipsis-text-wrapper"
3733
- }, pl = ["innerHTML"], ml = { class: "tm-ellipsis-last-line" }, gl = ["innerHTML"], bl = {
4018
+ }, xi = ["innerHTML"], Ti = { class: "tm-ellipsis-last-line" }, wi = ["innerHTML"], Vi = {
3734
4019
  key: 0,
3735
4020
  class: "tm-ellipsis-toolbar-part"
3736
- }, yl = {
4021
+ }, Fi = {
3737
4022
  ref: "measureRef",
3738
4023
  class: "tm-ellipsis-measure"
3739
4024
  };
3740
- function vl(e, i, t, n, l, s) {
3741
- const o = u("CopyIcon"), c = u("el-tooltip");
3742
- return r(), g("div", {
4025
+ function zi(e, l, t, a, i, n) {
4026
+ const r = u("CopyIcon"), c = u("el-tooltip");
4027
+ return o(), b("div", {
3743
4028
  ref: "containerRef",
3744
- style: U(s.containerStyle),
4029
+ style: B(n.containerStyle),
3745
4030
  class: "tm-ellipsis-text",
3746
- onMouseenter: i[0] || (i[0] = (...d) => s.handleMouseEnter && s.handleMouseEnter(...d)),
3747
- onMouseleave: i[1] || (i[1] = (...d) => s.handleMouseLeave && s.handleMouseLeave(...d))
4031
+ onMouseenter: l[0] || (l[0] = (...h) => n.handleMouseEnter && n.handleMouseEnter(...h)),
4032
+ onMouseleave: l[1] || (l[1] = (...h) => n.handleMouseLeave && n.handleMouseLeave(...h))
3748
4033
  }, [
3749
- t.showTooltip && l.isLastLineEllipsis ? (r(), m(c, _({
4034
+ t.showTooltip && i.isLastLineEllipsis ? (o(), m(c, _({
3750
4035
  key: 0,
3751
- content: l.originalText,
3752
- disabled: !t.showTooltip || !l.isLastLineEllipsis
4036
+ content: i.originalText,
4037
+ disabled: !t.showTooltip || !i.isLastLineEllipsis
3753
4038
  }, {
3754
- [l.isVue2 ? "open-delay" : "show-after"]: 300
4039
+ [i.isVue2 ? "open-delay" : "show-after"]: 300
3755
4040
  }, { placement: "top" }), {
3756
- default: f(() => [
3757
- b("div", rl, [
3758
- (r(!0), g(k, null, D(l.frontLines, (d, h) => (r(), g("div", {
3759
- key: "front-" + h,
4041
+ default: p(() => [
4042
+ v("div", bi, [
4043
+ (o(!0), b(L, null, A(i.frontLines, (h, f) => (o(), b("div", {
4044
+ key: "front-" + f,
3760
4045
  class: "tm-ellipsis-line",
3761
- innerHTML: d
3762
- }, null, 8, ul))), 128)),
3763
- b("div", dl, [
3764
- b("div", {
4046
+ innerHTML: h
4047
+ }, null, 8, yi))), 128)),
4048
+ v("div", vi, [
4049
+ v("div", {
3765
4050
  class: "tm-ellipsis-text-part",
3766
- innerHTML: l.lastLineText
3767
- }, null, 8, cl),
3768
- s.shouldShowToolbar && s.hasToolbarContent ? (r(), g("div", hl, [
3769
- t.copyable ? (r(), m(o, {
4051
+ innerHTML: i.lastLineText
4052
+ }, null, 8, Ci),
4053
+ n.shouldShowToolbar && n.hasToolbarContent ? (o(), b("div", _i, [
4054
+ t.copyable ? (o(), m(r, {
3770
4055
  key: 0,
3771
4056
  class: "icon-item",
3772
- onClick: s.handleCopy
3773
- }, null, 8, ["onClick"])) : v("", !0),
3774
- x(e.$slots, "toolbar", {}, void 0, !0)
3775
- ])) : v("", !0)
4057
+ onClick: n.handleCopy
4058
+ }, null, 8, ["onClick"])) : C("", !0),
4059
+ S(e.$slots, "toolbar", {}, void 0, !0)
4060
+ ])) : C("", !0)
3776
4061
  ])
3777
4062
  ])
3778
4063
  ]),
3779
4064
  _: 3
3780
- }, 16, ["content", "disabled"])) : (r(), g("div", fl, [
3781
- (r(!0), g(k, null, D(l.frontLines, (d, h) => (r(), g("div", {
3782
- key: "front-" + h,
4065
+ }, 16, ["content", "disabled"])) : (o(), b("div", Si, [
4066
+ (o(!0), b(L, null, A(i.frontLines, (h, f) => (o(), b("div", {
4067
+ key: "front-" + f,
3783
4068
  class: "tm-ellipsis-line",
3784
- innerHTML: d
3785
- }, null, 8, pl))), 128)),
3786
- b("div", ml, [
3787
- b("div", {
4069
+ innerHTML: h
4070
+ }, null, 8, xi))), 128)),
4071
+ v("div", Ti, [
4072
+ v("div", {
3788
4073
  class: "tm-ellipsis-text-part",
3789
- innerHTML: l.lastLineText
3790
- }, null, 8, gl),
3791
- s.shouldShowToolbar && s.hasToolbarContent ? (r(), g("div", bl, [
3792
- t.copyable ? (r(), m(o, {
4074
+ innerHTML: i.lastLineText
4075
+ }, null, 8, wi),
4076
+ n.shouldShowToolbar && n.hasToolbarContent ? (o(), b("div", Vi, [
4077
+ t.copyable ? (o(), m(r, {
3793
4078
  key: 0,
3794
4079
  class: "icon-item",
3795
- onClick: s.handleCopy
3796
- }, null, 8, ["onClick"])) : v("", !0),
3797
- x(e.$slots, "toolbar", {}, void 0, !0)
3798
- ])) : v("", !0)
4080
+ onClick: n.handleCopy
4081
+ }, null, 8, ["onClick"])) : C("", !0),
4082
+ S(e.$slots, "toolbar", {}, void 0, !0)
4083
+ ])) : C("", !0)
3799
4084
  ])
3800
4085
  ])),
3801
- b("div", yl, null, 512)
4086
+ v("div", Fi, null, 512)
3802
4087
  ], 36);
3803
4088
  }
3804
- const ze = /* @__PURE__ */ V(ol, [["render", vl], ["__scopeId", "data-v-14f27c2e"]]), Cl = {
3805
- install(e, i = {}) {
3806
- [Ve, Fe, $, ze].forEach((t) => e.component(t.name, t)), i.tableConfigProvider && Vi(i.tableConfigProvider), i.lang && se(i.lang || "zh-CN");
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");
3807
4092
  }
3808
- }, _l = {
3809
- install: Cl.install,
3810
- Table: Ve,
3811
- Column: Fe,
3812
- Search: we,
3813
- Select: ye,
3814
- AdvancedInput: ve,
3815
- AdvancedDate: Ce,
3816
- Cascader: _e,
3817
- Radio: Se,
3818
- Checkbox: xe,
3819
- Switch: Te,
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,
3820
4106
  EllipsisText: $,
3821
- AdvancedEllipsisText: ze,
3822
- setLang: se,
3823
- useLocale: R
4107
+ AdvancedEllipsisText: Oe,
4108
+ setLang: ae,
4109
+ useLocale: H
3824
4110
  };
3825
- typeof window != "undefined" && window.Vue && _l.install(window.Vue);
4111
+ typeof window != "undefined" && window.Vue && ki.install(window.Vue);
3826
4112
  export {
3827
- Ce as AdvancedDate,
3828
- ze as AdvancedEllipsisText,
3829
- ve as AdvancedInput,
3830
- _e as Cascader,
3831
- xe as Checkbox,
3832
- Fe as Column,
4113
+ Oe as AdvancedEllipsisText,
4114
+ xe as Cascader,
4115
+ we as Checkbox,
4116
+ ke as Column,
4117
+ Se as Date,
3833
4118
  $ as EllipsisText,
3834
- Se as Radio,
3835
- we as Search,
3836
- ye as Select,
3837
- Te as Switch,
3838
- Ve as Table,
3839
- _l as default,
3840
- se as setLang,
3841
- R as useLocale
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,
4127
+ ae as setLang,
4128
+ H as useLocale
3842
4129
  };