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