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.
- package/README.md +22 -2
- package/dist/vue2/tm-table.css +1 -1
- package/dist/vue2/tm-table.es.js +724 -505
- package/dist/vue2/tm-table.umd.js +1 -1
- package/dist/vue3/tm-table.css +1 -1
- package/dist/vue3/tm-table.es.js +1436 -1149
- package/dist/vue3/tm-table.umd.js +1 -1
- package/package.json +1 -1
package/dist/vue2/tm-table.es.js
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
1
|
+
var Z = Object.defineProperty, ee = Object.defineProperties;
|
|
2
|
+
var te = Object.getOwnPropertyDescriptors;
|
|
3
3
|
var S = Object.getOwnPropertySymbols;
|
|
4
|
-
var D = Object.prototype.hasOwnProperty,
|
|
5
|
-
var
|
|
4
|
+
var D = Object.prototype.hasOwnProperty, R = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var A = (t, e, i) => e in t ? Z(t, e, { enumerable: !0, configurable: !0, writable: !0, value: i }) : t[e] = i, u = (t, e) => {
|
|
6
6
|
for (var i in e || (e = {}))
|
|
7
|
-
D.call(e, i) &&
|
|
7
|
+
D.call(e, i) && A(t, i, e[i]);
|
|
8
8
|
if (S)
|
|
9
9
|
for (var i of S(e))
|
|
10
|
-
|
|
10
|
+
R.call(e, i) && A(t, i, e[i]);
|
|
11
11
|
return t;
|
|
12
|
-
}, m = (t, e) =>
|
|
13
|
-
var
|
|
12
|
+
}, m = (t, e) => ee(t, te(e));
|
|
13
|
+
var M = (t, e) => {
|
|
14
14
|
var i = {};
|
|
15
|
-
for (var
|
|
16
|
-
D.call(t,
|
|
15
|
+
for (var a in t)
|
|
16
|
+
D.call(t, a) && e.indexOf(a) < 0 && (i[a] = t[a]);
|
|
17
17
|
if (t != null && S)
|
|
18
|
-
for (var
|
|
19
|
-
e.indexOf(
|
|
18
|
+
for (var a of S(t))
|
|
19
|
+
e.indexOf(a) < 0 && R.call(t, a) && (i[a] = t[a]);
|
|
20
20
|
return i;
|
|
21
21
|
};
|
|
22
22
|
import "vue";
|
|
23
23
|
import y from "sortablejs";
|
|
24
|
-
const x = (t) => t, p = () => "mini",
|
|
24
|
+
const x = (t) => t, p = () => "mini", ie = {
|
|
25
25
|
today: "今天",
|
|
26
26
|
yesterday: "昨天",
|
|
27
27
|
last7days: "最近7天",
|
|
@@ -60,7 +60,7 @@ const x = (t) => t, p = () => "mini", Z = {
|
|
|
60
60
|
cancelTop: "取消置顶",
|
|
61
61
|
copySuccess: "复制成功",
|
|
62
62
|
copyFailed: "复制失败"
|
|
63
|
-
},
|
|
63
|
+
}, ae = {
|
|
64
64
|
today: "Today",
|
|
65
65
|
yesterday: "Yesterday",
|
|
66
66
|
last7days: "Last 7 days",
|
|
@@ -100,38 +100,38 @@ const x = (t) => t, p = () => "mini", Z = {
|
|
|
100
100
|
copySuccess: "Copy successfully",
|
|
101
101
|
copyFailed: "Copy failed"
|
|
102
102
|
};
|
|
103
|
-
var
|
|
104
|
-
const
|
|
105
|
-
"zh-CN":
|
|
106
|
-
"en-US":
|
|
103
|
+
var H;
|
|
104
|
+
const se = {
|
|
105
|
+
"zh-CN": ie,
|
|
106
|
+
"en-US": ae
|
|
107
107
|
};
|
|
108
|
-
let
|
|
108
|
+
let C = { value: "zh-CN" };
|
|
109
109
|
{
|
|
110
110
|
const t = require("vue");
|
|
111
|
-
t.observable || (
|
|
111
|
+
t.observable || (H = t.default) != null && H.observable ? C = t.default.observable(C) : C = new t({
|
|
112
112
|
data() {
|
|
113
|
-
return { currentLang:
|
|
113
|
+
return { currentLang: C };
|
|
114
114
|
}
|
|
115
115
|
}).$data.currentLang;
|
|
116
116
|
}
|
|
117
|
-
const
|
|
117
|
+
const le = (t) => {
|
|
118
118
|
var e;
|
|
119
|
-
return ((e =
|
|
120
|
-
},
|
|
121
|
-
|
|
119
|
+
return ((e = se[C.value]) == null ? void 0 : e[t]) || t;
|
|
120
|
+
}, O = (t) => {
|
|
121
|
+
C.value = t;
|
|
122
122
|
}, g = () => ({
|
|
123
|
-
t:
|
|
124
|
-
setLang:
|
|
125
|
-
currentLang:
|
|
123
|
+
t: le,
|
|
124
|
+
setLang: O,
|
|
125
|
+
currentLang: C
|
|
126
126
|
});
|
|
127
|
-
function d(t, e, i,
|
|
127
|
+
function d(t, e, i, a, s, l, n, o) {
|
|
128
128
|
var r = typeof t == "function" ? t.options : t;
|
|
129
129
|
return e && (r.render = e, r.staticRenderFns = i, r._compiled = !0), l && (r._scopeId = "data-v-" + l), {
|
|
130
130
|
exports: t,
|
|
131
131
|
options: r
|
|
132
132
|
};
|
|
133
133
|
}
|
|
134
|
-
const
|
|
134
|
+
const ne = {
|
|
135
135
|
name: "BaseIcon",
|
|
136
136
|
props: {
|
|
137
137
|
path: {
|
|
@@ -150,18 +150,18 @@ const se = {
|
|
|
150
150
|
}
|
|
151
151
|
}
|
|
152
152
|
};
|
|
153
|
-
var
|
|
153
|
+
var re = function() {
|
|
154
154
|
var e = this, i = e._self._c;
|
|
155
155
|
return i("i", { staticClass: "tm-icon", on: { click: e.handleClick } }, [i("svg", { style: { color: e.color }, attrs: { width: e.size, height: e.size, viewBox: "0 0 1024 1024", xmlns: "http://www.w3.org/2000/svg" } }, [i("path", { attrs: { d: e.path } })])]);
|
|
156
|
-
},
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
156
|
+
}, oe = [], ue = /* @__PURE__ */ d(
|
|
157
|
+
ne,
|
|
158
|
+
re,
|
|
159
|
+
oe,
|
|
160
160
|
!1,
|
|
161
161
|
null,
|
|
162
162
|
"1c30ca93"
|
|
163
163
|
);
|
|
164
|
-
const
|
|
164
|
+
const de = ue.exports, ce = {
|
|
165
165
|
menu: "M160 448a32 32 0 0 1-32-32V160.064a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V416a32 32 0 0 1-32 32zm448 0a32 32 0 0 1-32-32V160.064a32 32 0 0 1 32-32h255.936a32 32 0 0 1 32 32V416a32 32 0 0 1-32 32zM160 896a32 32 0 0 1-32-32V608a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32v256a32 32 0 0 1-32 32zm448 0a32 32 0 0 1-32-32V608a32 32 0 0 1 32-32h255.936a32 32 0 0 1 32 32v256a32 32 0 0 1-32 32z",
|
|
166
166
|
more: "M76.92892277 192.94787572h864.34120754c23.20379058 0 46.40758118-17.40284367 46.40758118-46.40758118s-23.20379058-46.40758118-46.40758118-46.40758116H76.92892277c-29.00473897 0-46.40758264 17.40284367-46.40758264 46.40758116s23.20379058 46.40758118 46.40758264 46.40758118zM941.27013031 465.59241882H76.92892277c-29.00473897 0-46.40758264 17.40284367-46.40758264 46.40758118s23.20379058 46.40758118 46.40758264 46.40758118h864.34120754c23.20379058 0 46.40758118-17.40284367 46.40758118-46.40758118s-23.20379058-46.40758118-46.40758118-46.40758118zM941.27013031 825.25117589H76.92892277c-29.00473897 0-46.40758264 17.40284367-46.40758264 46.40758118s23.20379058 46.40758118 46.40758264 46.40758264h864.34120754c23.20379058 0 46.40758118-17.40284367 46.40758118-46.40758264s-23.20379058-46.40758118-46.40758118-46.40758118z",
|
|
167
167
|
refresh: "M771.776 794.88A384 384 0 0 1 128 512h64a320 320 0 0 0 555.712 216.448H654.72a32 32 0 1 1 0-64h149.056a32 32 0 0 1 32 32v148.928a32 32 0 1 1-64 0v-50.56zM276.288 295.616h92.992a32 32 0 0 1 0 64H220.16a32 32 0 0 1-32-32V178.56a32 32 0 0 1 64 0v50.56A384 384 0 0 1 896.128 512h-64a320 320 0 0 0-555.776-216.384z",
|
|
@@ -173,9 +173,9 @@ const re = ne.exports, oe = {
|
|
|
173
173
|
download: "M160 832h704a32 32 0 1 1 0 64H160a32 32 0 1 1 0-64m384-253.696 236.288-236.352 45.248 45.248L508.8 704 192 387.2l45.248-45.248L480 584.704V128h64z",
|
|
174
174
|
delete: "M160 256H96a32 32 0 0 1 0-64h256V95.936a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V192h256a32 32 0 1 1 0 64h-64v672a32 32 0 0 1-32 32H192a32 32 0 0 1-32-32zm448-64v-64H416v64zM224 896h576V256H224zm192-128a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32m192 0a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32",
|
|
175
175
|
copy: "M128 320v576h576V320zm-32-64h640a32 32 0 0 1 32 32v640a32 32 0 0 1-32 32H96a32 32 0 0 1-32-32V288a32 32 0 0 1 32-32M960 96v704a32 32 0 0 1-32 32h-96v-64h64V128H384v64h-64V96a32 32 0 0 1 32-32h576a32 32 0 0 1 32 32M256 672h320v64H256zm0-192h320v64H256z"
|
|
176
|
-
}, f = Object.entries(
|
|
177
|
-
const
|
|
178
|
-
name:
|
|
176
|
+
}, f = Object.entries(ce).reduce((t, [e, i]) => {
|
|
177
|
+
const a = `${e}Icon`, s = {
|
|
178
|
+
name: a,
|
|
179
179
|
props: {
|
|
180
180
|
path: {
|
|
181
181
|
type: String,
|
|
@@ -189,7 +189,7 @@ const re = ne.exports, oe = {
|
|
|
189
189
|
}
|
|
190
190
|
},
|
|
191
191
|
render(l) {
|
|
192
|
-
return l(
|
|
192
|
+
return l(de, {
|
|
193
193
|
props: this.$props,
|
|
194
194
|
on: {
|
|
195
195
|
click: () => this.$emit("click")
|
|
@@ -197,15 +197,15 @@ const re = ne.exports, oe = {
|
|
|
197
197
|
});
|
|
198
198
|
}
|
|
199
199
|
};
|
|
200
|
-
return
|
|
201
|
-
l.component(
|
|
202
|
-
}, t[e] =
|
|
203
|
-
}, {}),
|
|
200
|
+
return s.install = (l) => {
|
|
201
|
+
l.component(a, s);
|
|
202
|
+
}, t[e] = s, t;
|
|
203
|
+
}, {}), he = f.menu, pe = f.refresh, fe = f.move;
|
|
204
204
|
f["column-setting"];
|
|
205
|
-
const
|
|
205
|
+
const me = f.more, ge = f["fixed-left"], be = f["fixed-right"], ye = f.upload, ve = f.download, Ce = f.delete, E = f.copy, { t: V } = g(), _e = !0, xe = !1, Se = {
|
|
206
206
|
name: "TmEllipsisText",
|
|
207
207
|
components: {
|
|
208
|
-
CopyIcon:
|
|
208
|
+
CopyIcon: E
|
|
209
209
|
},
|
|
210
210
|
props: {
|
|
211
211
|
text: {
|
|
@@ -234,12 +234,16 @@ const he = f.more, pe = f["fixed-left"], fe = f["fixed-right"], me = f.upload, g
|
|
|
234
234
|
copyable: {
|
|
235
235
|
type: Boolean,
|
|
236
236
|
default: !1
|
|
237
|
+
},
|
|
238
|
+
textAlign: {
|
|
239
|
+
type: String,
|
|
240
|
+
default: "left"
|
|
237
241
|
}
|
|
238
242
|
},
|
|
239
243
|
data() {
|
|
240
244
|
return {
|
|
241
|
-
isVue2:
|
|
242
|
-
isVue3:
|
|
245
|
+
isVue2: _e,
|
|
246
|
+
isVue3: xe,
|
|
243
247
|
isOverflow: !1,
|
|
244
248
|
currentLines: 1,
|
|
245
249
|
resizeObserver: null
|
|
@@ -258,7 +262,8 @@ const he = f.more, pe = f["fixed-left"], fe = f["fixed-right"], me = f.upload, g
|
|
|
258
262
|
display: "-webkit-inline-box",
|
|
259
263
|
overflow: "hidden",
|
|
260
264
|
WebkitBoxOrient: "vertical",
|
|
261
|
-
WebkitLineClamp: this.lines
|
|
265
|
+
WebkitLineClamp: this.lines,
|
|
266
|
+
textAlign: this.textAlign
|
|
262
267
|
};
|
|
263
268
|
}
|
|
264
269
|
},
|
|
@@ -295,7 +300,7 @@ const he = f.more, pe = f["fixed-left"], fe = f["fixed-right"], me = f.upload, g
|
|
|
295
300
|
});
|
|
296
301
|
return;
|
|
297
302
|
}
|
|
298
|
-
const i = t.scrollHeight,
|
|
303
|
+
const i = t.scrollHeight, a = t.scrollWidth, s = t.clientHeight, l = t.clientWidth, n = 1, o = i > s + n, r = a > l + n;
|
|
299
304
|
if (o || r) {
|
|
300
305
|
this.isOverflow = !0;
|
|
301
306
|
const b = parseFloat(e.lineHeight) || 16;
|
|
@@ -303,8 +308,8 @@ const he = f.more, pe = f["fixed-left"], fe = f["fixed-right"], me = f.upload, g
|
|
|
303
308
|
} else {
|
|
304
309
|
const b = t.getBoundingClientRect(), _ = (c = t.parentElement) == null ? void 0 : c.getBoundingClientRect();
|
|
305
310
|
if (_) {
|
|
306
|
-
const
|
|
307
|
-
this.isOverflow =
|
|
311
|
+
const X = b.height > _.height || b.width > _.width;
|
|
312
|
+
this.isOverflow = X;
|
|
308
313
|
} else
|
|
309
314
|
this.isOverflow = !1;
|
|
310
315
|
this.currentLines = 1;
|
|
@@ -337,7 +342,7 @@ const he = f.more, pe = f["fixed-left"], fe = f["fixed-right"], me = f.upload, g
|
|
|
337
342
|
},
|
|
338
343
|
handleCopy() {
|
|
339
344
|
navigator.clipboard && window.isSecureContext ? navigator.clipboard.writeText(this.text).then(() => {
|
|
340
|
-
this.$message.success(
|
|
345
|
+
this.$message.success(V("copySuccess"));
|
|
341
346
|
}).catch(() => {
|
|
342
347
|
this.fallbackCopy();
|
|
343
348
|
}) : this.fallbackCopy();
|
|
@@ -346,28 +351,28 @@ const he = f.more, pe = f["fixed-left"], fe = f["fixed-right"], me = f.upload, g
|
|
|
346
351
|
const t = document.createElement("textarea");
|
|
347
352
|
t.value = this.text, t.style.position = "fixed", t.style.left = "-999999px", t.style.top = "-999999px", document.body.appendChild(t), t.focus(), t.select();
|
|
348
353
|
try {
|
|
349
|
-
document.execCommand("copy"), this.$message.success(
|
|
354
|
+
document.execCommand("copy"), this.$message.success(V("copySuccess"));
|
|
350
355
|
} catch (e) {
|
|
351
|
-
this.$message.error(
|
|
356
|
+
this.$message.error(V("copyFailed"));
|
|
352
357
|
}
|
|
353
358
|
document.body.removeChild(t);
|
|
354
359
|
}
|
|
355
360
|
}
|
|
356
361
|
};
|
|
357
|
-
var
|
|
362
|
+
var $e = function() {
|
|
358
363
|
var e = this, i = e._self._c;
|
|
359
364
|
return i("el-tooltip", e._b({ attrs: { disabled: e.tooltipDisabled, content: e.text, effect: "dark", placement: "top" } }, "el-tooltip", {
|
|
360
365
|
[e.isVue2 ? "open-delay" : "show-after"]: 300
|
|
361
366
|
}, !1), [i("div", { staticClass: "ellipsis-text-container" }, [i("div", { ref: "textEl", staticClass: "ellipsis-text", style: e.textStyle }, [e._v(" " + e._s(e.text) + " ")]), i("div", { staticClass: "toolbar", class: { multiline: e.currentLines > 1 && e.lines > 1 } }, [e.copyable ? i("CopyIcon", { staticClass: "icon-item", on: { click: e.handleCopy } }) : e._e()], 1)])]);
|
|
362
|
-
},
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
367
|
+
}, Te = [], we = /* @__PURE__ */ d(
|
|
368
|
+
Se,
|
|
369
|
+
$e,
|
|
370
|
+
Te,
|
|
366
371
|
!1,
|
|
367
372
|
null,
|
|
368
|
-
"
|
|
373
|
+
"70ba8157"
|
|
369
374
|
);
|
|
370
|
-
const F =
|
|
375
|
+
const F = we.exports, Fe = {
|
|
371
376
|
name: "RenderVue2",
|
|
372
377
|
inheritAttrs: !1,
|
|
373
378
|
props: {
|
|
@@ -387,10 +392,10 @@ const F = Se.exports, $e = {
|
|
|
387
392
|
const e = m(u({}, this.data || {}), {
|
|
388
393
|
$attrs: this.$attrs,
|
|
389
394
|
$listeners: this.$listeners
|
|
390
|
-
}), i = this.renderFn.toString(),
|
|
395
|
+
}), i = this.renderFn.toString(), a = /\(\s*h\s*[,)]/.test(i) || this.renderFn.length >= 1;
|
|
391
396
|
process.env.NODE_ENV;
|
|
392
|
-
let
|
|
393
|
-
return
|
|
397
|
+
let s;
|
|
398
|
+
return a ? s = this.renderFn(t, e) : s = this.renderFn(m(u({}, e), { h: t })), s;
|
|
394
399
|
} catch (e) {
|
|
395
400
|
return console.error("[RenderComponent] Error in render function:", e), process.env.NODE_ENV === "development" ? t("div", {
|
|
396
401
|
style: {
|
|
@@ -403,20 +408,20 @@ const F = Se.exports, $e = {
|
|
|
403
408
|
}, `RenderComponent Error: ${e.message}`) : null;
|
|
404
409
|
}
|
|
405
410
|
}
|
|
406
|
-
},
|
|
407
|
-
var
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
+
}, Ve = null, ze = null;
|
|
412
|
+
var Le = /* @__PURE__ */ d(
|
|
413
|
+
Fe,
|
|
414
|
+
Ve,
|
|
415
|
+
ze,
|
|
411
416
|
!1,
|
|
412
417
|
null,
|
|
413
418
|
null
|
|
414
419
|
);
|
|
415
|
-
const
|
|
420
|
+
const ke = Le.exports, Oe = !0, Ae = !1, De = {
|
|
416
421
|
name: "FormItemLayout",
|
|
417
422
|
components: {
|
|
418
423
|
EllipsisText: F,
|
|
419
|
-
RenderComponent:
|
|
424
|
+
RenderComponent: ke
|
|
420
425
|
},
|
|
421
426
|
props: {
|
|
422
427
|
// 布局方向
|
|
@@ -447,13 +452,18 @@ const ze = Fe.exports, Le = !0, Ve = !1, ke = {
|
|
|
447
452
|
field: {
|
|
448
453
|
type: [String, Number],
|
|
449
454
|
default: ""
|
|
455
|
+
},
|
|
456
|
+
labelAlign: {
|
|
457
|
+
type: String,
|
|
458
|
+
default: "right",
|
|
459
|
+
validator: (t) => ["left", "right", "center"].includes(t)
|
|
450
460
|
}
|
|
451
461
|
},
|
|
452
462
|
data() {
|
|
453
463
|
return {
|
|
454
464
|
t: g().t,
|
|
455
|
-
isVue2:
|
|
456
|
-
isVue3:
|
|
465
|
+
isVue2: Oe,
|
|
466
|
+
isVue3: Ae,
|
|
457
467
|
getDefaultSize: p
|
|
458
468
|
};
|
|
459
469
|
},
|
|
@@ -514,28 +524,28 @@ const ze = Fe.exports, Le = !0, Ve = !1, ke = {
|
|
|
514
524
|
}
|
|
515
525
|
}
|
|
516
526
|
};
|
|
517
|
-
var
|
|
527
|
+
var Re = function() {
|
|
518
528
|
var e = this, i = e._self._c;
|
|
519
529
|
return i("div", { staticClass: "form-item-layout", class: {
|
|
520
530
|
"form-item-layout--horizontal": e.direction === "horizontal",
|
|
521
531
|
"form-item-layout--vertical": e.direction === "vertical"
|
|
522
|
-
}, style: e.containerStyle }, [e.hasLabel ? i("div", { staticClass: "form-item-label", style: e.labelStyle }, [e.labelOptions && e.labelOptions.length ? i("el-select", { staticClass: "label-select", attrs: { placeholder: e.t("selectPlaceholder"), size: e.getDefaultSize() }, on: { change: e.handleFieldChange }, model: { value: e.fieldValue, callback: function(
|
|
523
|
-
e.fieldValue =
|
|
524
|
-
}, expression: "fieldValue" } }, e._l(e.labelOptions, function(
|
|
525
|
-
return i("el-option", { key:
|
|
526
|
-
}), 1) : e.label ? [typeof e.label == "string" ? i("div", { staticClass: "label-text" }, [i("EllipsisText", { attrs: { text: e.label, lines: 2 } })], 1) : typeof e.label == "function" ? i("div", { staticClass: "label-render" }, [i("RenderComponent", { attrs: { "render-fn": e.label } })], 1) : e._e()] : e._e()], 2) : e._e(), i("div", { staticClass: "form-item-input", style: e.inputStyle }, [e._t("default")], 2)]);
|
|
527
|
-
},
|
|
528
|
-
ke,
|
|
529
|
-
Oe,
|
|
532
|
+
}, style: e.containerStyle }, [e.hasLabel ? i("div", { staticClass: "form-item-label", style: e.labelStyle }, [e.labelOptions && e.labelOptions.length ? i("el-select", { staticClass: "label-select", attrs: { placeholder: e.t("selectPlaceholder"), size: e.getDefaultSize() }, on: { change: e.handleFieldChange }, model: { value: e.fieldValue, callback: function(a) {
|
|
533
|
+
e.fieldValue = a;
|
|
534
|
+
}, expression: "fieldValue" } }, e._l(e.labelOptions, function(a) {
|
|
535
|
+
return i("el-option", { key: a.value, attrs: { label: a.label, value: a.value } });
|
|
536
|
+
}), 1) : e.label ? [typeof e.label == "string" ? i("div", { staticClass: "label-text" }, [i("EllipsisText", { attrs: { text: e.label, lines: 2, width: e.labelWidth - 4, "text-align": e.labelAlign } })], 1) : typeof e.label == "function" ? i("div", { staticClass: "label-render" }, [i("RenderComponent", { attrs: { "render-fn": e.label } })], 1) : e._e()] : e._e()], 2) : e._e(), i("div", { staticClass: "form-item-input", style: e.inputStyle }, [e._t("default")], 2)]);
|
|
537
|
+
}, Me = [], He = /* @__PURE__ */ d(
|
|
530
538
|
De,
|
|
539
|
+
Re,
|
|
540
|
+
Me,
|
|
531
541
|
!1,
|
|
532
542
|
null,
|
|
533
|
-
"
|
|
543
|
+
"57a7088a"
|
|
534
544
|
);
|
|
535
|
-
const
|
|
545
|
+
const v = He.exports, We = !0, Ee = !1, $ = "value", Ie = "input", Ne = {
|
|
536
546
|
name: "TmSelectFilter",
|
|
537
547
|
components: {
|
|
538
|
-
FormItemLayout:
|
|
548
|
+
FormItemLayout: v
|
|
539
549
|
},
|
|
540
550
|
props: {
|
|
541
551
|
[$]: {
|
|
@@ -606,13 +616,18 @@ const C = Ae.exports, Re = !0, Me = !1, $ = "value", He = "input", Ee = {
|
|
|
606
616
|
type: String,
|
|
607
617
|
default: void 0,
|
|
608
618
|
validator: (t) => !t || ["horizontal", "vertical"].includes(t)
|
|
619
|
+
},
|
|
620
|
+
labelAlign: {
|
|
621
|
+
type: String,
|
|
622
|
+
default: "right",
|
|
623
|
+
validator: (t) => ["left", "right", "center"].includes(t)
|
|
609
624
|
}
|
|
610
625
|
},
|
|
611
626
|
data() {
|
|
612
627
|
return {
|
|
613
628
|
t: g().t,
|
|
614
|
-
isVue2:
|
|
615
|
-
isVue3:
|
|
629
|
+
isVue2: We,
|
|
630
|
+
isVue3: Ee,
|
|
616
631
|
getDefaultSize: p,
|
|
617
632
|
optionsList: [],
|
|
618
633
|
loading: !1,
|
|
@@ -631,7 +646,7 @@ const C = Ae.exports, Re = !0, Me = !1, $ = "value", He = "input", Ee = {
|
|
|
631
646
|
const i = this[$];
|
|
632
647
|
Array.isArray(i) && i.length > 0 && (e = typeof this.valueOnClear == "function" ? this.valueOnClear() : this.valueOnClear);
|
|
633
648
|
}
|
|
634
|
-
this.$emit(
|
|
649
|
+
this.$emit(Ie, e), this.$emit("change", e);
|
|
635
650
|
}
|
|
636
651
|
},
|
|
637
652
|
propMap() {
|
|
@@ -682,14 +697,14 @@ const C = Ae.exports, Re = !0, Me = !1, $ = "value", He = "input", Ee = {
|
|
|
682
697
|
}
|
|
683
698
|
}
|
|
684
699
|
};
|
|
685
|
-
var
|
|
700
|
+
var Pe = function() {
|
|
686
701
|
var e = this, i = e._self._c;
|
|
687
|
-
return i("FormItemLayout", { attrs: { label: e.label, "label-options": e.labelOptions, field: e.field, "label-width": e.labelWidth, "input-width": e.inputWidth, direction: e.direction }, on: { "field-change": e.handleFieldChange } }, [i("el-select", e._g(e._b({ ref: "select", staticClass: "select", attrs: { loading: e.loading }, on: { clear: e.handleClear }, scopedSlots: e._u([{ key: "header", fn: function() {
|
|
688
|
-
return [e.isVue3 && e.multiple && e.showCheckAll ? i("el-checkbox", { staticStyle: { width: "100%", height: "20px", "padding-left": "10px" }, attrs: { indeterminate: e.indeterminate, size: e.getDefaultSize() }, on: { change: e.handleCheckAll }, model: { value: e.checkAll, callback: function(
|
|
689
|
-
e.checkAll =
|
|
702
|
+
return i("FormItemLayout", { attrs: { label: e.label, "label-options": e.labelOptions, field: e.field, "label-width": e.labelWidth, "input-width": e.inputWidth, direction: e.direction, "label-align": e.labelAlign }, on: { "field-change": e.handleFieldChange } }, [i("el-select", e._g(e._b({ ref: "select", staticClass: "select", attrs: { loading: e.loading }, on: { clear: e.handleClear }, scopedSlots: e._u([{ key: "header", fn: function() {
|
|
703
|
+
return [e.isVue3 && e.multiple && e.showCheckAll ? i("el-checkbox", { staticStyle: { width: "100%", height: "20px", "padding-left": "10px" }, attrs: { indeterminate: e.indeterminate, size: e.getDefaultSize() }, on: { change: e.handleCheckAll }, model: { value: e.checkAll, callback: function(a) {
|
|
704
|
+
e.checkAll = a;
|
|
690
705
|
}, expression: "checkAll" } }, [e._v(e._s(e.t("all")))]) : e._e()];
|
|
691
|
-
}, proxy: !0 }]), model: { value: e.computedValue, callback: function(
|
|
692
|
-
e.computedValue =
|
|
706
|
+
}, proxy: !0 }]), model: { value: e.computedValue, callback: function(a) {
|
|
707
|
+
e.computedValue = a;
|
|
693
708
|
}, expression: "computedValue" } }, "el-select", m(u({}, e.$attrs), {
|
|
694
709
|
size: e.getDefaultSize(),
|
|
695
710
|
filterable: e.filterable,
|
|
@@ -698,26 +713,26 @@ var We = function() {
|
|
|
698
713
|
multiple: e.multiple,
|
|
699
714
|
placeholder: e.placeholder,
|
|
700
715
|
loading: e.loading
|
|
701
|
-
}), !1), e.isVue2 ? e.$listeners : {}), [e.isVue2 && e.multiple && e.showCheckAll ? i("div", { staticClass: "check-all-option" }, [i("el-checkbox", { staticStyle: { width: "100%" }, attrs: { indeterminate: e.indeterminate, size: e.getDefaultSize() }, on: { change: e.handleCheckAll }, model: { value: e.checkAll, callback: function(
|
|
702
|
-
e.checkAll =
|
|
703
|
-
}, expression: "checkAll" } }, [e._v(e._s(e.t("all")))])], 1) : e._e(), e._l(e.optionsList, function(
|
|
704
|
-
return i("el-option", { key:
|
|
705
|
-
return [e._v(e._s(
|
|
706
|
-
}, { item:
|
|
716
|
+
}), !1), e.isVue2 ? e.$listeners : {}), [e.isVue2 && e.multiple && e.showCheckAll ? i("div", { staticClass: "check-all-option" }, [i("el-checkbox", { staticStyle: { width: "100%" }, attrs: { indeterminate: e.indeterminate, size: e.getDefaultSize() }, on: { change: e.handleCheckAll }, model: { value: e.checkAll, callback: function(a) {
|
|
717
|
+
e.checkAll = a;
|
|
718
|
+
}, expression: "checkAll" } }, [e._v(e._s(e.t("all")))])], 1) : e._e(), e._l(e.optionsList, function(a) {
|
|
719
|
+
return i("el-option", { key: a[e.propMap.value], attrs: { label: a[e.propMap.label], value: a[e.propMap.value], disabled: a.disabled } }, [e._t("option", function() {
|
|
720
|
+
return [e._v(e._s(a[e.propMap.label]))];
|
|
721
|
+
}, { item: a })], 2);
|
|
707
722
|
})], 2)], 1);
|
|
708
|
-
},
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
723
|
+
}, Be = [], je = /* @__PURE__ */ d(
|
|
724
|
+
Ne,
|
|
725
|
+
Pe,
|
|
726
|
+
Be,
|
|
712
727
|
!1,
|
|
713
728
|
null,
|
|
714
|
-
"
|
|
729
|
+
"ef8f7987"
|
|
715
730
|
);
|
|
716
|
-
const
|
|
717
|
-
name: "
|
|
731
|
+
const I = je.exports, Ue = {
|
|
732
|
+
name: "TmInputFilter",
|
|
718
733
|
components: {
|
|
719
|
-
MoreIcon:
|
|
720
|
-
FormItemLayout:
|
|
734
|
+
MoreIcon: me,
|
|
735
|
+
FormItemLayout: v
|
|
721
736
|
},
|
|
722
737
|
props: {
|
|
723
738
|
label: {
|
|
@@ -757,6 +772,11 @@ const E = Ne.exports, Pe = {
|
|
|
757
772
|
type: String,
|
|
758
773
|
default: void 0,
|
|
759
774
|
validator: (t) => !t || ["horizontal", "vertical"].includes(t)
|
|
775
|
+
},
|
|
776
|
+
labelAlign: {
|
|
777
|
+
type: String,
|
|
778
|
+
default: "right",
|
|
779
|
+
validator: (t) => ["left", "right", "center"].includes(t)
|
|
760
780
|
}
|
|
761
781
|
},
|
|
762
782
|
data() {
|
|
@@ -826,27 +846,27 @@ const E = Ne.exports, Pe = {
|
|
|
826
846
|
this.updateCurrentOptionMultiple();
|
|
827
847
|
}
|
|
828
848
|
};
|
|
829
|
-
var
|
|
849
|
+
var Je = function() {
|
|
830
850
|
var e = this, i = e._self._c;
|
|
831
|
-
return i("FormItemLayout", { attrs: { label: e.label, "label-options": e.labelOptions, field: e.field, "label-width": e.labelWidth, "input-width": e.inputWidth, direction: e.direction }, on: { "field-change": e.handlefieldChange } }, [i("el-input", { staticClass: "
|
|
832
|
-
return !
|
|
833
|
-
} }, model: { value: e.inputValue, callback: function(
|
|
834
|
-
e.inputValue =
|
|
835
|
-
}, expression: "inputValue" } }, [e.shouldShowMultiple ? i("el-popover", { attrs: { slot: "append", value: e.isExactMode, placement: "bottom-end", width: 260, trigger: "click" }, on: { input: e.handleVisibleChange }, slot: "append" }, [i("div", { staticClass: "popover-content" }, [i("p", { staticClass: "popover-subtitle" }, [e._v(e._s(e.t("accurateSearchTips")))]), i("el-input", { staticStyle: { "font-size": "12px" }, attrs: { size: e.getDefaultSize(), type: "textarea", rows: 8, placeholder: e.t("accurateSearchPlaceholder") }, model: { value: e.exactValue, callback: function(
|
|
836
|
-
e.exactValue =
|
|
851
|
+
return i("FormItemLayout", { attrs: { label: e.label, "label-options": e.labelOptions, field: e.field, "label-width": e.labelWidth, "input-width": e.inputWidth, direction: e.direction, "label-align": e.labelAlign }, on: { "field-change": e.handlefieldChange } }, [i("el-input", { staticClass: "tm-input", attrs: { size: e.getDefaultSize(), placeholder: e.placeholder, clearable: "" }, nativeOn: { keyup: function(a) {
|
|
852
|
+
return !a.type.indexOf("key") && e._k(a.keyCode, "enter", 13, a.key, "Enter") ? null : e.handleEnter.apply(null, arguments);
|
|
853
|
+
} }, model: { value: e.inputValue, callback: function(a) {
|
|
854
|
+
e.inputValue = a;
|
|
855
|
+
}, expression: "inputValue" } }, [e.shouldShowMultiple ? i("el-popover", { attrs: { slot: "append", value: e.isExactMode, placement: "bottom-end", width: 260, trigger: "click" }, on: { input: e.handleVisibleChange }, slot: "append" }, [i("div", { staticClass: "popover-content" }, [i("p", { staticClass: "popover-subtitle" }, [e._v(e._s(e.t("accurateSearchTips")))]), i("el-input", { staticStyle: { "font-size": "12px" }, attrs: { size: e.getDefaultSize(), type: "textarea", rows: 8, placeholder: e.t("accurateSearchPlaceholder") }, model: { value: e.exactValue, callback: function(a) {
|
|
856
|
+
e.exactValue = a;
|
|
837
857
|
}, expression: "exactValue" } }), i("div", { staticClass: "popover-footer" }, [i("el-button", { staticStyle: { float: "left" }, attrs: { size: e.getCompatSize("mini") }, on: { click: e.handleClear } }, [e._v(e._s(e.t("clear")))]), i("el-button", { attrs: { size: e.getCompatSize("mini") }, on: { click: e.handlePopoverClose } }, [e._v(e._s(e.t("cancel")))]), i("el-button", { attrs: { type: "primary", size: e.getCompatSize("mini") }, on: { click: e.handleExactSearch } }, [e._v(e._s(e.t("search")))])], 1)], 1), i("template", { slot: "reference" }, [i("MoreIcon", { staticStyle: { cursor: "pointer" } })], 1)], 2) : e._e()], 1)], 1);
|
|
838
|
-
},
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
858
|
+
}, Ke = [], qe = /* @__PURE__ */ d(
|
|
859
|
+
Ue,
|
|
860
|
+
Je,
|
|
861
|
+
Ke,
|
|
842
862
|
!1,
|
|
843
863
|
null,
|
|
844
|
-
"
|
|
864
|
+
"28e573ff"
|
|
845
865
|
);
|
|
846
|
-
const
|
|
847
|
-
name: "
|
|
866
|
+
const N = qe.exports, { t: h } = g(), Qe = !0, Ge = !1, Ye = "value", Xe = {
|
|
867
|
+
name: "TmDateFilter",
|
|
848
868
|
components: {
|
|
849
|
-
FormItemLayout:
|
|
869
|
+
FormItemLayout: v
|
|
850
870
|
},
|
|
851
871
|
props: {
|
|
852
872
|
value: {
|
|
@@ -967,6 +987,11 @@ const W = Ue.exports, { t: h } = g(), Je = !0, Ke = !1, qe = "value", Qe = {
|
|
|
967
987
|
type: String,
|
|
968
988
|
default: void 0,
|
|
969
989
|
validator: (t) => !t || ["horizontal", "vertical"].includes(t)
|
|
990
|
+
},
|
|
991
|
+
labelAlign: {
|
|
992
|
+
type: String,
|
|
993
|
+
default: "right",
|
|
994
|
+
validator: (t) => ["left", "right", "center"].includes(t)
|
|
970
995
|
}
|
|
971
996
|
},
|
|
972
997
|
computed: {
|
|
@@ -996,43 +1021,43 @@ const W = Ue.exports, { t: h } = g(), Je = !0, Ke = !1, qe = "value", Qe = {
|
|
|
996
1021
|
{
|
|
997
1022
|
text: h("today"),
|
|
998
1023
|
onClick(i) {
|
|
999
|
-
const
|
|
1000
|
-
e && (
|
|
1024
|
+
const a = /* @__PURE__ */ new Date(), s = /* @__PURE__ */ new Date();
|
|
1025
|
+
e && (s.setHours(0, 0, 0, 0), a.setHours(23, 59, 59, 999)), i.$emit("pick", [s, a]);
|
|
1001
1026
|
}
|
|
1002
1027
|
},
|
|
1003
1028
|
{
|
|
1004
1029
|
text: h("yesterday"),
|
|
1005
1030
|
onClick(i) {
|
|
1006
|
-
const
|
|
1007
|
-
|
|
1031
|
+
const a = /* @__PURE__ */ new Date(), s = /* @__PURE__ */ new Date();
|
|
1032
|
+
s.setTime(s.getTime() - 3600 * 1e3 * 24), a.setTime(a.getTime() - 3600 * 1e3 * 24), e && (s.setHours(0, 0, 0, 0), a.setHours(23, 59, 59, 999)), i.$emit("pick", [s, a]);
|
|
1008
1033
|
}
|
|
1009
1034
|
},
|
|
1010
1035
|
{
|
|
1011
1036
|
text: h("last7days"),
|
|
1012
1037
|
onClick(i) {
|
|
1013
|
-
const
|
|
1014
|
-
|
|
1038
|
+
const a = /* @__PURE__ */ new Date(), s = /* @__PURE__ */ new Date();
|
|
1039
|
+
s.setTime(s.getTime() - 3600 * 1e3 * 24 * 7), e && (s.setHours(0, 0, 0, 0), a.setHours(23, 59, 59, 999)), i.$emit("pick", [s, a]);
|
|
1015
1040
|
}
|
|
1016
1041
|
},
|
|
1017
1042
|
{
|
|
1018
1043
|
text: h("last30days"),
|
|
1019
1044
|
onClick(i) {
|
|
1020
|
-
const
|
|
1021
|
-
|
|
1045
|
+
const a = /* @__PURE__ */ new Date(), s = /* @__PURE__ */ new Date();
|
|
1046
|
+
s.setTime(s.getTime() - 3600 * 1e3 * 24 * 30), e && (s.setHours(0, 0, 0, 0), a.setHours(23, 59, 59, 999)), i.$emit("pick", [s, a]);
|
|
1022
1047
|
}
|
|
1023
1048
|
},
|
|
1024
1049
|
{
|
|
1025
1050
|
text: h("thisMonth"),
|
|
1026
1051
|
onClick(i) {
|
|
1027
|
-
const
|
|
1028
|
-
|
|
1052
|
+
const a = /* @__PURE__ */ new Date(), s = /* @__PURE__ */ new Date();
|
|
1053
|
+
s.setDate(1), e && (s.setHours(0, 0, 0, 0), a.setHours(23, 59, 59, 999)), i.$emit("pick", [s, a]);
|
|
1029
1054
|
}
|
|
1030
1055
|
},
|
|
1031
1056
|
{
|
|
1032
1057
|
text: h("lastMonth"),
|
|
1033
1058
|
onClick(i) {
|
|
1034
|
-
const
|
|
1035
|
-
|
|
1059
|
+
const a = /* @__PURE__ */ new Date(), s = /* @__PURE__ */ new Date();
|
|
1060
|
+
s.setMonth(s.getMonth() - 1), s.setDate(1), a.setDate(0), e && (s.setHours(0, 0, 0, 0), a.setHours(23, 59, 59, 999)), i.$emit("pick", [s, a]);
|
|
1036
1061
|
}
|
|
1037
1062
|
}
|
|
1038
1063
|
];
|
|
@@ -1103,27 +1128,27 @@ const W = Ue.exports, { t: h } = g(), Je = !0, Ke = !1, qe = "value", Qe = {
|
|
|
1103
1128
|
if (this.type === "datetimerange" && Array.isArray(t))
|
|
1104
1129
|
return t.map((e) => {
|
|
1105
1130
|
if (typeof e == "string") {
|
|
1106
|
-
const i = /* @__PURE__ */ new Date(), [
|
|
1131
|
+
const i = /* @__PURE__ */ new Date(), [a, s, l] = e.split(":").map(Number);
|
|
1107
1132
|
return new Date(
|
|
1108
1133
|
i.getFullYear(),
|
|
1109
1134
|
i.getMonth(),
|
|
1110
1135
|
i.getDate(),
|
|
1111
|
-
s,
|
|
1112
1136
|
a,
|
|
1137
|
+
s,
|
|
1113
1138
|
l || 0
|
|
1114
1139
|
);
|
|
1115
1140
|
}
|
|
1116
1141
|
return e;
|
|
1117
1142
|
});
|
|
1118
1143
|
if (this.type === "datetime" && typeof t == "string") {
|
|
1119
|
-
const e = /* @__PURE__ */ new Date(), [i,
|
|
1144
|
+
const e = /* @__PURE__ */ new Date(), [i, a, s] = t.split(":").map(Number);
|
|
1120
1145
|
return new Date(
|
|
1121
1146
|
e.getFullYear(),
|
|
1122
1147
|
e.getMonth(),
|
|
1123
1148
|
e.getDate(),
|
|
1124
1149
|
i,
|
|
1125
|
-
|
|
1126
|
-
|
|
1150
|
+
a,
|
|
1151
|
+
s || 0
|
|
1127
1152
|
);
|
|
1128
1153
|
}
|
|
1129
1154
|
return t;
|
|
@@ -1136,10 +1161,10 @@ const W = Ue.exports, { t: h } = g(), Je = !0, Ke = !1, qe = "value", Qe = {
|
|
|
1136
1161
|
data() {
|
|
1137
1162
|
return {
|
|
1138
1163
|
t: h,
|
|
1139
|
-
isVue2:
|
|
1140
|
-
isVue3:
|
|
1164
|
+
isVue2: Qe,
|
|
1165
|
+
isVue3: Ge,
|
|
1141
1166
|
getDefaultSize: p,
|
|
1142
|
-
valueField:
|
|
1167
|
+
valueField: Ye
|
|
1143
1168
|
};
|
|
1144
1169
|
},
|
|
1145
1170
|
methods: {
|
|
@@ -1161,21 +1186,21 @@ const W = Ue.exports, { t: h } = g(), Je = !0, Ke = !1, qe = "value", Qe = {
|
|
|
1161
1186
|
}
|
|
1162
1187
|
}
|
|
1163
1188
|
};
|
|
1164
|
-
var
|
|
1189
|
+
var Ze = function() {
|
|
1165
1190
|
var e = this, i = e._self._c;
|
|
1166
|
-
return i("FormItemLayout", { attrs: { label: e.label, "label-options": e.labelOptions, field: e.field, "label-width": e.labelWidth, "input-width": e.inputWidth, direction: e.direction }, on: { "field-change": e.handleFieldChange } }, [i("el-date-picker", { staticClass: "date-picker", attrs: { value: e.dateValue, type: e.type, size: e.getDefaultSize(), "range-separator": e.rangeSeparator, "start-placeholder": e.computedStartPlaceholder, "end-placeholder": e.computedEndPlaceholder, placeholder: e.placeholder, "picker-options": e.computedPickerOptions, format: e.computedFormat, "value-format": e.computedFormat, disabled: e.disabled, clearable: e.clearable, readonly: e.readonly, editable: e.editable, align: e.align, "popper-class": e.popperClass, "default-value": e.defaultValue, "default-time": e.computedDefaultTime }, on: { input: e.handleDateChange, change: e.handleDateChange, blur: e.handleBlur, focus: e.handleFocus } })], 1);
|
|
1167
|
-
},
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1191
|
+
return i("FormItemLayout", { attrs: { label: e.label, "label-options": e.labelOptions, field: e.field, "label-width": e.labelWidth, "input-width": e.inputWidth, direction: e.direction, "label-align": e.labelAlign }, on: { "field-change": e.handleFieldChange } }, [i("el-date-picker", { staticClass: "date-picker", attrs: { value: e.dateValue, type: e.type, size: e.getDefaultSize(), "range-separator": e.rangeSeparator, "start-placeholder": e.computedStartPlaceholder, "end-placeholder": e.computedEndPlaceholder, placeholder: e.placeholder, "picker-options": e.computedPickerOptions, format: e.computedFormat, "value-format": e.computedFormat, disabled: e.disabled, clearable: e.clearable, readonly: e.readonly, editable: e.editable, align: e.align, "popper-class": e.popperClass, "default-value": e.defaultValue, "default-time": e.computedDefaultTime }, on: { input: e.handleDateChange, change: e.handleDateChange, blur: e.handleBlur, focus: e.handleFocus } })], 1);
|
|
1192
|
+
}, et = [], tt = /* @__PURE__ */ d(
|
|
1193
|
+
Xe,
|
|
1194
|
+
Ze,
|
|
1195
|
+
et,
|
|
1171
1196
|
!1,
|
|
1172
1197
|
null,
|
|
1173
|
-
"
|
|
1198
|
+
"2de48d4b"
|
|
1174
1199
|
);
|
|
1175
|
-
const
|
|
1200
|
+
const P = tt.exports, it = !0, at = {
|
|
1176
1201
|
name: "TmCascaderFilter",
|
|
1177
1202
|
components: {
|
|
1178
|
-
FormItemLayout:
|
|
1203
|
+
FormItemLayout: v
|
|
1179
1204
|
},
|
|
1180
1205
|
props: {
|
|
1181
1206
|
value: {
|
|
@@ -1232,11 +1257,16 @@ const I = Xe.exports, Ze = !0, et = {
|
|
|
1232
1257
|
type: String,
|
|
1233
1258
|
default: void 0,
|
|
1234
1259
|
validator: (t) => !t || ["horizontal", "vertical"].includes(t)
|
|
1260
|
+
},
|
|
1261
|
+
labelAlign: {
|
|
1262
|
+
type: String,
|
|
1263
|
+
default: "right",
|
|
1264
|
+
validator: (t) => ["left", "right", "center"].includes(t)
|
|
1235
1265
|
}
|
|
1236
1266
|
},
|
|
1237
1267
|
data() {
|
|
1238
1268
|
return {
|
|
1239
|
-
isVue2:
|
|
1269
|
+
isVue2: it,
|
|
1240
1270
|
getDefaultSize: p,
|
|
1241
1271
|
selectedValue: this.value,
|
|
1242
1272
|
optionsList: [],
|
|
@@ -1290,14 +1320,14 @@ const I = Xe.exports, Ze = !0, et = {
|
|
|
1290
1320
|
}
|
|
1291
1321
|
}
|
|
1292
1322
|
};
|
|
1293
|
-
var
|
|
1323
|
+
var st = function() {
|
|
1294
1324
|
var e = this, i = e._self._c;
|
|
1295
|
-
return i("FormItemLayout", { attrs: { label: e.label, "label-width": e.labelWidth, "input-width": e.inputWidth, direction: e.direction } }, [i("div", { staticClass: "cascader" }, [i("el-cascader", e._g(e._b({ ref: "cascader", scopedSlots: e._u([{ key: "default", fn: function({ node:
|
|
1325
|
+
return i("FormItemLayout", { attrs: { label: e.label, "label-width": e.labelWidth, "input-width": e.inputWidth, direction: e.direction, "label-align": e.labelAlign } }, [i("div", { staticClass: "cascader" }, [i("el-cascader", e._g(e._b({ ref: "cascader", scopedSlots: e._u([{ key: "default", fn: function({ node: a, data: s }) {
|
|
1296
1326
|
return [e._t("default", function() {
|
|
1297
|
-
return [i("span", [e._v(e._s(
|
|
1298
|
-
}, { node:
|
|
1299
|
-
} }], null, !0), model: { value: e.selectedValue, callback: function(
|
|
1300
|
-
e.selectedValue =
|
|
1327
|
+
return [i("span", [e._v(e._s(s[e.propMap.label]))])];
|
|
1328
|
+
}, { node: a, data: s })];
|
|
1329
|
+
} }], null, !0), model: { value: e.selectedValue, callback: function(a) {
|
|
1330
|
+
e.selectedValue = a;
|
|
1301
1331
|
}, expression: "selectedValue" } }, "el-cascader", m(u({}, e.$attrs), {
|
|
1302
1332
|
size: e.getDefaultSize(),
|
|
1303
1333
|
filterable: e.filterable,
|
|
@@ -1309,18 +1339,18 @@ var tt = function() {
|
|
|
1309
1339
|
options: e.optionsList,
|
|
1310
1340
|
loading: e.loading
|
|
1311
1341
|
}), !1), e.isVue2 ? e.$listeners : {}))], 1)]);
|
|
1312
|
-
},
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1342
|
+
}, lt = [], nt = /* @__PURE__ */ d(
|
|
1343
|
+
at,
|
|
1344
|
+
st,
|
|
1345
|
+
lt,
|
|
1316
1346
|
!1,
|
|
1317
1347
|
null,
|
|
1318
|
-
"
|
|
1348
|
+
"be6225d9"
|
|
1319
1349
|
);
|
|
1320
|
-
const
|
|
1350
|
+
const B = nt.exports, rt = !0, ot = !1, ut = {
|
|
1321
1351
|
name: "TmRadioFilter",
|
|
1322
1352
|
components: {
|
|
1323
|
-
FormItemLayout:
|
|
1353
|
+
FormItemLayout: v
|
|
1324
1354
|
},
|
|
1325
1355
|
props: {
|
|
1326
1356
|
value: {
|
|
@@ -1364,12 +1394,17 @@ const N = st.exports, at = !0, lt = !1, nt = {
|
|
|
1364
1394
|
type: String,
|
|
1365
1395
|
default: void 0,
|
|
1366
1396
|
validator: (t) => !t || ["horizontal", "vertical"].includes(t)
|
|
1397
|
+
},
|
|
1398
|
+
labelAlign: {
|
|
1399
|
+
type: String,
|
|
1400
|
+
default: "right",
|
|
1401
|
+
validator: (t) => ["left", "right", "center"].includes(t)
|
|
1367
1402
|
}
|
|
1368
1403
|
},
|
|
1369
1404
|
data() {
|
|
1370
1405
|
return {
|
|
1371
|
-
isVue2:
|
|
1372
|
-
isVue3:
|
|
1406
|
+
isVue2: rt,
|
|
1407
|
+
isVue3: ot,
|
|
1373
1408
|
getDefaultSize: p,
|
|
1374
1409
|
selectedValue: this.value,
|
|
1375
1410
|
optionsList: [],
|
|
@@ -1417,32 +1452,32 @@ const N = st.exports, at = !0, lt = !1, nt = {
|
|
|
1417
1452
|
}
|
|
1418
1453
|
}
|
|
1419
1454
|
};
|
|
1420
|
-
var
|
|
1455
|
+
var dt = function() {
|
|
1421
1456
|
var e = this, i = e._self._c;
|
|
1422
|
-
return i("FormItemLayout", { attrs: { label: e.label, "label-width": e.labelWidth, "input-width": e.inputWidth, direction: e.direction } }, [i("el-radio-group", e._g(e._b({ ref: "radioGroup", staticClass: "radio-group", model: { value: e.selectedValue, callback: function(
|
|
1423
|
-
e.selectedValue =
|
|
1457
|
+
return i("FormItemLayout", { attrs: { label: e.label, "label-width": e.labelWidth, "input-width": e.inputWidth, direction: e.direction, "label-align": e.labelAlign } }, [i("el-radio-group", e._g(e._b({ ref: "radioGroup", staticClass: "radio-group", model: { value: e.selectedValue, callback: function(a) {
|
|
1458
|
+
e.selectedValue = a;
|
|
1424
1459
|
}, expression: "selectedValue" } }, "el-radio-group", m(u({}, e.$attrs), {
|
|
1425
1460
|
size: e.getDefaultSize()
|
|
1426
|
-
}), !1), e.isVue2 ? e.$listeners : {}), [e.$slots.default ? [e._t("default")] : e._l(e.optionsList, function(
|
|
1427
|
-
return i("el-radio-button", e._b({ key:
|
|
1428
|
-
[e.isVue3 ? "value" : "label"]:
|
|
1429
|
-
disabled:
|
|
1461
|
+
}), !1), e.isVue2 ? e.$listeners : {}), [e.$slots.default ? [e._t("default")] : e._l(e.optionsList, function(a) {
|
|
1462
|
+
return i("el-radio-button", e._b({ key: a[e.propMap.value], staticStyle: { flex: "1" } }, "el-radio-button", {
|
|
1463
|
+
[e.isVue3 ? "value" : "label"]: a[e.propMap.value],
|
|
1464
|
+
disabled: a.disabled
|
|
1430
1465
|
}, !1), [e._t("option", function() {
|
|
1431
|
-
return [e._v(e._s(
|
|
1432
|
-
}, { item:
|
|
1466
|
+
return [e._v(e._s(a[e.propMap.label]))];
|
|
1467
|
+
}, { item: a })], 2);
|
|
1433
1468
|
})], 2)], 1);
|
|
1434
|
-
},
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1469
|
+
}, ct = [], ht = /* @__PURE__ */ d(
|
|
1470
|
+
ut,
|
|
1471
|
+
dt,
|
|
1472
|
+
ct,
|
|
1438
1473
|
!1,
|
|
1439
1474
|
null,
|
|
1440
|
-
"
|
|
1475
|
+
"49789913"
|
|
1441
1476
|
);
|
|
1442
|
-
const
|
|
1477
|
+
const j = ht.exports, pt = !0, ft = !1, mt = {
|
|
1443
1478
|
name: "TmCheckboxFilter",
|
|
1444
1479
|
components: {
|
|
1445
|
-
FormItemLayout:
|
|
1480
|
+
FormItemLayout: v
|
|
1446
1481
|
},
|
|
1447
1482
|
props: {
|
|
1448
1483
|
value: {
|
|
@@ -1481,12 +1516,17 @@ const P = ut.exports, dt = !0, ct = !1, ht = {
|
|
|
1481
1516
|
type: String,
|
|
1482
1517
|
default: void 0,
|
|
1483
1518
|
validator: (t) => !t || ["horizontal", "vertical"].includes(t)
|
|
1519
|
+
},
|
|
1520
|
+
labelAlign: {
|
|
1521
|
+
type: String,
|
|
1522
|
+
default: "right",
|
|
1523
|
+
validator: (t) => ["left", "right", "center"].includes(t)
|
|
1484
1524
|
}
|
|
1485
1525
|
},
|
|
1486
1526
|
data() {
|
|
1487
1527
|
return {
|
|
1488
|
-
isVue2:
|
|
1489
|
-
isVue3:
|
|
1528
|
+
isVue2: pt,
|
|
1529
|
+
isVue3: ft,
|
|
1490
1530
|
getDefaultSize: p,
|
|
1491
1531
|
selectedValue: this.value || [],
|
|
1492
1532
|
optionsList: [],
|
|
@@ -1534,32 +1574,32 @@ const P = ut.exports, dt = !0, ct = !1, ht = {
|
|
|
1534
1574
|
}
|
|
1535
1575
|
}
|
|
1536
1576
|
};
|
|
1537
|
-
var
|
|
1577
|
+
var gt = function() {
|
|
1538
1578
|
var e = this, i = e._self._c;
|
|
1539
|
-
return i("FormItemLayout", { attrs: { label: e.label, "label-width": e.labelWidth, "input-width": e.inputWidth, direction: e.direction } }, [i("div", { staticClass: "checkbox-content" }, [i("el-checkbox-group", e._g(e._b({ ref: "checkboxGroup", model: { value: e.selectedValue, callback: function(
|
|
1540
|
-
e.selectedValue =
|
|
1579
|
+
return i("FormItemLayout", { attrs: { label: e.label, "label-width": e.labelWidth, "input-width": e.inputWidth, direction: e.direction, "label-align": e.labelAlign } }, [i("div", { staticClass: "checkbox-content" }, [i("el-checkbox-group", e._g(e._b({ ref: "checkboxGroup", model: { value: e.selectedValue, callback: function(a) {
|
|
1580
|
+
e.selectedValue = a;
|
|
1541
1581
|
}, expression: "selectedValue" } }, "el-checkbox-group", m(u({}, e.$attrs), {
|
|
1542
1582
|
size: e.getDefaultSize()
|
|
1543
|
-
}), !1), e.isVue2 ? e.$listeners : {}), [e.$slots.default ? [e._t("default")] : e._l(e.optionsList, function(
|
|
1544
|
-
return i("el-checkbox-button", e._b({ key:
|
|
1545
|
-
[e.isVue3 ? "value" : "label"]:
|
|
1546
|
-
disabled:
|
|
1583
|
+
}), !1), e.isVue2 ? e.$listeners : {}), [e.$slots.default ? [e._t("default")] : e._l(e.optionsList, function(a) {
|
|
1584
|
+
return i("el-checkbox-button", e._b({ key: a[e.propMap.value], staticStyle: { flex: "1" } }, "el-checkbox-button", {
|
|
1585
|
+
[e.isVue3 ? "value" : "label"]: a[e.propMap.value],
|
|
1586
|
+
disabled: a.disabled
|
|
1547
1587
|
}, !1), [e._t("option", function() {
|
|
1548
|
-
return [e._v(e._s(
|
|
1549
|
-
}, { item:
|
|
1588
|
+
return [e._v(e._s(a[e.propMap.label]))];
|
|
1589
|
+
}, { item: a })], 2);
|
|
1550
1590
|
})], 2)], 1)]);
|
|
1551
|
-
},
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1591
|
+
}, bt = [], yt = /* @__PURE__ */ d(
|
|
1592
|
+
mt,
|
|
1593
|
+
gt,
|
|
1594
|
+
bt,
|
|
1555
1595
|
!1,
|
|
1556
1596
|
null,
|
|
1557
|
-
"
|
|
1597
|
+
"c1549ec0"
|
|
1558
1598
|
);
|
|
1559
|
-
const
|
|
1599
|
+
const U = yt.exports, vt = !0, Ct = {
|
|
1560
1600
|
name: "TmSwitchFilter",
|
|
1561
1601
|
components: {
|
|
1562
|
-
FormItemLayout:
|
|
1602
|
+
FormItemLayout: v
|
|
1563
1603
|
},
|
|
1564
1604
|
props: {
|
|
1565
1605
|
value: {
|
|
@@ -1583,11 +1623,16 @@ const B = mt.exports, gt = !0, bt = {
|
|
|
1583
1623
|
type: String,
|
|
1584
1624
|
default: void 0,
|
|
1585
1625
|
validator: (t) => !t || ["horizontal", "vertical"].includes(t)
|
|
1626
|
+
},
|
|
1627
|
+
labelAlign: {
|
|
1628
|
+
type: String,
|
|
1629
|
+
default: "right",
|
|
1630
|
+
validator: (t) => ["left", "right", "center"].includes(t)
|
|
1586
1631
|
}
|
|
1587
1632
|
},
|
|
1588
1633
|
data() {
|
|
1589
1634
|
return {
|
|
1590
|
-
isVue2:
|
|
1635
|
+
isVue2: vt,
|
|
1591
1636
|
getDefaultSize: p,
|
|
1592
1637
|
switchValue: this.value
|
|
1593
1638
|
};
|
|
@@ -1604,20 +1649,179 @@ const B = mt.exports, gt = !0, bt = {
|
|
|
1604
1649
|
}
|
|
1605
1650
|
}
|
|
1606
1651
|
};
|
|
1607
|
-
var
|
|
1652
|
+
var _t = function() {
|
|
1608
1653
|
var e = this, i = e._self._c;
|
|
1609
|
-
return i("FormItemLayout", { attrs: { label: e.label, "label-width": e.labelWidth, "input-width": e.inputWidth, direction: e.direction } }, [i("div", { staticClass: "switch-content" }, [i("el-switch", e._g(e._b({ ref: "switch", attrs: { size: e.getDefaultSize() }, model: { value: e.switchValue, callback: function(
|
|
1610
|
-
e.switchValue =
|
|
1654
|
+
return i("FormItemLayout", { attrs: { label: e.label, "label-width": e.labelWidth, "input-width": e.inputWidth, direction: e.direction, "label-align": e.labelAlign } }, [i("div", { staticClass: "switch-content" }, [i("el-switch", e._g(e._b({ ref: "switch", attrs: { size: e.getDefaultSize() }, model: { value: e.switchValue, callback: function(a) {
|
|
1655
|
+
e.switchValue = a;
|
|
1611
1656
|
}, expression: "switchValue" } }, "el-switch", e.$attrs, !1), e.isVue2 ? e.$listeners : {}))], 1)]);
|
|
1612
|
-
},
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1657
|
+
}, xt = [], St = /* @__PURE__ */ d(
|
|
1658
|
+
Ct,
|
|
1659
|
+
_t,
|
|
1660
|
+
xt,
|
|
1616
1661
|
!1,
|
|
1617
1662
|
null,
|
|
1618
|
-
"
|
|
1663
|
+
"7455db21"
|
|
1619
1664
|
);
|
|
1620
|
-
const
|
|
1665
|
+
const J = St.exports, $t = !0, Tt = !1, W = "value", z = "input", wt = {
|
|
1666
|
+
name: "TmTextareaFilter",
|
|
1667
|
+
components: {
|
|
1668
|
+
FormItemLayout: v
|
|
1669
|
+
},
|
|
1670
|
+
props: {
|
|
1671
|
+
label: {
|
|
1672
|
+
type: [String, Function, Object, Array],
|
|
1673
|
+
default: ""
|
|
1674
|
+
},
|
|
1675
|
+
[W]: {
|
|
1676
|
+
type: String,
|
|
1677
|
+
default: ""
|
|
1678
|
+
},
|
|
1679
|
+
field: {
|
|
1680
|
+
type: [String, Number],
|
|
1681
|
+
default: ""
|
|
1682
|
+
},
|
|
1683
|
+
placeholder: {
|
|
1684
|
+
type: String,
|
|
1685
|
+
default: ""
|
|
1686
|
+
},
|
|
1687
|
+
labelOptions: {
|
|
1688
|
+
type: Array,
|
|
1689
|
+
default: () => []
|
|
1690
|
+
},
|
|
1691
|
+
// 不再支持rows配置,autosize已有默认配置,和该属性冲突
|
|
1692
|
+
autosize: {
|
|
1693
|
+
type: [Boolean, Object],
|
|
1694
|
+
default: () => ({
|
|
1695
|
+
minRows: 1,
|
|
1696
|
+
maxRows: 10
|
|
1697
|
+
})
|
|
1698
|
+
},
|
|
1699
|
+
maxlength: {
|
|
1700
|
+
type: [String, Number],
|
|
1701
|
+
default: ""
|
|
1702
|
+
},
|
|
1703
|
+
minlength: {
|
|
1704
|
+
type: [String, Number],
|
|
1705
|
+
default: ""
|
|
1706
|
+
},
|
|
1707
|
+
showWordLimit: {
|
|
1708
|
+
type: Boolean,
|
|
1709
|
+
default: !1
|
|
1710
|
+
},
|
|
1711
|
+
readonly: {
|
|
1712
|
+
type: Boolean,
|
|
1713
|
+
default: !1
|
|
1714
|
+
},
|
|
1715
|
+
disabled: {
|
|
1716
|
+
type: Boolean,
|
|
1717
|
+
default: !1
|
|
1718
|
+
},
|
|
1719
|
+
resize: {
|
|
1720
|
+
type: String,
|
|
1721
|
+
default: "vertical",
|
|
1722
|
+
validator: (t) => ["none", "both", "horizontal", "vertical"].includes(t)
|
|
1723
|
+
},
|
|
1724
|
+
tabindex: {
|
|
1725
|
+
type: [String, Number],
|
|
1726
|
+
default: ""
|
|
1727
|
+
},
|
|
1728
|
+
validateEvent: {
|
|
1729
|
+
type: Boolean,
|
|
1730
|
+
default: !0
|
|
1731
|
+
},
|
|
1732
|
+
clearable: {
|
|
1733
|
+
type: Boolean,
|
|
1734
|
+
default: !0
|
|
1735
|
+
},
|
|
1736
|
+
// FormItemLayout 配置参数
|
|
1737
|
+
labelWidth: {
|
|
1738
|
+
type: [String, Number],
|
|
1739
|
+
default: void 0
|
|
1740
|
+
},
|
|
1741
|
+
inputWidth: {
|
|
1742
|
+
type: [String, Number],
|
|
1743
|
+
default: void 0
|
|
1744
|
+
},
|
|
1745
|
+
direction: {
|
|
1746
|
+
type: String,
|
|
1747
|
+
default: void 0,
|
|
1748
|
+
validator: (t) => !t || ["horizontal", "vertical"].includes(t)
|
|
1749
|
+
},
|
|
1750
|
+
labelAlign: {
|
|
1751
|
+
type: String,
|
|
1752
|
+
default: "right",
|
|
1753
|
+
validator: (t) => ["left", "right", "center"].includes(t)
|
|
1754
|
+
}
|
|
1755
|
+
},
|
|
1756
|
+
data() {
|
|
1757
|
+
return {
|
|
1758
|
+
isVue2: $t,
|
|
1759
|
+
isVue3: Tt,
|
|
1760
|
+
getDefaultSize: p,
|
|
1761
|
+
inputValue: this.value
|
|
1762
|
+
};
|
|
1763
|
+
},
|
|
1764
|
+
computed: {
|
|
1765
|
+
selectedOption() {
|
|
1766
|
+
return !this.labelOptions || !this.labelOptions.length || !this.field ? null : this.labelOptions.find((t) => t.value === this.field);
|
|
1767
|
+
}
|
|
1768
|
+
},
|
|
1769
|
+
watch: {
|
|
1770
|
+
[W]: {
|
|
1771
|
+
immediate: !0,
|
|
1772
|
+
handler(t) {
|
|
1773
|
+
this.inputValue = t;
|
|
1774
|
+
}
|
|
1775
|
+
},
|
|
1776
|
+
inputValue(t) {
|
|
1777
|
+
this.$emit(z, t);
|
|
1778
|
+
}
|
|
1779
|
+
},
|
|
1780
|
+
methods: {
|
|
1781
|
+
handleInput(t) {
|
|
1782
|
+
this.inputValue = t, this.$emit(z, t);
|
|
1783
|
+
},
|
|
1784
|
+
handleChange(t) {
|
|
1785
|
+
this.$emit("change", t);
|
|
1786
|
+
},
|
|
1787
|
+
handleFocus(t) {
|
|
1788
|
+
this.$emit("focus", t);
|
|
1789
|
+
},
|
|
1790
|
+
handleBlur(t) {
|
|
1791
|
+
this.$emit("blur", t);
|
|
1792
|
+
},
|
|
1793
|
+
handleClear() {
|
|
1794
|
+
this.inputValue = "", this.$emit(z, ""), this.$emit("clear");
|
|
1795
|
+
},
|
|
1796
|
+
handleFieldChange(t) {
|
|
1797
|
+
this.$emit("field-change", t);
|
|
1798
|
+
},
|
|
1799
|
+
// 暴露的方法
|
|
1800
|
+
focus() {
|
|
1801
|
+
this.$refs.textarea.focus();
|
|
1802
|
+
},
|
|
1803
|
+
blur() {
|
|
1804
|
+
this.$refs.textarea.blur();
|
|
1805
|
+
},
|
|
1806
|
+
select() {
|
|
1807
|
+
this.$refs.textarea.select();
|
|
1808
|
+
}
|
|
1809
|
+
}
|
|
1810
|
+
};
|
|
1811
|
+
var Ft = function() {
|
|
1812
|
+
var e = this, i = e._self._c;
|
|
1813
|
+
return i("FormItemLayout", { attrs: { label: e.label, "label-options": e.labelOptions, field: e.field, "label-width": e.labelWidth, "input-width": e.inputWidth, direction: e.direction, "label-align": e.labelAlign }, on: { "field-change": e.handleFieldChange } }, [i("div", { staticClass: "textarea" }, [i("el-input", e._g(e._b({ ref: "textarea", staticClass: "textarea-input", attrs: { size: e.getDefaultSize(), placeholder: e.placeholder, type: "textarea", autosize: e.autosize, maxlength: e.maxlength, minlength: e.minlength, "show-word-limit": e.showWordLimit, readonly: e.readonly, disabled: e.disabled, resize: e.resize, tabindex: e.tabindex, "validate-event": e.validateEvent }, on: { input: e.handleInput, change: e.handleChange, focus: e.handleFocus, blur: e.handleBlur, clear: e.handleClear }, model: { value: e.inputValue, callback: function(a) {
|
|
1814
|
+
e.inputValue = a;
|
|
1815
|
+
}, expression: "inputValue" } }, "el-input", e.$attrs, !1), e.isVue2 ? e.$listeners : {})), e.clearable && e.inputValue ? i("i", { staticClass: "textarea-clear-icon el-input__icon el-icon-circle-close", on: { click: e.handleClear } }) : e._e()], 1)]);
|
|
1816
|
+
}, Vt = [], zt = /* @__PURE__ */ d(
|
|
1817
|
+
wt,
|
|
1818
|
+
Ft,
|
|
1819
|
+
Vt,
|
|
1820
|
+
!1,
|
|
1821
|
+
null,
|
|
1822
|
+
"e903b851"
|
|
1823
|
+
);
|
|
1824
|
+
const K = zt.exports, Lt = {
|
|
1621
1825
|
name: "DynamicSlot",
|
|
1622
1826
|
props: {
|
|
1623
1827
|
name: {
|
|
@@ -1630,7 +1834,7 @@ const j = Ct.exports, _t = {
|
|
|
1630
1834
|
}
|
|
1631
1835
|
},
|
|
1632
1836
|
render(t) {
|
|
1633
|
-
var
|
|
1837
|
+
var s;
|
|
1634
1838
|
const e = (l) => {
|
|
1635
1839
|
var n, o;
|
|
1636
1840
|
if (!l) return null;
|
|
@@ -1646,19 +1850,19 @@ const j = Ct.exports, _t = {
|
|
|
1646
1850
|
var n;
|
|
1647
1851
|
return l ? ((n = l.$options) == null ? void 0 : n.name) === "TmTable" : !1;
|
|
1648
1852
|
};
|
|
1649
|
-
let
|
|
1650
|
-
if (!
|
|
1651
|
-
let l = (
|
|
1652
|
-
for (; l && !
|
|
1853
|
+
let a = e(this.$parent);
|
|
1854
|
+
if (!a) {
|
|
1855
|
+
let l = (s = this.$parent) == null ? void 0 : s.$parent;
|
|
1856
|
+
for (; l && !a; ) {
|
|
1653
1857
|
if (i(l)) {
|
|
1654
|
-
|
|
1858
|
+
a = e(l);
|
|
1655
1859
|
break;
|
|
1656
1860
|
}
|
|
1657
1861
|
l = l.$parent;
|
|
1658
1862
|
}
|
|
1659
1863
|
}
|
|
1660
|
-
if (
|
|
1661
|
-
const l = typeof
|
|
1864
|
+
if (a) {
|
|
1865
|
+
const l = typeof a == "function" ? a(this.slotProps) : a;
|
|
1662
1866
|
{
|
|
1663
1867
|
if (!l) return null;
|
|
1664
1868
|
if (Array.isArray(l)) {
|
|
@@ -1675,16 +1879,16 @@ const j = Ct.exports, _t = {
|
|
|
1675
1879
|
}
|
|
1676
1880
|
return null;
|
|
1677
1881
|
}
|
|
1678
|
-
},
|
|
1679
|
-
var
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1882
|
+
}, kt = null, Ot = null;
|
|
1883
|
+
var At = /* @__PURE__ */ d(
|
|
1884
|
+
Lt,
|
|
1885
|
+
kt,
|
|
1886
|
+
Ot,
|
|
1683
1887
|
!1,
|
|
1684
1888
|
null,
|
|
1685
1889
|
null
|
|
1686
1890
|
);
|
|
1687
|
-
const
|
|
1891
|
+
const Dt = At.exports, { t: Rt } = g(), Mt = !0, Ht = !1, Wt = [
|
|
1688
1892
|
"date",
|
|
1689
1893
|
"daterange",
|
|
1690
1894
|
"datetime",
|
|
@@ -1696,17 +1900,18 @@ const Tt = $t.exports, { t: wt } = g(), Ft = !0, zt = !1, Lt = [
|
|
|
1696
1900
|
"years",
|
|
1697
1901
|
"week",
|
|
1698
1902
|
"monthrange"
|
|
1699
|
-
],
|
|
1903
|
+
], Et = {
|
|
1700
1904
|
name: "TmTableSearch",
|
|
1701
1905
|
components: {
|
|
1702
|
-
TmSelect:
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
TmCascader:
|
|
1706
|
-
TmRadio:
|
|
1707
|
-
TmCheckbox:
|
|
1708
|
-
TmSwitch:
|
|
1709
|
-
|
|
1906
|
+
TmSelect: I,
|
|
1907
|
+
TmInput: N,
|
|
1908
|
+
TmDate: P,
|
|
1909
|
+
TmCascader: B,
|
|
1910
|
+
TmRadio: j,
|
|
1911
|
+
TmCheckbox: U,
|
|
1912
|
+
TmSwitch: J,
|
|
1913
|
+
TmTextarea: K,
|
|
1914
|
+
DynamicSlot: Dt
|
|
1710
1915
|
},
|
|
1711
1916
|
props: {
|
|
1712
1917
|
disabled: {
|
|
@@ -1734,16 +1939,21 @@ const Tt = $t.exports, { t: wt } = g(), Ft = !0, zt = !1, Lt = [
|
|
|
1734
1939
|
type: String,
|
|
1735
1940
|
default: void 0,
|
|
1736
1941
|
validator: (t) => !t || ["horizontal", "vertical"].includes(t)
|
|
1942
|
+
},
|
|
1943
|
+
labelAlign: {
|
|
1944
|
+
type: String,
|
|
1945
|
+
default: "right",
|
|
1946
|
+
validator: (t) => ["left", "right", "center"].includes(t)
|
|
1737
1947
|
}
|
|
1738
1948
|
},
|
|
1739
1949
|
data() {
|
|
1740
1950
|
return {
|
|
1741
|
-
t:
|
|
1742
|
-
isVue2:
|
|
1743
|
-
isVue3:
|
|
1951
|
+
t: Rt,
|
|
1952
|
+
isVue2: Mt,
|
|
1953
|
+
isVue3: Ht,
|
|
1744
1954
|
getCompatSize: x,
|
|
1745
1955
|
getDefaultSize: p,
|
|
1746
|
-
DATE_TYPES:
|
|
1956
|
+
DATE_TYPES: Wt,
|
|
1747
1957
|
// 用于存储初始默认值,重置时恢复
|
|
1748
1958
|
defaultValues: {}
|
|
1749
1959
|
};
|
|
@@ -1761,7 +1971,7 @@ const Tt = $t.exports, { t: wt } = g(), Ft = !0, zt = !1, Lt = [
|
|
|
1761
1971
|
getLayoutProps() {
|
|
1762
1972
|
return (t) => {
|
|
1763
1973
|
const e = {};
|
|
1764
|
-
return t.labelWidth !== void 0 ? e.labelWidth = t.labelWidth : this.labelWidth !== void 0 && (e.labelWidth = this.labelWidth), t.inputWidth !== void 0 ? e.inputWidth = t.inputWidth : this.inputWidth !== void 0 && (e.inputWidth = this.inputWidth), t.direction !== void 0 ? e.direction = t.direction : this.direction !== void 0 && (e.direction = this.direction), e;
|
|
1974
|
+
return t.labelWidth !== void 0 ? e.labelWidth = t.labelWidth : this.labelWidth !== void 0 && (e.labelWidth = this.labelWidth), t.inputWidth !== void 0 ? e.inputWidth = t.inputWidth : this.inputWidth !== void 0 && (e.inputWidth = this.inputWidth), t.direction !== void 0 ? e.direction = t.direction : this.direction !== void 0 && (e.direction = this.direction), t.labelAlign !== void 0 ? e.labelAlign = t.labelAlign : this.labelAlign !== void 0 && (e.labelAlign = this.labelAlign), e;
|
|
1765
1975
|
};
|
|
1766
1976
|
}
|
|
1767
1977
|
},
|
|
@@ -1778,14 +1988,14 @@ const Tt = $t.exports, { t: wt } = g(), Ft = !0, zt = !1, Lt = [
|
|
|
1778
1988
|
return t ? this.isVue2 ? !!t : t()[0].children.length > 0 : !1;
|
|
1779
1989
|
},
|
|
1780
1990
|
handleUpdate(t, e, i) {
|
|
1781
|
-
const
|
|
1782
|
-
|
|
1783
|
-
[
|
|
1991
|
+
const a = this.getFieldValue(t, i);
|
|
1992
|
+
a && this.$emit("update:search-form", m(u({}, this.computedSearchForm), {
|
|
1993
|
+
[a]: e
|
|
1784
1994
|
}));
|
|
1785
1995
|
},
|
|
1786
1996
|
handleUpdateDate(t, e) {
|
|
1787
|
-
const i = e || [],
|
|
1788
|
-
|
|
1997
|
+
const i = e || [], a = this.getFieldValue(t, "start"), s = this.getFieldValue(t, "end"), l = this.getFieldValue(t, "value"), n = {};
|
|
1998
|
+
a && (n[a] = i[0]), s && (n[s] = i[1]), l && (n[l] = i), this.$emit("update:search-form", u(u({}, this.computedSearchForm), n));
|
|
1789
1999
|
},
|
|
1790
2000
|
getFieldValue(t, e) {
|
|
1791
2001
|
if (typeof t == "string")
|
|
@@ -1815,12 +2025,12 @@ const Tt = $t.exports, { t: wt } = g(), Ft = !0, zt = !1, Lt = [
|
|
|
1815
2025
|
const e = "$scopedSlots";
|
|
1816
2026
|
if (this[e][t])
|
|
1817
2027
|
return !0;
|
|
1818
|
-
let
|
|
1819
|
-
for (;
|
|
1820
|
-
const
|
|
1821
|
-
if (
|
|
2028
|
+
let a = this.$parent;
|
|
2029
|
+
for (; a; ) {
|
|
2030
|
+
const s = a[e];
|
|
2031
|
+
if (a.$options.name === "TmTable" && (s != null && s[t]))
|
|
1822
2032
|
return !0;
|
|
1823
|
-
|
|
2033
|
+
a = a.$parent;
|
|
1824
2034
|
}
|
|
1825
2035
|
return !1;
|
|
1826
2036
|
},
|
|
@@ -1830,38 +2040,38 @@ const Tt = $t.exports, { t: wt } = g(), Ft = !0, zt = !1, Lt = [
|
|
|
1830
2040
|
const t = {};
|
|
1831
2041
|
this.searchColumns.forEach((e) => {
|
|
1832
2042
|
if (typeof e == "string" || !e.fields) return;
|
|
1833
|
-
const i = this.getFieldValue(e, "value"),
|
|
2043
|
+
const i = this.getFieldValue(e, "value"), a = this.getFieldValue(e, "label");
|
|
1834
2044
|
if (e.type === "input" && e.labelOptions && e.labelOptions.length > 0) {
|
|
1835
2045
|
const l = e.labelOptions[0];
|
|
1836
|
-
if (
|
|
1837
|
-
if (
|
|
1838
|
-
t[
|
|
2046
|
+
if (a)
|
|
2047
|
+
if (a in this.computedSearchForm)
|
|
2048
|
+
t[a] = this.computedSearchForm[a];
|
|
1839
2049
|
else {
|
|
1840
2050
|
const n = this.getFieldDefault(e, "label");
|
|
1841
|
-
n !== void 0 ? t[
|
|
2051
|
+
n !== void 0 ? t[a] = n : l && l.value !== void 0 && (t[a] = l.value);
|
|
1842
2052
|
}
|
|
1843
2053
|
i && !(i in this.computedSearchForm) && (t[i] = "");
|
|
1844
2054
|
} else if (this.isDateType(e.type) && e.labelOptions && e.labelOptions.length > 0) {
|
|
1845
2055
|
const l = e.labelOptions[0];
|
|
1846
|
-
if (i && !(i in this.computedSearchForm) && (t[i] = []),
|
|
1847
|
-
if (
|
|
1848
|
-
t[
|
|
2056
|
+
if (i && !(i in this.computedSearchForm) && (t[i] = []), a)
|
|
2057
|
+
if (a in this.computedSearchForm)
|
|
2058
|
+
t[a] = this.computedSearchForm[a];
|
|
1849
2059
|
else {
|
|
1850
2060
|
const n = this.getFieldDefault(e, "label");
|
|
1851
|
-
n !== void 0 ? t[
|
|
2061
|
+
n !== void 0 ? t[a] = n : l && l.value !== void 0 && (t[a] = l.value);
|
|
1852
2062
|
}
|
|
1853
2063
|
} else if (e.type === "select" && e.labelOptions && e.labelOptions.length > 0) {
|
|
1854
2064
|
const l = e.labelOptions[0];
|
|
1855
|
-
if (i && !(i in this.computedSearchForm) && (t[i] = e.multiple ? [] : ""),
|
|
1856
|
-
if (
|
|
1857
|
-
t[
|
|
2065
|
+
if (i && !(i in this.computedSearchForm) && (t[i] = e.multiple ? [] : ""), a)
|
|
2066
|
+
if (a in this.computedSearchForm)
|
|
2067
|
+
t[a] = this.computedSearchForm[a];
|
|
1858
2068
|
else {
|
|
1859
2069
|
const n = this.getFieldDefault(e, "label");
|
|
1860
|
-
n !== void 0 ? t[
|
|
2070
|
+
n !== void 0 ? t[a] = n : l && l.value !== void 0 && (t[a] = l.value);
|
|
1861
2071
|
}
|
|
1862
2072
|
}
|
|
1863
|
-
const
|
|
1864
|
-
if (i &&
|
|
2073
|
+
const s = this.getFieldDefault(e, "value");
|
|
2074
|
+
if (i && s !== void 0 && !(i in this.computedSearchForm) ? this.isDateType(e.type) && !Array.isArray(s) ? t[i] = [] : e.type === "checkbox" && !Array.isArray(s) ? t[i] = s ? [s] : [] : e.type === "switch" && typeof s != "boolean" ? t[i] = !!s : t[i] = s : i && !(i in this.computedSearchForm) && (e.type === "checkbox" ? t[i] = [] : e.type === "switch" && (t[i] = !1)), this.isDateType(e.type)) {
|
|
1865
2075
|
const l = this.getFieldValue(e, "start"), n = this.getFieldValue(e, "end"), o = this.getFieldDefault(e, "start"), r = this.getFieldDefault(e, "end");
|
|
1866
2076
|
l && o !== void 0 && !(l in this.computedSearchForm) && (t[l] = o), n && r !== void 0 && !(n in this.computedSearchForm) && (t[n] = r);
|
|
1867
2077
|
}
|
|
@@ -1883,30 +2093,32 @@ const Tt = $t.exports, { t: wt } = g(), Ft = !0, zt = !1, Lt = [
|
|
|
1883
2093
|
}
|
|
1884
2094
|
}
|
|
1885
2095
|
};
|
|
1886
|
-
var
|
|
2096
|
+
var It = function() {
|
|
1887
2097
|
var e = this, i = e._self._c;
|
|
1888
|
-
return i("div", { staticClass: "table-search", class: `table-search--${e.isVue2 ? "v2" : "v3"}` }, [i("div", { staticClass: "search-content" }, [e.hasDefaultSlot() ? e._t("default") : e.searchColumns && e.searchColumns.length ? [e._l(e.searchColumns, function(
|
|
1889
|
-
return [typeof
|
|
1890
|
-
e.$set(e.computedSearchForm, e.getFieldValue(
|
|
1891
|
-
}, expression: "computedSearchForm[getFieldValue(col, 'value')]" } }, "tm-select", e.getLayoutProps(
|
|
1892
|
-
e.$set(e.computedSearchForm, e.getFieldValue(
|
|
1893
|
-
}, expression: "computedSearchForm[getFieldValue(col, 'value')]" } }, "tm-cascader", e.getLayoutProps(
|
|
1894
|
-
e.$set(e.computedSearchForm, e.getFieldValue(
|
|
1895
|
-
}, expression: "computedSearchForm[getFieldValue(col, 'value')]" } }, "tm-radio", e.getLayoutProps(
|
|
1896
|
-
e.$set(e.computedSearchForm, e.getFieldValue(
|
|
1897
|
-
}, expression: "computedSearchForm[getFieldValue(col, 'value')]" } }, "tm-checkbox", e.getLayoutProps(
|
|
1898
|
-
e.$set(e.computedSearchForm, e.getFieldValue(
|
|
1899
|
-
}, expression: "computedSearchForm[getFieldValue(col, 'value')]" } }, "tm-switch", e.getLayoutProps(
|
|
2098
|
+
return i("div", { staticClass: "table-search", class: `table-search--${e.isVue2 ? "v2" : "v3"}` }, [i("div", { staticClass: "search-content" }, [e.hasDefaultSlot() ? e._t("default") : e.searchColumns && e.searchColumns.length ? [e._l(e.searchColumns, function(a, s) {
|
|
2099
|
+
return [typeof a == "string" ? i("div", { key: `str-${a}-${s}`, staticClass: "search-item" }, [i("dynamic-slot", { key: a, attrs: { name: `search-${a}`, "slot-props": { searchForm: e.searchForm } } })], 1) : i("div", { key: `obj-${s}`, staticClass: "search-item" }, [a.fields ? [e.hasSearchSlot(`search-${e.getFieldValue(a, "value")}`) ? [i("dynamic-slot", { key: e.getFieldValue(a, "value"), attrs: { name: `search-${e.getFieldValue(a, "value")}`, "slot-props": { searchForm: e.searchForm, col: a } } })] : [i("div", { key: e.getFieldValue(a, "value") || `col-${s}`, staticStyle: { display: "flex" } }, [a.type === "input" ? i("tm-Input", e._b({ attrs: { label: a.label, value: e.computedSearchForm[e.getFieldValue(a, "value")], field: e.computedSearchForm[e.getFieldValue(a, "label")], multiple: a.multiple, labelOptions: a.labelOptions, placeholder: a.placeholder }, on: { "value-change": (l) => e.handleUpdate(a, l, "value"), "field-change": (l) => e.handleUpdate(a, l, "label"), search: e.handleSearch } }, "tm-Input", e.getLayoutProps(a), !1)) : e._e(), e.isDateType(a.type) ? i("tm-date", e._b({ attrs: { type: a.type, label: a.label, value: e.computedSearchForm[e.getFieldValue(a, "value")], field: e.computedSearchForm[e.getFieldValue(a, "label")], start: e.computedSearchForm[e.getFieldValue(a, "start")], end: e.computedSearchForm[e.getFieldValue(a, "end")], labelOptions: a.labelOptions, "start-placeholder": a.startPlaceholder, "end-placeholder": a.endPlaceholder, placeholder: a.placeholder, "range-separator": a.rangeSeparator, disabled: a.disabled, clearable: a.clearable, readonly: a.readonly, editable: a.editable, align: a.align, "popper-class": a.popperClass, "default-value": a.defaultValue, "default-time": a.defaultTime, shortcuts: a.shortcuts, "past-only": a.pastOnly, format: a.format }, on: { "field-change": (l) => e.handleUpdate(a, l, "label"), "value-change": (l) => e.handleUpdateDate(a, l), "start-change": (l) => e.handleUpdateDate(a, l), "end-change": (l) => e.handleUpdateDate(a, l) } }, "tm-date", e.getLayoutProps(a), !1)) : e._e(), a.type === "select" ? i("tm-select", e._b({ attrs: { label: a.label, field: e.computedSearchForm[e.getFieldValue(a, "label")], options: a.options, labelOptions: a.labelOptions, placeholder: a.placeholder, multiple: a.multiple, "show-check-all": a.checkAll, "value-on-clear": a.valueOnClear, clearable: a.clearable }, on: { "field-change": (l) => e.handleUpdate(a, l, "label") }, model: { value: e.computedSearchForm[e.getFieldValue(a, "value")], callback: function(l) {
|
|
2100
|
+
e.$set(e.computedSearchForm, e.getFieldValue(a, "value"), l);
|
|
2101
|
+
}, expression: "computedSearchForm[getFieldValue(col, 'value')]" } }, "tm-select", e.getLayoutProps(a), !1)) : e._e(), a.type === "cascader" ? i("tm-cascader", e._b({ attrs: { label: a.label, options: a.options, labelOptions: a.labelOptions, props: a.props, placeholder: a.placeholder, "show-check-all": a.checkAll }, model: { value: e.computedSearchForm[e.getFieldValue(a, "value")], callback: function(l) {
|
|
2102
|
+
e.$set(e.computedSearchForm, e.getFieldValue(a, "value"), l);
|
|
2103
|
+
}, expression: "computedSearchForm[getFieldValue(col, 'value')]" } }, "tm-cascader", e.getLayoutProps(a), !1)) : e._e(), a.type === "radio" ? i("tm-radio", e._b({ attrs: { label: a.label, options: a.options, props: a.props }, model: { value: e.computedSearchForm[e.getFieldValue(a, "value")], callback: function(l) {
|
|
2104
|
+
e.$set(e.computedSearchForm, e.getFieldValue(a, "value"), l);
|
|
2105
|
+
}, expression: "computedSearchForm[getFieldValue(col, 'value')]" } }, "tm-radio", e.getLayoutProps(a), !1)) : e._e(), a.type === "checkbox" ? i("tm-checkbox", e._b({ attrs: { label: a.label, options: a.options, props: a.props }, model: { value: e.computedSearchForm[e.getFieldValue(a, "value")], callback: function(l) {
|
|
2106
|
+
e.$set(e.computedSearchForm, e.getFieldValue(a, "value"), l);
|
|
2107
|
+
}, expression: "computedSearchForm[getFieldValue(col, 'value')]" } }, "tm-checkbox", e.getLayoutProps(a), !1)) : e._e(), a.type === "switch" ? i("tm-switch", e._b({ attrs: { "active-text": a.activeText, "inactive-text": a.inactiveText, label: a.label, "active-color": a.activeColor, "inactive-color": a.inactiveColor }, model: { value: e.computedSearchForm[e.getFieldValue(a, "value")], callback: function(l) {
|
|
2108
|
+
e.$set(e.computedSearchForm, e.getFieldValue(a, "value"), l);
|
|
2109
|
+
}, expression: "computedSearchForm[getFieldValue(col, 'value')]" } }, "tm-switch", e.getLayoutProps(a), !1)) : e._e(), a.type === "textarea" ? i("tm-textarea", e._b({ attrs: { field: e.computedSearchForm[e.getFieldValue(a, "label")], label: a.label, labelOptions: a.labelOptions, placeholder: a.placeholder, autosize: a.autosize, maxlength: a.maxlength, minlength: a.minlength, "show-word-limit": a.showWordLimit, readonly: a.readonly, disabled: a.disabled, resize: a.resize, clearable: a.clearable }, on: { "field-change": (l) => e.handleUpdate(a, l, "label") }, model: { value: e.computedSearchForm[e.getFieldValue(a, "value")], callback: function(l) {
|
|
2110
|
+
e.$set(e.computedSearchForm, e.getFieldValue(a, "value"), l);
|
|
2111
|
+
}, expression: "computedSearchForm[getFieldValue(col, 'value')]" } }, "tm-textarea", e.getLayoutProps(a), !1)) : e._e()], 1)]] : [i("div", { key: `error-${s}`, staticClass: "search-error-message" }, [e._v(" 缺少 fields 配置,无法渲染此组件 ")])]], 2)];
|
|
1900
2112
|
})] : e._e(), i("div", { staticClass: "search-actions" }, [i("el-button", { attrs: { type: "primary", size: e.getDefaultSize() }, on: { click: e.handleSearch } }, [e._v(e._s(e.t("query")))]), i("el-button", { attrs: { size: e.getDefaultSize() }, on: { click: e.handleReset } }, [e._v(e._s(e.t("reset")))])], 1)], 2)]);
|
|
1901
|
-
},
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
2113
|
+
}, Nt = [], Pt = /* @__PURE__ */ d(
|
|
2114
|
+
Et,
|
|
2115
|
+
It,
|
|
2116
|
+
Nt,
|
|
1905
2117
|
!1,
|
|
1906
2118
|
null,
|
|
1907
|
-
"
|
|
2119
|
+
"be7a7198"
|
|
1908
2120
|
);
|
|
1909
|
-
const
|
|
2121
|
+
const q = Pt.exports, Bt = !0, jt = {
|
|
1910
2122
|
name: "TablePagination",
|
|
1911
2123
|
props: {
|
|
1912
2124
|
current: {
|
|
@@ -1928,7 +2140,7 @@ const U = Dt.exports, At = !0, Rt = {
|
|
|
1928
2140
|
},
|
|
1929
2141
|
data() {
|
|
1930
2142
|
return {
|
|
1931
|
-
isVue2:
|
|
2143
|
+
isVue2: Bt,
|
|
1932
2144
|
getCompatSize: x
|
|
1933
2145
|
};
|
|
1934
2146
|
},
|
|
@@ -1941,22 +2153,22 @@ const U = Dt.exports, At = !0, Rt = {
|
|
|
1941
2153
|
}
|
|
1942
2154
|
}
|
|
1943
2155
|
};
|
|
1944
|
-
var
|
|
2156
|
+
var Ut = function() {
|
|
1945
2157
|
var e = this, i = e._self._c;
|
|
1946
|
-
return i("div", { staticClass: "tm-pagination" }, [i("el-pagination", e._g(e._b({ staticStyle: { "text-align": "right" }, attrs: { "current-page": e.current, "page-size": e.pageSize, total: e.total, "page-sizes": [10, 20, 50, 100, 300, 500, 1e3, 2e3], size: e.getCompatSize("mini"), layout: "total, sizes, prev, pager, next, jumper" }, on: { "size-change": e.handleSizeChange, "update:current-page": function(
|
|
1947
|
-
return e.$emit("update:current",
|
|
1948
|
-
}, "update:page-size": function(
|
|
1949
|
-
return e.$emit("update:pageSize",
|
|
2158
|
+
return i("div", { staticClass: "tm-pagination" }, [i("el-pagination", e._g(e._b({ staticStyle: { "text-align": "right" }, attrs: { "current-page": e.current, "page-size": e.pageSize, total: e.total, "page-sizes": [10, 20, 50, 100, 300, 500, 1e3, 2e3], size: e.getCompatSize("mini"), layout: "total, sizes, prev, pager, next, jumper" }, on: { "size-change": e.handleSizeChange, "update:current-page": function(a) {
|
|
2159
|
+
return e.$emit("update:current", a);
|
|
2160
|
+
}, "update:page-size": function(a) {
|
|
2161
|
+
return e.$emit("update:pageSize", a);
|
|
1950
2162
|
}, "current-change": e.handleCurrentChange } }, "el-pagination", e.$attrs, !1), e.isVue2 ? e.$listeners : {}))], 1);
|
|
1951
|
-
},
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
2163
|
+
}, Jt = [], Kt = /* @__PURE__ */ d(
|
|
2164
|
+
jt,
|
|
2165
|
+
Ut,
|
|
2166
|
+
Jt,
|
|
1955
2167
|
!1,
|
|
1956
2168
|
null,
|
|
1957
2169
|
"4dbdf6e7"
|
|
1958
2170
|
);
|
|
1959
|
-
const
|
|
2171
|
+
const qt = Kt.exports, Qt = {
|
|
1960
2172
|
name: "TmTableMenu",
|
|
1961
2173
|
props: {
|
|
1962
2174
|
size: {
|
|
@@ -1965,18 +2177,18 @@ const Wt = Et.exports, It = {
|
|
|
1965
2177
|
}
|
|
1966
2178
|
}
|
|
1967
2179
|
};
|
|
1968
|
-
var
|
|
2180
|
+
var Gt = function() {
|
|
1969
2181
|
var e = this, i = e._self._c;
|
|
1970
2182
|
return i("div", { staticClass: "tm-table-menu", attrs: { size: "small", inline: "" } }, [i("div", { staticClass: "left" }, [e._t("left")], 2), i("div", { staticClass: "right" }, [e._t("right")], 2)]);
|
|
1971
|
-
},
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
2183
|
+
}, Yt = [], Xt = /* @__PURE__ */ d(
|
|
2184
|
+
Qt,
|
|
2185
|
+
Gt,
|
|
2186
|
+
Yt,
|
|
1975
2187
|
!1,
|
|
1976
2188
|
null,
|
|
1977
2189
|
"579dd2c3"
|
|
1978
2190
|
);
|
|
1979
|
-
const
|
|
2191
|
+
const Zt = Xt.exports, T = (t) => t ? t.data && t.data.attrs || {} : {}, L = (t, e) => {
|
|
1980
2192
|
t && (t.data || (t.data = {}), t.data.attrs || (t.data.attrs = {}), typeof e == "object" && Object.assign(t.data.attrs, e));
|
|
1981
2193
|
}, w = {
|
|
1982
2194
|
// 默认实现:使用localStorage获取配置
|
|
@@ -2006,20 +2218,20 @@ const jt = Bt.exports, T = (t) => t ? t.data && t.data.attrs || {} : {}, L = (t,
|
|
|
2006
2218
|
return Promise.reject(e);
|
|
2007
2219
|
}
|
|
2008
2220
|
}
|
|
2009
|
-
},
|
|
2221
|
+
}, ei = (t) => w.getTableConfig(t.key), ti = (t) => w.setTableConfig(t), ii = (t) => {
|
|
2010
2222
|
t && (typeof t.getTableConfig == "function" && (w.getTableConfig = t.getTableConfig), typeof t.setTableConfig == "function" && (w.setTableConfig = t.setTableConfig));
|
|
2011
|
-
}, { t:
|
|
2012
|
-
formatter: (t, e, i,
|
|
2013
|
-
},
|
|
2223
|
+
}, { t: ai } = g(), si = !0, li = !1, ni = {
|
|
2224
|
+
formatter: (t, e, i, a) => [void 0, null, ""].includes(i) ? "-" : i
|
|
2225
|
+
}, ri = {
|
|
2014
2226
|
name: "TmColumnConfig",
|
|
2015
2227
|
components: {
|
|
2016
|
-
MoveIcon:
|
|
2017
|
-
FixedLeftIcon:
|
|
2018
|
-
FixedRightIcon:
|
|
2019
|
-
UploadIcon:
|
|
2020
|
-
DownloadIcon:
|
|
2021
|
-
DeleteIcon:
|
|
2022
|
-
MenuIcon:
|
|
2228
|
+
MoveIcon: fe,
|
|
2229
|
+
FixedLeftIcon: ge,
|
|
2230
|
+
FixedRightIcon: be,
|
|
2231
|
+
UploadIcon: ye,
|
|
2232
|
+
DownloadIcon: ve,
|
|
2233
|
+
DeleteIcon: Ce,
|
|
2234
|
+
MenuIcon: he,
|
|
2023
2235
|
tmEllipsisText: F
|
|
2024
2236
|
},
|
|
2025
2237
|
props: {
|
|
@@ -2057,9 +2269,9 @@ const jt = Bt.exports, T = (t) => t ? t.data && t.data.attrs || {} : {}, L = (t,
|
|
|
2057
2269
|
},
|
|
2058
2270
|
data() {
|
|
2059
2271
|
return {
|
|
2060
|
-
t:
|
|
2061
|
-
isVue2:
|
|
2062
|
-
isVue3:
|
|
2272
|
+
t: ai,
|
|
2273
|
+
isVue2: si,
|
|
2274
|
+
isVue3: li,
|
|
2063
2275
|
getDefaultSize: p,
|
|
2064
2276
|
getCompatSize: x,
|
|
2065
2277
|
buttonType: { type: "text" },
|
|
@@ -2154,31 +2366,31 @@ const jt = Bt.exports, T = (t) => t ? t.data && t.data.attrs || {} : {}, L = (t,
|
|
|
2154
2366
|
const t = this.columns || [];
|
|
2155
2367
|
let e = {};
|
|
2156
2368
|
this.defaultColumnsConfig = t.filter((i) => {
|
|
2157
|
-
const
|
|
2158
|
-
return !(!
|
|
2159
|
-
}).map((i,
|
|
2160
|
-
const
|
|
2161
|
-
L(i, l),
|
|
2162
|
-
const n =
|
|
2369
|
+
const a = T(i);
|
|
2370
|
+
return !(!a.prop || this.ignoredColumnConfigTypes.includes(a.type));
|
|
2371
|
+
}).map((i, a) => {
|
|
2372
|
+
const s = T(i), l = u(u({}, ni), s);
|
|
2373
|
+
L(i, l), s.prop && (e[s.prop] = i);
|
|
2374
|
+
const n = s.hasOwnProperty("visible") ? s.visible !== !1 : !0;
|
|
2163
2375
|
return {
|
|
2164
|
-
prop:
|
|
2376
|
+
prop: s.prop,
|
|
2165
2377
|
// label: attrs.label, // 移除label,避免国际化导致比较不一致
|
|
2166
|
-
fixed:
|
|
2167
|
-
sort:
|
|
2168
|
-
cancellable:
|
|
2378
|
+
fixed: s.fixed || "",
|
|
2379
|
+
sort: a,
|
|
2380
|
+
cancellable: s.hasOwnProperty("cancellable") ? s.cancellable : !0,
|
|
2169
2381
|
visible: n
|
|
2170
2382
|
};
|
|
2171
2383
|
}), this.columnMap = e;
|
|
2172
2384
|
},
|
|
2173
2385
|
// 加载列配置
|
|
2174
2386
|
loadColumnConfig() {
|
|
2175
|
-
|
|
2387
|
+
ei({
|
|
2176
2388
|
key: this.computedTableKey
|
|
2177
2389
|
}).then((t) => {
|
|
2178
2390
|
var i;
|
|
2179
2391
|
if (t.data.code !== 200) return;
|
|
2180
2392
|
let e = JSON.parse(((i = t.data) == null ? void 0 : i.data) || null) || {};
|
|
2181
|
-
e.columnsConfig && JSON.stringify(this.defaultColumnsConfig) === JSON.stringify(e.defaultColumnsConfig) ? this.tableColumns = e.columnsConfig.map((
|
|
2393
|
+
e.columnsConfig && JSON.stringify(this.defaultColumnsConfig) === JSON.stringify(e.defaultColumnsConfig) ? this.tableColumns = e.columnsConfig.map((a) => u({}, a)) : this.tableColumns = this.defaultColumnsConfig.map((a) => u({}, a)), this.processedColumns = this.applyColumnConfig(this.tableColumns), this.isConfigLoaded = !0, this.$emit("complete", {
|
|
2182
2394
|
columns: this.processedColumns,
|
|
2183
2395
|
isInitialLoad: !0
|
|
2184
2396
|
});
|
|
@@ -2190,24 +2402,24 @@ const jt = Bt.exports, T = (t) => t ? t.data && t.data.attrs || {} : {}, L = (t,
|
|
|
2190
2402
|
});
|
|
2191
2403
|
},
|
|
2192
2404
|
applyColumnConfig(t, e = !1) {
|
|
2193
|
-
let i = this.columns.filter((
|
|
2194
|
-
const l = T(
|
|
2405
|
+
let i = this.columns.filter((s) => {
|
|
2406
|
+
const l = T(s);
|
|
2195
2407
|
return this.ignoredColumnConfigTypes.includes(l.type);
|
|
2196
|
-
}),
|
|
2197
|
-
return [...t].sort((
|
|
2198
|
-
const n =
|
|
2408
|
+
}), a = [];
|
|
2409
|
+
return [...t].sort((s, l) => {
|
|
2410
|
+
const n = s.sort !== void 0 ? s.sort : 1 / 0, o = l.sort !== void 0 ? l.sort : 1 / 0;
|
|
2199
2411
|
return n - o;
|
|
2200
|
-
}).forEach((
|
|
2201
|
-
if (
|
|
2202
|
-
let l = this.columnMap[
|
|
2412
|
+
}).forEach((s) => {
|
|
2413
|
+
if (s.prop) {
|
|
2414
|
+
let l = this.columnMap[s.prop];
|
|
2203
2415
|
l && (L(l, {
|
|
2204
|
-
fixed:
|
|
2205
|
-
visible:
|
|
2206
|
-
}), (!e &&
|
|
2416
|
+
fixed: s.fixed || void 0,
|
|
2417
|
+
visible: s.visible
|
|
2418
|
+
}), (!e && s.visible || e) && a.push(l));
|
|
2207
2419
|
}
|
|
2208
|
-
}), i.forEach((
|
|
2209
|
-
L(
|
|
2210
|
-
}), [...i, ...
|
|
2420
|
+
}), i.forEach((s) => {
|
|
2421
|
+
L(s, { visible: !0 });
|
|
2422
|
+
}), [...i, ...a];
|
|
2211
2423
|
},
|
|
2212
2424
|
crateSortable() {
|
|
2213
2425
|
const t = this.$refs.sortListRef;
|
|
@@ -2230,27 +2442,27 @@ const jt = Bt.exports, T = (t) => t ? t.data && t.data.attrs || {} : {}, L = (t,
|
|
|
2230
2442
|
group: "columns",
|
|
2231
2443
|
dragClass: "sortable-drag",
|
|
2232
2444
|
onStart: ({ item: i }) => {
|
|
2233
|
-
const
|
|
2234
|
-
(l) => l.prop ===
|
|
2445
|
+
const a = i.getAttribute("data-prop"), s = this.sortedTableColumns.find(
|
|
2446
|
+
(l) => l.prop === a
|
|
2235
2447
|
);
|
|
2236
|
-
this.isDraggingFrozen =
|
|
2448
|
+
this.isDraggingFrozen = s && s.fixed === "left", this.isDraggingFrozenRight = s && s.fixed === "right", this.draggedItemIndex = Array.from(t.children).indexOf(i), i.classList.add("sortable-drag");
|
|
2237
2449
|
},
|
|
2238
2450
|
onMove: (i) => {
|
|
2239
|
-
const { target:
|
|
2240
|
-
if (!
|
|
2451
|
+
const { target: a, related: s } = i;
|
|
2452
|
+
if (!a || !s)
|
|
2241
2453
|
return !1;
|
|
2242
|
-
const l =
|
|
2243
|
-
return this.isDraggingFrozen && !o || this.isDraggingFrozenRight && !r || !this.isDraggingFrozen && !this.isDraggingFrozenRight && (o || r) ? (
|
|
2454
|
+
const l = s ? s.getAttribute("data-prop") : null, n = l ? this.sortedTableColumns.find((c) => c.prop === l) : null, o = n && n.fixed === "left", r = n && n.fixed === "right";
|
|
2455
|
+
return this.isDraggingFrozen && !o || this.isDraggingFrozenRight && !r || !this.isDraggingFrozen && !this.isDraggingFrozenRight && (o || r) ? (a.classList.add("no-drop-zone"), !1) : (document.querySelectorAll(".no-drop-zone").forEach((c) => {
|
|
2244
2456
|
c.classList.remove("no-drop-zone");
|
|
2245
2457
|
}), !0);
|
|
2246
2458
|
},
|
|
2247
|
-
onEnd: ({ item: i, newIndex:
|
|
2248
|
-
if (
|
|
2459
|
+
onEnd: ({ item: i, newIndex: a, oldIndex: s }) => {
|
|
2460
|
+
if (a === void 0 || s === void 0 || a < 0 || s < 0 || a >= this.sortedTableColumns.length || s >= this.sortedTableColumns.length)
|
|
2249
2461
|
return;
|
|
2250
2462
|
document.querySelectorAll(".no-drop-zone").forEach((_) => {
|
|
2251
2463
|
_.classList.remove("no-drop-zone");
|
|
2252
2464
|
}), i.classList.remove("sortable-drag");
|
|
2253
|
-
const l = this.sortedTableColumns[
|
|
2465
|
+
const l = this.sortedTableColumns[s], n = l.fixed === "left", o = l.fixed === "right", r = a > 0 ? this.sortedTableColumns[a - 1] : null, c = a < this.sortedTableColumns.length - 1 ? this.sortedTableColumns[a + 1] : null;
|
|
2254
2466
|
let b = !1;
|
|
2255
2467
|
if (n ? (r && r.fixed !== "left" || c && c.fixed === "right") && (b = !0) : o ? (r && r.fixed !== "right" || c && c.fixed !== "right") && (b = !0) : (r && r.fixed === "right" || c && c.fixed === "left") && (b = !0), b) {
|
|
2256
2468
|
this.rollbackSort();
|
|
@@ -2267,8 +2479,8 @@ const jt = Bt.exports, T = (t) => t ? t.data && t.data.attrs || {} : {}, L = (t,
|
|
|
2267
2479
|
updateSortAfterDrag() {
|
|
2268
2480
|
const t = this.$refs.sortListRef;
|
|
2269
2481
|
if (!t) return;
|
|
2270
|
-
Array.from(t.children || []).filter((i) => i && i.dataset && i.dataset.prop).map((i) => i.dataset.prop).forEach((i,
|
|
2271
|
-
this.sortedTableColumns.some((
|
|
2482
|
+
Array.from(t.children || []).filter((i) => i && i.dataset && i.dataset.prop).map((i) => i.dataset.prop).forEach((i, a) => {
|
|
2483
|
+
this.sortedTableColumns.some((s) => s.prop === i ? (s.sort = a, !0) : !1);
|
|
2272
2484
|
}), this.columnsCopy = JSON.parse(JSON.stringify(this.sortedTableColumns)), this.$emit("on-sort-change", this.sortedTableColumns);
|
|
2273
2485
|
},
|
|
2274
2486
|
// 移除了handleSearch方法,改用计算属性filteredSortedTableColumns
|
|
@@ -2340,25 +2552,25 @@ const jt = Bt.exports, T = (t) => t ? t.data && t.data.attrs || {} : {}, L = (t,
|
|
|
2340
2552
|
},
|
|
2341
2553
|
// 修改置顶方法,确保右侧固定列置顶时会取消固定
|
|
2342
2554
|
moveTop(t, e) {
|
|
2343
|
-
const i = this.sortedTableColumns,
|
|
2555
|
+
const i = this.sortedTableColumns, a = t.prop;
|
|
2344
2556
|
if (t.fixed === "right" && (t.fixed = ""), t.fixed === "left")
|
|
2345
2557
|
i.unshift(i.splice(e, 1)[0]);
|
|
2346
2558
|
else {
|
|
2347
|
-
const
|
|
2559
|
+
const s = this.findLastIndex(
|
|
2348
2560
|
this.sortedTableColumns,
|
|
2349
2561
|
(l) => l.fixed === "left"
|
|
2350
2562
|
);
|
|
2351
2563
|
i.splice(
|
|
2352
|
-
|
|
2564
|
+
s + 1,
|
|
2353
2565
|
0,
|
|
2354
2566
|
i.splice(e, 1)[0]
|
|
2355
2567
|
);
|
|
2356
2568
|
}
|
|
2357
2569
|
this.updateSortValues(), this.columnsCopy = JSON.parse(JSON.stringify(this.sortedTableColumns)), this.$emit("on-sort-change", this.sortedTableColumns), this.$nextTick(() => {
|
|
2358
|
-
const
|
|
2359
|
-
if (
|
|
2360
|
-
const l = Array.from(
|
|
2361
|
-
(n) => n.dataset && n.dataset.prop ===
|
|
2570
|
+
const s = this.$refs.sortListRef;
|
|
2571
|
+
if (s) {
|
|
2572
|
+
const l = Array.from(s.children).find(
|
|
2573
|
+
(n) => n.dataset && n.dataset.prop === a
|
|
2362
2574
|
);
|
|
2363
2575
|
l && l.scrollIntoView({ behavior: "smooth", block: "nearest" });
|
|
2364
2576
|
}
|
|
@@ -2367,32 +2579,32 @@ const jt = Bt.exports, T = (t) => t ? t.data && t.data.attrs || {} : {}, L = (t,
|
|
|
2367
2579
|
frozenLeftHandle(t) {
|
|
2368
2580
|
const e = this.sortedTableColumns, i = e.splice(t, 1)[0];
|
|
2369
2581
|
if (i.fixed = i.fixed === "left" ? "" : "left", i.fixed === "left") {
|
|
2370
|
-
const
|
|
2582
|
+
const a = this.findLastIndex(
|
|
2371
2583
|
this.sortedTableColumns,
|
|
2372
|
-
(
|
|
2584
|
+
(s) => s.fixed === "left"
|
|
2373
2585
|
);
|
|
2374
|
-
e.splice(
|
|
2586
|
+
e.splice(a + 1, 0, i);
|
|
2375
2587
|
} else {
|
|
2376
|
-
const
|
|
2588
|
+
const a = this.findLastIndex(
|
|
2377
2589
|
this.sortedTableColumns,
|
|
2378
|
-
(
|
|
2590
|
+
(s) => s.fixed === "left"
|
|
2379
2591
|
);
|
|
2380
|
-
e.splice(
|
|
2592
|
+
e.splice(a + 1, 0, i);
|
|
2381
2593
|
}
|
|
2382
2594
|
this.updateSortValues(), this.columnsCopy = JSON.parse(JSON.stringify(this.sortedTableColumns)), this.$emit("on-sort-change", this.sortedTableColumns);
|
|
2383
2595
|
},
|
|
2384
2596
|
frozenRightHandle(t) {
|
|
2385
2597
|
const e = this.sortedTableColumns, i = e.splice(t, 1)[0];
|
|
2386
2598
|
if (i.fixed = i.fixed === "right" ? "" : "right", i.fixed === "right") {
|
|
2387
|
-
const
|
|
2388
|
-
(
|
|
2599
|
+
const a = e.findIndex(
|
|
2600
|
+
(s) => s.fixed === "right"
|
|
2389
2601
|
);
|
|
2390
|
-
|
|
2602
|
+
a === -1 ? e.push(i) : e.splice(a, 0, i);
|
|
2391
2603
|
} else {
|
|
2392
|
-
const
|
|
2393
|
-
(
|
|
2604
|
+
const a = e.findIndex(
|
|
2605
|
+
(s) => s.fixed === "right"
|
|
2394
2606
|
);
|
|
2395
|
-
|
|
2607
|
+
a === -1 ? e.push(i) : e.splice(a, 0, i);
|
|
2396
2608
|
}
|
|
2397
2609
|
this.updateSortValues(), this.columnsCopy = JSON.parse(JSON.stringify(this.sortedTableColumns)), this.$emit("on-sort-change", this.sortedTableColumns);
|
|
2398
2610
|
},
|
|
@@ -2400,14 +2612,14 @@ const jt = Bt.exports, T = (t) => t ? t.data && t.data.attrs || {} : {}, L = (t,
|
|
|
2400
2612
|
var e;
|
|
2401
2613
|
this.updateSortValues();
|
|
2402
2614
|
const t = (e = this.tableColumns) == null ? void 0 : e.map((i) => {
|
|
2403
|
-
const
|
|
2615
|
+
const a = this.sortedTableColumns.find(
|
|
2404
2616
|
(o) => o.prop === i.prop
|
|
2405
2617
|
);
|
|
2406
|
-
|
|
2407
|
-
const n = i, { label:
|
|
2408
|
-
return
|
|
2618
|
+
a && (i.sort = a.sort, i.fixed = a.fixed, i.visible = a.visible);
|
|
2619
|
+
const n = i, { label: s } = n;
|
|
2620
|
+
return M(n, ["label"]);
|
|
2409
2621
|
});
|
|
2410
|
-
|
|
2622
|
+
ti({
|
|
2411
2623
|
key: this.computedTableKey,
|
|
2412
2624
|
info: JSON.stringify({
|
|
2413
2625
|
columnsConfig: t,
|
|
@@ -2439,7 +2651,7 @@ const jt = Bt.exports, T = (t) => t ? t.data && t.data.attrs || {} : {}, L = (t,
|
|
|
2439
2651
|
}
|
|
2440
2652
|
}
|
|
2441
2653
|
};
|
|
2442
|
-
var
|
|
2654
|
+
var oi = function() {
|
|
2443
2655
|
var e = this, i = e._self._c;
|
|
2444
2656
|
return i("el-popover", e._g(e._b({ attrs: { "popper-class": "column-config-popover", width: 680, "show-arrow": !1, placement: e.placement, trigger: "click" }, on: { show: e.handlePopoverShow, hide: e.handlePopoverHide }, scopedSlots: e._u([{ key: "reference", fn: function() {
|
|
2445
2657
|
return [i("div", { staticStyle: { display: "inline-block", "margin-left": "10px" } }, [i("el-tooltip", e._b({ attrs: { content: e.t("columnSetting"), placement: "top" } }, "el-tooltip", e.afterOpenDelay, !1), [i("el-button", { ref: "operationRef", attrs: { size: e.getDefaultSize(), circle: "" } }, [i("MenuIcon")], 1)], 1)], 1)];
|
|
@@ -2447,45 +2659,45 @@ var Zt = function() {
|
|
|
2447
2659
|
[e.isVue3 ? "visible" : "value"]: e.popoverVisible
|
|
2448
2660
|
}, !1), {
|
|
2449
2661
|
[e.isVue3 ? "update:visible" : "input"]: e.handleVisibleChange
|
|
2450
|
-
}), [e.popoverVisible ? i("div", { staticClass: "container" }, [i("div", { staticClass: "main-container" }, [i("div", { staticClass: "left-content" }, [i("div", { staticClass: "title" }, [i("span", [e._v(e._s(e.t("SelectableFields")) + "(" + e._s(e.tableColumns.length) + ")")]), i("el-button", e._b({ staticStyle: { "margin-left": "10px" }, on: { click: e.handleSelectAll } }, "el-button", e.buttonType, !1), [e._v(e._s(e.t("all")))])], 1), i("div", { staticClass: "option-list" }, [i("div", { staticStyle: { height: "100%", "overflow-y": "auto" } }, [e._l(e.tableColumns, function(
|
|
2451
|
-
return [
|
|
2452
|
-
e.$set(
|
|
2453
|
-
}, expression: "col.visible" } }, [i("TmEllipsisText", { attrs: { width: "80px", text: e.getColumnLabel(
|
|
2454
|
-
})], 2)])]), i("div", { staticClass: "right-content" }, [i("div", { staticClass: "search-box" }, [i("el-input", { staticClass: "search-input", attrs: { size: e.getCompatSize("small"), clearable: "", placeholder: e.t("search") }, model: { value: e.keyWord, callback: function(
|
|
2455
|
-
e.keyWord =
|
|
2456
|
-
}, expression: "keyWord" } })], 1), e.showFixedLimitTips ? i("div", { staticClass: "tips" }) : e._e(), i("div", { ref: "sortListRef", staticClass: "sort-list" }, e._l(e.filteredSortedTableColumns, function(
|
|
2457
|
-
return i("div", { key:
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
], attrs: { "data-prop":
|
|
2462
|
-
|
|
2463
|
-
} } }, "el-button", e.buttonType, !1), [i("DeleteIcon")], 1)], 1) : e._e(), e.canMoveTop(
|
|
2464
|
-
return e.moveTop(
|
|
2465
|
-
} } }, "el-button", e.buttonType, !1), [i("UploadIcon")], 1)], 1) : e._e(),
|
|
2466
|
-
return e.frozenLeftHandle(
|
|
2467
|
-
} } }, "el-button", e.buttonType, !1), [i("FixedLeftIcon")], 1)], 1) : e._e(),
|
|
2468
|
-
return e.frozenRightHandle(
|
|
2662
|
+
}), [e.popoverVisible ? i("div", { staticClass: "container" }, [i("div", { staticClass: "main-container" }, [i("div", { staticClass: "left-content" }, [i("div", { staticClass: "title" }, [i("span", [e._v(e._s(e.t("SelectableFields")) + "(" + e._s(e.tableColumns.length) + ")")]), i("el-button", e._b({ staticStyle: { "margin-left": "10px" }, on: { click: e.handleSelectAll } }, "el-button", e.buttonType, !1), [e._v(e._s(e.t("all")))])], 1), i("div", { staticClass: "option-list" }, [i("div", { staticStyle: { height: "100%", "overflow-y": "auto" } }, [e._l(e.tableColumns, function(a, s) {
|
|
2663
|
+
return [a.prop ? i("div", { key: s + a.prop, staticStyle: { width: "110px", display: "inline-block" } }, [i("el-checkbox", { staticClass: "el-checkbox", attrs: { disabled: !a.cancellable, label: a.prop, value: a.prop }, model: { value: a.visible, callback: function(l) {
|
|
2664
|
+
e.$set(a, "visible", l);
|
|
2665
|
+
}, expression: "col.visible" } }, [i("TmEllipsisText", { attrs: { width: "80px", text: e.getColumnLabel(a.prop) } })], 1)], 1) : e._e()];
|
|
2666
|
+
})], 2)])]), i("div", { staticClass: "right-content" }, [i("div", { staticClass: "search-box" }, [i("el-input", { staticClass: "search-input", attrs: { size: e.getCompatSize("small"), clearable: "", placeholder: e.t("search") }, model: { value: e.keyWord, callback: function(a) {
|
|
2667
|
+
e.keyWord = a;
|
|
2668
|
+
}, expression: "keyWord" } })], 1), e.showFixedLimitTips ? i("div", { staticClass: "tips" }) : e._e(), i("div", { ref: "sortListRef", staticClass: "sort-list" }, e._l(e.filteredSortedTableColumns, function(a, s) {
|
|
2669
|
+
return i("div", { key: a.prop, staticClass: "sort-item-wrapper", class: [
|
|
2670
|
+
a.fixed === "left" ? "frozen" : "",
|
|
2671
|
+
a.fixed === "right" ? "frozenRight" : "",
|
|
2672
|
+
a.fixed ? "" : "noFrozen"
|
|
2673
|
+
], attrs: { "data-prop": a.prop } }, [a.visible ? i("div", { staticClass: "sort-item" }, [i("div", { staticClass: "row-title" }, [i("MoveIcon", { staticStyle: { "flex-shrink": "0" } }), i("TmEllipsisText", { attrs: { text: e.getColumnLabel(a.prop) } })], 1), i("div", { staticClass: "operation-btns" }, [a.cancellable ? i("el-tooltip", e._b({ attrs: { content: e.t("cancel"), placement: "top" } }, "el-tooltip", e.afterOpenDelay, !1), [i("el-button", e._b({ staticClass: "iconfont-button delete-button", attrs: { size: e.getCompatSize("mini") }, on: { click: function(l) {
|
|
2674
|
+
a.visible = !1;
|
|
2675
|
+
} } }, "el-button", e.buttonType, !1), [i("DeleteIcon")], 1)], 1) : e._e(), e.canMoveTop(a, s) ? i("el-tooltip", e._b({ attrs: { content: e.t("top"), placement: "top" } }, "el-tooltip", e.afterOpenDelay, !1), [i("el-button", e._b({ staticClass: "iconfont-button top-button", attrs: { size: e.getCompatSize("mini") }, on: { click: function(l) {
|
|
2676
|
+
return e.moveTop(a, s);
|
|
2677
|
+
} } }, "el-button", e.buttonType, !1), [i("UploadIcon")], 1)], 1) : e._e(), a.fixed !== "right" ? i("el-tooltip", e._b({ attrs: { content: a.fixed === "left" ? e.t("cancelLeftFixed") : e.t("leftFixed"), placement: "top" } }, "el-tooltip", e.afterOpenDelay, !1), [i("el-button", e._b({ staticClass: "iconfont-button left-fixed-btn", class: { "active-fixed": a.fixed === "left" }, attrs: { size: e.getCompatSize("mini"), disabled: a.fixed !== "left" && e.isThanMaxFrozen }, on: { click: function(l) {
|
|
2678
|
+
return e.frozenLeftHandle(s);
|
|
2679
|
+
} } }, "el-button", e.buttonType, !1), [i("FixedLeftIcon")], 1)], 1) : e._e(), a.fixed !== "left" ? i("el-tooltip", e._b({ attrs: { content: a.fixed === "right" ? e.t("cancelRightFixed") : e.t("rightFixed"), placement: "top" } }, "el-tooltip", e.afterOpenDelay, !1), [i("el-button", e._b({ staticClass: "iconfont-button right-fixed-btn", class: { "active-fixed": a.fixed === "right" }, attrs: { size: e.getCompatSize("mini"), disabled: a.fixed !== "right" && e.isThanMaxRightFrozen }, on: { click: function(l) {
|
|
2680
|
+
return e.frozenRightHandle(s);
|
|
2469
2681
|
} } }, "el-button", e.buttonType, !1), [i("FixedRightIcon")], 1)], 1) : e._e()], 1)]) : e._e()]);
|
|
2470
|
-
}), 0)])]), i("div", { staticClass: "footer" }, [i("div", { staticClass: "footer-left" }, [i("el-button", { attrs: { size: e.getCompatSize("mini") }, on: { click: e.handleRestoreDefault } }, [e._v(e._s(e.t("restoreDefault")))])], 1), i("div", { staticClass: "footer-right" }, [i("el-button", { attrs: { size: e.getCompatSize("mini") }, on: { click: function(
|
|
2682
|
+
}), 0)])]), i("div", { staticClass: "footer" }, [i("div", { staticClass: "footer-left" }, [i("el-button", { attrs: { size: e.getCompatSize("mini") }, on: { click: e.handleRestoreDefault } }, [e._v(e._s(e.t("restoreDefault")))])], 1), i("div", { staticClass: "footer-right" }, [i("el-button", { attrs: { size: e.getCompatSize("mini") }, on: { click: function(a) {
|
|
2471
2683
|
e.popoverVisible = !1;
|
|
2472
2684
|
} } }, [e._v(e._s(e.t("cancel")))]), i("el-button", { attrs: { size: e.getCompatSize("mini"), type: "primary" }, on: { click: e.onSave } }, [e._v(e._s(e.t("saveAndApply")))])], 1)])]) : e._e()]);
|
|
2473
|
-
},
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
|
|
2685
|
+
}, ui = [], di = /* @__PURE__ */ d(
|
|
2686
|
+
ri,
|
|
2687
|
+
oi,
|
|
2688
|
+
ui,
|
|
2477
2689
|
!1,
|
|
2478
2690
|
null,
|
|
2479
2691
|
"127cbd33"
|
|
2480
2692
|
);
|
|
2481
|
-
const
|
|
2693
|
+
const ci = di.exports, hi = !0, pi = !1, fi = {
|
|
2482
2694
|
name: "TmTable",
|
|
2483
2695
|
components: {
|
|
2484
|
-
TableSearch:
|
|
2485
|
-
TablePagination:
|
|
2486
|
-
TableMenu:
|
|
2487
|
-
ColumnConfig:
|
|
2488
|
-
RefreshIcon:
|
|
2696
|
+
TableSearch: q,
|
|
2697
|
+
TablePagination: qt,
|
|
2698
|
+
TableMenu: Zt,
|
|
2699
|
+
ColumnConfig: ci,
|
|
2700
|
+
RefreshIcon: pe,
|
|
2489
2701
|
// 用于渲染VNode的组件
|
|
2490
2702
|
ColumnRenderer: {
|
|
2491
2703
|
props: ["vnode"],
|
|
@@ -2589,14 +2801,19 @@ const ii = ti.exports, si = !0, ai = !1, li = {
|
|
|
2589
2801
|
type: String,
|
|
2590
2802
|
default: void 0,
|
|
2591
2803
|
validator: (t) => !t || ["horizontal", "vertical"].includes(t)
|
|
2804
|
+
},
|
|
2805
|
+
labelAlign: {
|
|
2806
|
+
type: String,
|
|
2807
|
+
default: "right",
|
|
2808
|
+
validator: (t) => ["left", "right", "center"].includes(t)
|
|
2592
2809
|
}
|
|
2593
2810
|
},
|
|
2594
2811
|
data() {
|
|
2595
2812
|
return {
|
|
2596
2813
|
getDefaultSize: p,
|
|
2597
2814
|
getCompatSize: x,
|
|
2598
|
-
isVue3:
|
|
2599
|
-
isVue2:
|
|
2815
|
+
isVue3: pi,
|
|
2816
|
+
isVue2: hi,
|
|
2600
2817
|
t: g().t,
|
|
2601
2818
|
tableData: [],
|
|
2602
2819
|
tableLoading: !1,
|
|
@@ -2687,10 +2904,10 @@ const ii = ti.exports, si = !0, ai = !1, li = {
|
|
|
2687
2904
|
current: this.paginationInfo.current
|
|
2688
2905
|
},
|
|
2689
2906
|
params: this.searchForm
|
|
2690
|
-
}), { list: e, total: i, pageSize:
|
|
2907
|
+
}), { list: e, total: i, pageSize: a, current: s } = t;
|
|
2691
2908
|
this.tableData = e;
|
|
2692
2909
|
let l = u({}, this.paginationInfo);
|
|
2693
|
-
i !== void 0 && (l.total = i),
|
|
2910
|
+
i !== void 0 && (l.total = i), s !== void 0 && (l.current = s), a !== void 0 && (l.pageSize = a), this.paginationInfo = l;
|
|
2694
2911
|
} catch (t) {
|
|
2695
2912
|
} finally {
|
|
2696
2913
|
this.tableLoading = !1;
|
|
@@ -2702,8 +2919,8 @@ const ii = ti.exports, si = !0, ai = !1, li = {
|
|
|
2702
2919
|
this.isAutoHeight() ? this.$nextTick(() => {
|
|
2703
2920
|
const t = this.$refs.table, e = this.$refs.tmPagination;
|
|
2704
2921
|
if (!t) return;
|
|
2705
|
-
const i = t.$el,
|
|
2706
|
-
this.tableHeight = document.documentElement.clientHeight - i.offsetTop -
|
|
2922
|
+
const i = t.$el, a = e && e.$el && e.$el.offsetHeight || 0;
|
|
2923
|
+
this.tableHeight = document.documentElement.clientHeight - i.offsetTop - a - this.calcHeight;
|
|
2707
2924
|
}) : this.tableHeight = this.height, this.refreshTable();
|
|
2708
2925
|
},
|
|
2709
2926
|
// 处理查询
|
|
@@ -2738,24 +2955,24 @@ const ii = ti.exports, si = !0, ai = !1, li = {
|
|
|
2738
2955
|
}
|
|
2739
2956
|
}
|
|
2740
2957
|
};
|
|
2741
|
-
var
|
|
2958
|
+
var mi = function() {
|
|
2742
2959
|
var e = this, i = e._self._c;
|
|
2743
|
-
return i("div", { ref: "tablePage", staticClass: "tm-table" }, [e.searchColumns && e.searchColumns.length > 0 ? i("table-search", { ref: "search", attrs: { disabled: e.pageLoading, "search-columns": e.searchColumns, "search-form": e.searchForm, "label-width": e.labelWidth, "input-width": e.inputWidth, direction: e.direction }, on: { search: e.search, reset: e.reset, "update:search-form": e.handleUpdateSearchForm } }, [e._t("search")], 2) : e._e(), e._t("between-search-menu"), e.showMenu ? i("table-menu", { scopedSlots: e._u([{ key: "left", fn: function() {
|
|
2960
|
+
return i("div", { ref: "tablePage", staticClass: "tm-table" }, [e.searchColumns && e.searchColumns.length > 0 ? i("table-search", { ref: "search", attrs: { disabled: e.pageLoading, "search-columns": e.searchColumns, "search-form": e.searchForm, "label-width": e.labelWidth, "input-width": e.inputWidth, direction: e.direction, "label-align": e.labelAlign }, on: { search: e.search, reset: e.reset, "update:search-form": e.handleUpdateSearchForm } }, [e._t("search")], 2) : e._e(), e._t("between-search-menu"), e.showMenu ? i("table-menu", { scopedSlots: e._u([{ key: "left", fn: function() {
|
|
2744
2961
|
return [e._t("menu-left")];
|
|
2745
2962
|
}, proxy: !0 }, { key: "right", fn: function() {
|
|
2746
2963
|
return [e._t("menu-right"), e.refreshButton && typeof e.data == "function" ? i("el-tooltip", e._b({ attrs: { content: e.t("refresh"), placement: "top" } }, "el-tooltip", e.afterOpenDelay, !1), [i("el-button", { attrs: { circle: "", size: e.getDefaultSize() }, on: { click: e.handleRefresh } }, [i("RefreshIcon")], 1)], 1) : e._e(), e.columnSettingButton ? i("ColumnConfig", { attrs: { maxFixedLeftQuantity: e.maxFixedLeftQuantity, maxFixedRightQuantity: e.maxFixedRightQuantity, tableKey: e.computedTableKey, columns: e.originalColumns }, on: { complete: e.handleColumnConfigComplete } }) : e._e()];
|
|
2747
|
-
}, proxy: !0 }], null, !0) }) : e._e(), e._t("between-menu-table"), i("el-table", e._g(e._b({ directives: [{ name: "loading", rawName: "v-loading", value: e.pageLoading, expression: "pageLoading" }], key: e.tableReload, ref: "table", attrs: { data: e.tableData, height: e.tableHeight, size: e.getCompatSize("mini") }, on: { "selection-change": e.handleSelectionChange } }, "el-table", m(u({}, e.$attrs), { border: e.border }), !1), e.isVue2 ? e.$listeners : {}), e._l(e.displayColumns, function(
|
|
2748
|
-
return i("columnRenderer", { key: e.isVue3 ?
|
|
2964
|
+
}, proxy: !0 }], null, !0) }) : e._e(), e._t("between-menu-table"), i("el-table", e._g(e._b({ directives: [{ name: "loading", rawName: "v-loading", value: e.pageLoading, expression: "pageLoading" }], key: e.tableReload, ref: "table", attrs: { data: e.tableData, height: e.tableHeight, size: e.getCompatSize("mini") }, on: { "selection-change": e.handleSelectionChange } }, "el-table", m(u({}, e.$attrs), { border: e.border }), !1), e.isVue2 ? e.$listeners : {}), e._l(e.displayColumns, function(a) {
|
|
2965
|
+
return i("columnRenderer", { key: e.isVue3 ? a.id : a.data.attrs.prop, attrs: { vnode: a } });
|
|
2749
2966
|
}), 1), e._t("between-table-pagination"), e.computedShowPagination ? i("table-pagination", { ref: "tmPagination", attrs: { "page-size": e.paginationInfo.pageSize, current: e.paginationInfo.current, total: e.paginationInfo.total, disabled: e.tableLoading }, on: { "size-change": e.handleSizeChange, "current-change": e.handleCurrentChange } }) : e._e(), e._t("after-pagination")], 2);
|
|
2750
|
-
},
|
|
2751
|
-
|
|
2752
|
-
|
|
2753
|
-
|
|
2967
|
+
}, gi = [], bi = /* @__PURE__ */ d(
|
|
2968
|
+
fi,
|
|
2969
|
+
mi,
|
|
2970
|
+
gi,
|
|
2754
2971
|
!1,
|
|
2755
2972
|
null,
|
|
2756
|
-
"
|
|
2973
|
+
"020e8134"
|
|
2757
2974
|
);
|
|
2758
|
-
const
|
|
2975
|
+
const Q = bi.exports, yi = !0, vi = !1, Ci = {
|
|
2759
2976
|
name: "TmTableColumn",
|
|
2760
2977
|
inheritAttrs: !1,
|
|
2761
2978
|
computed: {
|
|
@@ -2768,8 +2985,8 @@ const J = oi.exports, ui = !0, di = !1, ci = {
|
|
|
2768
2985
|
},
|
|
2769
2986
|
data() {
|
|
2770
2987
|
return {
|
|
2771
|
-
isVue2:
|
|
2772
|
-
isVue3:
|
|
2988
|
+
isVue2: yi,
|
|
2989
|
+
isVue3: vi
|
|
2773
2990
|
};
|
|
2774
2991
|
},
|
|
2775
2992
|
created() {
|
|
@@ -2779,25 +2996,25 @@ const J = oi.exports, ui = !0, di = !1, ci = {
|
|
|
2779
2996
|
});
|
|
2780
2997
|
}
|
|
2781
2998
|
};
|
|
2782
|
-
var
|
|
2999
|
+
var _i = function() {
|
|
2783
3000
|
var e = this, i = e._self._c;
|
|
2784
|
-
return e.isVisible ? i("el-table-column", e._g(e._b({ scopedSlots: e._u([e._l(e.slots, function(
|
|
2785
|
-
return { key:
|
|
2786
|
-
return [e._t(
|
|
3001
|
+
return e.isVisible ? i("el-table-column", e._g(e._b({ scopedSlots: e._u([e._l(e.slots, function(a, s) {
|
|
3002
|
+
return { key: s, fn: function(l) {
|
|
3003
|
+
return [e._t(s, null, null, l)];
|
|
2787
3004
|
} };
|
|
2788
3005
|
})], null, !0) }, "el-table-column", e.$attrs, !1), e.isVue2 ? e.$listeners : {})) : e._e();
|
|
2789
|
-
},
|
|
2790
|
-
|
|
2791
|
-
|
|
2792
|
-
|
|
3006
|
+
}, xi = [], Si = /* @__PURE__ */ d(
|
|
3007
|
+
Ci,
|
|
3008
|
+
_i,
|
|
3009
|
+
xi,
|
|
2793
3010
|
!1,
|
|
2794
3011
|
null,
|
|
2795
3012
|
null
|
|
2796
3013
|
);
|
|
2797
|
-
const
|
|
3014
|
+
const G = Si.exports, { t: k } = g(), $i = {
|
|
2798
3015
|
name: "TmAdvancedEllipsisText",
|
|
2799
3016
|
components: {
|
|
2800
|
-
CopyIcon:
|
|
3017
|
+
CopyIcon: E
|
|
2801
3018
|
},
|
|
2802
3019
|
props: {
|
|
2803
3020
|
rows: {
|
|
@@ -2914,7 +3131,7 @@ const K = fi.exports, { t: V } = g(), mi = {
|
|
|
2914
3131
|
},
|
|
2915
3132
|
handleCopy() {
|
|
2916
3133
|
navigator.clipboard && window.isSecureContext ? navigator.clipboard.writeText(this.originalText).then(() => {
|
|
2917
|
-
this.$message.success(
|
|
3134
|
+
this.$message.success(k("copySuccess"));
|
|
2918
3135
|
}).catch(() => {
|
|
2919
3136
|
this.fallbackCopy();
|
|
2920
3137
|
}) : this.fallbackCopy();
|
|
@@ -2923,9 +3140,9 @@ const K = fi.exports, { t: V } = g(), mi = {
|
|
|
2923
3140
|
const t = document.createElement("textarea");
|
|
2924
3141
|
t.value = this.originalText, t.style.position = "fixed", t.style.left = "-999999px", t.style.top = "-999999px", document.body.appendChild(t), t.focus(), t.select();
|
|
2925
3142
|
try {
|
|
2926
|
-
document.execCommand("copy"), this.$message.success(
|
|
3143
|
+
document.execCommand("copy"), this.$message.success(k("copySuccess"));
|
|
2927
3144
|
} catch (e) {
|
|
2928
|
-
this.$message.error(
|
|
3145
|
+
this.$message.error(k("copyFailed"));
|
|
2929
3146
|
}
|
|
2930
3147
|
document.body.removeChild(t);
|
|
2931
3148
|
},
|
|
@@ -2944,15 +3161,15 @@ const K = fi.exports, { t: V } = g(), mi = {
|
|
|
2944
3161
|
wordBreak: "break-all",
|
|
2945
3162
|
whiteSpace: "normal"
|
|
2946
3163
|
}), i.textContent = "测", i.offsetHeight;
|
|
2947
|
-
const
|
|
2948
|
-
i.innerHTML = "", this.lineHeight =
|
|
3164
|
+
const a = i.offsetHeight;
|
|
3165
|
+
i.innerHTML = "", this.lineHeight = a;
|
|
2949
3166
|
} else {
|
|
2950
|
-
const
|
|
2951
|
-
if (
|
|
2952
|
-
this.lineHeight = parseInt(
|
|
3167
|
+
const a = e.lineHeight;
|
|
3168
|
+
if (a && a !== "normal")
|
|
3169
|
+
this.lineHeight = parseInt(a);
|
|
2953
3170
|
else {
|
|
2954
|
-
const
|
|
2955
|
-
this.lineHeight =
|
|
3171
|
+
const s = parseInt(e.fontSize);
|
|
3172
|
+
this.lineHeight = s * 1.2;
|
|
2956
3173
|
}
|
|
2957
3174
|
}
|
|
2958
3175
|
},
|
|
@@ -2978,9 +3195,9 @@ const K = fi.exports, { t: V } = g(), mi = {
|
|
|
2978
3195
|
if (this.getTextHeight(t) <= e)
|
|
2979
3196
|
this.frontLines = [], this.lastLineText = t, this.isLastLineEllipsis = this.checkIfTextOverflows(t);
|
|
2980
3197
|
else {
|
|
2981
|
-
const
|
|
2982
|
-
this.frontLines = this.splitTextToLines(
|
|
2983
|
-
const l = t.substring(
|
|
3198
|
+
const a = this.lineHeight * (this.rows - 1), s = this.findTextForHeight(t, a);
|
|
3199
|
+
this.frontLines = this.splitTextToLines(s);
|
|
3200
|
+
const l = t.substring(s.length);
|
|
2984
3201
|
this.lastLineText = l, this.isLastLineEllipsis = l.length > 0 && this.checkIfTextOverflows(l);
|
|
2985
3202
|
}
|
|
2986
3203
|
}
|
|
@@ -2989,28 +3206,28 @@ const K = fi.exports, { t: V } = g(), mi = {
|
|
|
2989
3206
|
findTextForHeight(t, e) {
|
|
2990
3207
|
if (this.getTextHeight(t) <= e)
|
|
2991
3208
|
return t;
|
|
2992
|
-
let i = 0,
|
|
2993
|
-
for (; i <=
|
|
2994
|
-
const l = Math.floor((i +
|
|
2995
|
-
this.getTextHeight(n) <= e ? (
|
|
3209
|
+
let i = 0, a = t.length, s = "";
|
|
3210
|
+
for (; i <= a; ) {
|
|
3211
|
+
const l = Math.floor((i + a) / 2), n = t.substring(0, l);
|
|
3212
|
+
this.getTextHeight(n) <= e ? (s = n, i = l + 1) : a = l - 1;
|
|
2996
3213
|
}
|
|
2997
|
-
return
|
|
3214
|
+
return s;
|
|
2998
3215
|
},
|
|
2999
3216
|
splitTextToLines(t) {
|
|
3000
3217
|
if (!t) return [];
|
|
3001
3218
|
const e = [];
|
|
3002
3219
|
let i = t;
|
|
3003
3220
|
for (; i.length > 0; ) {
|
|
3004
|
-
const
|
|
3005
|
-
if (
|
|
3006
|
-
e.push(
|
|
3221
|
+
const a = this.findTextForHeight(i, this.lineHeight);
|
|
3222
|
+
if (a.length === 0) break;
|
|
3223
|
+
e.push(a), i = i.substring(a.length);
|
|
3007
3224
|
}
|
|
3008
3225
|
return e;
|
|
3009
3226
|
},
|
|
3010
3227
|
checkIfTextOverflows(t) {
|
|
3011
3228
|
if (!t) return !1;
|
|
3012
|
-
const e = this.getTextWidth(t), i = this.shouldShowToolbar && this.hasToolbarContent ? this.getToolbarWidth() : 0,
|
|
3013
|
-
return e >
|
|
3229
|
+
const e = this.getTextWidth(t), i = this.shouldShowToolbar && this.hasToolbarContent ? this.getToolbarWidth() : 0, a = this.containerWidth - i - 5;
|
|
3230
|
+
return e > a;
|
|
3014
3231
|
},
|
|
3015
3232
|
getToolbarWidth() {
|
|
3016
3233
|
let t = 0;
|
|
@@ -3029,15 +3246,15 @@ const K = fi.exports, { t: V } = g(), mi = {
|
|
|
3029
3246
|
measureText(t, e = {}) {
|
|
3030
3247
|
if (!this.$refs.containerRef || !this.$refs.measureRef)
|
|
3031
3248
|
return 0;
|
|
3032
|
-
const i = this.$refs.measureRef,
|
|
3249
|
+
const i = this.$refs.measureRef, a = i.style.cssText;
|
|
3033
3250
|
this.setMeasureElementStyle(i, e), i.textContent = t, i.offsetHeight;
|
|
3034
|
-
const
|
|
3035
|
-
return i.style.cssText =
|
|
3251
|
+
const s = e.whiteSpace === "nowrap" ? i.offsetWidth : i.offsetHeight;
|
|
3252
|
+
return i.style.cssText = a, i.innerHTML = "", s;
|
|
3036
3253
|
},
|
|
3037
3254
|
setMeasureElementStyle(t, e = {}) {
|
|
3038
3255
|
const i = window.getComputedStyle(this.$refs.containerRef);
|
|
3039
|
-
t.style.cssText = "", t.style.position = "absolute", t.style.left = "-9999px", t.style.top = "-9999px", t.style.visibility = "hidden", t.style.pointerEvents = "none", t.style.zIndex = "-1", t.style.fontSize = i.fontSize, t.style.fontFamily = i.fontFamily, t.style.fontWeight = i.fontWeight, t.style.lineHeight = i.lineHeight, t.style.letterSpacing = i.letterSpacing, t.style.wordSpacing = i.wordSpacing, t.style.padding = "0", t.style.margin = "0", t.style.border = "none", t.style.boxSizing = "border-box", Object.entries(e).forEach(([
|
|
3040
|
-
t.style[
|
|
3256
|
+
t.style.cssText = "", t.style.position = "absolute", t.style.left = "-9999px", t.style.top = "-9999px", t.style.visibility = "hidden", t.style.pointerEvents = "none", t.style.zIndex = "-1", t.style.fontSize = i.fontSize, t.style.fontFamily = i.fontFamily, t.style.fontWeight = i.fontWeight, t.style.lineHeight = i.lineHeight, t.style.letterSpacing = i.letterSpacing, t.style.wordSpacing = i.wordSpacing, t.style.padding = "0", t.style.margin = "0", t.style.border = "none", t.style.boxSizing = "border-box", Object.entries(e).forEach(([a, s]) => {
|
|
3257
|
+
t.style[a] = s;
|
|
3041
3258
|
});
|
|
3042
3259
|
},
|
|
3043
3260
|
handleMouseEnter() {
|
|
@@ -3076,59 +3293,61 @@ const K = fi.exports, { t: V } = g(), mi = {
|
|
|
3076
3293
|
}
|
|
3077
3294
|
}
|
|
3078
3295
|
};
|
|
3079
|
-
var
|
|
3296
|
+
var Ti = function() {
|
|
3080
3297
|
var e = this, i = e._self._c;
|
|
3081
3298
|
return i("div", { ref: "containerRef", staticClass: "tm-ellipsis-text", style: e.containerStyle, on: { mouseenter: e.handleMouseEnter, mouseleave: e.handleMouseLeave } }, [e.showTooltip && e.isLastLineEllipsis ? i("el-tooltip", e._b({ attrs: { content: e.originalText, disabled: !e.showTooltip || !e.isLastLineEllipsis, placement: "top" } }, "el-tooltip", {
|
|
3082
3299
|
[e.isVue2 ? "open-delay" : "show-after"]: 300
|
|
3083
|
-
}, !1), [i("div", { staticClass: "tm-ellipsis-text-wrapper" }, [e._l(e.frontLines, function(
|
|
3084
|
-
return i("div", { key: "front-" +
|
|
3085
|
-
}), i("div", { staticClass: "tm-ellipsis-last-line" }, [i("div", { staticClass: "tm-ellipsis-text-part", domProps: { innerHTML: e._s(e.lastLineText) } }), e.shouldShowToolbar && e.hasToolbarContent ? i("div", { staticClass: "tm-ellipsis-toolbar-part" }, [e.copyable ? i("CopyIcon", { staticClass: "icon-item", on: { click: e.handleCopy } }) : e._e(), e._t("toolbar")], 2) : e._e()])], 2)]) : i("div", { staticClass: "tm-ellipsis-text-wrapper" }, [e._l(e.frontLines, function(
|
|
3086
|
-
return i("div", { key: "front-" +
|
|
3300
|
+
}, !1), [i("div", { staticClass: "tm-ellipsis-text-wrapper" }, [e._l(e.frontLines, function(a, s) {
|
|
3301
|
+
return i("div", { key: "front-" + s, staticClass: "tm-ellipsis-line", domProps: { innerHTML: e._s(a) } });
|
|
3302
|
+
}), i("div", { staticClass: "tm-ellipsis-last-line" }, [i("div", { staticClass: "tm-ellipsis-text-part", domProps: { innerHTML: e._s(e.lastLineText) } }), e.shouldShowToolbar && e.hasToolbarContent ? i("div", { staticClass: "tm-ellipsis-toolbar-part" }, [e.copyable ? i("CopyIcon", { staticClass: "icon-item", on: { click: e.handleCopy } }) : e._e(), e._t("toolbar")], 2) : e._e()])], 2)]) : i("div", { staticClass: "tm-ellipsis-text-wrapper" }, [e._l(e.frontLines, function(a, s) {
|
|
3303
|
+
return i("div", { key: "front-" + s, staticClass: "tm-ellipsis-line", domProps: { innerHTML: e._s(a) } });
|
|
3087
3304
|
}), i("div", { staticClass: "tm-ellipsis-last-line" }, [i("div", { staticClass: "tm-ellipsis-text-part", domProps: { innerHTML: e._s(e.lastLineText) } }), e.shouldShowToolbar && e.hasToolbarContent ? i("div", { staticClass: "tm-ellipsis-toolbar-part" }, [e.copyable ? i("CopyIcon", { staticClass: "icon-item", on: { click: e.handleCopy } }) : e._e(), e._t("toolbar")], 2) : e._e()])], 2), i("div", { ref: "measureRef", staticClass: "tm-ellipsis-measure" })], 1);
|
|
3088
|
-
},
|
|
3089
|
-
|
|
3090
|
-
|
|
3091
|
-
|
|
3305
|
+
}, wi = [], Fi = /* @__PURE__ */ d(
|
|
3306
|
+
$i,
|
|
3307
|
+
Ti,
|
|
3308
|
+
wi,
|
|
3092
3309
|
!1,
|
|
3093
3310
|
null,
|
|
3094
3311
|
"14f27c2e"
|
|
3095
3312
|
);
|
|
3096
|
-
const
|
|
3313
|
+
const Y = Fi.exports, Vi = {
|
|
3097
3314
|
install(t, e = {}) {
|
|
3098
|
-
[
|
|
3315
|
+
[Q, G, F, Y].forEach((i) => t.component(i.name, i)), e.tableConfigProvider && ii(e.tableConfigProvider), e.lang && O(e.lang || "zh-CN");
|
|
3099
3316
|
}
|
|
3100
|
-
},
|
|
3101
|
-
install:
|
|
3102
|
-
Table:
|
|
3103
|
-
Column:
|
|
3104
|
-
Search:
|
|
3105
|
-
Select:
|
|
3106
|
-
|
|
3107
|
-
|
|
3108
|
-
Cascader:
|
|
3109
|
-
Radio:
|
|
3110
|
-
Checkbox:
|
|
3111
|
-
Switch:
|
|
3317
|
+
}, zi = {
|
|
3318
|
+
install: Vi.install,
|
|
3319
|
+
Table: Q,
|
|
3320
|
+
Column: G,
|
|
3321
|
+
Search: q,
|
|
3322
|
+
Select: I,
|
|
3323
|
+
Input: N,
|
|
3324
|
+
Date: P,
|
|
3325
|
+
Cascader: B,
|
|
3326
|
+
Radio: j,
|
|
3327
|
+
Checkbox: U,
|
|
3328
|
+
Switch: J,
|
|
3329
|
+
Textarea: K,
|
|
3112
3330
|
EllipsisText: F,
|
|
3113
|
-
AdvancedEllipsisText:
|
|
3114
|
-
setLang:
|
|
3331
|
+
AdvancedEllipsisText: Y,
|
|
3332
|
+
setLang: O,
|
|
3115
3333
|
useLocale: g
|
|
3116
3334
|
};
|
|
3117
|
-
typeof window != "undefined" && window.Vue &&
|
|
3335
|
+
typeof window != "undefined" && window.Vue && zi.install(window.Vue);
|
|
3118
3336
|
export {
|
|
3119
|
-
|
|
3120
|
-
|
|
3121
|
-
|
|
3122
|
-
|
|
3123
|
-
|
|
3124
|
-
K as Column,
|
|
3337
|
+
Y as AdvancedEllipsisText,
|
|
3338
|
+
B as Cascader,
|
|
3339
|
+
U as Checkbox,
|
|
3340
|
+
G as Column,
|
|
3341
|
+
P as Date,
|
|
3125
3342
|
F as EllipsisText,
|
|
3126
|
-
|
|
3127
|
-
|
|
3128
|
-
|
|
3129
|
-
|
|
3130
|
-
J as
|
|
3131
|
-
|
|
3132
|
-
|
|
3343
|
+
N as Input,
|
|
3344
|
+
j as Radio,
|
|
3345
|
+
q as Search,
|
|
3346
|
+
I as Select,
|
|
3347
|
+
J as Switch,
|
|
3348
|
+
Q as Table,
|
|
3349
|
+
K as Textarea,
|
|
3350
|
+
zi as default,
|
|
3351
|
+
O as setLang,
|
|
3133
3352
|
g as useLocale
|
|
3134
3353
|
};
|