tm-table 1.0.82 → 1.0.84
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/dist/vue2/tm-table.css +1 -1
- package/dist/vue2/tm-table.es.js +547 -238
- package/dist/vue2/tm-table.umd.js +1 -1
- package/dist/vue3/tm-table.css +1 -1
- package/dist/vue3/tm-table.es.js +1061 -689
- package/dist/vue3/tm-table.umd.js +1 -1
- package/package.json +1 -1
package/dist/vue3/tm-table.es.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import
|
|
3
|
-
const
|
|
1
|
+
import { ref as fe, resolveComponent as d, createElementBlock as m, openBlock as a, normalizeClass as L, createBlock as b, createCommentVNode as v, createVNode as g, normalizeStyle as U, withCtx as p, Fragment as w, renderList as F, mergeProps as C, toHandlers as A, createSlots as Y, renderSlot as z, createTextVNode as V, toDisplayString as _, createElementVNode as y, h as pe, withKeys as me, resolveDirective as ge, withDirectives as be, normalizeProps as ye, guardReactiveProps as ve } from "vue";
|
|
2
|
+
import H from "sortablejs";
|
|
3
|
+
const Z = {
|
|
4
4
|
mini: "small",
|
|
5
5
|
small: "small",
|
|
6
6
|
default: "default",
|
|
7
7
|
large: "large"
|
|
8
|
-
}, B = (e) =>
|
|
8
|
+
}, B = (e) => Z[e] || Z.default, D = () => "default", Ce = {
|
|
9
9
|
today: "今天",
|
|
10
10
|
yesterday: "昨天",
|
|
11
11
|
last7days: "最近7天",
|
|
@@ -41,8 +41,10 @@ const X = {
|
|
|
41
41
|
rightFixed: "固定到右侧",
|
|
42
42
|
cancelLeftFixed: "取消左侧固定",
|
|
43
43
|
leftFixed: "固定到左侧",
|
|
44
|
-
cancelTop: "取消置顶"
|
|
45
|
-
|
|
44
|
+
cancelTop: "取消置顶",
|
|
45
|
+
copySuccess: "复制成功",
|
|
46
|
+
copyFailed: "复制失败"
|
|
47
|
+
}, _e = {
|
|
46
48
|
today: "Today",
|
|
47
49
|
yesterday: "Yesterday",
|
|
48
50
|
last7days: "Last 7 days",
|
|
@@ -78,28 +80,30 @@ const X = {
|
|
|
78
80
|
rightFixed: "Fixed to right",
|
|
79
81
|
cancelLeftFixed: "Cancel left fixed",
|
|
80
82
|
leftFixed: "Fixed to left",
|
|
81
|
-
cancelTop: "Cancel top"
|
|
82
|
-
|
|
83
|
-
"
|
|
84
|
-
|
|
83
|
+
cancelTop: "Cancel top",
|
|
84
|
+
copySuccess: "Copy successfully",
|
|
85
|
+
copyFailed: "Copy failed"
|
|
86
|
+
}, xe = {
|
|
87
|
+
"zh-CN": Ce,
|
|
88
|
+
"en-US": _e
|
|
85
89
|
};
|
|
86
|
-
let
|
|
87
|
-
|
|
88
|
-
const
|
|
89
|
-
var
|
|
90
|
-
return ((
|
|
91
|
-
},
|
|
92
|
-
|
|
93
|
-
},
|
|
94
|
-
t:
|
|
95
|
-
setLang:
|
|
96
|
-
currentLang:
|
|
97
|
-
}),
|
|
98
|
-
const
|
|
99
|
-
for (const [n, l] of
|
|
100
|
-
|
|
101
|
-
return
|
|
102
|
-
},
|
|
90
|
+
let J = { value: "zh-CN" };
|
|
91
|
+
J = fe("zh-CN");
|
|
92
|
+
const Se = (e) => {
|
|
93
|
+
var i;
|
|
94
|
+
return ((i = xe[J.value]) == null ? void 0 : i[e]) || e;
|
|
95
|
+
}, ee = (e) => {
|
|
96
|
+
J.value = e;
|
|
97
|
+
}, R = () => ({
|
|
98
|
+
t: Se,
|
|
99
|
+
setLang: ee,
|
|
100
|
+
currentLang: J
|
|
101
|
+
}), k = (e, i) => {
|
|
102
|
+
const t = e.__vccOpts || e;
|
|
103
|
+
for (const [n, l] of i)
|
|
104
|
+
t[n] = l;
|
|
105
|
+
return t;
|
|
106
|
+
}, Te = !1, Ve = !0, K = "modelValue", ze = "update:modelValue", ke = {
|
|
103
107
|
name: "TmSelectFilter",
|
|
104
108
|
props: {
|
|
105
109
|
[K]: {
|
|
@@ -152,9 +156,9 @@ const ve = (e) => {
|
|
|
152
156
|
},
|
|
153
157
|
data() {
|
|
154
158
|
return {
|
|
155
|
-
t:
|
|
156
|
-
isVue2:
|
|
157
|
-
isVue3:
|
|
159
|
+
t: R().t,
|
|
160
|
+
isVue2: Te,
|
|
161
|
+
isVue3: Ve,
|
|
158
162
|
getDefaultSize: D,
|
|
159
163
|
optionsList: [],
|
|
160
164
|
loading: !1,
|
|
@@ -169,7 +173,7 @@ const ve = (e) => {
|
|
|
169
173
|
return this[K];
|
|
170
174
|
},
|
|
171
175
|
set(e) {
|
|
172
|
-
this.$emit(
|
|
176
|
+
this.$emit(ze, e), this.$emit("change", e);
|
|
173
177
|
}
|
|
174
178
|
},
|
|
175
179
|
fieldValue: {
|
|
@@ -212,33 +216,33 @@ const ve = (e) => {
|
|
|
212
216
|
},
|
|
213
217
|
handleCheckAll(e) {
|
|
214
218
|
this.indeterminate = !1;
|
|
215
|
-
let
|
|
216
|
-
e && (
|
|
219
|
+
let i = [];
|
|
220
|
+
e && (i = this.optionsList.map((t) => t[this.propMap.value])), this.computedValue = i;
|
|
217
221
|
},
|
|
218
222
|
setActivedSelect(e) {
|
|
219
223
|
this.activedSelect = e;
|
|
220
224
|
}
|
|
221
225
|
}
|
|
222
|
-
},
|
|
226
|
+
}, we = {
|
|
223
227
|
key: 0,
|
|
224
228
|
class: "check-all-option"
|
|
225
229
|
};
|
|
226
|
-
function
|
|
227
|
-
const o = d("el-option"), f = d("el-select"),
|
|
228
|
-
return
|
|
229
|
-
class:
|
|
230
|
+
function Fe(e, i, t, n, l, s) {
|
|
231
|
+
const o = d("el-option"), f = d("el-select"), u = d("el-checkbox");
|
|
232
|
+
return a(), m("div", {
|
|
233
|
+
class: L(["advanced-select", { hasField: t.labelOptions && t.labelOptions.length > 0 }])
|
|
230
234
|
}, [
|
|
231
|
-
|
|
235
|
+
t.labelOptions && t.labelOptions.length > 0 ? (a(), b(f, {
|
|
232
236
|
key: 0,
|
|
233
237
|
size: l.getDefaultSize(),
|
|
234
|
-
class:
|
|
238
|
+
class: L(["field-select", `field-select--${l.isVue2 ? "v2" : "v3"}`]),
|
|
235
239
|
modelValue: s.fieldValue,
|
|
236
|
-
"onUpdate:modelValue":
|
|
237
|
-
onFocus:
|
|
238
|
-
style:
|
|
240
|
+
"onUpdate:modelValue": i[0] || (i[0] = (h) => s.fieldValue = h),
|
|
241
|
+
onFocus: i[1] || (i[1] = (h) => s.setActivedSelect("left")),
|
|
242
|
+
style: U(`z-index:${l.activedSelect === "left" ? 2 : 0}`)
|
|
239
243
|
}, {
|
|
240
244
|
default: p(() => [
|
|
241
|
-
(
|
|
245
|
+
(a(!0), m(w, null, F(t.labelOptions, (h) => (a(), b(o, {
|
|
242
246
|
key: h.value,
|
|
243
247
|
label: h.label,
|
|
244
248
|
value: h.value
|
|
@@ -246,49 +250,49 @@ function ze(e, t, i, n, l, s) {
|
|
|
246
250
|
]),
|
|
247
251
|
_: 1
|
|
248
252
|
}, 8, ["size", "class", "modelValue", "style"])) : v("", !0),
|
|
249
|
-
|
|
253
|
+
g(f, C({
|
|
250
254
|
ref: "select",
|
|
251
255
|
class: ["select", `select--${l.isVue3 ? "v3" : "v2"}`],
|
|
252
|
-
onFocus:
|
|
256
|
+
onFocus: i[4] || (i[4] = (h) => s.setActivedSelect("right")),
|
|
253
257
|
style: `z-index:${l.activedSelect === "right" ? 2 : 0}`,
|
|
254
258
|
modelValue: s.computedValue,
|
|
255
|
-
"onUpdate:modelValue":
|
|
259
|
+
"onUpdate:modelValue": i[5] || (i[5] = (h) => s.computedValue = h)
|
|
256
260
|
}, {
|
|
257
261
|
...e.$attrs,
|
|
258
262
|
size: l.getDefaultSize(),
|
|
259
|
-
filterable:
|
|
260
|
-
clearable:
|
|
261
|
-
collapseTags:
|
|
262
|
-
multiple:
|
|
263
|
-
placeholder:
|
|
263
|
+
filterable: t.filterable,
|
|
264
|
+
clearable: t.clearable,
|
|
265
|
+
collapseTags: t.collapseTags,
|
|
266
|
+
multiple: t.multiple,
|
|
267
|
+
placeholder: t.placeholder,
|
|
264
268
|
loading: l.loading
|
|
265
|
-
}, A(l.isVue2 ? e.$listeners : {}), { loading: l.loading }),
|
|
269
|
+
}, A(l.isVue2 ? e.$listeners : {}), { loading: l.loading }), Y({
|
|
266
270
|
default: p(() => [
|
|
267
|
-
l.isVue2 &&
|
|
268
|
-
|
|
271
|
+
l.isVue2 && t.multiple && t.showCheckAll ? (a(), m("div", we, [
|
|
272
|
+
g(u, {
|
|
269
273
|
style: { width: "100%" },
|
|
270
274
|
modelValue: l.checkAll,
|
|
271
|
-
"onUpdate:modelValue":
|
|
275
|
+
"onUpdate:modelValue": i[2] || (i[2] = (h) => l.checkAll = h),
|
|
272
276
|
indeterminate: l.indeterminate,
|
|
273
277
|
size: l.getDefaultSize(),
|
|
274
278
|
onChange: s.handleCheckAll
|
|
275
279
|
}, {
|
|
276
280
|
default: p(() => [
|
|
277
|
-
|
|
281
|
+
V(_(l.t("all")), 1)
|
|
278
282
|
]),
|
|
279
283
|
_: 1
|
|
280
284
|
}, 8, ["modelValue", "indeterminate", "size", "onChange"])
|
|
281
285
|
])) : v("", !0),
|
|
282
|
-
|
|
283
|
-
(
|
|
286
|
+
z(e.$slots, "default", {}, () => [
|
|
287
|
+
(a(!0), m(w, null, F(l.optionsList, (h) => (a(), b(o, {
|
|
284
288
|
key: h[s.propMap.value],
|
|
285
289
|
label: h[s.propMap.label],
|
|
286
290
|
value: h[s.propMap.value],
|
|
287
291
|
disabled: h.disabled
|
|
288
292
|
}, {
|
|
289
293
|
default: p(() => [
|
|
290
|
-
|
|
291
|
-
|
|
294
|
+
z(e.$slots, "option", { item: h }, () => [
|
|
295
|
+
V(_(h[s.propMap.label]), 1)
|
|
292
296
|
], !0)
|
|
293
297
|
]),
|
|
294
298
|
_: 2
|
|
@@ -297,19 +301,19 @@ function ze(e, t, i, n, l, s) {
|
|
|
297
301
|
]),
|
|
298
302
|
_: 2
|
|
299
303
|
}, [
|
|
300
|
-
l.isVue3 &&
|
|
304
|
+
l.isVue3 && t.multiple && t.showCheckAll ? {
|
|
301
305
|
name: "header",
|
|
302
306
|
fn: p(() => [
|
|
303
|
-
|
|
307
|
+
g(u, {
|
|
304
308
|
modelValue: l.checkAll,
|
|
305
|
-
"onUpdate:modelValue":
|
|
309
|
+
"onUpdate:modelValue": i[3] || (i[3] = (h) => l.checkAll = h),
|
|
306
310
|
indeterminate: l.indeterminate,
|
|
307
311
|
size: l.getDefaultSize(),
|
|
308
312
|
onChange: s.handleCheckAll,
|
|
309
313
|
style: { width: "100%", height: "20px", "padding-left": "10px" }
|
|
310
314
|
}, {
|
|
311
315
|
default: p(() => [
|
|
312
|
-
|
|
316
|
+
V(_(l.t("all")), 1)
|
|
313
317
|
]),
|
|
314
318
|
_: 1
|
|
315
319
|
}, 8, ["modelValue", "indeterminate", "size", "onChange"])
|
|
@@ -319,7 +323,7 @@ function ze(e, t, i, n, l, s) {
|
|
|
319
323
|
]), 1040, ["class", "style", "modelValue", "loading"])
|
|
320
324
|
], 2);
|
|
321
325
|
}
|
|
322
|
-
const
|
|
326
|
+
const te = /* @__PURE__ */ k(ke, [["render", Fe], ["__scopeId", "data-v-062139ab"]]), Le = {
|
|
323
327
|
name: "BaseIcon",
|
|
324
328
|
props: {
|
|
325
329
|
path: {
|
|
@@ -336,24 +340,24 @@ const $ = /* @__PURE__ */ F(Se, [["render", ze], ["__scopeId", "data-v-062139ab"
|
|
|
336
340
|
handleClick() {
|
|
337
341
|
}
|
|
338
342
|
}
|
|
339
|
-
},
|
|
340
|
-
function
|
|
341
|
-
return
|
|
343
|
+
}, Oe = ["width", "height"], Me = ["d"];
|
|
344
|
+
function Ae(e, i, t, n, l, s) {
|
|
345
|
+
return a(), m("i", {
|
|
342
346
|
class: "tm-icon",
|
|
343
|
-
onClick:
|
|
347
|
+
onClick: i[0] || (i[0] = (...o) => s.handleClick && s.handleClick(...o))
|
|
344
348
|
}, [
|
|
345
|
-
(
|
|
346
|
-
width:
|
|
347
|
-
height:
|
|
348
|
-
style:
|
|
349
|
+
(a(), m("svg", {
|
|
350
|
+
width: t.size,
|
|
351
|
+
height: t.size,
|
|
352
|
+
style: U({ color: t.color }),
|
|
349
353
|
viewBox: "0 0 1024 1024",
|
|
350
354
|
xmlns: "http://www.w3.org/2000/svg"
|
|
351
355
|
}, [
|
|
352
|
-
y("path", { d:
|
|
353
|
-
], 12,
|
|
356
|
+
y("path", { d: t.path }, null, 8, Me)
|
|
357
|
+
], 12, Oe))
|
|
354
358
|
]);
|
|
355
359
|
}
|
|
356
|
-
const
|
|
360
|
+
const De = /* @__PURE__ */ k(Le, [["render", Ae], ["__scopeId", "data-v-1c30ca93"]]), He = {
|
|
357
361
|
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",
|
|
358
362
|
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",
|
|
359
363
|
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",
|
|
@@ -365,13 +369,13 @@ const Le = /* @__PURE__ */ F(Fe, [["render", we], ["__scopeId", "data-v-1c30ca93
|
|
|
365
369
|
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",
|
|
366
370
|
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",
|
|
367
371
|
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"
|
|
368
|
-
}, O = Object.entries(
|
|
369
|
-
const n = `${
|
|
372
|
+
}, O = Object.entries(He).reduce((e, [i, t]) => {
|
|
373
|
+
const n = `${i}Icon`, l = {
|
|
370
374
|
name: n,
|
|
371
375
|
props: {
|
|
372
376
|
path: {
|
|
373
377
|
type: String,
|
|
374
|
-
default:
|
|
378
|
+
default: t
|
|
375
379
|
},
|
|
376
380
|
size: {
|
|
377
381
|
type: [String, Number]
|
|
@@ -381,18 +385,18 @@ const Le = /* @__PURE__ */ F(Fe, [["render", we], ["__scopeId", "data-v-1c30ca93
|
|
|
381
385
|
}
|
|
382
386
|
},
|
|
383
387
|
render(s) {
|
|
384
|
-
return
|
|
388
|
+
return pe(De, this.$props);
|
|
385
389
|
}
|
|
386
390
|
};
|
|
387
391
|
return l.install = (s) => {
|
|
388
392
|
s.component(n, l);
|
|
389
|
-
}, e[
|
|
390
|
-
}, {}),
|
|
393
|
+
}, e[i] = l, e;
|
|
394
|
+
}, {}), Re = O.menu, Ee = O.refresh, Ie = O.move;
|
|
391
395
|
O["column-setting"];
|
|
392
|
-
const
|
|
396
|
+
const We = O.more, Pe = O["fixed-left"], Ne = O["fixed-right"], Ue = O.upload, Be = O.download, je = O.delete, ie = O.copy, { t: Q } = R(), Je = !1, Ke = !0, Qe = {
|
|
393
397
|
name: "TmEllipsisText",
|
|
394
398
|
components: {
|
|
395
|
-
CopyIcon:
|
|
399
|
+
CopyIcon: ie
|
|
396
400
|
},
|
|
397
401
|
props: {
|
|
398
402
|
text: {
|
|
@@ -425,8 +429,8 @@ const Ie = O.more, Re = O["fixed-left"], Ee = O["fixed-right"], He = O.upload, P
|
|
|
425
429
|
},
|
|
426
430
|
data() {
|
|
427
431
|
return {
|
|
428
|
-
isVue2:
|
|
429
|
-
isVue3:
|
|
432
|
+
isVue2: Je,
|
|
433
|
+
isVue3: Ke,
|
|
430
434
|
isOverflow: !1,
|
|
431
435
|
currentLines: 1
|
|
432
436
|
};
|
|
@@ -436,10 +440,10 @@ const Ie = O.more, Re = O["fixed-left"], Ee = O["fixed-right"], He = O.upload, P
|
|
|
436
440
|
return !this.showTooltip || !this.isOverflow;
|
|
437
441
|
},
|
|
438
442
|
textStyle() {
|
|
439
|
-
const e = typeof this.width == "number" ? `${this.width}px` : this.width,
|
|
443
|
+
const e = typeof this.width == "number" ? `${this.width}px` : this.width, i = typeof this.maxWidth == "number" ? `${this.maxWidth}px` : this.maxWidth;
|
|
440
444
|
return {
|
|
441
445
|
width: e,
|
|
442
|
-
maxWidth:
|
|
446
|
+
maxWidth: i,
|
|
443
447
|
lineHeight: this.lineHeight,
|
|
444
448
|
display: "-webkit-inline-box",
|
|
445
449
|
overflow: "hidden",
|
|
@@ -460,14 +464,14 @@ const Ie = O.more, Re = O["fixed-left"], Ee = O["fixed-right"], He = O.upload, P
|
|
|
460
464
|
checkOverflow() {
|
|
461
465
|
const e = this.$refs.textEl;
|
|
462
466
|
if (!e) return;
|
|
463
|
-
const
|
|
464
|
-
|
|
465
|
-
const l = parseFloat(
|
|
466
|
-
this.isOverflow =
|
|
467
|
+
const i = document.createElement("div"), t = getComputedStyle(e);
|
|
468
|
+
i.style.position = "absolute", i.style.visibility = "hidden", i.style.left = "-9999px", i.style.width = t.width, i.style.fontSize = t.fontSize, i.style.fontFamily = t.fontFamily, i.style.lineHeight = t.lineHeight, i.style.wordBreak = "break-word", i.textContent = this.text, document.body.appendChild(i);
|
|
469
|
+
const l = parseFloat(t.lineHeight) * this.lines;
|
|
470
|
+
this.isOverflow = i.offsetHeight > l, document.body.removeChild(i), this.currentLines = t.height.slice(0, -2) / t.lineHeight.slice(0, -2);
|
|
467
471
|
},
|
|
468
472
|
handleCopy() {
|
|
469
473
|
navigator.clipboard && window.isSecureContext ? navigator.clipboard.writeText(this.text).then(() => {
|
|
470
|
-
this.$message.success("
|
|
474
|
+
this.$message.success(Q("copySuccess"));
|
|
471
475
|
}).catch(() => {
|
|
472
476
|
this.fallbackCopy();
|
|
473
477
|
}) : this.fallbackCopy();
|
|
@@ -476,35 +480,35 @@ const Ie = O.more, Re = O["fixed-left"], Ee = O["fixed-right"], He = O.upload, P
|
|
|
476
480
|
const e = document.createElement("textarea");
|
|
477
481
|
e.value = this.text, e.style.position = "fixed", e.style.left = "-999999px", e.style.top = "-999999px", document.body.appendChild(e), e.focus(), e.select();
|
|
478
482
|
try {
|
|
479
|
-
document.execCommand("copy"), this.$message.success("
|
|
483
|
+
document.execCommand("copy"), this.$message.success(Q("copySuccess"));
|
|
480
484
|
} catch {
|
|
481
|
-
this.$message.error("
|
|
485
|
+
this.$message.error(Q("copyFailed"));
|
|
482
486
|
}
|
|
483
487
|
document.body.removeChild(e);
|
|
484
488
|
}
|
|
485
489
|
}
|
|
486
|
-
},
|
|
487
|
-
function
|
|
490
|
+
}, qe = { class: "ellipsis-text-container" };
|
|
491
|
+
function $e(e, i, t, n, l, s) {
|
|
488
492
|
const o = d("CopyIcon"), f = d("el-tooltip");
|
|
489
|
-
return
|
|
493
|
+
return a(), b(f, C({
|
|
490
494
|
disabled: s.tooltipDisabled,
|
|
491
|
-
content:
|
|
495
|
+
content: t.text,
|
|
492
496
|
effect: "dark",
|
|
493
497
|
placement: "top"
|
|
494
498
|
}, {
|
|
495
499
|
[l.isVue2 ? "open-delay" : "show-after"]: 300
|
|
496
500
|
}), {
|
|
497
501
|
default: p(() => [
|
|
498
|
-
y("div",
|
|
502
|
+
y("div", qe, [
|
|
499
503
|
y("div", {
|
|
500
504
|
ref: "textEl",
|
|
501
505
|
class: "ellipsis-text",
|
|
502
|
-
style:
|
|
503
|
-
}, _(
|
|
506
|
+
style: U(s.textStyle)
|
|
507
|
+
}, _(t.text), 5),
|
|
504
508
|
y("div", {
|
|
505
|
-
class:
|
|
509
|
+
class: L(["toolbar", { multiline: l.currentLines > 1 && t.lines > 1 }])
|
|
506
510
|
}, [
|
|
507
|
-
|
|
511
|
+
t.copyable ? (a(), b(o, {
|
|
508
512
|
key: 0,
|
|
509
513
|
class: "icon-item",
|
|
510
514
|
onClick: s.handleCopy
|
|
@@ -515,11 +519,11 @@ function Ke(e, t, i, n, l, s) {
|
|
|
515
519
|
_: 1
|
|
516
520
|
}, 16, ["disabled", "content"]);
|
|
517
521
|
}
|
|
518
|
-
const
|
|
522
|
+
const X = /* @__PURE__ */ k(Qe, [["render", $e], ["__scopeId", "data-v-b0e14655"]]), Ge = !1, Ye = !0, Xe = {
|
|
519
523
|
name: "TmAdvancedInputFilter",
|
|
520
524
|
components: {
|
|
521
|
-
MoreIcon:
|
|
522
|
-
EllipsisText:
|
|
525
|
+
MoreIcon: We,
|
|
526
|
+
EllipsisText: X
|
|
523
527
|
},
|
|
524
528
|
props: {
|
|
525
529
|
label: {
|
|
@@ -549,9 +553,9 @@ const Y = /* @__PURE__ */ F(Je, [["render", Ke], ["__scopeId", "data-v-560ac879"
|
|
|
549
553
|
},
|
|
550
554
|
data() {
|
|
551
555
|
return {
|
|
552
|
-
t:
|
|
553
|
-
isVue3:
|
|
554
|
-
isVue2:
|
|
556
|
+
t: R().t,
|
|
557
|
+
isVue3: Ye,
|
|
558
|
+
isVue2: Ge,
|
|
555
559
|
getDefaultSize: D,
|
|
556
560
|
getCompatSize: B,
|
|
557
561
|
exactValue: "",
|
|
@@ -636,20 +640,20 @@ const Y = /* @__PURE__ */ F(Je, [["render", Ke], ["__scopeId", "data-v-560ac879"
|
|
|
636
640
|
created() {
|
|
637
641
|
this.updateCurrentOptionMultiple();
|
|
638
642
|
}
|
|
639
|
-
},
|
|
643
|
+
}, Ze = {
|
|
640
644
|
key: 1,
|
|
641
645
|
class: "input-label"
|
|
642
|
-
},
|
|
643
|
-
function
|
|
644
|
-
const o = d("el-option"), f = d("el-select"),
|
|
645
|
-
return
|
|
646
|
-
class:
|
|
647
|
-
style:
|
|
646
|
+
}, et = { class: "popover-content" }, tt = { class: "popover-subtitle" }, it = { class: "popover-footer" };
|
|
647
|
+
function lt(e, i, t, n, l, s) {
|
|
648
|
+
const o = d("el-option"), f = d("el-select"), u = d("EllipsisText"), h = d("el-input"), S = d("el-button"), x = d("MoreIcon"), E = d("el-popover");
|
|
649
|
+
return a(), m("div", {
|
|
650
|
+
class: L(["tm-advanced-input", `tm-advanced-input--${l.isVue3 ? "v3" : "v2"}`]),
|
|
651
|
+
style: U({ width: s.width })
|
|
648
652
|
}, [
|
|
649
|
-
|
|
653
|
+
t.labelOptions && t.labelOptions.length ? (a(), b(f, {
|
|
650
654
|
key: 0,
|
|
651
655
|
modelValue: s.fieldValue,
|
|
652
|
-
"onUpdate:modelValue":
|
|
656
|
+
"onUpdate:modelValue": i[0] || (i[0] = (T) => s.fieldValue = T),
|
|
653
657
|
placeholder: l.t("selectPlaceholder"),
|
|
654
658
|
style: { width: "100px", "flex-shrink": "0" },
|
|
655
659
|
size: l.getDefaultSize(),
|
|
@@ -657,32 +661,32 @@ function et(e, t, i, n, l, s) {
|
|
|
657
661
|
onChange: s.handlefieldChange
|
|
658
662
|
}, {
|
|
659
663
|
default: p(() => [
|
|
660
|
-
(
|
|
661
|
-
key:
|
|
662
|
-
label:
|
|
663
|
-
value:
|
|
664
|
+
(a(!0), m(w, null, F(t.labelOptions, (T) => (a(), b(o, {
|
|
665
|
+
key: T.value,
|
|
666
|
+
label: T.label,
|
|
667
|
+
value: T.value
|
|
664
668
|
}, null, 8, ["label", "value"]))), 128))
|
|
665
669
|
]),
|
|
666
670
|
_: 1
|
|
667
|
-
}, 8, ["modelValue", "placeholder", "size", "onChange"])) :
|
|
668
|
-
|
|
669
|
-
text:
|
|
671
|
+
}, 8, ["modelValue", "placeholder", "size", "onChange"])) : t.label ? (a(), m("div", Ze, [
|
|
672
|
+
g(u, {
|
|
673
|
+
text: t.label,
|
|
670
674
|
lines: 2
|
|
671
675
|
}, null, 8, ["text"])
|
|
672
676
|
])) : v("", !0),
|
|
673
|
-
|
|
677
|
+
g(h, {
|
|
674
678
|
modelValue: l.inputValue,
|
|
675
|
-
"onUpdate:modelValue":
|
|
679
|
+
"onUpdate:modelValue": i[3] || (i[3] = (T) => l.inputValue = T),
|
|
676
680
|
size: l.getDefaultSize(),
|
|
677
|
-
placeholder:
|
|
678
|
-
onKeyup:
|
|
681
|
+
placeholder: t.placeholder,
|
|
682
|
+
onKeyup: me(s.handleEnter, ["enter", "native"]),
|
|
679
683
|
clearable: "",
|
|
680
|
-
class:
|
|
681
|
-
},
|
|
684
|
+
class: L(["right-input", { "has-label": t.labelOptions && t.labelOptions.length }])
|
|
685
|
+
}, Y({ _: 2 }, [
|
|
682
686
|
s.shouldShowMultiple ? {
|
|
683
687
|
name: "append",
|
|
684
688
|
fn: p(() => [
|
|
685
|
-
|
|
689
|
+
g(E, C({
|
|
686
690
|
[l.isVue3 ? "visible" : "value"]: l.isExactMode,
|
|
687
691
|
placement: "bottom-end",
|
|
688
692
|
width: 240,
|
|
@@ -691,47 +695,47 @@ function et(e, t, i, n, l, s) {
|
|
|
691
695
|
[l.isVue3 ? "update:visible" : "input"]: s.handleVisibleChange
|
|
692
696
|
})), {
|
|
693
697
|
reference: p(() => [
|
|
694
|
-
|
|
698
|
+
g(x, { style: { cursor: "pointer" } })
|
|
695
699
|
]),
|
|
696
700
|
default: p(() => [
|
|
697
|
-
y("div",
|
|
698
|
-
y("p",
|
|
699
|
-
|
|
701
|
+
y("div", et, [
|
|
702
|
+
y("p", tt, _(l.t("accurateSearchTips")), 1),
|
|
703
|
+
g(h, {
|
|
700
704
|
size: l.getDefaultSize(),
|
|
701
705
|
type: "textarea",
|
|
702
706
|
rows: 8,
|
|
703
707
|
modelValue: l.exactValue,
|
|
704
|
-
"onUpdate:modelValue":
|
|
708
|
+
"onUpdate:modelValue": i[1] || (i[1] = (T) => l.exactValue = T),
|
|
705
709
|
placeholder: l.t("accurateSearchPlaceholder"),
|
|
706
710
|
style: { "font-size": "12px" }
|
|
707
711
|
}, null, 8, ["size", "modelValue", "placeholder"]),
|
|
708
|
-
y("div",
|
|
709
|
-
|
|
712
|
+
y("div", it, [
|
|
713
|
+
g(S, {
|
|
710
714
|
style: { float: "left" },
|
|
711
715
|
size: l.getCompatSize("mini"),
|
|
712
716
|
onClick: s.handleClear
|
|
713
717
|
}, {
|
|
714
718
|
default: p(() => [
|
|
715
|
-
|
|
719
|
+
V(_(l.t("clear")), 1)
|
|
716
720
|
]),
|
|
717
721
|
_: 1
|
|
718
722
|
}, 8, ["size", "onClick"]),
|
|
719
|
-
|
|
723
|
+
g(S, {
|
|
720
724
|
size: l.getCompatSize("mini"),
|
|
721
|
-
onClick:
|
|
725
|
+
onClick: i[2] || (i[2] = (T) => l.isExactMode = !1)
|
|
722
726
|
}, {
|
|
723
727
|
default: p(() => [
|
|
724
|
-
|
|
728
|
+
V(_(l.t("cancel")), 1)
|
|
725
729
|
]),
|
|
726
730
|
_: 1
|
|
727
731
|
}, 8, ["size"]),
|
|
728
|
-
|
|
732
|
+
g(S, {
|
|
729
733
|
type: "primary",
|
|
730
734
|
size: l.getCompatSize("mini"),
|
|
731
735
|
onClick: s.handleExactSearch
|
|
732
736
|
}, {
|
|
733
737
|
default: p(() => [
|
|
734
|
-
|
|
738
|
+
V(_(l.t("search")), 1)
|
|
735
739
|
]),
|
|
736
740
|
_: 1
|
|
737
741
|
}, 8, ["size", "onClick"])
|
|
@@ -746,7 +750,7 @@ function et(e, t, i, n, l, s) {
|
|
|
746
750
|
]), 1032, ["modelValue", "size", "placeholder", "onKeyup", "class"])
|
|
747
751
|
], 6);
|
|
748
752
|
}
|
|
749
|
-
const
|
|
753
|
+
const le = /* @__PURE__ */ k(Xe, [["render", lt], ["__scopeId", "data-v-96a2075d"]]), { t: I } = R(), st = !1, nt = !0, at = {
|
|
750
754
|
name: "TmAdvancedDateFilter",
|
|
751
755
|
props: {
|
|
752
756
|
value: {
|
|
@@ -796,52 +800,52 @@ const ee = /* @__PURE__ */ F(Ge, [["render", et], ["__scopeId", "data-v-96a2075d
|
|
|
796
800
|
},
|
|
797
801
|
computed: {
|
|
798
802
|
computedFormat() {
|
|
799
|
-
const e = "YYYY",
|
|
800
|
-
return this.format ? this.format : this.type === "year" ? e : this.type === "month" ? `${e}-MM` : this.type === "date" ? `${e}-MM-${
|
|
803
|
+
const e = "YYYY", i = "DD";
|
|
804
|
+
return this.format ? this.format : this.type === "year" ? e : this.type === "month" ? `${e}-MM` : this.type === "date" ? `${e}-MM-${i}` : this.type === "dates" ? `${e}-MM-${i}` : this.type === "months" ? `${e}-MM` : this.type === "years" ? e : this.type === "week" ? `${e}-MM-WW` : this.type === "datetime" ? `${e}-MM-${i} HH:mm:ss` : this.type === "datetimerange" ? `${e}-MM-${i} HH:mm:ss` : this.type === "daterange" ? `${e}-MM-${i}` : this.type === "monthrange" ? `${e}-MM` : "";
|
|
801
805
|
},
|
|
802
806
|
computedPickerOptions() {
|
|
803
807
|
return {
|
|
804
808
|
shortcuts: [
|
|
805
809
|
{
|
|
806
|
-
text:
|
|
810
|
+
text: I("today"),
|
|
807
811
|
onClick(e) {
|
|
808
|
-
const
|
|
809
|
-
e.$emit("pick", [
|
|
812
|
+
const i = /* @__PURE__ */ new Date(), t = /* @__PURE__ */ new Date();
|
|
813
|
+
e.$emit("pick", [t, i]);
|
|
810
814
|
}
|
|
811
815
|
},
|
|
812
816
|
{
|
|
813
|
-
text:
|
|
817
|
+
text: I("yesterday"),
|
|
814
818
|
onClick(e) {
|
|
815
|
-
const
|
|
816
|
-
|
|
819
|
+
const i = /* @__PURE__ */ new Date(), t = /* @__PURE__ */ new Date();
|
|
820
|
+
t.setTime(t.getTime() - 3600 * 1e3 * 24), i.setTime(i.getTime() - 3600 * 1e3 * 24), e.$emit("pick", [t, i]);
|
|
817
821
|
}
|
|
818
822
|
},
|
|
819
823
|
{
|
|
820
|
-
text:
|
|
824
|
+
text: I("last7days"),
|
|
821
825
|
onClick(e) {
|
|
822
|
-
const
|
|
823
|
-
|
|
826
|
+
const i = /* @__PURE__ */ new Date(), t = /* @__PURE__ */ new Date();
|
|
827
|
+
t.setTime(t.getTime() - 3600 * 1e3 * 24 * 7), e.$emit("pick", [t, i]);
|
|
824
828
|
}
|
|
825
829
|
},
|
|
826
830
|
{
|
|
827
|
-
text:
|
|
831
|
+
text: I("last30days"),
|
|
828
832
|
onClick(e) {
|
|
829
|
-
const
|
|
830
|
-
|
|
833
|
+
const i = /* @__PURE__ */ new Date(), t = /* @__PURE__ */ new Date();
|
|
834
|
+
t.setTime(t.getTime() - 3600 * 1e3 * 24 * 30), e.$emit("pick", [t, i]);
|
|
831
835
|
}
|
|
832
836
|
},
|
|
833
837
|
{
|
|
834
|
-
text:
|
|
838
|
+
text: I("thisMonth"),
|
|
835
839
|
onClick(e) {
|
|
836
|
-
const
|
|
837
|
-
|
|
840
|
+
const i = /* @__PURE__ */ new Date(), t = /* @__PURE__ */ new Date();
|
|
841
|
+
t.setDate(1), e.$emit("pick", [t, i]);
|
|
838
842
|
}
|
|
839
843
|
},
|
|
840
844
|
{
|
|
841
|
-
text:
|
|
845
|
+
text: I("lastMonth"),
|
|
842
846
|
onClick(e) {
|
|
843
|
-
const
|
|
844
|
-
|
|
847
|
+
const i = /* @__PURE__ */ new Date(), t = /* @__PURE__ */ new Date();
|
|
848
|
+
t.setMonth(t.getMonth() - 1), t.setDate(1), i.setDate(0), e.$emit("pick", [t, i]);
|
|
845
849
|
}
|
|
846
850
|
}
|
|
847
851
|
]
|
|
@@ -867,9 +871,9 @@ const ee = /* @__PURE__ */ F(Ge, [["render", et], ["__scopeId", "data-v-96a2075d
|
|
|
867
871
|
},
|
|
868
872
|
data() {
|
|
869
873
|
return {
|
|
870
|
-
t:
|
|
871
|
-
isVue2:
|
|
872
|
-
isVue3:
|
|
874
|
+
t: I,
|
|
875
|
+
isVue2: st,
|
|
876
|
+
isVue3: nt,
|
|
873
877
|
getDefaultSize: D
|
|
874
878
|
};
|
|
875
879
|
},
|
|
@@ -883,19 +887,19 @@ const ee = /* @__PURE__ */ F(Ge, [["render", et], ["__scopeId", "data-v-96a2075d
|
|
|
883
887
|
}
|
|
884
888
|
}
|
|
885
889
|
};
|
|
886
|
-
function
|
|
887
|
-
const o = d("el-option"), f = d("el-select"),
|
|
888
|
-
return
|
|
889
|
-
class:
|
|
890
|
+
function ot(e, i, t, n, l, s) {
|
|
891
|
+
const o = d("el-option"), f = d("el-select"), u = d("el-date-picker");
|
|
892
|
+
return a(), m("div", {
|
|
893
|
+
class: L(["tm-date-picker", `tm-date-picker--${l.isVue3 ? "v3" : "v2"}`])
|
|
890
894
|
}, [
|
|
891
|
-
|
|
895
|
+
g(f, {
|
|
892
896
|
modelValue: s.fieldValue,
|
|
893
|
-
"onUpdate:modelValue":
|
|
897
|
+
"onUpdate:modelValue": i[0] || (i[0] = (h) => s.fieldValue = h),
|
|
894
898
|
size: l.getDefaultSize(),
|
|
895
899
|
style: { width: "100px" }
|
|
896
900
|
}, {
|
|
897
901
|
default: p(() => [
|
|
898
|
-
(
|
|
902
|
+
(a(!0), m(w, null, F(t.labelOptions, (h) => (a(), b(o, {
|
|
899
903
|
key: h.value,
|
|
900
904
|
label: h.label,
|
|
901
905
|
value: h.value
|
|
@@ -903,14 +907,14 @@ function st(e, t, i, n, l, s) {
|
|
|
903
907
|
]),
|
|
904
908
|
_: 1
|
|
905
909
|
}, 8, ["modelValue", "size"]),
|
|
906
|
-
|
|
910
|
+
g(u, {
|
|
907
911
|
modelValue: s.dateValue,
|
|
908
|
-
"onUpdate:modelValue":
|
|
912
|
+
"onUpdate:modelValue": i[1] || (i[1] = (h) => s.dateValue = h),
|
|
909
913
|
type: "daterange",
|
|
910
914
|
size: l.getDefaultSize(),
|
|
911
915
|
"range-separator": "-",
|
|
912
|
-
"start-placeholder":
|
|
913
|
-
"end-placeholder":
|
|
916
|
+
"start-placeholder": t.startPlaceholder === void 0 ? l.t("startDate") : t.startPlaceholder,
|
|
917
|
+
"end-placeholder": t.endPlaceholder === void 0 ? l.t("endDate") : t.endPlaceholder,
|
|
914
918
|
"picker-options": s.computedPickerOptions,
|
|
915
919
|
style: { width: "206px" },
|
|
916
920
|
format: s.computedFormat,
|
|
@@ -918,7 +922,7 @@ function st(e, t, i, n, l, s) {
|
|
|
918
922
|
}, null, 8, ["modelValue", "size", "start-placeholder", "end-placeholder", "picker-options", "format", "value-format"])
|
|
919
923
|
], 2);
|
|
920
924
|
}
|
|
921
|
-
const
|
|
925
|
+
const se = /* @__PURE__ */ k(at, [["render", ot], ["__scopeId", "data-v-3cd3ede3"]]), rt = !1, ut = {
|
|
922
926
|
name: "TmCascaderFilter",
|
|
923
927
|
props: {
|
|
924
928
|
value: {
|
|
@@ -961,7 +965,7 @@ const te = /* @__PURE__ */ F(it, [["render", st], ["__scopeId", "data-v-3cd3ede3
|
|
|
961
965
|
},
|
|
962
966
|
data() {
|
|
963
967
|
return {
|
|
964
|
-
isVue2:
|
|
968
|
+
isVue2: rt,
|
|
965
969
|
getDefaultSize: D,
|
|
966
970
|
selectedValue: this.value,
|
|
967
971
|
optionsList: [],
|
|
@@ -1005,10 +1009,10 @@ const te = /* @__PURE__ */ F(it, [["render", st], ["__scopeId", "data-v-3cd3ede3
|
|
|
1005
1009
|
if (typeof e == "function")
|
|
1006
1010
|
try {
|
|
1007
1011
|
this.loading = !0;
|
|
1008
|
-
const
|
|
1009
|
-
Array.isArray(
|
|
1010
|
-
} catch (
|
|
1011
|
-
console.error(
|
|
1012
|
+
const i = await e();
|
|
1013
|
+
Array.isArray(i) && (this.optionsList = i);
|
|
1014
|
+
} catch (i) {
|
|
1015
|
+
console.error(i);
|
|
1012
1016
|
} finally {
|
|
1013
1017
|
this.loading = !1;
|
|
1014
1018
|
}
|
|
@@ -1016,38 +1020,38 @@ const te = /* @__PURE__ */ F(it, [["render", st], ["__scopeId", "data-v-3cd3ede3
|
|
|
1016
1020
|
}
|
|
1017
1021
|
}
|
|
1018
1022
|
};
|
|
1019
|
-
function
|
|
1023
|
+
function ct(e, i, t, n, l, s) {
|
|
1020
1024
|
const o = d("el-cascader");
|
|
1021
|
-
return
|
|
1025
|
+
return a(), b(o, C({
|
|
1022
1026
|
ref: "cascader",
|
|
1023
1027
|
class: ["tm-cascader", `tm-cascader--${l.isVue2 ? "v2" : "v3"}`],
|
|
1024
1028
|
modelValue: l.selectedValue,
|
|
1025
|
-
"onUpdate:modelValue":
|
|
1029
|
+
"onUpdate:modelValue": i[0] || (i[0] = (f) => l.selectedValue = f),
|
|
1026
1030
|
style: { width: "200px" }
|
|
1027
1031
|
}, {
|
|
1028
1032
|
...e.$attrs,
|
|
1029
1033
|
size: l.getDefaultSize(),
|
|
1030
|
-
filterable:
|
|
1031
|
-
clearable:
|
|
1032
|
-
collapseTags:
|
|
1033
|
-
collapseTagsTooltip:
|
|
1034
|
+
filterable: t.filterable,
|
|
1035
|
+
clearable: t.clearable,
|
|
1036
|
+
collapseTags: t.collapseTags,
|
|
1037
|
+
collapseTagsTooltip: t.collapseTagsTooltip,
|
|
1034
1038
|
props: s.cascaderProps,
|
|
1035
|
-
placeholder:
|
|
1039
|
+
placeholder: t.placeholder,
|
|
1036
1040
|
options: l.optionsList,
|
|
1037
1041
|
loading: l.loading
|
|
1038
1042
|
}, A(l.isVue2 ? e.$listeners : {})), {
|
|
1039
|
-
default: p(({ node: f, data:
|
|
1040
|
-
|
|
1043
|
+
default: p(({ node: f, data: u }) => [
|
|
1044
|
+
z(e.$slots, "default", {
|
|
1041
1045
|
node: f,
|
|
1042
|
-
data:
|
|
1046
|
+
data: u
|
|
1043
1047
|
}, () => [
|
|
1044
|
-
y("span", null, _(
|
|
1048
|
+
y("span", null, _(u[s.propMap.label]), 1)
|
|
1045
1049
|
])
|
|
1046
1050
|
]),
|
|
1047
1051
|
_: 3
|
|
1048
1052
|
}, 16, ["class", "modelValue"]);
|
|
1049
1053
|
}
|
|
1050
|
-
const
|
|
1054
|
+
const ne = /* @__PURE__ */ k(ut, [["render", ct]]), dt = !1, ht = !0, ft = {
|
|
1051
1055
|
name: "TmRadioFilter",
|
|
1052
1056
|
props: {
|
|
1053
1057
|
value: {
|
|
@@ -1077,8 +1081,8 @@ const le = /* @__PURE__ */ F(at, [["render", ot]]), rt = !1, ut = !0, dt = {
|
|
|
1077
1081
|
},
|
|
1078
1082
|
data() {
|
|
1079
1083
|
return {
|
|
1080
|
-
isVue2:
|
|
1081
|
-
isVue3:
|
|
1084
|
+
isVue2: dt,
|
|
1085
|
+
isVue3: ht,
|
|
1082
1086
|
getDefaultSize: D,
|
|
1083
1087
|
selectedValue: this.value,
|
|
1084
1088
|
optionsList: [],
|
|
@@ -1099,10 +1103,10 @@ const le = /* @__PURE__ */ F(at, [["render", ot]]), rt = !1, ut = !0, dt = {
|
|
|
1099
1103
|
// 计算每个按钮的宽度,确保填满容器
|
|
1100
1104
|
calculateItemWidth() {
|
|
1101
1105
|
if (!this.optionsList.length) return {};
|
|
1102
|
-
const
|
|
1106
|
+
const i = `${(this.hasWideOptions ? 305 : 200) / this.optionsList.length}px`;
|
|
1103
1107
|
return {
|
|
1104
|
-
width:
|
|
1105
|
-
flex: `0 0 ${
|
|
1108
|
+
width: i,
|
|
1109
|
+
flex: `0 0 ${i}`
|
|
1106
1110
|
};
|
|
1107
1111
|
}
|
|
1108
1112
|
},
|
|
@@ -1128,10 +1132,10 @@ const le = /* @__PURE__ */ F(at, [["render", ot]]), rt = !1, ut = !0, dt = {
|
|
|
1128
1132
|
if (typeof e == "function")
|
|
1129
1133
|
try {
|
|
1130
1134
|
this.loading = !0;
|
|
1131
|
-
const
|
|
1132
|
-
Array.isArray(
|
|
1133
|
-
} catch (
|
|
1134
|
-
console.error(
|
|
1135
|
+
const i = await e();
|
|
1136
|
+
Array.isArray(i) && (this.optionsList = i);
|
|
1137
|
+
} catch (i) {
|
|
1138
|
+
console.error(i);
|
|
1135
1139
|
} finally {
|
|
1136
1140
|
this.loading = !1;
|
|
1137
1141
|
}
|
|
@@ -1139,34 +1143,34 @@ const le = /* @__PURE__ */ F(at, [["render", ot]]), rt = !1, ut = !0, dt = {
|
|
|
1139
1143
|
}
|
|
1140
1144
|
}
|
|
1141
1145
|
};
|
|
1142
|
-
function
|
|
1146
|
+
function pt(e, i, t, n, l, s) {
|
|
1143
1147
|
const o = d("el-radio-button"), f = d("el-radio-group");
|
|
1144
|
-
return
|
|
1145
|
-
class:
|
|
1148
|
+
return a(), m("div", {
|
|
1149
|
+
class: L(["tm-radio", {
|
|
1146
1150
|
"wide-mode": s.hasWideOptions,
|
|
1147
1151
|
"tm-radio--v3": l.isVue3,
|
|
1148
1152
|
"tm-radio--v2": l.isVue2
|
|
1149
1153
|
}])
|
|
1150
1154
|
}, [
|
|
1151
|
-
|
|
1155
|
+
g(f, C({
|
|
1152
1156
|
ref: "radioGroup",
|
|
1153
1157
|
modelValue: l.selectedValue,
|
|
1154
|
-
"onUpdate:modelValue":
|
|
1158
|
+
"onUpdate:modelValue": i[0] || (i[0] = (u) => l.selectedValue = u)
|
|
1155
1159
|
}, {
|
|
1156
1160
|
...e.$attrs,
|
|
1157
1161
|
size: l.getDefaultSize()
|
|
1158
1162
|
}, A(l.isVue2 ? e.$listeners : {})), {
|
|
1159
1163
|
default: p(() => [
|
|
1160
|
-
e.$slots.default ?
|
|
1161
|
-
[l.isVue3 ? "value" : "label"]:
|
|
1162
|
-
disabled:
|
|
1164
|
+
e.$slots.default ? z(e.$slots, "default", { key: 0 }, void 0, !0) : (a(!0), m(w, { key: 1 }, F(l.optionsList, (u) => (a(), b(o, C({ ref_for: !0 }, {
|
|
1165
|
+
[l.isVue3 ? "value" : "label"]: u[s.propMap.value],
|
|
1166
|
+
disabled: u.disabled,
|
|
1163
1167
|
style: s.calculateItemWidth
|
|
1164
1168
|
}, {
|
|
1165
|
-
key:
|
|
1169
|
+
key: u[s.propMap.value]
|
|
1166
1170
|
}), {
|
|
1167
1171
|
default: p(() => [
|
|
1168
|
-
|
|
1169
|
-
|
|
1172
|
+
z(e.$slots, "option", { item: u }, () => [
|
|
1173
|
+
V(_(u[s.propMap.label]), 1)
|
|
1170
1174
|
], !0)
|
|
1171
1175
|
]),
|
|
1172
1176
|
_: 2
|
|
@@ -1176,7 +1180,7 @@ function ct(e, t, i, n, l, s) {
|
|
|
1176
1180
|
}, 16, ["modelValue"])
|
|
1177
1181
|
], 2);
|
|
1178
1182
|
}
|
|
1179
|
-
const
|
|
1183
|
+
const ae = /* @__PURE__ */ k(ft, [["render", pt], ["__scopeId", "data-v-61fed13d"]]), mt = !1, gt = !0, bt = {
|
|
1180
1184
|
name: "TmCheckboxFilter",
|
|
1181
1185
|
props: {
|
|
1182
1186
|
value: {
|
|
@@ -1206,8 +1210,8 @@ const ie = /* @__PURE__ */ F(dt, [["render", ct], ["__scopeId", "data-v-61fed13d
|
|
|
1206
1210
|
},
|
|
1207
1211
|
data() {
|
|
1208
1212
|
return {
|
|
1209
|
-
isVue2:
|
|
1210
|
-
isVue3:
|
|
1213
|
+
isVue2: mt,
|
|
1214
|
+
isVue3: gt,
|
|
1211
1215
|
getDefaultSize: D,
|
|
1212
1216
|
selectedValue: this.value || [],
|
|
1213
1217
|
optionsList: [],
|
|
@@ -1230,7 +1234,7 @@ const ie = /* @__PURE__ */ F(dt, [["render", ct], ["__scopeId", "data-v-61fed13d
|
|
|
1230
1234
|
if (!this.optionsList.length) return {};
|
|
1231
1235
|
const e = Math.ceil(
|
|
1232
1236
|
this.optionsList.length / (this.hasWideOptions ? 6 : 4)
|
|
1233
|
-
),
|
|
1237
|
+
), i = Math.ceil(this.optionsList.length / e), n = `${(this.hasWideOptions ? 305 : 200) / i}px`;
|
|
1234
1238
|
return {
|
|
1235
1239
|
width: n,
|
|
1236
1240
|
flex: `0 0 ${n}`
|
|
@@ -1259,10 +1263,10 @@ const ie = /* @__PURE__ */ F(dt, [["render", ct], ["__scopeId", "data-v-61fed13d
|
|
|
1259
1263
|
if (typeof e == "function")
|
|
1260
1264
|
try {
|
|
1261
1265
|
this.loading = !0;
|
|
1262
|
-
const
|
|
1263
|
-
Array.isArray(
|
|
1264
|
-
} catch (
|
|
1265
|
-
console.error(
|
|
1266
|
+
const i = await e();
|
|
1267
|
+
Array.isArray(i) && (this.optionsList = i);
|
|
1268
|
+
} catch (i) {
|
|
1269
|
+
console.error(i);
|
|
1266
1270
|
} finally {
|
|
1267
1271
|
this.loading = !1;
|
|
1268
1272
|
}
|
|
@@ -1270,34 +1274,34 @@ const ie = /* @__PURE__ */ F(dt, [["render", ct], ["__scopeId", "data-v-61fed13d
|
|
|
1270
1274
|
}
|
|
1271
1275
|
}
|
|
1272
1276
|
};
|
|
1273
|
-
function
|
|
1277
|
+
function yt(e, i, t, n, l, s) {
|
|
1274
1278
|
const o = d("el-checkbox-button"), f = d("el-checkbox-group");
|
|
1275
|
-
return
|
|
1276
|
-
class:
|
|
1279
|
+
return a(), m("div", {
|
|
1280
|
+
class: L(["tm-checkbox", {
|
|
1277
1281
|
"wide-mode": s.hasWideOptions,
|
|
1278
1282
|
"tm-checkbox--v3": l.isVue3,
|
|
1279
1283
|
"tm-checkbox--v2": l.isVue2
|
|
1280
1284
|
}])
|
|
1281
1285
|
}, [
|
|
1282
|
-
|
|
1286
|
+
g(f, C({
|
|
1283
1287
|
ref: "checkboxGroup",
|
|
1284
1288
|
modelValue: l.selectedValue,
|
|
1285
|
-
"onUpdate:modelValue":
|
|
1289
|
+
"onUpdate:modelValue": i[0] || (i[0] = (u) => l.selectedValue = u)
|
|
1286
1290
|
}, {
|
|
1287
1291
|
...e.$attrs,
|
|
1288
1292
|
size: l.getDefaultSize()
|
|
1289
1293
|
}, A(l.isVue2 ? e.$listeners : {})), {
|
|
1290
1294
|
default: p(() => [
|
|
1291
|
-
e.$slots.default ?
|
|
1292
|
-
key:
|
|
1295
|
+
e.$slots.default ? z(e.$slots, "default", { key: 0 }, void 0, !0) : (a(!0), m(w, { key: 1 }, F(l.optionsList, (u) => (a(), b(o, C({
|
|
1296
|
+
key: u[s.propMap.value]
|
|
1293
1297
|
}, { ref_for: !0 }, {
|
|
1294
|
-
[l.isVue3 ? "value" : "label"]:
|
|
1295
|
-
disabled:
|
|
1298
|
+
[l.isVue3 ? "value" : "label"]: u[s.propMap.value],
|
|
1299
|
+
disabled: u.disabled,
|
|
1296
1300
|
style: s.calculateItemWidth
|
|
1297
1301
|
}), {
|
|
1298
1302
|
default: p(() => [
|
|
1299
|
-
|
|
1300
|
-
|
|
1303
|
+
z(e.$slots, "option", { item: u }, () => [
|
|
1304
|
+
V(_(u[s.propMap.label]), 1)
|
|
1301
1305
|
], !0)
|
|
1302
1306
|
]),
|
|
1303
1307
|
_: 2
|
|
@@ -1307,7 +1311,7 @@ function mt(e, t, i, n, l, s) {
|
|
|
1307
1311
|
}, 16, ["modelValue"])
|
|
1308
1312
|
], 2);
|
|
1309
1313
|
}
|
|
1310
|
-
const
|
|
1314
|
+
const oe = /* @__PURE__ */ k(bt, [["render", yt], ["__scopeId", "data-v-b44866b1"]]), vt = !1, Ct = {
|
|
1311
1315
|
name: "TmSwitchFilter",
|
|
1312
1316
|
props: {
|
|
1313
1317
|
value: {
|
|
@@ -1321,7 +1325,7 @@ const se = /* @__PURE__ */ F(ft, [["render", mt], ["__scopeId", "data-v-b44866b1
|
|
|
1321
1325
|
},
|
|
1322
1326
|
data() {
|
|
1323
1327
|
return {
|
|
1324
|
-
isVue2:
|
|
1328
|
+
isVue2: vt,
|
|
1325
1329
|
getDefaultSize: D,
|
|
1326
1330
|
switchValue: this.value
|
|
1327
1331
|
};
|
|
@@ -1333,11 +1337,11 @@ const se = /* @__PURE__ */ F(ft, [["render", mt], ["__scopeId", "data-v-b44866b1
|
|
|
1333
1337
|
if (!s) return 0;
|
|
1334
1338
|
let o = 0;
|
|
1335
1339
|
for (let f = 0; f < s.length; f++) {
|
|
1336
|
-
const
|
|
1337
|
-
o += /[\u4e00-\u9fa5]/.test(
|
|
1340
|
+
const u = s.charAt(f);
|
|
1341
|
+
o += /[\u4e00-\u9fa5]/.test(u) ? 2 : 1;
|
|
1338
1342
|
}
|
|
1339
1343
|
return o;
|
|
1340
|
-
},
|
|
1344
|
+
}, i = e(this.$attrs["active-text"]), t = e(this.$attrs["inactive-text"]), n = e(this.$attrs.label), l = i + t + n;
|
|
1341
1345
|
return l > 20 ? "wide-container" : l > 6 ? "medium-container" : "narrow-container";
|
|
1342
1346
|
}
|
|
1343
1347
|
},
|
|
@@ -1352,26 +1356,26 @@ const se = /* @__PURE__ */ F(ft, [["render", mt], ["__scopeId", "data-v-b44866b1
|
|
|
1352
1356
|
this.$emit("input", e), this.$emit("change", e);
|
|
1353
1357
|
}
|
|
1354
1358
|
}
|
|
1355
|
-
},
|
|
1359
|
+
}, _t = {
|
|
1356
1360
|
key: 0,
|
|
1357
1361
|
class: "switch-label"
|
|
1358
1362
|
};
|
|
1359
|
-
function
|
|
1363
|
+
function xt(e, i, t, n, l, s) {
|
|
1360
1364
|
const o = d("el-switch");
|
|
1361
|
-
return
|
|
1362
|
-
class:
|
|
1365
|
+
return a(), m("div", {
|
|
1366
|
+
class: L(["tm-switch", s.containerWidthClass])
|
|
1363
1367
|
}, [
|
|
1364
|
-
|
|
1365
|
-
|
|
1368
|
+
t.label ? (a(), m("span", _t, _(t.label), 1)) : v("", !0),
|
|
1369
|
+
g(o, C({
|
|
1366
1370
|
ref: "switch",
|
|
1367
1371
|
modelValue: l.switchValue,
|
|
1368
|
-
"onUpdate:modelValue":
|
|
1372
|
+
"onUpdate:modelValue": i[0] || (i[0] = (f) => l.switchValue = f)
|
|
1369
1373
|
}, e.$attrs, A(l.isVue2 ? e.$listeners : {}), {
|
|
1370
1374
|
size: l.getDefaultSize()
|
|
1371
1375
|
}), null, 16, ["modelValue", "size"])
|
|
1372
1376
|
], 2);
|
|
1373
1377
|
}
|
|
1374
|
-
const
|
|
1378
|
+
const re = /* @__PURE__ */ k(Ct, [["render", xt], ["__scopeId", "data-v-9e7a342f"]]), St = {
|
|
1375
1379
|
name: "DynamicSlot",
|
|
1376
1380
|
functional: !0,
|
|
1377
1381
|
props: {
|
|
@@ -1384,32 +1388,32 @@ const ne = /* @__PURE__ */ F(bt, [["render", vt], ["__scopeId", "data-v-9e7a342f
|
|
|
1384
1388
|
default: () => ({})
|
|
1385
1389
|
}
|
|
1386
1390
|
},
|
|
1387
|
-
render(e,
|
|
1388
|
-
const { props:
|
|
1389
|
-
let l = n.$scopedSlots[
|
|
1391
|
+
render(e, i) {
|
|
1392
|
+
const { props: t, parent: n } = i;
|
|
1393
|
+
let l = n.$scopedSlots[t.name];
|
|
1390
1394
|
if (!l) {
|
|
1391
1395
|
let s = n.$parent;
|
|
1392
1396
|
for (; s && !l; ) {
|
|
1393
1397
|
if (s.$options.name === "TmTable") {
|
|
1394
|
-
l = s.$scopedSlots[
|
|
1398
|
+
l = s.$scopedSlots[t.name];
|
|
1395
1399
|
break;
|
|
1396
1400
|
}
|
|
1397
1401
|
s = s.$parent;
|
|
1398
1402
|
}
|
|
1399
1403
|
}
|
|
1400
|
-
return l ? l(
|
|
1404
|
+
return l ? l(t.slotProps) : e();
|
|
1401
1405
|
}
|
|
1402
|
-
}, { t:
|
|
1406
|
+
}, { t: Tt } = R(), Vt = !1, zt = !0, kt = {
|
|
1403
1407
|
name: "TmTableSearch",
|
|
1404
1408
|
components: {
|
|
1405
|
-
TmSelect:
|
|
1406
|
-
TmAdvancedInput:
|
|
1407
|
-
TmAdvancedDate:
|
|
1408
|
-
TmCascader:
|
|
1409
|
-
TmRadio:
|
|
1410
|
-
TmCheckbox:
|
|
1411
|
-
TmSwitch:
|
|
1412
|
-
DynamicSlot:
|
|
1409
|
+
TmSelect: te,
|
|
1410
|
+
TmAdvancedInput: le,
|
|
1411
|
+
TmAdvancedDate: se,
|
|
1412
|
+
TmCascader: ne,
|
|
1413
|
+
TmRadio: ae,
|
|
1414
|
+
TmCheckbox: oe,
|
|
1415
|
+
TmSwitch: re,
|
|
1416
|
+
DynamicSlot: St
|
|
1413
1417
|
},
|
|
1414
1418
|
props: {
|
|
1415
1419
|
disabled: {
|
|
@@ -1427,9 +1431,9 @@ const ne = /* @__PURE__ */ F(bt, [["render", vt], ["__scopeId", "data-v-9e7a342f
|
|
|
1427
1431
|
},
|
|
1428
1432
|
data() {
|
|
1429
1433
|
return {
|
|
1430
|
-
t:
|
|
1434
|
+
t: Tt,
|
|
1431
1435
|
isVue2: Vt,
|
|
1432
|
-
isVue3:
|
|
1436
|
+
isVue3: zt,
|
|
1433
1437
|
getCompatSize: B,
|
|
1434
1438
|
getDefaultSize: D,
|
|
1435
1439
|
// 用于存储初始默认值,重置时恢复
|
|
@@ -1454,50 +1458,50 @@ const ne = /* @__PURE__ */ F(bt, [["render", vt], ["__scopeId", "data-v-9e7a342f
|
|
|
1454
1458
|
const e = this.$slots.default;
|
|
1455
1459
|
return this.isVue2 ? !!e : e()[0].children.length > 0;
|
|
1456
1460
|
},
|
|
1457
|
-
handleUpdate(e,
|
|
1458
|
-
const n = this.getFieldValue(e,
|
|
1461
|
+
handleUpdate(e, i, t) {
|
|
1462
|
+
const n = this.getFieldValue(e, t);
|
|
1459
1463
|
n && this.$emit("update:search-form", {
|
|
1460
1464
|
...this.computedSearchForm,
|
|
1461
|
-
[n]:
|
|
1465
|
+
[n]: i
|
|
1462
1466
|
});
|
|
1463
1467
|
},
|
|
1464
|
-
handleUpdateDate(e,
|
|
1465
|
-
const
|
|
1466
|
-
n && (o[n] =
|
|
1468
|
+
handleUpdateDate(e, i) {
|
|
1469
|
+
const t = i || [], n = this.getFieldValue(e, "start"), l = this.getFieldValue(e, "end"), s = this.getFieldValue(e, "value"), o = {};
|
|
1470
|
+
n && (o[n] = t[0]), l && (o[l] = t[1]), s && (o[s] = t), this.$emit("update:search-form", {
|
|
1467
1471
|
...this.computedSearchForm,
|
|
1468
1472
|
...o
|
|
1469
1473
|
});
|
|
1470
1474
|
},
|
|
1471
|
-
getFieldValue(e,
|
|
1475
|
+
getFieldValue(e, i) {
|
|
1472
1476
|
if (typeof e == "string")
|
|
1473
1477
|
return e;
|
|
1474
|
-
if (e.fields &&
|
|
1475
|
-
const
|
|
1476
|
-
if (typeof
|
|
1477
|
-
return
|
|
1478
|
-
if (Array.isArray(
|
|
1479
|
-
return
|
|
1480
|
-
if (
|
|
1481
|
-
return
|
|
1478
|
+
if (e.fields && i in e.fields) {
|
|
1479
|
+
const t = e.fields[i];
|
|
1480
|
+
if (typeof t == "string")
|
|
1481
|
+
return t;
|
|
1482
|
+
if (Array.isArray(t))
|
|
1483
|
+
return t[0];
|
|
1484
|
+
if (t && typeof t == "object")
|
|
1485
|
+
return t.name;
|
|
1482
1486
|
}
|
|
1483
1487
|
},
|
|
1484
1488
|
// 获取字段默认值(仅支持新的fields结构)
|
|
1485
|
-
getFieldDefault(e,
|
|
1486
|
-
if (e.fields &&
|
|
1487
|
-
const
|
|
1488
|
-
if (Array.isArray(
|
|
1489
|
-
return
|
|
1490
|
-
if (
|
|
1491
|
-
return
|
|
1489
|
+
getFieldDefault(e, i) {
|
|
1490
|
+
if (e.fields && i in e.fields) {
|
|
1491
|
+
const t = e.fields[i];
|
|
1492
|
+
if (Array.isArray(t) && t.length > 1)
|
|
1493
|
+
return t[1];
|
|
1494
|
+
if (t && typeof t == "object" && "default" in t)
|
|
1495
|
+
return t.default;
|
|
1492
1496
|
}
|
|
1493
1497
|
},
|
|
1494
1498
|
// 检查是否存在对应名称的插槽
|
|
1495
1499
|
hasSearchSlot(e) {
|
|
1496
|
-
const
|
|
1497
|
-
if (this[
|
|
1500
|
+
const i = "$slots";
|
|
1501
|
+
if (this[i][e])
|
|
1498
1502
|
return !0;
|
|
1499
1503
|
let n = this.$parent;
|
|
1500
|
-
const l = n[
|
|
1504
|
+
const l = n[i];
|
|
1501
1505
|
for (; n; ) {
|
|
1502
1506
|
if (n.$options.name === "TmTable" && l[e])
|
|
1503
1507
|
return !0;
|
|
@@ -1509,42 +1513,42 @@ const ne = /* @__PURE__ */ F(bt, [["render", vt], ["__scopeId", "data-v-9e7a342f
|
|
|
1509
1513
|
initDefaultValues() {
|
|
1510
1514
|
if (!this.searchColumns || !this.searchColumns.length) return;
|
|
1511
1515
|
const e = {};
|
|
1512
|
-
this.searchColumns.forEach((
|
|
1513
|
-
if (typeof
|
|
1514
|
-
const
|
|
1515
|
-
if (
|
|
1516
|
-
const s =
|
|
1516
|
+
this.searchColumns.forEach((i) => {
|
|
1517
|
+
if (typeof i == "string" || !i.fields) return;
|
|
1518
|
+
const t = this.getFieldValue(i, "value"), n = this.getFieldValue(i, "label");
|
|
1519
|
+
if (i.type === "input" && i.labelOptions && i.labelOptions.length > 0) {
|
|
1520
|
+
const s = i.labelOptions[0];
|
|
1517
1521
|
if (n)
|
|
1518
1522
|
if (n in this.computedSearchForm)
|
|
1519
1523
|
e[n] = this.computedSearchForm[n];
|
|
1520
1524
|
else {
|
|
1521
|
-
const o = this.getFieldDefault(
|
|
1525
|
+
const o = this.getFieldDefault(i, "label");
|
|
1522
1526
|
o !== void 0 ? e[n] = o : s && s.value !== void 0 && (e[n] = s.value);
|
|
1523
1527
|
}
|
|
1524
|
-
|
|
1525
|
-
} else if (
|
|
1526
|
-
const s =
|
|
1527
|
-
if (
|
|
1528
|
+
t && !(t in this.computedSearchForm) && (e[t] = "");
|
|
1529
|
+
} else if (i.type === "date" && i.labelOptions && i.labelOptions.length > 0) {
|
|
1530
|
+
const s = i.labelOptions[0];
|
|
1531
|
+
if (t && !(t in this.computedSearchForm) && (e[t] = []), n)
|
|
1528
1532
|
if (n in this.computedSearchForm)
|
|
1529
1533
|
e[n] = this.computedSearchForm[n];
|
|
1530
1534
|
else {
|
|
1531
|
-
const o = this.getFieldDefault(
|
|
1535
|
+
const o = this.getFieldDefault(i, "label");
|
|
1532
1536
|
o !== void 0 ? e[n] = o : s && s.value !== void 0 && (e[n] = s.value);
|
|
1533
1537
|
}
|
|
1534
|
-
} else if (
|
|
1535
|
-
const s =
|
|
1536
|
-
if (
|
|
1538
|
+
} else if (i.type === "select" && i.labelOptions && i.labelOptions.length > 0) {
|
|
1539
|
+
const s = i.labelOptions[0];
|
|
1540
|
+
if (t && !(t in this.computedSearchForm) && (e[t] = i.multiple ? [] : ""), n)
|
|
1537
1541
|
if (n in this.computedSearchForm)
|
|
1538
1542
|
e[n] = this.computedSearchForm[n];
|
|
1539
1543
|
else {
|
|
1540
|
-
const o = this.getFieldDefault(
|
|
1544
|
+
const o = this.getFieldDefault(i, "label");
|
|
1541
1545
|
o !== void 0 ? e[n] = o : s && s.value !== void 0 && (e[n] = s.value);
|
|
1542
1546
|
}
|
|
1543
1547
|
}
|
|
1544
|
-
const l = this.getFieldDefault(
|
|
1545
|
-
if (
|
|
1546
|
-
const s = this.getFieldValue(
|
|
1547
|
-
s && f !== void 0 && !(s in this.computedSearchForm) && (e[s] = f), o &&
|
|
1548
|
+
const l = this.getFieldDefault(i, "value");
|
|
1549
|
+
if (t && l !== void 0 && !(t in this.computedSearchForm) ? i.type === "date" && !Array.isArray(l) ? e[t] = [] : i.type === "checkbox" && !Array.isArray(l) ? e[t] = l ? [l] : [] : i.type === "switch" && typeof l != "boolean" ? e[t] = !!l : e[t] = l : t && !(t in this.computedSearchForm) && (i.type === "checkbox" ? e[t] = [] : i.type === "switch" && (e[t] = !1)), i.type === "date") {
|
|
1550
|
+
const s = this.getFieldValue(i, "start"), o = this.getFieldValue(i, "end"), f = this.getFieldDefault(i, "start"), u = this.getFieldDefault(i, "end");
|
|
1551
|
+
s && f !== void 0 && !(s in this.computedSearchForm) && (e[s] = f), o && u !== void 0 && !(o in this.computedSearchForm) && (e[o] = u);
|
|
1548
1552
|
}
|
|
1549
1553
|
}), this.defaultValues = e, this.$emit("update:search-form", {
|
|
1550
1554
|
...e,
|
|
@@ -1566,137 +1570,137 @@ const ne = /* @__PURE__ */ F(bt, [["render", vt], ["__scopeId", "data-v-9e7a342f
|
|
|
1566
1570
|
this.$emit("update:search-form", { ...this.defaultValues }), this.$emit("reset");
|
|
1567
1571
|
}
|
|
1568
1572
|
}
|
|
1569
|
-
},
|
|
1570
|
-
function
|
|
1571
|
-
const o = d("dynamic-slot"), f = d("tm-advanced-input"),
|
|
1572
|
-
return
|
|
1573
|
-
class:
|
|
1573
|
+
}, wt = { class: "search-content" }, Ft = { class: "search-actions" };
|
|
1574
|
+
function Lt(e, i, t, n, l, s) {
|
|
1575
|
+
const o = d("dynamic-slot"), f = d("tm-advanced-input"), u = d("tm-advanced-date"), h = d("tm-select"), S = d("tm-cascader"), x = d("tm-radio"), E = d("tm-checkbox"), T = d("tm-switch"), W = d("el-button");
|
|
1576
|
+
return a(), m("div", {
|
|
1577
|
+
class: L(["table-search", `table-search--${l.isVue2 ? "v2" : "v3"}`])
|
|
1574
1578
|
}, [
|
|
1575
|
-
y("div",
|
|
1576
|
-
s.hasDefaultSlot() ?
|
|
1577
|
-
typeof
|
|
1578
|
-
key: `str-${
|
|
1579
|
+
y("div", wt, [
|
|
1580
|
+
s.hasDefaultSlot() ? z(e.$slots, "default", { key: 0 }, void 0, !0) : t.searchColumns && t.searchColumns.length ? (a(!0), m(w, { key: 1 }, F(t.searchColumns, (r, M) => (a(), m(w, null, [
|
|
1581
|
+
typeof r == "string" ? (a(), m("div", {
|
|
1582
|
+
key: `str-${r}-${M}`,
|
|
1579
1583
|
class: "search-item"
|
|
1580
1584
|
}, [
|
|
1581
|
-
(
|
|
1582
|
-
name: `search-${
|
|
1583
|
-
"slot-props": { searchForm:
|
|
1584
|
-
key:
|
|
1585
|
+
(a(), b(o, {
|
|
1586
|
+
name: `search-${r}`,
|
|
1587
|
+
"slot-props": { searchForm: t.searchForm },
|
|
1588
|
+
key: r
|
|
1585
1589
|
}, null, 8, ["name", "slot-props"]))
|
|
1586
|
-
])) : (
|
|
1590
|
+
])) : (a(), m("div", {
|
|
1587
1591
|
key: `obj-${M}`,
|
|
1588
1592
|
class: "search-item"
|
|
1589
1593
|
}, [
|
|
1590
|
-
|
|
1591
|
-
s.hasSearchSlot(`search-${s.getFieldValue(
|
|
1592
|
-
name: `search-${s.getFieldValue(
|
|
1593
|
-
"slot-props": { searchForm:
|
|
1594
|
-
key: s.getFieldValue(
|
|
1595
|
-
}, null, 8, ["name", "slot-props"])) : (
|
|
1594
|
+
r.fields ? (a(), m(w, { key: 0 }, [
|
|
1595
|
+
s.hasSearchSlot(`search-${s.getFieldValue(r, "value")}`) ? (a(), b(o, {
|
|
1596
|
+
name: `search-${s.getFieldValue(r, "value")}`,
|
|
1597
|
+
"slot-props": { searchForm: t.searchForm, col: r },
|
|
1598
|
+
key: s.getFieldValue(r, "value")
|
|
1599
|
+
}, null, 8, ["name", "slot-props"])) : (a(), m("div", {
|
|
1596
1600
|
style: { display: "flex" },
|
|
1597
|
-
key: s.getFieldValue(
|
|
1601
|
+
key: s.getFieldValue(r, "value") || `col-${M}`
|
|
1598
1602
|
}, [
|
|
1599
|
-
|
|
1603
|
+
r.type === "input" ? (a(), b(f, {
|
|
1600
1604
|
key: 0,
|
|
1601
|
-
label:
|
|
1602
|
-
value: s.computedSearchForm[s.getFieldValue(
|
|
1603
|
-
field: s.computedSearchForm[s.getFieldValue(
|
|
1604
|
-
onValueChange: (
|
|
1605
|
-
onFieldChange: (
|
|
1606
|
-
multiple:
|
|
1607
|
-
labelOptions:
|
|
1608
|
-
placeholder:
|
|
1605
|
+
label: r.label,
|
|
1606
|
+
value: s.computedSearchForm[s.getFieldValue(r, "value")],
|
|
1607
|
+
field: s.computedSearchForm[s.getFieldValue(r, "label")],
|
|
1608
|
+
onValueChange: (c) => s.handleUpdate(r, c, "value"),
|
|
1609
|
+
onFieldChange: (c) => s.handleUpdate(r, c, "label"),
|
|
1610
|
+
multiple: r.multiple,
|
|
1611
|
+
labelOptions: r.labelOptions,
|
|
1612
|
+
placeholder: r.placeholder,
|
|
1609
1613
|
onSearch: s.handleSearch
|
|
1610
1614
|
}, null, 8, ["label", "value", "field", "onValueChange", "onFieldChange", "multiple", "labelOptions", "placeholder", "onSearch"])) : v("", !0),
|
|
1611
|
-
|
|
1615
|
+
r.type === "date" ? (a(), b(u, {
|
|
1612
1616
|
key: 1,
|
|
1613
|
-
label:
|
|
1614
|
-
value: s.computedSearchForm[s.getFieldValue(
|
|
1615
|
-
field: s.computedSearchForm[s.getFieldValue(
|
|
1616
|
-
start: s.computedSearchForm[s.getFieldValue(
|
|
1617
|
-
end: s.computedSearchForm[s.getFieldValue(
|
|
1618
|
-
onFieldChange: (
|
|
1619
|
-
onValueChange: (
|
|
1620
|
-
onStartChange: (
|
|
1621
|
-
onEndChange: (
|
|
1622
|
-
labelOptions:
|
|
1623
|
-
"start-placeholder":
|
|
1624
|
-
"end-placeholder":
|
|
1617
|
+
label: r.label,
|
|
1618
|
+
value: s.computedSearchForm[s.getFieldValue(r, "value")],
|
|
1619
|
+
field: s.computedSearchForm[s.getFieldValue(r, "label")],
|
|
1620
|
+
start: s.computedSearchForm[s.getFieldValue(r, "start")],
|
|
1621
|
+
end: s.computedSearchForm[s.getFieldValue(r, "end")],
|
|
1622
|
+
onFieldChange: (c) => s.handleUpdate(r, c, "label"),
|
|
1623
|
+
onValueChange: (c) => s.handleUpdateDate(r, c),
|
|
1624
|
+
onStartChange: (c) => s.handleUpdateDate(r, c),
|
|
1625
|
+
onEndChange: (c) => s.handleUpdateDate(r, c),
|
|
1626
|
+
labelOptions: r.labelOptions,
|
|
1627
|
+
"start-placeholder": r.startPlaceholder,
|
|
1628
|
+
"end-placeholder": r.endPlaceholder
|
|
1625
1629
|
}, null, 8, ["label", "value", "field", "start", "end", "onFieldChange", "onValueChange", "onStartChange", "onEndChange", "labelOptions", "start-placeholder", "end-placeholder"])) : v("", !0),
|
|
1626
|
-
|
|
1630
|
+
r.type === "select" ? (a(), b(h, {
|
|
1627
1631
|
key: 2,
|
|
1628
|
-
label:
|
|
1629
|
-
modelValue: s.computedSearchForm[s.getFieldValue(
|
|
1630
|
-
"onUpdate:modelValue": (
|
|
1631
|
-
field: s.computedSearchForm[s.getFieldValue(
|
|
1632
|
-
options:
|
|
1633
|
-
labelOptions:
|
|
1634
|
-
placeholder:
|
|
1635
|
-
multiple:
|
|
1636
|
-
"show-check-all":
|
|
1637
|
-
onFieldChange: (
|
|
1632
|
+
label: r.label,
|
|
1633
|
+
modelValue: s.computedSearchForm[s.getFieldValue(r, "value")],
|
|
1634
|
+
"onUpdate:modelValue": (c) => s.computedSearchForm[s.getFieldValue(r, "value")] = c,
|
|
1635
|
+
field: s.computedSearchForm[s.getFieldValue(r, "label")],
|
|
1636
|
+
options: r.options,
|
|
1637
|
+
labelOptions: r.labelOptions,
|
|
1638
|
+
placeholder: r.placeholder,
|
|
1639
|
+
multiple: r.multiple,
|
|
1640
|
+
"show-check-all": r.checkAll,
|
|
1641
|
+
onFieldChange: (c) => s.handleUpdate(r, c, "label")
|
|
1638
1642
|
}, null, 8, ["label", "modelValue", "onUpdate:modelValue", "field", "options", "labelOptions", "placeholder", "multiple", "show-check-all", "onFieldChange"])) : v("", !0),
|
|
1639
|
-
|
|
1643
|
+
r.type === "cascader" ? (a(), b(S, {
|
|
1640
1644
|
key: 3,
|
|
1641
|
-
modelValue: s.computedSearchForm[s.getFieldValue(
|
|
1642
|
-
"onUpdate:modelValue": (
|
|
1643
|
-
label:
|
|
1644
|
-
options:
|
|
1645
|
-
labelOptions:
|
|
1646
|
-
props:
|
|
1647
|
-
placeholder:
|
|
1648
|
-
"show-check-all":
|
|
1645
|
+
modelValue: s.computedSearchForm[s.getFieldValue(r, "value")],
|
|
1646
|
+
"onUpdate:modelValue": (c) => s.computedSearchForm[s.getFieldValue(r, "value")] = c,
|
|
1647
|
+
label: r.label,
|
|
1648
|
+
options: r.options,
|
|
1649
|
+
labelOptions: r.labelOptions,
|
|
1650
|
+
props: r.props,
|
|
1651
|
+
placeholder: r.placeholder,
|
|
1652
|
+
"show-check-all": r.checkAll
|
|
1649
1653
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "label", "options", "labelOptions", "props", "placeholder", "show-check-all"])) : v("", !0),
|
|
1650
|
-
|
|
1654
|
+
r.type === "radio" ? (a(), b(x, {
|
|
1651
1655
|
key: 4,
|
|
1652
|
-
modelValue: s.computedSearchForm[s.getFieldValue(
|
|
1653
|
-
"onUpdate:modelValue": (
|
|
1654
|
-
label:
|
|
1655
|
-
options:
|
|
1656
|
-
props:
|
|
1656
|
+
modelValue: s.computedSearchForm[s.getFieldValue(r, "value")],
|
|
1657
|
+
"onUpdate:modelValue": (c) => s.computedSearchForm[s.getFieldValue(r, "value")] = c,
|
|
1658
|
+
label: r.label,
|
|
1659
|
+
options: r.options,
|
|
1660
|
+
props: r.props
|
|
1657
1661
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "label", "options", "props"])) : v("", !0),
|
|
1658
|
-
|
|
1662
|
+
r.type === "checkbox" ? (a(), b(E, {
|
|
1659
1663
|
key: 5,
|
|
1660
|
-
modelValue: s.computedSearchForm[s.getFieldValue(
|
|
1661
|
-
"onUpdate:modelValue": (
|
|
1662
|
-
label:
|
|
1663
|
-
options:
|
|
1664
|
-
props:
|
|
1664
|
+
modelValue: s.computedSearchForm[s.getFieldValue(r, "value")],
|
|
1665
|
+
"onUpdate:modelValue": (c) => s.computedSearchForm[s.getFieldValue(r, "value")] = c,
|
|
1666
|
+
label: r.label,
|
|
1667
|
+
options: r.options,
|
|
1668
|
+
props: r.props
|
|
1665
1669
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "label", "options", "props"])) : v("", !0),
|
|
1666
|
-
|
|
1670
|
+
r.type === "switch" ? (a(), b(T, {
|
|
1667
1671
|
key: 6,
|
|
1668
|
-
modelValue: s.computedSearchForm[s.getFieldValue(
|
|
1669
|
-
"onUpdate:modelValue": (
|
|
1670
|
-
"active-text":
|
|
1671
|
-
"inactive-text":
|
|
1672
|
-
label:
|
|
1673
|
-
"active-color":
|
|
1674
|
-
"inactive-color":
|
|
1672
|
+
modelValue: s.computedSearchForm[s.getFieldValue(r, "value")],
|
|
1673
|
+
"onUpdate:modelValue": (c) => s.computedSearchForm[s.getFieldValue(r, "value")] = c,
|
|
1674
|
+
"active-text": r.activeText,
|
|
1675
|
+
"inactive-text": r.inactiveText,
|
|
1676
|
+
label: r.label,
|
|
1677
|
+
"active-color": r.activeColor,
|
|
1678
|
+
"inactive-color": r.inactiveColor
|
|
1675
1679
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "active-text", "inactive-text", "label", "active-color", "inactive-color"])) : v("", !0)
|
|
1676
1680
|
]))
|
|
1677
|
-
], 64)) : (
|
|
1681
|
+
], 64)) : (a(), m("div", {
|
|
1678
1682
|
key: `error-${M}`,
|
|
1679
1683
|
class: "search-error-message"
|
|
1680
1684
|
}, " 缺少 fields 配置,无法渲染此组件 "))
|
|
1681
1685
|
]))
|
|
1682
1686
|
], 64))), 256)) : v("", !0),
|
|
1683
1687
|
y("div", Ft, [
|
|
1684
|
-
|
|
1688
|
+
g(W, {
|
|
1685
1689
|
type: "primary",
|
|
1686
1690
|
size: l.getDefaultSize(),
|
|
1687
1691
|
onClick: s.handleSearch
|
|
1688
1692
|
}, {
|
|
1689
1693
|
default: p(() => [
|
|
1690
|
-
|
|
1694
|
+
V(_(l.t("query")), 1)
|
|
1691
1695
|
]),
|
|
1692
1696
|
_: 1
|
|
1693
1697
|
}, 8, ["size", "onClick"]),
|
|
1694
|
-
|
|
1698
|
+
g(W, {
|
|
1695
1699
|
size: l.getDefaultSize(),
|
|
1696
1700
|
onClick: s.handleReset
|
|
1697
1701
|
}, {
|
|
1698
1702
|
default: p(() => [
|
|
1699
|
-
|
|
1703
|
+
V(_(l.t("reset")), 1)
|
|
1700
1704
|
]),
|
|
1701
1705
|
_: 1
|
|
1702
1706
|
}, 8, ["size", "onClick"])
|
|
@@ -1704,7 +1708,7 @@ function kt(e, t, i, n, l, s) {
|
|
|
1704
1708
|
])
|
|
1705
1709
|
], 2);
|
|
1706
1710
|
}
|
|
1707
|
-
const
|
|
1711
|
+
const ue = /* @__PURE__ */ k(kt, [["render", Lt], ["__scopeId", "data-v-572f884b"]]), Ot = !1, Mt = {
|
|
1708
1712
|
name: "TablePagination",
|
|
1709
1713
|
props: {
|
|
1710
1714
|
current: {
|
|
@@ -1726,7 +1730,7 @@ const ae = /* @__PURE__ */ F(xt, [["render", kt], ["__scopeId", "data-v-572f884b
|
|
|
1726
1730
|
},
|
|
1727
1731
|
data() {
|
|
1728
1732
|
return {
|
|
1729
|
-
isVue2:
|
|
1733
|
+
isVue2: Ot,
|
|
1730
1734
|
getCompatSize: B
|
|
1731
1735
|
};
|
|
1732
1736
|
},
|
|
@@ -1738,26 +1742,26 @@ const ae = /* @__PURE__ */ F(xt, [["render", kt], ["__scopeId", "data-v-572f884b
|
|
|
1738
1742
|
this.$emit("current-change", e);
|
|
1739
1743
|
}
|
|
1740
1744
|
}
|
|
1741
|
-
},
|
|
1742
|
-
function
|
|
1745
|
+
}, At = { class: "tm-pagination" };
|
|
1746
|
+
function Dt(e, i, t, n, l, s) {
|
|
1743
1747
|
const o = d("el-pagination");
|
|
1744
|
-
return
|
|
1745
|
-
|
|
1748
|
+
return a(), m("div", At, [
|
|
1749
|
+
g(o, C(e.$attrs, A(l.isVue2 ? e.$listeners : {}), {
|
|
1746
1750
|
style: { "text-align": "right" },
|
|
1747
|
-
"current-page":
|
|
1748
|
-
"page-size":
|
|
1749
|
-
total:
|
|
1751
|
+
"current-page": t.current,
|
|
1752
|
+
"page-size": t.pageSize,
|
|
1753
|
+
total: t.total,
|
|
1750
1754
|
"page-sizes": [10, 20, 50, 100, 300, 500, 1e3, 2e3],
|
|
1751
1755
|
size: l.getCompatSize("mini"),
|
|
1752
1756
|
layout: "total, sizes, prev, pager, next, jumper",
|
|
1753
1757
|
onSizeChange: s.handleSizeChange,
|
|
1754
|
-
"onUpdate:currentPage":
|
|
1755
|
-
"onUpdate:pageSize":
|
|
1758
|
+
"onUpdate:currentPage": i[0] || (i[0] = (f) => e.$emit("update:current", f)),
|
|
1759
|
+
"onUpdate:pageSize": i[1] || (i[1] = (f) => e.$emit("update:pageSize", f)),
|
|
1756
1760
|
onCurrentChange: s.handleCurrentChange
|
|
1757
1761
|
}), null, 16, ["current-page", "page-size", "total", "size", "onSizeChange", "onCurrentChange"])
|
|
1758
1762
|
]);
|
|
1759
1763
|
}
|
|
1760
|
-
const
|
|
1764
|
+
const Ht = /* @__PURE__ */ k(Mt, [["render", Dt], ["__scopeId", "data-v-4dbdf6e7"]]), Rt = {
|
|
1761
1765
|
name: "TmTableMenu",
|
|
1762
1766
|
props: {
|
|
1763
1767
|
size: {
|
|
@@ -1765,36 +1769,36 @@ const Mt = /* @__PURE__ */ F(wt, [["render", Ot], ["__scopeId", "data-v-4dbdf6e7
|
|
|
1765
1769
|
default: "mini"
|
|
1766
1770
|
}
|
|
1767
1771
|
}
|
|
1768
|
-
},
|
|
1772
|
+
}, Et = {
|
|
1769
1773
|
size: "small",
|
|
1770
1774
|
class: "tm-table-menu",
|
|
1771
1775
|
inline: ""
|
|
1772
|
-
}, It = { class: "left" },
|
|
1773
|
-
function
|
|
1774
|
-
return
|
|
1776
|
+
}, It = { class: "left" }, Wt = { class: "right" };
|
|
1777
|
+
function Pt(e, i, t, n, l, s) {
|
|
1778
|
+
return a(), m("div", Et, [
|
|
1775
1779
|
y("div", It, [
|
|
1776
|
-
|
|
1780
|
+
z(e.$slots, "left", {}, void 0, !0)
|
|
1777
1781
|
]),
|
|
1778
|
-
y("div",
|
|
1779
|
-
|
|
1782
|
+
y("div", Wt, [
|
|
1783
|
+
z(e.$slots, "right", {}, void 0, !0)
|
|
1780
1784
|
])
|
|
1781
1785
|
]);
|
|
1782
1786
|
}
|
|
1783
|
-
const
|
|
1784
|
-
e && (e.props || (e.props = {}), typeof
|
|
1785
|
-
},
|
|
1787
|
+
const Nt = /* @__PURE__ */ k(Rt, [["render", Pt], ["__scopeId", "data-v-579dd2c3"]]), q = (e) => e ? e.props || {} : {}, $ = (e, i) => {
|
|
1788
|
+
e && (e.props || (e.props = {}), typeof i == "object" && Object.assign(e.props, i));
|
|
1789
|
+
}, j = {
|
|
1786
1790
|
// 默认实现:使用localStorage获取配置
|
|
1787
1791
|
getTableConfig(e) {
|
|
1788
1792
|
try {
|
|
1789
|
-
const
|
|
1793
|
+
const i = localStorage.getItem(`tm-table-config-${e}`);
|
|
1790
1794
|
return Promise.resolve({
|
|
1791
1795
|
data: {
|
|
1792
1796
|
code: 200,
|
|
1793
|
-
data:
|
|
1797
|
+
data: i
|
|
1794
1798
|
}
|
|
1795
1799
|
});
|
|
1796
|
-
} catch (
|
|
1797
|
-
return Promise.reject(
|
|
1800
|
+
} catch (i) {
|
|
1801
|
+
return Promise.reject(i);
|
|
1798
1802
|
}
|
|
1799
1803
|
},
|
|
1800
1804
|
// 默认实现:使用localStorage保存配置
|
|
@@ -1806,24 +1810,24 @@ const Ht = /* @__PURE__ */ F(At, [["render", Et], ["__scopeId", "data-v-579dd2c3
|
|
|
1806
1810
|
message: "success"
|
|
1807
1811
|
}
|
|
1808
1812
|
});
|
|
1809
|
-
} catch (
|
|
1810
|
-
return Promise.reject(
|
|
1813
|
+
} catch (i) {
|
|
1814
|
+
return Promise.reject(i);
|
|
1811
1815
|
}
|
|
1812
1816
|
}
|
|
1813
|
-
},
|
|
1814
|
-
e && (typeof e.getTableConfig == "function" && (
|
|
1815
|
-
}, { t:
|
|
1816
|
-
formatter: (e,
|
|
1817
|
-
},
|
|
1817
|
+
}, Ut = (e) => j.getTableConfig(e.key), Bt = (e) => j.setTableConfig(e), jt = (e) => {
|
|
1818
|
+
e && (typeof e.getTableConfig == "function" && (j.getTableConfig = e.getTableConfig), typeof e.setTableConfig == "function" && (j.setTableConfig = e.setTableConfig));
|
|
1819
|
+
}, { t: Jt } = R(), Kt = !1, Qt = !0, qt = {
|
|
1820
|
+
formatter: (e, i, t, n) => [void 0, null, ""].includes(t) ? "-" : t
|
|
1821
|
+
}, $t = {
|
|
1818
1822
|
name: "TmColumnConfig",
|
|
1819
1823
|
components: {
|
|
1820
|
-
MoveIcon:
|
|
1821
|
-
FixedLeftIcon:
|
|
1822
|
-
FixedRightIcon:
|
|
1823
|
-
UploadIcon:
|
|
1824
|
-
DownloadIcon:
|
|
1825
|
-
DeleteIcon:
|
|
1826
|
-
MenuIcon:
|
|
1824
|
+
MoveIcon: Ie,
|
|
1825
|
+
FixedLeftIcon: Pe,
|
|
1826
|
+
FixedRightIcon: Ne,
|
|
1827
|
+
UploadIcon: Ue,
|
|
1828
|
+
DownloadIcon: Be,
|
|
1829
|
+
DeleteIcon: je,
|
|
1830
|
+
MenuIcon: Re
|
|
1827
1831
|
},
|
|
1828
1832
|
props: {
|
|
1829
1833
|
// 表格列数据,从$slots.default传入
|
|
@@ -1860,9 +1864,9 @@ const Ht = /* @__PURE__ */ F(At, [["render", Et], ["__scopeId", "data-v-579dd2c3
|
|
|
1860
1864
|
},
|
|
1861
1865
|
data() {
|
|
1862
1866
|
return {
|
|
1863
|
-
t:
|
|
1864
|
-
isVue2:
|
|
1865
|
-
isVue3:
|
|
1867
|
+
t: Jt,
|
|
1868
|
+
isVue2: Kt,
|
|
1869
|
+
isVue3: Qt,
|
|
1866
1870
|
getDefaultSize: D,
|
|
1867
1871
|
getCompatSize: B,
|
|
1868
1872
|
buttonType: { link: !0, type: "primary" },
|
|
@@ -1931,10 +1935,10 @@ const Ht = /* @__PURE__ */ F(At, [["render", Et], ["__scopeId", "data-v-579dd2c3
|
|
|
1931
1935
|
* 查找数组中满足条件的最后一个元素的索引
|
|
1932
1936
|
* 用于兼容旧版JS环境中不支持findLastIndex的情况
|
|
1933
1937
|
*/
|
|
1934
|
-
findLastIndex(e,
|
|
1935
|
-
for (let
|
|
1936
|
-
if (
|
|
1937
|
-
return
|
|
1938
|
+
findLastIndex(e, i) {
|
|
1939
|
+
for (let t = e.length - 1; t >= 0; t--)
|
|
1940
|
+
if (i(e[t], t, e))
|
|
1941
|
+
return t;
|
|
1938
1942
|
return -1;
|
|
1939
1943
|
},
|
|
1940
1944
|
// 初始化列配置
|
|
@@ -1944,16 +1948,16 @@ const Ht = /* @__PURE__ */ F(At, [["render", Et], ["__scopeId", "data-v-579dd2c3
|
|
|
1944
1948
|
// 处理原始列数据
|
|
1945
1949
|
processOriginalColumns() {
|
|
1946
1950
|
const e = this.columns || [];
|
|
1947
|
-
let
|
|
1948
|
-
this.defaultColumnsConfig = e.filter((
|
|
1949
|
-
const n =
|
|
1951
|
+
let i = {};
|
|
1952
|
+
this.defaultColumnsConfig = e.filter((t) => {
|
|
1953
|
+
const n = q(t);
|
|
1950
1954
|
return !(!n.prop || this.ignoredColumnConfigTypes.includes(n.type));
|
|
1951
|
-
}).map((
|
|
1952
|
-
const l =
|
|
1953
|
-
...
|
|
1955
|
+
}).map((t, n) => {
|
|
1956
|
+
const l = q(t), s = {
|
|
1957
|
+
...qt,
|
|
1954
1958
|
...l
|
|
1955
1959
|
};
|
|
1956
|
-
|
|
1960
|
+
$(t, s), l.prop && (i[l.prop] = t);
|
|
1957
1961
|
const o = l.prop === "operation" || l.label && l.label.includes("操作"), f = l.hasOwnProperty("visible") ? l.visible !== !1 : !0;
|
|
1958
1962
|
return {
|
|
1959
1963
|
prop: l.prop,
|
|
@@ -1965,17 +1969,17 @@ const Ht = /* @__PURE__ */ F(At, [["render", Et], ["__scopeId", "data-v-579dd2c3
|
|
|
1965
1969
|
cancellable: l.hasOwnProperty("cancellable") ? l.cancellable : !0,
|
|
1966
1970
|
visible: f
|
|
1967
1971
|
};
|
|
1968
|
-
}), this.columnMap =
|
|
1972
|
+
}), this.columnMap = i;
|
|
1969
1973
|
},
|
|
1970
1974
|
// 加载列配置
|
|
1971
1975
|
loadColumnConfig() {
|
|
1972
|
-
|
|
1976
|
+
Ut({
|
|
1973
1977
|
key: this.computedTableKey
|
|
1974
1978
|
}).then((e) => {
|
|
1975
|
-
var
|
|
1979
|
+
var t;
|
|
1976
1980
|
if (e.data.code !== 200) return;
|
|
1977
|
-
let
|
|
1978
|
-
|
|
1981
|
+
let i = JSON.parse(((t = e.data) == null ? void 0 : t.data) || null) || {};
|
|
1982
|
+
i.columnsConfig && JSON.stringify(this.defaultColumnsConfig) === JSON.stringify(i.defaultColumnsConfig) ? this.tableColumns = i.columnsConfig.map((n) => ({ ...n })) : this.tableColumns = this.defaultColumnsConfig.map((n) => ({
|
|
1979
1983
|
...n
|
|
1980
1984
|
})), this.processedColumns = this.applyColumnConfig(this.tableColumns), this.isConfigLoaded = !0, this.$emit("complete", {
|
|
1981
1985
|
columns: this.processedColumns,
|
|
@@ -1990,9 +1994,9 @@ const Ht = /* @__PURE__ */ F(At, [["render", Et], ["__scopeId", "data-v-579dd2c3
|
|
|
1990
1994
|
});
|
|
1991
1995
|
});
|
|
1992
1996
|
},
|
|
1993
|
-
applyColumnConfig(e,
|
|
1994
|
-
let
|
|
1995
|
-
const s =
|
|
1997
|
+
applyColumnConfig(e, i = !1) {
|
|
1998
|
+
let t = this.columns.filter((l) => {
|
|
1999
|
+
const s = q(l);
|
|
1996
2000
|
return this.ignoredColumnConfigTypes.includes(s.type);
|
|
1997
2001
|
}), n = [];
|
|
1998
2002
|
return [...e].sort((l, s) => {
|
|
@@ -2001,20 +2005,20 @@ const Ht = /* @__PURE__ */ F(At, [["render", Et], ["__scopeId", "data-v-579dd2c3
|
|
|
2001
2005
|
}).forEach((l) => {
|
|
2002
2006
|
if (l.prop) {
|
|
2003
2007
|
let s = this.columnMap[l.prop];
|
|
2004
|
-
s && (
|
|
2008
|
+
s && ($(s, {
|
|
2005
2009
|
fixed: l.fixed || void 0,
|
|
2006
2010
|
visible: l.visible
|
|
2007
|
-
}), (!
|
|
2011
|
+
}), (!i && l.visible || i) && n.push(s));
|
|
2008
2012
|
}
|
|
2009
|
-
}),
|
|
2010
|
-
|
|
2011
|
-
}), [...
|
|
2013
|
+
}), t.forEach((l) => {
|
|
2014
|
+
$(l, { visible: !0 });
|
|
2015
|
+
}), [...t, ...n];
|
|
2012
2016
|
},
|
|
2013
2017
|
crateSortable() {
|
|
2014
2018
|
const e = this.$refs.sortListRef;
|
|
2015
2019
|
if (!e) return;
|
|
2016
2020
|
this.sortable && (this.sortable.destroy(), this.sortable = null);
|
|
2017
|
-
const
|
|
2021
|
+
const i = new H(e, {
|
|
2018
2022
|
ghostClass: "blue-background-class",
|
|
2019
2023
|
animation: 150,
|
|
2020
2024
|
// 动画持续时间,毫秒
|
|
@@ -2030,40 +2034,40 @@ const Ht = /* @__PURE__ */ F(At, [["render", Et], ["__scopeId", "data-v-579dd2c3
|
|
|
2030
2034
|
// 当克隆元素隐藏时删除它
|
|
2031
2035
|
group: "columns",
|
|
2032
2036
|
dragClass: "sortable-drag",
|
|
2033
|
-
onStart: ({ item:
|
|
2034
|
-
const n =
|
|
2037
|
+
onStart: ({ item: t }) => {
|
|
2038
|
+
const n = t.getAttribute("data-prop"), l = this.sortedTableColumns.find(
|
|
2035
2039
|
(s) => s.prop === n
|
|
2036
2040
|
);
|
|
2037
|
-
this.isDraggingFrozen = l && l.fixed === "left", this.isDraggingFrozenRight = l && l.fixed === "right", this.draggedItemIndex = Array.from(e.children).indexOf(
|
|
2041
|
+
this.isDraggingFrozen = l && l.fixed === "left", this.isDraggingFrozenRight = l && l.fixed === "right", this.draggedItemIndex = Array.from(e.children).indexOf(t), t.classList.add("sortable-drag");
|
|
2038
2042
|
},
|
|
2039
|
-
onMove: (
|
|
2040
|
-
const { target: n, related: l } =
|
|
2043
|
+
onMove: (t) => {
|
|
2044
|
+
const { target: n, related: l } = t;
|
|
2041
2045
|
if (!n || !l)
|
|
2042
2046
|
return !1;
|
|
2043
|
-
const s = l ? l.getAttribute("data-prop") : null, o = s ? this.sortedTableColumns.find((
|
|
2044
|
-
if (
|
|
2047
|
+
const s = l ? l.getAttribute("data-prop") : null, o = s ? this.sortedTableColumns.find((x) => x.prop === s) : null, f = n.getAttribute("data-prop"), u = f ? this.sortedTableColumns.find((x) => x.prop === f) : null;
|
|
2048
|
+
if (u && u.isOperation && o && o.fixed === "left")
|
|
2045
2049
|
return n.classList.add("no-drop-zone"), !1;
|
|
2046
2050
|
const h = o && o.fixed === "left", S = o && o.fixed === "right";
|
|
2047
|
-
return this.isDraggingFrozen && !h || this.isDraggingFrozenRight && !S || !this.isDraggingFrozen && !this.isDraggingFrozenRight && (h || S) ? (n.classList.add("no-drop-zone"), !1) : (document.querySelectorAll(".no-drop-zone").forEach((
|
|
2048
|
-
|
|
2051
|
+
return this.isDraggingFrozen && !h || this.isDraggingFrozenRight && !S || !this.isDraggingFrozen && !this.isDraggingFrozenRight && (h || S) ? (n.classList.add("no-drop-zone"), !1) : (document.querySelectorAll(".no-drop-zone").forEach((x) => {
|
|
2052
|
+
x.classList.remove("no-drop-zone");
|
|
2049
2053
|
}), !0);
|
|
2050
2054
|
},
|
|
2051
|
-
onEnd: ({ item:
|
|
2055
|
+
onEnd: ({ item: t, newIndex: n, oldIndex: l }) => {
|
|
2052
2056
|
if (n === void 0 || l === void 0 || n < 0 || l < 0 || n >= this.sortedTableColumns.length || l >= this.sortedTableColumns.length)
|
|
2053
2057
|
return;
|
|
2054
|
-
document.querySelectorAll(".no-drop-zone").forEach((
|
|
2055
|
-
|
|
2056
|
-
}),
|
|
2057
|
-
const s = this.sortedTableColumns[l], o = s.fixed === "left", f = s.fixed === "right",
|
|
2058
|
+
document.querySelectorAll(".no-drop-zone").forEach((x) => {
|
|
2059
|
+
x.classList.remove("no-drop-zone");
|
|
2060
|
+
}), t.classList.remove("sortable-drag");
|
|
2061
|
+
const s = this.sortedTableColumns[l], o = s.fixed === "left", f = s.fixed === "right", u = n > 0 ? this.sortedTableColumns[n - 1] : null, h = n < this.sortedTableColumns.length - 1 ? this.sortedTableColumns[n + 1] : null;
|
|
2058
2062
|
let S = !1;
|
|
2059
|
-
if (o ? (
|
|
2063
|
+
if (o ? (u && u.fixed !== "left" || h && h.fixed === "right") && (S = !0) : f ? (u && u.fixed !== "right" || h && h.fixed !== "right") && (S = !0) : (u && u.fixed === "right" || h && h.fixed === "left") && (S = !0), S) {
|
|
2060
2064
|
this.rollbackSort();
|
|
2061
2065
|
return;
|
|
2062
2066
|
}
|
|
2063
2067
|
this.updateSortAfterDrag();
|
|
2064
2068
|
}
|
|
2065
2069
|
});
|
|
2066
|
-
this.sortable =
|
|
2070
|
+
this.sortable = i;
|
|
2067
2071
|
},
|
|
2068
2072
|
rollbackSort() {
|
|
2069
2073
|
this.sortedTableColumns = JSON.parse(JSON.stringify(this.columnsCopy));
|
|
@@ -2071,15 +2075,15 @@ const Ht = /* @__PURE__ */ F(At, [["render", Et], ["__scopeId", "data-v-579dd2c3
|
|
|
2071
2075
|
updateSortAfterDrag() {
|
|
2072
2076
|
const e = this.$refs.sortListRef;
|
|
2073
2077
|
if (!e) return;
|
|
2074
|
-
Array.from(e.children || []).filter((
|
|
2075
|
-
this.sortedTableColumns.some((l) => l.prop ===
|
|
2078
|
+
Array.from(e.children || []).filter((t) => t && t.dataset && t.dataset.prop).map((t) => t.dataset.prop).forEach((t, n) => {
|
|
2079
|
+
this.sortedTableColumns.some((l) => l.prop === t ? (l.sort = n, !0) : !1);
|
|
2076
2080
|
}), this.columnsCopy = JSON.parse(JSON.stringify(this.sortedTableColumns)), this.$emit("on-sort-change", this.sortedTableColumns);
|
|
2077
2081
|
},
|
|
2078
2082
|
handleSearch() {
|
|
2079
2083
|
clearTimeout(this.searchTimer), this.searchTimer = setTimeout(() => {
|
|
2080
2084
|
const e = this.keyWord;
|
|
2081
|
-
this.sortedTableColumns.forEach((
|
|
2082
|
-
|
|
2085
|
+
this.sortedTableColumns.forEach((i) => {
|
|
2086
|
+
i.searchShow = i.label.includes(e);
|
|
2083
2087
|
});
|
|
2084
2088
|
}, 500);
|
|
2085
2089
|
},
|
|
@@ -2088,13 +2092,13 @@ const Ht = /* @__PURE__ */ F(At, [["render", Et], ["__scopeId", "data-v-579dd2c3
|
|
|
2088
2092
|
},
|
|
2089
2093
|
// 初始化排序后的列数据
|
|
2090
2094
|
initSortedTableColumns() {
|
|
2091
|
-
this.tableColumns.forEach((e,
|
|
2092
|
-
e.sort === void 0 && (e.sort =
|
|
2093
|
-
}), this.sortedTableColumns = [...this.tableColumns].sort((e,
|
|
2095
|
+
this.tableColumns.forEach((e, i) => {
|
|
2096
|
+
e.sort === void 0 && (e.sort = i);
|
|
2097
|
+
}), this.sortedTableColumns = [...this.tableColumns].sort((e, i) => e.fixed === "left" && i.fixed !== "left" ? -1 : e.fixed !== "left" && i.fixed === "left" || e.fixed === "right" && i.fixed !== "right" ? 1 : e.fixed !== "right" && i.fixed === "right" ? -1 : e.sort - i.sort);
|
|
2094
2098
|
},
|
|
2095
2099
|
setPlacement() {
|
|
2096
|
-
const
|
|
2097
|
-
(window.innerHeight || document.documentElement.clientHeight) - (
|
|
2100
|
+
const i = this.$refs.operationRef.$el.getBoundingClientRect();
|
|
2101
|
+
(window.innerHeight || document.documentElement.clientHeight) - (i.bottom - window.scrollY) > 512 ? this.placement = "bottom" : this.placement = "left";
|
|
2098
2102
|
},
|
|
2099
2103
|
handleVisibleChange(e) {
|
|
2100
2104
|
this.popoverVisible = e;
|
|
@@ -2118,51 +2122,51 @@ const Ht = /* @__PURE__ */ F(At, [["render", Et], ["__scopeId", "data-v-579dd2c3
|
|
|
2118
2122
|
document.removeEventListener("mouseup", window.sortableGlobalMouseUp), document.removeEventListener(
|
|
2119
2123
|
"mousemove",
|
|
2120
2124
|
window.sortableGlobalMouseMove
|
|
2121
|
-
), typeof
|
|
2125
|
+
), typeof H < "u" && H.utils && (document.removeEventListener(
|
|
2122
2126
|
"mousemove",
|
|
2123
|
-
|
|
2124
|
-
), document.removeEventListener("mouseup",
|
|
2127
|
+
H.utils.throttleCall
|
|
2128
|
+
), document.removeEventListener("mouseup", H.utils.throttleCall));
|
|
2125
2129
|
} catch {
|
|
2126
2130
|
}
|
|
2127
2131
|
},
|
|
2128
2132
|
handleSelectAll() {
|
|
2129
|
-
const e = this.tableColumns.some((
|
|
2130
|
-
this.tableColumns.forEach((
|
|
2131
|
-
|
|
2133
|
+
const e = this.tableColumns.some((i) => !i.visible);
|
|
2134
|
+
this.tableColumns.forEach((i) => {
|
|
2135
|
+
i.cancellable && (i.visible = e);
|
|
2132
2136
|
});
|
|
2133
2137
|
},
|
|
2134
2138
|
handleRestoreDefault() {
|
|
2135
2139
|
this.tableColumns = JSON.parse(JSON.stringify(this.defaultColumnsConfig)), this.sortedTableColumns = [...this.tableColumns].sort(
|
|
2136
|
-
(e,
|
|
2140
|
+
(e, i) => e.sort - i.sort
|
|
2137
2141
|
);
|
|
2138
2142
|
},
|
|
2139
2143
|
// 判断是否可以置顶
|
|
2140
|
-
canMoveTop(e,
|
|
2141
|
-
if (
|
|
2144
|
+
canMoveTop(e, i) {
|
|
2145
|
+
if (i === 0) return !1;
|
|
2142
2146
|
if (e.fixed === "left") {
|
|
2143
|
-
const
|
|
2144
|
-
return
|
|
2147
|
+
const t = this.sortedTableColumns[i - 1];
|
|
2148
|
+
return t && t.fixed === "left";
|
|
2145
2149
|
}
|
|
2146
2150
|
if (!e.fixed) {
|
|
2147
|
-
const
|
|
2148
|
-
return
|
|
2151
|
+
const t = this.sortedTableColumns[i - 1];
|
|
2152
|
+
return t && t.fixed === "left" ? !1 : t && !t.fixed;
|
|
2149
2153
|
}
|
|
2150
2154
|
return e.fixed === "right";
|
|
2151
2155
|
},
|
|
2152
2156
|
// 修改置顶方法,确保右侧固定列置顶时会取消固定
|
|
2153
|
-
moveTop(e,
|
|
2154
|
-
const
|
|
2157
|
+
moveTop(e, i) {
|
|
2158
|
+
const t = this.sortedTableColumns, n = e.prop;
|
|
2155
2159
|
if (e.fixed === "right" && (e.fixed = ""), e.fixed === "left")
|
|
2156
|
-
|
|
2160
|
+
t.unshift(t.splice(i, 1)[0]);
|
|
2157
2161
|
else {
|
|
2158
2162
|
const l = this.findLastIndex(
|
|
2159
2163
|
this.sortedTableColumns,
|
|
2160
2164
|
(s) => s.fixed === "left"
|
|
2161
2165
|
);
|
|
2162
|
-
|
|
2166
|
+
t.splice(
|
|
2163
2167
|
l + 1,
|
|
2164
2168
|
0,
|
|
2165
|
-
|
|
2169
|
+
t.splice(i, 1)[0]
|
|
2166
2170
|
);
|
|
2167
2171
|
}
|
|
2168
2172
|
this.updateSortValues(), this.columnsCopy = JSON.parse(JSON.stringify(this.sortedTableColumns)), this.$emit("on-sort-change", this.sortedTableColumns), this.$nextTick(() => {
|
|
@@ -2176,55 +2180,55 @@ const Ht = /* @__PURE__ */ F(At, [["render", Et], ["__scopeId", "data-v-579dd2c3
|
|
|
2176
2180
|
});
|
|
2177
2181
|
},
|
|
2178
2182
|
frozenLeftHandle(e) {
|
|
2179
|
-
const
|
|
2180
|
-
if (
|
|
2183
|
+
const i = this.sortedTableColumns, t = i.splice(e, 1)[0];
|
|
2184
|
+
if (t.fixed = t.fixed === "left" ? "" : "left", t.fixed === "left") {
|
|
2181
2185
|
const n = this.findLastIndex(
|
|
2182
2186
|
this.sortedTableColumns,
|
|
2183
2187
|
(l) => l.fixed === "left"
|
|
2184
2188
|
);
|
|
2185
|
-
|
|
2189
|
+
i.splice(n + 1, 0, t);
|
|
2186
2190
|
} else {
|
|
2187
2191
|
const n = this.findLastIndex(
|
|
2188
2192
|
this.sortedTableColumns,
|
|
2189
2193
|
(l) => l.fixed === "left"
|
|
2190
2194
|
);
|
|
2191
|
-
|
|
2195
|
+
i.splice(n + 1, 0, t);
|
|
2192
2196
|
}
|
|
2193
2197
|
this.updateSortValues(), this.columnsCopy = JSON.parse(JSON.stringify(this.sortedTableColumns)), this.$emit("on-sort-change", this.sortedTableColumns);
|
|
2194
2198
|
},
|
|
2195
2199
|
frozenRightHandle(e) {
|
|
2196
|
-
const
|
|
2197
|
-
if (
|
|
2198
|
-
const n =
|
|
2200
|
+
const i = this.sortedTableColumns, t = i.splice(e, 1)[0];
|
|
2201
|
+
if (t.fixed = t.fixed === "right" ? "" : "right", t.fixed === "right") {
|
|
2202
|
+
const n = i.findIndex(
|
|
2199
2203
|
(l) => l.fixed === "right"
|
|
2200
2204
|
);
|
|
2201
|
-
n === -1 ?
|
|
2205
|
+
n === -1 ? i.push(t) : i.splice(n, 0, t);
|
|
2202
2206
|
} else {
|
|
2203
|
-
const n =
|
|
2207
|
+
const n = i.findIndex(
|
|
2204
2208
|
(l) => l.fixed === "right"
|
|
2205
2209
|
);
|
|
2206
|
-
n === -1 ?
|
|
2210
|
+
n === -1 ? i.push(t) : i.splice(n, 0, t);
|
|
2207
2211
|
}
|
|
2208
2212
|
this.updateSortValues(), this.columnsCopy = JSON.parse(JSON.stringify(this.sortedTableColumns)), this.$emit("on-sort-change", this.sortedTableColumns);
|
|
2209
2213
|
},
|
|
2210
2214
|
onSave() {
|
|
2211
|
-
var
|
|
2215
|
+
var i;
|
|
2212
2216
|
this.updateSortValues();
|
|
2213
|
-
const e = (
|
|
2214
|
-
|
|
2217
|
+
const e = (i = this.tableColumns) == null ? void 0 : i.map((t) => {
|
|
2218
|
+
t.searchShow = !0;
|
|
2215
2219
|
const n = this.sortedTableColumns.find(
|
|
2216
|
-
(l) => l.prop ===
|
|
2220
|
+
(l) => l.prop === t.prop
|
|
2217
2221
|
);
|
|
2218
|
-
return n && (
|
|
2222
|
+
return n && (t.sort = n.sort, t.fixed = n.fixed, t.visible = n.visible), t;
|
|
2219
2223
|
});
|
|
2220
|
-
|
|
2224
|
+
Bt({
|
|
2221
2225
|
key: this.computedTableKey,
|
|
2222
2226
|
info: JSON.stringify({
|
|
2223
2227
|
columnsConfig: e,
|
|
2224
2228
|
defaultColumnsConfig: this.defaultColumnsConfig
|
|
2225
2229
|
})
|
|
2226
|
-
}).then((
|
|
2227
|
-
|
|
2230
|
+
}).then((t) => {
|
|
2231
|
+
t.data.code === 200 && (this.processedColumns = this.applyColumnConfig(e, !0), this.$emit("complete", {
|
|
2228
2232
|
columns: this.processedColumns,
|
|
2229
2233
|
isInitialLoad: !1
|
|
2230
2234
|
}), this.$message.success(this.t("saveSuccess")), this.popoverVisible = !1);
|
|
@@ -2232,8 +2236,8 @@ const Ht = /* @__PURE__ */ F(At, [["render", Et], ["__scopeId", "data-v-579dd2c3
|
|
|
2232
2236
|
},
|
|
2233
2237
|
// 直接更新排序值,不依赖DOM结构
|
|
2234
2238
|
updateSortValues() {
|
|
2235
|
-
this.sortedTableColumns.forEach((e,
|
|
2236
|
-
e.sort =
|
|
2239
|
+
this.sortedTableColumns.forEach((e, i) => {
|
|
2240
|
+
e.sort = i;
|
|
2237
2241
|
});
|
|
2238
2242
|
}
|
|
2239
2243
|
},
|
|
@@ -2244,26 +2248,26 @@ const Ht = /* @__PURE__ */ F(At, [["render", Et], ["__scopeId", "data-v-579dd2c3
|
|
|
2244
2248
|
beforeDestroy() {
|
|
2245
2249
|
this.sortable && (this.sortable.destroy(), this.sortable = null);
|
|
2246
2250
|
try {
|
|
2247
|
-
document.removeEventListener("mouseup", window.sortableGlobalMouseUp), document.removeEventListener("mousemove", window.sortableGlobalMouseMove), typeof
|
|
2251
|
+
document.removeEventListener("mouseup", window.sortableGlobalMouseUp), document.removeEventListener("mousemove", window.sortableGlobalMouseMove), typeof H < "u" && H.utils && (document.removeEventListener("mousemove", H.utils.throttleCall), document.removeEventListener("mouseup", H.utils.throttleCall));
|
|
2248
2252
|
} catch {
|
|
2249
2253
|
}
|
|
2250
2254
|
}
|
|
2251
|
-
},
|
|
2255
|
+
}, Gt = {
|
|
2252
2256
|
key: 0,
|
|
2253
2257
|
class: "container"
|
|
2254
|
-
},
|
|
2258
|
+
}, Yt = { class: "main-container" }, Xt = { class: "left-content" }, Zt = { class: "title" }, ei = { class: "option-list" }, ti = { style: { height: "100%", "overflow-y": "auto" } }, ii = { class: "right-content" }, li = { class: "search-box" }, si = {
|
|
2255
2259
|
key: 0,
|
|
2256
2260
|
class: "tips"
|
|
2257
|
-
},
|
|
2261
|
+
}, ni = {
|
|
2258
2262
|
class: "sort-list",
|
|
2259
2263
|
ref: "sortListRef"
|
|
2260
|
-
},
|
|
2264
|
+
}, ai = ["data-prop"], oi = {
|
|
2261
2265
|
key: 0,
|
|
2262
2266
|
class: "sort-item"
|
|
2263
|
-
},
|
|
2264
|
-
function
|
|
2265
|
-
const o = d("el-button"), f = d("el-checkbox"),
|
|
2266
|
-
return
|
|
2267
|
+
}, ri = { class: "row-title" }, ui = { class: "operation-btns" }, ci = { class: "footer" }, di = { class: "footer-left" }, hi = { class: "footer-right" }, fi = { style: { display: "inline-block", "margin-left": "10px" } };
|
|
2268
|
+
function pi(e, i, t, n, l, s) {
|
|
2269
|
+
const o = d("el-button"), f = d("el-checkbox"), u = d("el-input"), h = d("MoveIcon"), S = d("DeleteIcon"), x = d("el-tooltip"), E = d("UploadIcon"), T = d("FixedLeftIcon"), W = d("FixedRightIcon"), r = d("MenuIcon"), M = d("el-popover");
|
|
2270
|
+
return a(), b(M, C({ "popper-class": "column-config-popover" }, {
|
|
2267
2271
|
[l.isVue3 ? "visible" : "value"]: l.popoverVisible
|
|
2268
2272
|
}, A({
|
|
2269
2273
|
[l.isVue3 ? "update:visible" : "input"]: s.handleVisibleChange
|
|
@@ -2276,18 +2280,18 @@ function cl(e, t, i, n, l, s) {
|
|
|
2276
2280
|
onHide: s.handlePopoverHide
|
|
2277
2281
|
}), {
|
|
2278
2282
|
reference: p(() => [
|
|
2279
|
-
y("div",
|
|
2280
|
-
|
|
2283
|
+
y("div", fi, [
|
|
2284
|
+
g(x, C({
|
|
2281
2285
|
content: l.t("columnSetting")
|
|
2282
2286
|
}, l.afterOpenDelay, { placement: "top" }), {
|
|
2283
2287
|
default: p(() => [
|
|
2284
|
-
|
|
2288
|
+
g(o, {
|
|
2285
2289
|
size: l.getDefaultSize(),
|
|
2286
2290
|
ref: "operationRef",
|
|
2287
2291
|
circle: ""
|
|
2288
2292
|
}, {
|
|
2289
2293
|
default: p(() => [
|
|
2290
|
-
|
|
2294
|
+
g(r)
|
|
2291
2295
|
]),
|
|
2292
2296
|
_: 1
|
|
2293
2297
|
}, 8, ["size"])
|
|
@@ -2297,35 +2301,35 @@ function cl(e, t, i, n, l, s) {
|
|
|
2297
2301
|
])
|
|
2298
2302
|
]),
|
|
2299
2303
|
default: p(() => [
|
|
2300
|
-
l.popoverVisible ? (
|
|
2301
|
-
y("div",
|
|
2302
|
-
y("div",
|
|
2303
|
-
y("div",
|
|
2304
|
+
l.popoverVisible ? (a(), m("div", Gt, [
|
|
2305
|
+
y("div", Yt, [
|
|
2306
|
+
y("div", Xt, [
|
|
2307
|
+
y("div", Zt, [
|
|
2304
2308
|
y("span", null, _(l.t("SelectableFields")) + "(" + _(l.tableColumns.length) + ")", 1),
|
|
2305
|
-
|
|
2309
|
+
g(o, C({ style: { "margin-left": "10px" } }, l.buttonType, { onClick: s.handleSelectAll }), {
|
|
2306
2310
|
default: p(() => [
|
|
2307
|
-
|
|
2311
|
+
V(_(l.t("all")), 1)
|
|
2308
2312
|
]),
|
|
2309
2313
|
_: 1
|
|
2310
2314
|
}, 16, ["onClick"])
|
|
2311
2315
|
]),
|
|
2312
|
-
y("div",
|
|
2313
|
-
y("div",
|
|
2314
|
-
(
|
|
2315
|
-
|
|
2316
|
+
y("div", ei, [
|
|
2317
|
+
y("div", ti, [
|
|
2318
|
+
(a(!0), m(w, null, F(l.tableColumns, (c, P) => (a(), m(w, null, [
|
|
2319
|
+
c.prop ? (a(), m("div", {
|
|
2316
2320
|
style: { width: "110px", display: "inline-block" },
|
|
2317
|
-
key:
|
|
2321
|
+
key: P + c.prop
|
|
2318
2322
|
}, [
|
|
2319
|
-
|
|
2320
|
-
disabled: !
|
|
2323
|
+
g(f, {
|
|
2324
|
+
disabled: !c.cancellable,
|
|
2321
2325
|
class: "el-checkbox",
|
|
2322
|
-
modelValue:
|
|
2323
|
-
"onUpdate:modelValue": (
|
|
2324
|
-
label:
|
|
2325
|
-
value:
|
|
2326
|
+
modelValue: c.visible,
|
|
2327
|
+
"onUpdate:modelValue": (N) => c.visible = N,
|
|
2328
|
+
label: c.prop,
|
|
2329
|
+
value: c.prop
|
|
2326
2330
|
}, {
|
|
2327
2331
|
default: p(() => [
|
|
2328
|
-
|
|
2332
|
+
V(_(c.label), 1)
|
|
2329
2333
|
]),
|
|
2330
2334
|
_: 2
|
|
2331
2335
|
}, 1032, ["disabled", "modelValue", "onUpdate:modelValue", "label", "value"])
|
|
@@ -2334,106 +2338,106 @@ function cl(e, t, i, n, l, s) {
|
|
|
2334
2338
|
])
|
|
2335
2339
|
])
|
|
2336
2340
|
]),
|
|
2337
|
-
y("div",
|
|
2338
|
-
y("div",
|
|
2339
|
-
|
|
2341
|
+
y("div", ii, [
|
|
2342
|
+
y("div", li, [
|
|
2343
|
+
g(u, {
|
|
2340
2344
|
size: l.getCompatSize("small"),
|
|
2341
2345
|
class: "search-input",
|
|
2342
2346
|
clearable: "",
|
|
2343
2347
|
placeholder: l.t("search"),
|
|
2344
2348
|
modelValue: l.keyWord,
|
|
2345
|
-
"onUpdate:modelValue":
|
|
2349
|
+
"onUpdate:modelValue": i[0] || (i[0] = (c) => l.keyWord = c)
|
|
2346
2350
|
}, null, 8, ["size", "placeholder", "modelValue"])
|
|
2347
2351
|
]),
|
|
2348
|
-
s.showFixedLimitTips ? (
|
|
2349
|
-
y("div",
|
|
2350
|
-
(
|
|
2351
|
-
class:
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2352
|
+
s.showFixedLimitTips ? (a(), m("div", si)) : v("", !0),
|
|
2353
|
+
y("div", ni, [
|
|
2354
|
+
(a(!0), m(w, null, F(l.sortedTableColumns, (c, P) => (a(), m("div", {
|
|
2355
|
+
class: L(["sort-item-wrapper", [
|
|
2356
|
+
c.fixed === "left" ? "frozen" : "",
|
|
2357
|
+
c.fixed === "right" ? "frozenRight" : "",
|
|
2358
|
+
c.fixed ? "" : "noFrozen"
|
|
2355
2359
|
]]),
|
|
2356
|
-
"data-prop":
|
|
2357
|
-
key:
|
|
2360
|
+
"data-prop": c.prop,
|
|
2361
|
+
key: c.prop
|
|
2358
2362
|
}, [
|
|
2359
|
-
|
|
2360
|
-
y("div",
|
|
2361
|
-
|
|
2362
|
-
|
|
2363
|
+
c.visible && c.searchShow !== !1 ? (a(), m("div", oi, [
|
|
2364
|
+
y("div", ri, [
|
|
2365
|
+
g(h),
|
|
2366
|
+
V(" " + _(c.label), 1)
|
|
2363
2367
|
]),
|
|
2364
|
-
y("div",
|
|
2365
|
-
|
|
2368
|
+
y("div", ui, [
|
|
2369
|
+
c.cancellable ? (a(), b(x, C({
|
|
2366
2370
|
key: 0,
|
|
2367
2371
|
content: l.t("cancel"),
|
|
2368
2372
|
placement: "top"
|
|
2369
2373
|
}, { ref_for: !0 }, l.afterOpenDelay), {
|
|
2370
2374
|
default: p(() => [
|
|
2371
|
-
|
|
2375
|
+
g(o, C({ ref_for: !0 }, l.buttonType, {
|
|
2372
2376
|
size: l.getCompatSize("mini"),
|
|
2373
2377
|
class: "iconfont-button delete-button",
|
|
2374
|
-
onClick: (
|
|
2378
|
+
onClick: (N) => c.visible = !1
|
|
2375
2379
|
}), {
|
|
2376
2380
|
default: p(() => [
|
|
2377
|
-
|
|
2381
|
+
g(S)
|
|
2378
2382
|
]),
|
|
2379
2383
|
_: 2
|
|
2380
2384
|
}, 1040, ["size", "onClick"])
|
|
2381
2385
|
]),
|
|
2382
2386
|
_: 2
|
|
2383
2387
|
}, 1040, ["content"])) : v("", !0),
|
|
2384
|
-
s.canMoveTop(
|
|
2388
|
+
s.canMoveTop(c, P) ? (a(), b(x, C({
|
|
2385
2389
|
key: 1,
|
|
2386
2390
|
content: l.t("top"),
|
|
2387
2391
|
placement: "top"
|
|
2388
2392
|
}, { ref_for: !0 }, l.afterOpenDelay), {
|
|
2389
2393
|
default: p(() => [
|
|
2390
|
-
|
|
2394
|
+
g(o, C({ ref_for: !0 }, l.buttonType, {
|
|
2391
2395
|
size: l.getCompatSize("mini"),
|
|
2392
2396
|
class: "iconfont-button top-button",
|
|
2393
|
-
onClick: (
|
|
2397
|
+
onClick: (N) => s.moveTop(c, P)
|
|
2394
2398
|
}), {
|
|
2395
2399
|
default: p(() => [
|
|
2396
|
-
|
|
2400
|
+
g(E)
|
|
2397
2401
|
]),
|
|
2398
2402
|
_: 2
|
|
2399
2403
|
}, 1040, ["size", "onClick"])
|
|
2400
2404
|
]),
|
|
2401
2405
|
_: 2
|
|
2402
2406
|
}, 1040, ["content"])) : v("", !0),
|
|
2403
|
-
|
|
2407
|
+
c.fixed !== "right" ? (a(), b(x, C({
|
|
2404
2408
|
key: 2,
|
|
2405
|
-
content:
|
|
2409
|
+
content: c.fixed === "left" ? l.t("cancelLeftFixed") : l.t("leftFixed"),
|
|
2406
2410
|
placement: "top"
|
|
2407
2411
|
}, { ref_for: !0 }, l.afterOpenDelay), {
|
|
2408
2412
|
default: p(() => [
|
|
2409
|
-
|
|
2413
|
+
g(o, C({ ref_for: !0 }, l.buttonType, {
|
|
2410
2414
|
size: l.getCompatSize("mini"),
|
|
2411
|
-
class: ["iconfont-button left-fixed-btn", { "active-fixed":
|
|
2412
|
-
onClick: (
|
|
2413
|
-
disabled:
|
|
2415
|
+
class: ["iconfont-button left-fixed-btn", { "active-fixed": c.fixed === "left" }],
|
|
2416
|
+
onClick: (N) => s.frozenLeftHandle(P),
|
|
2417
|
+
disabled: c.fixed !== "left" && s.isThanMaxFrozen
|
|
2414
2418
|
}), {
|
|
2415
2419
|
default: p(() => [
|
|
2416
|
-
|
|
2420
|
+
g(T)
|
|
2417
2421
|
]),
|
|
2418
2422
|
_: 2
|
|
2419
2423
|
}, 1040, ["size", "class", "onClick", "disabled"])
|
|
2420
2424
|
]),
|
|
2421
2425
|
_: 2
|
|
2422
2426
|
}, 1040, ["content"])) : v("", !0),
|
|
2423
|
-
|
|
2427
|
+
c.fixed !== "left" ? (a(), b(x, C({
|
|
2424
2428
|
key: 3,
|
|
2425
|
-
content:
|
|
2429
|
+
content: c.fixed === "right" ? l.t("cancelRightFixed") : l.t("rightFixed"),
|
|
2426
2430
|
placement: "top"
|
|
2427
2431
|
}, { ref_for: !0 }, l.afterOpenDelay), {
|
|
2428
2432
|
default: p(() => [
|
|
2429
|
-
|
|
2433
|
+
g(o, C({ ref_for: !0 }, l.buttonType, {
|
|
2430
2434
|
size: l.getCompatSize("mini"),
|
|
2431
|
-
class: ["iconfont-button right-fixed-btn", { "active-fixed":
|
|
2432
|
-
onClick: (
|
|
2433
|
-
disabled:
|
|
2435
|
+
class: ["iconfont-button right-fixed-btn", { "active-fixed": c.fixed === "right" }],
|
|
2436
|
+
onClick: (N) => s.frozenRightHandle(P),
|
|
2437
|
+
disabled: c.fixed !== "right" && s.isThanMaxRightFrozen
|
|
2434
2438
|
}), {
|
|
2435
2439
|
default: p(() => [
|
|
2436
|
-
|
|
2440
|
+
g(W)
|
|
2437
2441
|
]),
|
|
2438
2442
|
_: 2
|
|
2439
2443
|
}, 1040, ["size", "class", "onClick", "disabled"])
|
|
@@ -2442,39 +2446,39 @@ function cl(e, t, i, n, l, s) {
|
|
|
2442
2446
|
}, 1040, ["content"])) : v("", !0)
|
|
2443
2447
|
])
|
|
2444
2448
|
])) : v("", !0)
|
|
2445
|
-
], 10,
|
|
2449
|
+
], 10, ai))), 128))
|
|
2446
2450
|
], 512)
|
|
2447
2451
|
])
|
|
2448
2452
|
]),
|
|
2449
|
-
y("div",
|
|
2450
|
-
y("div",
|
|
2451
|
-
|
|
2453
|
+
y("div", ci, [
|
|
2454
|
+
y("div", di, [
|
|
2455
|
+
g(o, {
|
|
2452
2456
|
size: l.getCompatSize("mini"),
|
|
2453
2457
|
onClick: s.handleRestoreDefault
|
|
2454
2458
|
}, {
|
|
2455
2459
|
default: p(() => [
|
|
2456
|
-
|
|
2460
|
+
V(_(l.t("restoreDefault")), 1)
|
|
2457
2461
|
]),
|
|
2458
2462
|
_: 1
|
|
2459
2463
|
}, 8, ["size", "onClick"])
|
|
2460
2464
|
]),
|
|
2461
|
-
y("div",
|
|
2462
|
-
|
|
2465
|
+
y("div", hi, [
|
|
2466
|
+
g(o, {
|
|
2463
2467
|
size: l.getCompatSize("mini"),
|
|
2464
|
-
onClick:
|
|
2468
|
+
onClick: i[1] || (i[1] = (c) => l.popoverVisible = !1)
|
|
2465
2469
|
}, {
|
|
2466
2470
|
default: p(() => [
|
|
2467
|
-
|
|
2471
|
+
V(_(l.t("cancel")), 1)
|
|
2468
2472
|
]),
|
|
2469
2473
|
_: 1
|
|
2470
2474
|
}, 8, ["size"]),
|
|
2471
|
-
|
|
2475
|
+
g(o, {
|
|
2472
2476
|
size: l.getCompatSize("mini"),
|
|
2473
2477
|
type: "primary",
|
|
2474
2478
|
onClick: s.onSave
|
|
2475
2479
|
}, {
|
|
2476
2480
|
default: p(() => [
|
|
2477
|
-
|
|
2481
|
+
V(_(l.t("saveAndApply")), 1)
|
|
2478
2482
|
]),
|
|
2479
2483
|
_: 1
|
|
2480
2484
|
}, 8, ["size", "onClick"])
|
|
@@ -2485,14 +2489,14 @@ function cl(e, t, i, n, l, s) {
|
|
|
2485
2489
|
_: 1
|
|
2486
2490
|
}, 16, ["placement", "onShow", "onHide"]);
|
|
2487
2491
|
}
|
|
2488
|
-
const
|
|
2492
|
+
const mi = /* @__PURE__ */ k($t, [["render", pi], ["__scopeId", "data-v-f3445124"]]), gi = !1, bi = !0, yi = {
|
|
2489
2493
|
name: "TmTable",
|
|
2490
2494
|
components: {
|
|
2491
|
-
TableSearch:
|
|
2492
|
-
TablePagination:
|
|
2493
|
-
TableMenu:
|
|
2494
|
-
ColumnConfig:
|
|
2495
|
-
RefreshIcon:
|
|
2495
|
+
TableSearch: ue,
|
|
2496
|
+
TablePagination: Ht,
|
|
2497
|
+
TableMenu: Nt,
|
|
2498
|
+
ColumnConfig: mi,
|
|
2499
|
+
RefreshIcon: Ee,
|
|
2496
2500
|
// 用于渲染VNode的组件
|
|
2497
2501
|
ColumnRenderer: {
|
|
2498
2502
|
props: ["vnode"],
|
|
@@ -2584,9 +2588,9 @@ const hl = /* @__PURE__ */ F(Kt, [["render", cl], ["__scopeId", "data-v-fbd319a5
|
|
|
2584
2588
|
return {
|
|
2585
2589
|
getDefaultSize: D,
|
|
2586
2590
|
getCompatSize: B,
|
|
2587
|
-
isVue3:
|
|
2588
|
-
isVue2:
|
|
2589
|
-
t:
|
|
2591
|
+
isVue3: bi,
|
|
2592
|
+
isVue2: gi,
|
|
2593
|
+
t: R().t,
|
|
2590
2594
|
tableData: [],
|
|
2591
2595
|
tableLoading: !1,
|
|
2592
2596
|
columnsLoading: !1,
|
|
@@ -2615,6 +2619,9 @@ const hl = /* @__PURE__ */ F(Kt, [["render", cl], ["__scopeId", "data-v-fbd319a5
|
|
|
2615
2619
|
},
|
|
2616
2620
|
computedTableKey() {
|
|
2617
2621
|
return this.tableKey ? this.tableKey : this.$route.path.slice(1).replace(/\//g, "-");
|
|
2622
|
+
},
|
|
2623
|
+
computedShowPagination() {
|
|
2624
|
+
return this.showPagination && typeof this.data == "function";
|
|
2618
2625
|
}
|
|
2619
2626
|
},
|
|
2620
2627
|
watch: {
|
|
@@ -2660,6 +2667,7 @@ const hl = /* @__PURE__ */ F(Kt, [["render", cl], ["__scopeId", "data-v-fbd319a5
|
|
|
2660
2667
|
if (Array.isArray(this.data))
|
|
2661
2668
|
this.tableData = this.data;
|
|
2662
2669
|
else if (typeof this.data == "function") {
|
|
2670
|
+
if (this.tableLoading) return;
|
|
2663
2671
|
this.tableLoading = !0;
|
|
2664
2672
|
try {
|
|
2665
2673
|
const e = await this.data({
|
|
@@ -2668,8 +2676,8 @@ const hl = /* @__PURE__ */ F(Kt, [["render", cl], ["__scopeId", "data-v-fbd319a5
|
|
|
2668
2676
|
current: this.paginationInfo.current
|
|
2669
2677
|
},
|
|
2670
2678
|
params: this.searchForm
|
|
2671
|
-
}), { list:
|
|
2672
|
-
this.tableData =
|
|
2679
|
+
}), { list: i, total: t, pageSize: n, current: l } = e;
|
|
2680
|
+
this.tableData = i, t !== void 0 && (this.paginationInfo.total = t), l !== void 0 && (this.paginationInfo.current = l), n !== void 0 && (this.paginationInfo.pageSize = n);
|
|
2673
2681
|
} catch {
|
|
2674
2682
|
} finally {
|
|
2675
2683
|
this.tableLoading = !1;
|
|
@@ -2679,10 +2687,10 @@ const hl = /* @__PURE__ */ F(Kt, [["render", cl], ["__scopeId", "data-v-fbd319a5
|
|
|
2679
2687
|
// 获取表格高度
|
|
2680
2688
|
getTableHeight() {
|
|
2681
2689
|
this.isAutoHeight() ? this.$nextTick(() => {
|
|
2682
|
-
const e = this.$refs.table,
|
|
2690
|
+
const e = this.$refs.table, i = this.$refs.tmPagination;
|
|
2683
2691
|
if (!e) return;
|
|
2684
|
-
const
|
|
2685
|
-
this.tableHeight = document.documentElement.clientHeight -
|
|
2692
|
+
const t = e.$el, n = i && i.$el && i.$el.offsetHeight || 0;
|
|
2693
|
+
this.tableHeight = document.documentElement.clientHeight - t.offsetTop - n - this.calcHeight;
|
|
2686
2694
|
}) : this.tableHeight = this.height, this.refreshTable();
|
|
2687
2695
|
},
|
|
2688
2696
|
// 处理查询
|
|
@@ -2716,57 +2724,57 @@ const hl = /* @__PURE__ */ F(Kt, [["render", cl], ["__scopeId", "data-v-fbd319a5
|
|
|
2716
2724
|
this.tableReload++;
|
|
2717
2725
|
}
|
|
2718
2726
|
}
|
|
2719
|
-
},
|
|
2727
|
+
}, vi = {
|
|
2720
2728
|
class: "tm-table",
|
|
2721
2729
|
ref: "tablePage"
|
|
2722
2730
|
};
|
|
2723
|
-
function
|
|
2724
|
-
const o = d("table-search"), f = d("RefreshIcon"),
|
|
2725
|
-
return
|
|
2726
|
-
|
|
2731
|
+
function Ci(e, i, t, n, l, s) {
|
|
2732
|
+
const o = d("table-search"), f = d("RefreshIcon"), u = d("el-button"), h = d("el-tooltip"), S = d("ColumnConfig"), x = d("table-menu"), E = d("columnRenderer"), T = d("el-table"), W = d("table-pagination"), r = ge("loading");
|
|
2733
|
+
return a(), m("div", vi, [
|
|
2734
|
+
t.searchColumns && t.searchColumns.length > 0 ? (a(), b(o, {
|
|
2727
2735
|
key: 0,
|
|
2728
2736
|
ref: "search",
|
|
2729
2737
|
onSearch: s.search,
|
|
2730
2738
|
onReset: s.reset,
|
|
2731
2739
|
"onUpdate:searchForm": s.handleUpdateSearchForm,
|
|
2732
2740
|
disabled: s.pageLoading,
|
|
2733
|
-
"search-columns":
|
|
2734
|
-
"search-form":
|
|
2741
|
+
"search-columns": t.searchColumns,
|
|
2742
|
+
"search-form": t.searchForm
|
|
2735
2743
|
}, {
|
|
2736
2744
|
default: p(() => [
|
|
2737
|
-
|
|
2745
|
+
z(e.$slots, "search")
|
|
2738
2746
|
]),
|
|
2739
2747
|
_: 3
|
|
2740
2748
|
}, 8, ["onSearch", "onReset", "onUpdate:searchForm", "disabled", "search-columns", "search-form"])) : v("", !0),
|
|
2741
|
-
|
|
2749
|
+
t.showMenu ? (a(), b(x, { key: 1 }, {
|
|
2742
2750
|
left: p(() => [
|
|
2743
|
-
|
|
2751
|
+
z(e.$slots, "menu-left")
|
|
2744
2752
|
]),
|
|
2745
2753
|
right: p(() => [
|
|
2746
|
-
|
|
2747
|
-
|
|
2754
|
+
z(e.$slots, "menu-right"),
|
|
2755
|
+
t.refreshButton && typeof t.data == "function" ? (a(), b(h, C({
|
|
2748
2756
|
key: 0,
|
|
2749
2757
|
content: l.t("refresh"),
|
|
2750
2758
|
placement: "top"
|
|
2751
2759
|
}, l.afterOpenDelay), {
|
|
2752
2760
|
default: p(() => [
|
|
2753
|
-
|
|
2761
|
+
g(u, {
|
|
2754
2762
|
onClick: s.handleRefresh,
|
|
2755
2763
|
circle: "",
|
|
2756
2764
|
size: l.getDefaultSize()
|
|
2757
2765
|
}, {
|
|
2758
2766
|
default: p(() => [
|
|
2759
|
-
|
|
2767
|
+
g(f)
|
|
2760
2768
|
]),
|
|
2761
2769
|
_: 1
|
|
2762
2770
|
}, 8, ["onClick", "size"])
|
|
2763
2771
|
]),
|
|
2764
2772
|
_: 1
|
|
2765
2773
|
}, 16, ["content"])) : v("", !0),
|
|
2766
|
-
|
|
2774
|
+
t.columnSettingButton ? (a(), b(S, {
|
|
2767
2775
|
key: 1,
|
|
2768
|
-
maxFixedLeftQuantity:
|
|
2769
|
-
maxFixedRightQuantity:
|
|
2776
|
+
maxFixedLeftQuantity: t.maxFixedLeftQuantity,
|
|
2777
|
+
maxFixedRightQuantity: t.maxFixedRightQuantity,
|
|
2770
2778
|
tableKey: s.computedTableKey,
|
|
2771
2779
|
columns: l.originalColumns,
|
|
2772
2780
|
onComplete: s.handleColumnConfigComplete
|
|
@@ -2774,7 +2782,7 @@ function bl(e, t, i, n, l, s) {
|
|
|
2774
2782
|
]),
|
|
2775
2783
|
_: 3
|
|
2776
2784
|
})) : v("", !0),
|
|
2777
|
-
|
|
2785
|
+
be((a(), b(T, C({ ref: "table" }, { ...e.$attrs, border: t.border }, A(l.isVue2 ? e.$listeners : {}), {
|
|
2778
2786
|
data: l.tableData,
|
|
2779
2787
|
height: l.tableHeight,
|
|
2780
2788
|
size: l.getCompatSize("mini"),
|
|
@@ -2782,16 +2790,16 @@ function bl(e, t, i, n, l, s) {
|
|
|
2782
2790
|
key: l.tableReload
|
|
2783
2791
|
}), {
|
|
2784
2792
|
default: p(() => [
|
|
2785
|
-
(
|
|
2793
|
+
(a(!0), m(w, null, F(l.displayColumns, (M) => (a(), b(E, {
|
|
2786
2794
|
vnode: M,
|
|
2787
2795
|
key: l.isVue3 ? M.id : M.data.attrs.prop
|
|
2788
2796
|
}, null, 8, ["vnode"]))), 128))
|
|
2789
2797
|
]),
|
|
2790
2798
|
_: 1
|
|
2791
2799
|
}, 16, ["data", "height", "size", "onSelectionChange"])), [
|
|
2792
|
-
[
|
|
2800
|
+
[r, s.pageLoading]
|
|
2793
2801
|
]),
|
|
2794
|
-
|
|
2802
|
+
s.computedShowPagination ? (a(), b(W, {
|
|
2795
2803
|
key: 2,
|
|
2796
2804
|
ref: "tmPagination",
|
|
2797
2805
|
"page-size": l.paginationInfo.pageSize,
|
|
@@ -2803,7 +2811,7 @@ function bl(e, t, i, n, l, s) {
|
|
|
2803
2811
|
}, null, 8, ["page-size", "current-page", "total", "disabled", "onSizeChange", "onCurrentChange"])) : v("", !0)
|
|
2804
2812
|
], 512);
|
|
2805
2813
|
}
|
|
2806
|
-
const
|
|
2814
|
+
const ce = /* @__PURE__ */ k(yi, [["render", Ci]]), _i = !1, xi = !0, Si = {
|
|
2807
2815
|
name: "TmTableColumn",
|
|
2808
2816
|
inheritAttrs: !1,
|
|
2809
2817
|
computed: {
|
|
@@ -2816,8 +2824,8 @@ const oe = /* @__PURE__ */ F(ml, [["render", bl]]), yl = !1, vl = !0, Cl = {
|
|
|
2816
2824
|
},
|
|
2817
2825
|
data() {
|
|
2818
2826
|
return {
|
|
2819
|
-
isVue2:
|
|
2820
|
-
isVue3:
|
|
2827
|
+
isVue2: _i,
|
|
2828
|
+
isVue3: xi
|
|
2821
2829
|
};
|
|
2822
2830
|
},
|
|
2823
2831
|
created() {
|
|
@@ -2827,50 +2835,414 @@ const oe = /* @__PURE__ */ F(ml, [["render", bl]]), yl = !1, vl = !0, Cl = {
|
|
|
2827
2835
|
});
|
|
2828
2836
|
}
|
|
2829
2837
|
};
|
|
2830
|
-
function
|
|
2838
|
+
function Ti(e, i, t, n, l, s) {
|
|
2831
2839
|
const o = d("el-table-column");
|
|
2832
|
-
return s.isVisible ? (
|
|
2833
|
-
|
|
2834
|
-
name:
|
|
2840
|
+
return s.isVisible ? (a(), b(o, C({ key: 0 }, e.$attrs, A(l.isVue2 ? e.$listeners : {})), Y({ _: 2 }, [
|
|
2841
|
+
F(s.slots, (f, u) => ({
|
|
2842
|
+
name: u,
|
|
2835
2843
|
fn: p((h) => [
|
|
2836
|
-
|
|
2844
|
+
z(e.$slots, u, ye(ve(h)))
|
|
2837
2845
|
])
|
|
2838
2846
|
}))
|
|
2839
2847
|
]), 1040)) : v("", !0);
|
|
2840
2848
|
}
|
|
2841
|
-
const
|
|
2842
|
-
|
|
2843
|
-
|
|
2849
|
+
const de = /* @__PURE__ */ k(Si, [["render", Ti]]), { t: G } = R(), Vi = {
|
|
2850
|
+
name: "TmAdvancedEllipsisText",
|
|
2851
|
+
components: {
|
|
2852
|
+
CopyIcon: ie
|
|
2853
|
+
},
|
|
2854
|
+
props: {
|
|
2855
|
+
rows: {
|
|
2856
|
+
type: Number,
|
|
2857
|
+
default: 1
|
|
2858
|
+
},
|
|
2859
|
+
width: {
|
|
2860
|
+
type: String,
|
|
2861
|
+
default: "100%"
|
|
2862
|
+
},
|
|
2863
|
+
maxWidth: {
|
|
2864
|
+
type: String,
|
|
2865
|
+
default: ""
|
|
2866
|
+
},
|
|
2867
|
+
showToolbar: {
|
|
2868
|
+
type: Boolean,
|
|
2869
|
+
default: !1
|
|
2870
|
+
},
|
|
2871
|
+
text: {
|
|
2872
|
+
type: String,
|
|
2873
|
+
default: ""
|
|
2874
|
+
},
|
|
2875
|
+
showTooltip: {
|
|
2876
|
+
type: Boolean,
|
|
2877
|
+
default: !0
|
|
2878
|
+
},
|
|
2879
|
+
copyable: {
|
|
2880
|
+
type: Boolean,
|
|
2881
|
+
default: !1
|
|
2882
|
+
}
|
|
2883
|
+
},
|
|
2884
|
+
data() {
|
|
2885
|
+
return {
|
|
2886
|
+
isVue2: !1,
|
|
2887
|
+
originalText: "",
|
|
2888
|
+
isHovered: !1,
|
|
2889
|
+
lineHeight: 0,
|
|
2890
|
+
containerWidth: 0,
|
|
2891
|
+
resizeObserver: null,
|
|
2892
|
+
isCalculating: !1,
|
|
2893
|
+
// 计算结果
|
|
2894
|
+
frontLines: [],
|
|
2895
|
+
lastLineText: "",
|
|
2896
|
+
isLastLineEllipsis: !1,
|
|
2897
|
+
// 表格行悬浮监听
|
|
2898
|
+
tableRowElement: null
|
|
2899
|
+
};
|
|
2900
|
+
},
|
|
2901
|
+
computed: {
|
|
2902
|
+
containerStyle() {
|
|
2903
|
+
const e = {};
|
|
2904
|
+
return this.maxWidth ? (e.maxWidth = this.maxWidth, e.width = this.width) : e.width = this.width, e;
|
|
2905
|
+
},
|
|
2906
|
+
hasToolbarSlot() {
|
|
2907
|
+
return this.$slots.toolbar ? this.$slots.toolbar && this.$slots.toolbar().length > 0 : !1;
|
|
2908
|
+
},
|
|
2909
|
+
hasToolbarContent() {
|
|
2910
|
+
return this.copyable || this.hasToolbarSlot;
|
|
2911
|
+
},
|
|
2912
|
+
shouldShowToolbar() {
|
|
2913
|
+
return this.showToolbar || this.isHovered && this.hasToolbarContent;
|
|
2914
|
+
}
|
|
2915
|
+
},
|
|
2916
|
+
mounted() {
|
|
2917
|
+
this.initComponent(), this.setupResizeObserver(), this.setupTableRowHover();
|
|
2918
|
+
},
|
|
2919
|
+
updated() {
|
|
2920
|
+
const e = this.getTextContent();
|
|
2921
|
+
e !== this.originalText && (this.originalText = e, this.$nextTick(() => {
|
|
2922
|
+
this.calculateLayout();
|
|
2923
|
+
}));
|
|
2924
|
+
},
|
|
2925
|
+
beforeDestroy() {
|
|
2926
|
+
this.cleanupResizeObserver(), this.cleanupTableRowHover();
|
|
2927
|
+
},
|
|
2928
|
+
beforeUnmount() {
|
|
2929
|
+
this.cleanupResizeObserver(), this.cleanupTableRowHover();
|
|
2930
|
+
},
|
|
2931
|
+
watch: {
|
|
2932
|
+
text: {
|
|
2933
|
+
handler() {
|
|
2934
|
+
this.$nextTick(() => {
|
|
2935
|
+
this.originalText = this.getTextContent(), this.calculateLayout();
|
|
2936
|
+
});
|
|
2937
|
+
},
|
|
2938
|
+
immediate: !0
|
|
2939
|
+
},
|
|
2940
|
+
rows() {
|
|
2941
|
+
this.$nextTick(() => {
|
|
2942
|
+
this.calculateLayout();
|
|
2943
|
+
});
|
|
2944
|
+
},
|
|
2945
|
+
shouldShowToolbar() {
|
|
2946
|
+
this.$nextTick(() => {
|
|
2947
|
+
this.calculateLayout();
|
|
2948
|
+
});
|
|
2949
|
+
},
|
|
2950
|
+
"$slots.default": {
|
|
2951
|
+
handler() {
|
|
2952
|
+
this.$nextTick(() => {
|
|
2953
|
+
this.originalText = this.getTextContent(), this.calculateLayout();
|
|
2954
|
+
});
|
|
2955
|
+
},
|
|
2956
|
+
deep: !0
|
|
2957
|
+
}
|
|
2958
|
+
},
|
|
2959
|
+
methods: {
|
|
2960
|
+
initComponent() {
|
|
2961
|
+
this.$nextTick(() => {
|
|
2962
|
+
this.originalText = this.getTextContent(), this.calculateLineHeight(), this.$nextTick(() => {
|
|
2963
|
+
this.calculateLayout();
|
|
2964
|
+
});
|
|
2965
|
+
});
|
|
2966
|
+
},
|
|
2967
|
+
handleCopy() {
|
|
2968
|
+
navigator.clipboard && window.isSecureContext ? navigator.clipboard.writeText(this.originalText).then(() => {
|
|
2969
|
+
this.$message.success(G("copySuccess"));
|
|
2970
|
+
}).catch(() => {
|
|
2971
|
+
this.fallbackCopy();
|
|
2972
|
+
}) : this.fallbackCopy();
|
|
2973
|
+
},
|
|
2974
|
+
fallbackCopy() {
|
|
2975
|
+
const e = document.createElement("textarea");
|
|
2976
|
+
e.value = this.originalText, e.style.position = "fixed", e.style.left = "-999999px", e.style.top = "-999999px", document.body.appendChild(e), e.focus(), e.select();
|
|
2977
|
+
try {
|
|
2978
|
+
document.execCommand("copy"), this.$message.success(G("copySuccess"));
|
|
2979
|
+
} catch {
|
|
2980
|
+
this.$message.error(G("copyFailed"));
|
|
2981
|
+
}
|
|
2982
|
+
document.body.removeChild(e);
|
|
2983
|
+
},
|
|
2984
|
+
getTextContent() {
|
|
2985
|
+
if (this.$slots.default) {
|
|
2986
|
+
const e = this.$slots.default;
|
|
2987
|
+
return e().map((i) => typeof i.children == "string" ? i.children : Array.isArray(i.children) ? i.children.map((t) => t.children || "").join("") : "").join("");
|
|
2988
|
+
}
|
|
2989
|
+
return this.text || "";
|
|
2990
|
+
},
|
|
2991
|
+
calculateLineHeight() {
|
|
2992
|
+
const e = this.$refs.containerRef;
|
|
2993
|
+
if (!e) return;
|
|
2994
|
+
const i = window.getComputedStyle(e);
|
|
2995
|
+
this.containerWidth = e.offsetWidth;
|
|
2996
|
+
const t = this.$refs.measureRef;
|
|
2997
|
+
if (t) {
|
|
2998
|
+
this.setMeasureElementStyle(t, {
|
|
2999
|
+
width: this.containerWidth + "px",
|
|
3000
|
+
wordBreak: "break-all",
|
|
3001
|
+
whiteSpace: "normal"
|
|
3002
|
+
}), t.textContent = "测", t.offsetHeight;
|
|
3003
|
+
const n = t.offsetHeight;
|
|
3004
|
+
t.innerHTML = "", this.lineHeight = n;
|
|
3005
|
+
} else {
|
|
3006
|
+
const n = i.lineHeight;
|
|
3007
|
+
if (n && n !== "normal")
|
|
3008
|
+
this.lineHeight = parseInt(n);
|
|
3009
|
+
else {
|
|
3010
|
+
const l = parseInt(i.fontSize);
|
|
3011
|
+
this.lineHeight = l * 1.2;
|
|
3012
|
+
}
|
|
3013
|
+
}
|
|
3014
|
+
},
|
|
3015
|
+
calculateLayout() {
|
|
3016
|
+
if (!this.isCalculating) {
|
|
3017
|
+
if (!this.originalText || this.rows <= 0) {
|
|
3018
|
+
this.frontLines = [], this.lastLineText = this.originalText || "", this.isLastLineEllipsis = !1;
|
|
3019
|
+
return;
|
|
3020
|
+
}
|
|
3021
|
+
this.isCalculating = !0, this.$nextTick(() => {
|
|
3022
|
+
requestAnimationFrame(() => {
|
|
3023
|
+
this.performLayoutCalculation();
|
|
3024
|
+
});
|
|
3025
|
+
});
|
|
3026
|
+
}
|
|
3027
|
+
},
|
|
3028
|
+
performLayoutCalculation() {
|
|
3029
|
+
const e = this.originalText;
|
|
3030
|
+
if (this.rows === 1)
|
|
3031
|
+
this.frontLines = [], this.lastLineText = e, this.isLastLineEllipsis = this.checkIfTextOverflows(e);
|
|
3032
|
+
else {
|
|
3033
|
+
const i = this.lineHeight;
|
|
3034
|
+
if (this.getTextHeight(e) <= i)
|
|
3035
|
+
this.frontLines = [], this.lastLineText = e, this.isLastLineEllipsis = this.checkIfTextOverflows(e);
|
|
3036
|
+
else {
|
|
3037
|
+
const n = this.lineHeight * (this.rows - 1), l = this.findTextForHeight(e, n);
|
|
3038
|
+
this.frontLines = this.splitTextToLines(l);
|
|
3039
|
+
const s = e.substring(l.length);
|
|
3040
|
+
this.lastLineText = s, this.isLastLineEllipsis = s.length > 0 && this.checkIfTextOverflows(s);
|
|
3041
|
+
}
|
|
3042
|
+
}
|
|
3043
|
+
this.isCalculating = !1;
|
|
3044
|
+
},
|
|
3045
|
+
findTextForHeight(e, i) {
|
|
3046
|
+
if (this.getTextHeight(e) <= i)
|
|
3047
|
+
return e;
|
|
3048
|
+
let t = 0, n = e.length, l = "";
|
|
3049
|
+
for (; t <= n; ) {
|
|
3050
|
+
const s = Math.floor((t + n) / 2), o = e.substring(0, s);
|
|
3051
|
+
this.getTextHeight(o) <= i ? (l = o, t = s + 1) : n = s - 1;
|
|
3052
|
+
}
|
|
3053
|
+
return l;
|
|
3054
|
+
},
|
|
3055
|
+
splitTextToLines(e) {
|
|
3056
|
+
if (!e) return [];
|
|
3057
|
+
const i = [];
|
|
3058
|
+
let t = e;
|
|
3059
|
+
for (; t.length > 0; ) {
|
|
3060
|
+
const n = this.findTextForHeight(t, this.lineHeight);
|
|
3061
|
+
if (n.length === 0) break;
|
|
3062
|
+
i.push(n), t = t.substring(n.length);
|
|
3063
|
+
}
|
|
3064
|
+
return i;
|
|
3065
|
+
},
|
|
3066
|
+
checkIfTextOverflows(e) {
|
|
3067
|
+
if (!e) return !1;
|
|
3068
|
+
const i = this.getTextWidth(e), t = this.shouldShowToolbar && this.hasToolbarContent ? this.getToolbarWidth() : 0, n = this.containerWidth - t - 5;
|
|
3069
|
+
return i > n;
|
|
3070
|
+
},
|
|
3071
|
+
getToolbarWidth() {
|
|
3072
|
+
let e = 0;
|
|
3073
|
+
return this.copyable && (e += 20), this.hasToolbarSlot && (e += 40), e;
|
|
3074
|
+
},
|
|
3075
|
+
getTextHeight(e) {
|
|
3076
|
+
return this.measureText(e, {
|
|
3077
|
+
width: this.containerWidth + "px",
|
|
3078
|
+
wordBreak: "break-all",
|
|
3079
|
+
whiteSpace: "normal"
|
|
3080
|
+
});
|
|
3081
|
+
},
|
|
3082
|
+
getTextWidth(e) {
|
|
3083
|
+
return this.measureText(e, { whiteSpace: "nowrap" });
|
|
3084
|
+
},
|
|
3085
|
+
measureText(e, i = {}) {
|
|
3086
|
+
if (!this.$refs.containerRef || !this.$refs.measureRef)
|
|
3087
|
+
return 0;
|
|
3088
|
+
const t = this.$refs.measureRef, n = t.style.cssText;
|
|
3089
|
+
this.setMeasureElementStyle(t, i), t.textContent = e, t.offsetHeight;
|
|
3090
|
+
const l = i.whiteSpace === "nowrap" ? t.offsetWidth : t.offsetHeight;
|
|
3091
|
+
return t.style.cssText = n, t.innerHTML = "", l;
|
|
3092
|
+
},
|
|
3093
|
+
setMeasureElementStyle(e, i = {}) {
|
|
3094
|
+
const t = window.getComputedStyle(this.$refs.containerRef);
|
|
3095
|
+
e.style.cssText = "", e.style.position = "absolute", e.style.left = "-9999px", e.style.top = "-9999px", e.style.visibility = "hidden", e.style.pointerEvents = "none", e.style.zIndex = "-1", e.style.fontSize = t.fontSize, e.style.fontFamily = t.fontFamily, e.style.fontWeight = t.fontWeight, e.style.lineHeight = t.lineHeight, e.style.letterSpacing = t.letterSpacing, e.style.wordSpacing = t.wordSpacing, e.style.padding = "0", e.style.margin = "0", e.style.border = "none", e.style.boxSizing = "border-box", Object.entries(i).forEach(([n, l]) => {
|
|
3096
|
+
e.style[n] = l;
|
|
3097
|
+
});
|
|
3098
|
+
},
|
|
3099
|
+
handleMouseEnter() {
|
|
3100
|
+
this.isHovered = !0;
|
|
3101
|
+
},
|
|
3102
|
+
handleMouseLeave() {
|
|
3103
|
+
this.isHovered = !1;
|
|
3104
|
+
},
|
|
3105
|
+
setupResizeObserver() {
|
|
3106
|
+
typeof ResizeObserver < "u" && (this.resizeObserver = new ResizeObserver((e) => {
|
|
3107
|
+
const i = e[0];
|
|
3108
|
+
if (i) {
|
|
3109
|
+
const t = i.contentRect.width;
|
|
3110
|
+
Math.abs(t - this.containerWidth) > 1 && requestAnimationFrame(() => {
|
|
3111
|
+
this.calculateLineHeight(), this.calculateLayout();
|
|
3112
|
+
});
|
|
3113
|
+
}
|
|
3114
|
+
}), this.$refs.containerRef && this.resizeObserver.observe(this.$refs.containerRef));
|
|
3115
|
+
},
|
|
3116
|
+
cleanupResizeObserver() {
|
|
3117
|
+
this.resizeObserver && (this.resizeObserver.disconnect(), this.resizeObserver = null);
|
|
3118
|
+
},
|
|
3119
|
+
setupTableRowHover() {
|
|
3120
|
+
let e = this.$el;
|
|
3121
|
+
for (; e && e !== document.body; ) {
|
|
3122
|
+
if (e.classList && e.classList.contains("el-table__row")) {
|
|
3123
|
+
this.tableRowElement = e;
|
|
3124
|
+
break;
|
|
3125
|
+
}
|
|
3126
|
+
e = e.parentElement;
|
|
3127
|
+
}
|
|
3128
|
+
this.tableRowElement && (this.tableRowElement.addEventListener("mouseenter", this.handleMouseEnter), this.tableRowElement.addEventListener("mouseleave", this.handleMouseLeave));
|
|
3129
|
+
},
|
|
3130
|
+
cleanupTableRowHover() {
|
|
3131
|
+
this.tableRowElement && (this.tableRowElement.removeEventListener("mouseenter", this.handleMouseEnter), this.tableRowElement.removeEventListener("mouseleave", this.handleMouseLeave), this.tableRowElement = null);
|
|
3132
|
+
}
|
|
3133
|
+
}
|
|
3134
|
+
}, zi = { class: "tm-ellipsis-text-wrapper" }, ki = ["innerHTML"], wi = { class: "tm-ellipsis-last-line" }, Fi = ["innerHTML"], Li = {
|
|
3135
|
+
key: 0,
|
|
3136
|
+
class: "tm-ellipsis-toolbar-part"
|
|
3137
|
+
}, Oi = {
|
|
3138
|
+
key: 1,
|
|
3139
|
+
class: "tm-ellipsis-text-wrapper"
|
|
3140
|
+
}, Mi = ["innerHTML"], Ai = { class: "tm-ellipsis-last-line" }, Di = ["innerHTML"], Hi = {
|
|
3141
|
+
key: 0,
|
|
3142
|
+
class: "tm-ellipsis-toolbar-part"
|
|
3143
|
+
}, Ri = {
|
|
3144
|
+
ref: "measureRef",
|
|
3145
|
+
class: "tm-ellipsis-measure"
|
|
3146
|
+
};
|
|
3147
|
+
function Ei(e, i, t, n, l, s) {
|
|
3148
|
+
const o = d("CopyIcon"), f = d("el-tooltip");
|
|
3149
|
+
return a(), m("div", {
|
|
3150
|
+
ref: "containerRef",
|
|
3151
|
+
style: U(s.containerStyle),
|
|
3152
|
+
class: "tm-ellipsis-text",
|
|
3153
|
+
onMouseenter: i[0] || (i[0] = (...u) => s.handleMouseEnter && s.handleMouseEnter(...u)),
|
|
3154
|
+
onMouseleave: i[1] || (i[1] = (...u) => s.handleMouseLeave && s.handleMouseLeave(...u))
|
|
3155
|
+
}, [
|
|
3156
|
+
t.showTooltip && l.isLastLineEllipsis ? (a(), b(f, C({
|
|
3157
|
+
key: 0,
|
|
3158
|
+
content: l.originalText,
|
|
3159
|
+
disabled: !t.showTooltip || !l.isLastLineEllipsis
|
|
3160
|
+
}, {
|
|
3161
|
+
[l.isVue2 ? "open-delay" : "show-after"]: 300
|
|
3162
|
+
}, { placement: "top" }), {
|
|
3163
|
+
default: p(() => [
|
|
3164
|
+
y("div", zi, [
|
|
3165
|
+
(a(!0), m(w, null, F(l.frontLines, (u, h) => (a(), m("div", {
|
|
3166
|
+
key: "front-" + h,
|
|
3167
|
+
class: "tm-ellipsis-line",
|
|
3168
|
+
innerHTML: u
|
|
3169
|
+
}, null, 8, ki))), 128)),
|
|
3170
|
+
y("div", wi, [
|
|
3171
|
+
y("div", {
|
|
3172
|
+
class: "tm-ellipsis-text-part",
|
|
3173
|
+
innerHTML: l.lastLineText
|
|
3174
|
+
}, null, 8, Fi),
|
|
3175
|
+
s.shouldShowToolbar && s.hasToolbarContent ? (a(), m("div", Li, [
|
|
3176
|
+
t.copyable ? (a(), b(o, {
|
|
3177
|
+
key: 0,
|
|
3178
|
+
class: "icon-item",
|
|
3179
|
+
onClick: s.handleCopy
|
|
3180
|
+
}, null, 8, ["onClick"])) : v("", !0),
|
|
3181
|
+
z(e.$slots, "toolbar", {}, void 0, !0)
|
|
3182
|
+
])) : v("", !0)
|
|
3183
|
+
])
|
|
3184
|
+
])
|
|
3185
|
+
]),
|
|
3186
|
+
_: 3
|
|
3187
|
+
}, 16, ["content", "disabled"])) : (a(), m("div", Oi, [
|
|
3188
|
+
(a(!0), m(w, null, F(l.frontLines, (u, h) => (a(), m("div", {
|
|
3189
|
+
key: "front-" + h,
|
|
3190
|
+
class: "tm-ellipsis-line",
|
|
3191
|
+
innerHTML: u
|
|
3192
|
+
}, null, 8, Mi))), 128)),
|
|
3193
|
+
y("div", Ai, [
|
|
3194
|
+
y("div", {
|
|
3195
|
+
class: "tm-ellipsis-text-part",
|
|
3196
|
+
innerHTML: l.lastLineText
|
|
3197
|
+
}, null, 8, Di),
|
|
3198
|
+
s.shouldShowToolbar && s.hasToolbarContent ? (a(), m("div", Hi, [
|
|
3199
|
+
t.copyable ? (a(), b(o, {
|
|
3200
|
+
key: 0,
|
|
3201
|
+
class: "icon-item",
|
|
3202
|
+
onClick: s.handleCopy
|
|
3203
|
+
}, null, 8, ["onClick"])) : v("", !0),
|
|
3204
|
+
z(e.$slots, "toolbar", {}, void 0, !0)
|
|
3205
|
+
])) : v("", !0)
|
|
3206
|
+
])
|
|
3207
|
+
])),
|
|
3208
|
+
y("div", Ri, null, 512)
|
|
3209
|
+
], 36);
|
|
3210
|
+
}
|
|
3211
|
+
const he = /* @__PURE__ */ k(Vi, [["render", Ei], ["__scopeId", "data-v-16643222"]]), Ii = {
|
|
3212
|
+
install(e, i = {}) {
|
|
3213
|
+
[ce, de, X, he].forEach((t) => e.component(t.name, t)), i.tableConfigProvider && jt(i.tableConfigProvider);
|
|
2844
3214
|
}
|
|
2845
|
-
},
|
|
2846
|
-
install:
|
|
2847
|
-
Table:
|
|
2848
|
-
Column:
|
|
2849
|
-
Search:
|
|
2850
|
-
Select:
|
|
2851
|
-
AdvancedInput:
|
|
2852
|
-
AdvancedDate:
|
|
2853
|
-
Cascader:
|
|
2854
|
-
Radio:
|
|
2855
|
-
Checkbox:
|
|
2856
|
-
Switch:
|
|
2857
|
-
EllipsisText:
|
|
2858
|
-
|
|
2859
|
-
|
|
3215
|
+
}, Ni = {
|
|
3216
|
+
install: Ii.install,
|
|
3217
|
+
Table: ce,
|
|
3218
|
+
Column: de,
|
|
3219
|
+
Search: ue,
|
|
3220
|
+
Select: te,
|
|
3221
|
+
AdvancedInput: le,
|
|
3222
|
+
AdvancedDate: se,
|
|
3223
|
+
Cascader: ne,
|
|
3224
|
+
Radio: ae,
|
|
3225
|
+
Checkbox: oe,
|
|
3226
|
+
Switch: re,
|
|
3227
|
+
EllipsisText: X,
|
|
3228
|
+
AdvancedEllipsisText: he,
|
|
3229
|
+
setLang: ee,
|
|
3230
|
+
useLocale: R
|
|
2860
3231
|
};
|
|
2861
3232
|
export {
|
|
2862
|
-
|
|
2863
|
-
|
|
2864
|
-
le as
|
|
2865
|
-
|
|
2866
|
-
|
|
2867
|
-
|
|
2868
|
-
|
|
2869
|
-
ae as
|
|
2870
|
-
|
|
2871
|
-
|
|
2872
|
-
|
|
2873
|
-
|
|
2874
|
-
|
|
2875
|
-
|
|
3233
|
+
se as AdvancedDate,
|
|
3234
|
+
he as AdvancedEllipsisText,
|
|
3235
|
+
le as AdvancedInput,
|
|
3236
|
+
ne as Cascader,
|
|
3237
|
+
oe as Checkbox,
|
|
3238
|
+
de as Column,
|
|
3239
|
+
X as EllipsisText,
|
|
3240
|
+
ae as Radio,
|
|
3241
|
+
ue as Search,
|
|
3242
|
+
te as Select,
|
|
3243
|
+
re as Switch,
|
|
3244
|
+
ce as Table,
|
|
3245
|
+
Ni as default,
|
|
3246
|
+
ee as setLang,
|
|
3247
|
+
R as useLocale
|
|
2876
3248
|
};
|