tm-table 1.2.10 → 1.2.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -2
- package/dist/vue2/tm-table.css +1 -1
- package/dist/vue2/tm-table.es.js +367 -305
- package/dist/vue2/tm-table.umd.js +1 -1
- package/dist/vue3/tm-table.css +1 -1
- package/dist/vue3/tm-table.es.js +751 -670
- 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
|
|
1
|
+
var He = Object.defineProperty, Re = Object.defineProperties;
|
|
2
|
+
var Ee = Object.getOwnPropertyDescriptors;
|
|
3
3
|
var q = Object.getOwnPropertySymbols;
|
|
4
|
-
var
|
|
5
|
-
var
|
|
4
|
+
var re = Object.prototype.hasOwnProperty, ue = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var oe = (e, i, t) => i in e ? He(e, i, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[i] = t, T = (e, i) => {
|
|
6
6
|
for (var t in i || (i = {}))
|
|
7
|
-
|
|
7
|
+
re.call(i, t) && oe(e, t, i[t]);
|
|
8
8
|
if (q)
|
|
9
9
|
for (var t of q(i))
|
|
10
|
-
|
|
10
|
+
ue.call(i, t) && oe(e, t, i[t]);
|
|
11
11
|
return e;
|
|
12
|
-
},
|
|
13
|
-
var
|
|
12
|
+
}, E = (e, i) => Re(e, Ee(i));
|
|
13
|
+
var de = (e, i) => {
|
|
14
14
|
var t = {};
|
|
15
|
-
for (var
|
|
16
|
-
|
|
15
|
+
for (var s in e)
|
|
16
|
+
re.call(e, s) && i.indexOf(s) < 0 && (t[s] = e[s]);
|
|
17
17
|
if (e != null && q)
|
|
18
|
-
for (var
|
|
19
|
-
i.indexOf(
|
|
18
|
+
for (var s of q(e))
|
|
19
|
+
i.indexOf(s) < 0 && ue.call(e, s) && (t[s] = e[s]);
|
|
20
20
|
return t;
|
|
21
21
|
};
|
|
22
|
-
import { ref as Ie, createElementBlock as y, openBlock as r, normalizeStyle as
|
|
23
|
-
import { CircleClose as
|
|
22
|
+
import { ref as Ie, createElementBlock as y, openBlock as r, normalizeStyle as U, createElementVNode as v, h as Ce, resolveComponent as u, createBlock as b, mergeProps as _, withCtx as p, toDisplayString as x, normalizeClass as Z, createCommentVNode as C, defineComponent as We, useAttrs as Pe, useSlots as Ne, computed as he, resolveDynamicComponent as Ue, Fragment as z, renderList as O, createVNode as g, renderSlot as S, toHandlers as H, createTextVNode as k, withKeys as Be, createSlots as _e, resolveDirective as je, withDirectives as Ke, normalizeProps as Je, guardReactiveProps as Qe } from "vue";
|
|
23
|
+
import { CircleClose as qe } from "@element-plus/icons-vue";
|
|
24
24
|
import R from "sortablejs";
|
|
25
|
-
const
|
|
25
|
+
const ce = {
|
|
26
26
|
mini: "small",
|
|
27
27
|
small: "small",
|
|
28
28
|
default: "default",
|
|
29
29
|
large: "large"
|
|
30
|
-
}, Q = (e) =>
|
|
30
|
+
}, Q = (e) => ce[e] || ce.default, L = () => "default", Ye = {
|
|
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
|
+
}, Ge = {
|
|
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
|
+
}, Xe = {
|
|
109
|
+
"zh-CN": Ye,
|
|
110
|
+
"en-US": Ge
|
|
111
111
|
};
|
|
112
112
|
let $ = { value: "zh-CN" };
|
|
113
113
|
$ = Ie("zh-CN");
|
|
114
|
-
const
|
|
114
|
+
const Ze = (e) => {
|
|
115
115
|
var i;
|
|
116
|
-
return ((i =
|
|
116
|
+
return ((i = Xe[$.value]) == null ? void 0 : i[e]) || e;
|
|
117
117
|
}, ae = (e) => {
|
|
118
118
|
$.value = e;
|
|
119
|
-
},
|
|
120
|
-
t:
|
|
119
|
+
}, D = () => ({
|
|
120
|
+
t: Ze,
|
|
121
121
|
setLang: ae,
|
|
122
122
|
currentLang: $
|
|
123
123
|
}), w = (e, i) => {
|
|
124
124
|
const t = e.__vccOpts || e;
|
|
125
|
-
for (const [
|
|
126
|
-
t[
|
|
125
|
+
for (const [s, l] of i)
|
|
126
|
+
t[s] = l;
|
|
127
127
|
return t;
|
|
128
|
-
},
|
|
128
|
+
}, $e = {
|
|
129
129
|
name: "BaseIcon",
|
|
130
130
|
props: {
|
|
131
131
|
path: {
|
|
@@ -142,8 +142,8 @@ const Xe = (e) => {
|
|
|
142
142
|
handleClick() {
|
|
143
143
|
}
|
|
144
144
|
}
|
|
145
|
-
},
|
|
146
|
-
function
|
|
145
|
+
}, et = ["width", "height"], tt = ["d"];
|
|
146
|
+
function it(e, i, t, s, l, n) {
|
|
147
147
|
return r(), y("i", {
|
|
148
148
|
class: "tm-icon",
|
|
149
149
|
onClick: i[0] || (i[0] = (...o) => n.handleClick && n.handleClick(...o))
|
|
@@ -151,15 +151,15 @@ function tt(e, i, t, a, l, n) {
|
|
|
151
151
|
(r(), y("svg", {
|
|
152
152
|
width: t.size,
|
|
153
153
|
height: t.size,
|
|
154
|
-
style:
|
|
154
|
+
style: U({ 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, tt)
|
|
159
|
+
], 12, et))
|
|
160
160
|
]);
|
|
161
161
|
}
|
|
162
|
-
const
|
|
162
|
+
const lt = /* @__PURE__ */ w($e, [["render", it], ["__scopeId", "data-v-1c30ca93"]]), nt = {
|
|
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,9 +171,9 @@ const it = /* @__PURE__ */ w(Ze, [["render", tt], ["__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
|
-
},
|
|
175
|
-
const
|
|
176
|
-
name:
|
|
174
|
+
}, M = Object.entries(nt).reduce((e, [i, t]) => {
|
|
175
|
+
const s = `${i}Icon`, l = {
|
|
176
|
+
name: s,
|
|
177
177
|
props: {
|
|
178
178
|
path: {
|
|
179
179
|
type: String,
|
|
@@ -187,18 +187,18 @@ const it = /* @__PURE__ */ w(Ze, [["render", tt], ["__scopeId", "data-v-1c30ca93
|
|
|
187
187
|
}
|
|
188
188
|
},
|
|
189
189
|
render(n) {
|
|
190
|
-
return
|
|
190
|
+
return Ce(lt, this.$props);
|
|
191
191
|
}
|
|
192
192
|
};
|
|
193
193
|
return l.install = (n) => {
|
|
194
|
-
n.component(
|
|
194
|
+
n.component(s, l);
|
|
195
195
|
}, e[i] = l, e;
|
|
196
|
-
}, {}),
|
|
197
|
-
|
|
198
|
-
const
|
|
196
|
+
}, {}), st = M.menu, at = M.refresh, ot = M.move;
|
|
197
|
+
M["column-setting"];
|
|
198
|
+
const rt = M.more, ut = M["fixed-left"], dt = M["fixed-right"], ht = M.upload, ct = M.download, ft = M.delete, Se = M.copy, { t: te } = D(), pt = !1, mt = !0, gt = {
|
|
199
199
|
name: "TmEllipsisText",
|
|
200
200
|
components: {
|
|
201
|
-
CopyIcon:
|
|
201
|
+
CopyIcon: Se
|
|
202
202
|
},
|
|
203
203
|
props: {
|
|
204
204
|
text: {
|
|
@@ -235,8 +235,8 @@ const ot = D.more, rt = D["fixed-left"], ut = D["fixed-right"], dt = D.upload, h
|
|
|
235
235
|
},
|
|
236
236
|
data() {
|
|
237
237
|
return {
|
|
238
|
-
isVue2:
|
|
239
|
-
isVue3:
|
|
238
|
+
isVue2: pt,
|
|
239
|
+
isVue3: mt,
|
|
240
240
|
isOverflow: !1,
|
|
241
241
|
currentLines: 1,
|
|
242
242
|
resizeObserver: null,
|
|
@@ -287,7 +287,7 @@ const ot = D.more, rt = D["fixed-left"], ut = D["fixed-right"], dt = D.upload, h
|
|
|
287
287
|
}));
|
|
288
288
|
},
|
|
289
289
|
performOverflowCheck() {
|
|
290
|
-
var
|
|
290
|
+
var h;
|
|
291
291
|
const e = this.$refs.textEl;
|
|
292
292
|
if (!e) return;
|
|
293
293
|
const i = getComputedStyle(e);
|
|
@@ -298,16 +298,16 @@ const ot = D.more, rt = D["fixed-left"], ut = D["fixed-right"], dt = D.upload, h
|
|
|
298
298
|
return;
|
|
299
299
|
}
|
|
300
300
|
this.checkRetryCount = 0;
|
|
301
|
-
const t = e.scrollHeight,
|
|
301
|
+
const t = e.scrollHeight, s = e.scrollWidth, l = e.clientHeight, n = e.clientWidth, o = 1, d = t > l + o, c = s > n + o;
|
|
302
302
|
if (d || c) {
|
|
303
303
|
this.isOverflow = !0;
|
|
304
|
-
const
|
|
305
|
-
this.currentLines = Math.ceil(t /
|
|
304
|
+
const m = parseFloat(i.lineHeight) || 16;
|
|
305
|
+
this.currentLines = Math.ceil(t / m);
|
|
306
306
|
} else {
|
|
307
|
-
const
|
|
307
|
+
const m = e.getBoundingClientRect(), V = (h = e.parentElement) == null ? void 0 : h.getBoundingClientRect();
|
|
308
308
|
if (V) {
|
|
309
|
-
const
|
|
310
|
-
this.isOverflow =
|
|
309
|
+
const A = m.height > V.height || m.width > V.width;
|
|
310
|
+
this.isOverflow = A;
|
|
311
311
|
} else
|
|
312
312
|
this.isOverflow = !1;
|
|
313
313
|
this.currentLines = 1;
|
|
@@ -356,10 +356,10 @@ const ot = D.more, rt = D["fixed-left"], ut = D["fixed-right"], dt = D.upload, h
|
|
|
356
356
|
document.body.removeChild(e);
|
|
357
357
|
}
|
|
358
358
|
}
|
|
359
|
-
},
|
|
360
|
-
function
|
|
359
|
+
}, bt = { class: "ellipsis-text-container" };
|
|
360
|
+
function yt(e, i, t, s, l, n) {
|
|
361
361
|
const o = u("CopyIcon"), d = u("el-tooltip");
|
|
362
|
-
return r(),
|
|
362
|
+
return r(), b(d, _({
|
|
363
363
|
disabled: n.tooltipDisabled,
|
|
364
364
|
content: t.text,
|
|
365
365
|
effect: "dark",
|
|
@@ -368,16 +368,16 @@ function bt(e, i, t, a, l, n) {
|
|
|
368
368
|
[l.isVue2 ? "open-delay" : "show-after"]: 300
|
|
369
369
|
}), {
|
|
370
370
|
default: p(() => [
|
|
371
|
-
v("div",
|
|
371
|
+
v("div", bt, [
|
|
372
372
|
v("div", {
|
|
373
373
|
ref: "textEl",
|
|
374
374
|
class: "ellipsis-text",
|
|
375
|
-
style:
|
|
376
|
-
},
|
|
375
|
+
style: U(n.textStyle)
|
|
376
|
+
}, x(t.text), 5),
|
|
377
377
|
v("div", {
|
|
378
378
|
class: Z(["toolbar", { multiline: l.currentLines > 1 && t.lines > 1 }])
|
|
379
379
|
}, [
|
|
380
|
-
t.copyable ? (r(),
|
|
380
|
+
t.copyable ? (r(), b(o, {
|
|
381
381
|
key: 0,
|
|
382
382
|
class: "icon-item",
|
|
383
383
|
onClick: n.handleCopy
|
|
@@ -388,45 +388,45 @@ function bt(e, i, t, a, l, n) {
|
|
|
388
388
|
_: 1
|
|
389
389
|
}, 16, ["disabled", "content"]);
|
|
390
390
|
}
|
|
391
|
-
const ee = /* @__PURE__ */ w(
|
|
392
|
-
var
|
|
391
|
+
const ee = /* @__PURE__ */ w(gt, [["render", yt], ["__scopeId", "data-v-a18ee09f"]]);
|
|
392
|
+
var vt = Object.defineProperty, Ct = Object.defineProperties, _t = Object.getOwnPropertyDescriptors, fe = Object.getOwnPropertySymbols, St = Object.prototype.hasOwnProperty, xt = Object.prototype.propertyIsEnumerable, pe = (e, i, t) => i in e ? vt(e, i, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[i] = t, me = (e, i) => {
|
|
393
393
|
for (var t in i || (i = {}))
|
|
394
|
-
|
|
395
|
-
if (
|
|
396
|
-
for (var t of
|
|
397
|
-
|
|
394
|
+
St.call(i, t) && pe(e, t, i[t]);
|
|
395
|
+
if (fe)
|
|
396
|
+
for (var t of fe(i))
|
|
397
|
+
xt.call(i, t) && pe(e, t, i[t]);
|
|
398
398
|
return e;
|
|
399
|
-
},
|
|
400
|
-
const
|
|
399
|
+
}, ge = (e, i) => Ct(e, _t(i));
|
|
400
|
+
const Tt = {
|
|
401
401
|
name: "RenderVue3",
|
|
402
402
|
inheritAttrs: !1
|
|
403
|
-
},
|
|
403
|
+
}, wt = /* @__PURE__ */ We(ge(me({}, Tt), {
|
|
404
404
|
props: {
|
|
405
405
|
renderFn: { type: Function },
|
|
406
406
|
data: {}
|
|
407
407
|
},
|
|
408
408
|
setup(e) {
|
|
409
|
-
const i = e, t =
|
|
409
|
+
const i = e, t = Pe(), s = Ne(), l = he(() => ge(me({}, i.data || {}), {
|
|
410
410
|
$attrs: t,
|
|
411
|
-
$slots:
|
|
412
|
-
})), n =
|
|
411
|
+
$slots: s
|
|
412
|
+
})), n = he(() => {
|
|
413
413
|
try {
|
|
414
414
|
if (!i.renderFn || typeof i.renderFn != "function")
|
|
415
415
|
return console.warn("[RenderComponent] renderFn must be a function"), null;
|
|
416
416
|
const o = i.renderFn.toString(), d = /\(\s*h\s*[,)]/.test(o) || i.renderFn.length >= 1;
|
|
417
417
|
let c;
|
|
418
|
-
return d ? c = i.renderFn(
|
|
418
|
+
return d ? c = i.renderFn(Ce, l.value) : c = i.renderFn(l.value), c;
|
|
419
419
|
} catch (o) {
|
|
420
420
|
return console.error("[RenderComponent] Error in render function:", o), null;
|
|
421
421
|
}
|
|
422
422
|
});
|
|
423
|
-
return (o, d) => (r(),
|
|
423
|
+
return (o, d) => (r(), b(Ue(n.value)));
|
|
424
424
|
}
|
|
425
|
-
})),
|
|
425
|
+
})), Vt = !1, Ft = !0, kt = {
|
|
426
426
|
name: "FormItemLayout",
|
|
427
427
|
components: {
|
|
428
428
|
EllipsisText: ee,
|
|
429
|
-
RenderComponent:
|
|
429
|
+
RenderComponent: wt
|
|
430
430
|
},
|
|
431
431
|
props: {
|
|
432
432
|
// 布局方向
|
|
@@ -466,9 +466,9 @@ const xt = {
|
|
|
466
466
|
},
|
|
467
467
|
data() {
|
|
468
468
|
return {
|
|
469
|
-
t:
|
|
470
|
-
isVue2:
|
|
471
|
-
isVue3:
|
|
469
|
+
t: D().t,
|
|
470
|
+
isVue2: Vt,
|
|
471
|
+
isVue3: Ft,
|
|
472
472
|
getDefaultSize: L
|
|
473
473
|
};
|
|
474
474
|
},
|
|
@@ -531,42 +531,42 @@ const xt = {
|
|
|
531
531
|
}, zt = {
|
|
532
532
|
key: 0,
|
|
533
533
|
class: "label-text"
|
|
534
|
-
},
|
|
534
|
+
}, Lt = {
|
|
535
535
|
key: 1,
|
|
536
536
|
class: "label-render"
|
|
537
537
|
};
|
|
538
|
-
function
|
|
539
|
-
const o = u("el-option"), d = u("el-select"), c = u("EllipsisText"),
|
|
538
|
+
function At(e, i, t, s, l, n) {
|
|
539
|
+
const o = u("el-option"), d = u("el-select"), c = u("EllipsisText"), h = u("RenderComponent");
|
|
540
540
|
return r(), y("div", {
|
|
541
541
|
class: Z(["form-item-layout", {
|
|
542
542
|
"form-item-layout--horizontal": t.direction === "horizontal",
|
|
543
543
|
"form-item-layout--vertical": t.direction === "vertical"
|
|
544
544
|
}]),
|
|
545
|
-
style:
|
|
545
|
+
style: U(n.containerStyle)
|
|
546
546
|
}, [
|
|
547
547
|
n.hasLabel ? (r(), y("div", {
|
|
548
548
|
key: 0,
|
|
549
549
|
class: "form-item-label",
|
|
550
|
-
style:
|
|
550
|
+
style: U(n.labelStyle)
|
|
551
551
|
}, [
|
|
552
|
-
t.labelOptions && t.labelOptions.length ? (r(),
|
|
552
|
+
t.labelOptions && t.labelOptions.length ? (r(), b(d, {
|
|
553
553
|
key: 0,
|
|
554
554
|
modelValue: n.fieldValue,
|
|
555
|
-
"onUpdate:modelValue": i[0] || (i[0] = (
|
|
555
|
+
"onUpdate:modelValue": i[0] || (i[0] = (m) => n.fieldValue = m),
|
|
556
556
|
placeholder: l.t("selectPlaceholder"),
|
|
557
557
|
size: l.getDefaultSize(),
|
|
558
558
|
class: "label-select",
|
|
559
559
|
onChange: n.handleFieldChange
|
|
560
560
|
}, {
|
|
561
561
|
default: p(() => [
|
|
562
|
-
(r(!0), y(
|
|
563
|
-
key:
|
|
564
|
-
label:
|
|
565
|
-
value:
|
|
562
|
+
(r(!0), y(z, null, O(t.labelOptions, (m) => (r(), b(o, {
|
|
563
|
+
key: m.value,
|
|
564
|
+
label: m.label,
|
|
565
|
+
value: m.value
|
|
566
566
|
}, null, 8, ["label", "value"]))), 128))
|
|
567
567
|
]),
|
|
568
568
|
_: 1
|
|
569
|
-
}, 8, ["modelValue", "placeholder", "size", "onChange"])) : t.label ? (r(), y(
|
|
569
|
+
}, 8, ["modelValue", "placeholder", "size", "onChange"])) : t.label ? (r(), y(z, { key: 1 }, [
|
|
570
570
|
typeof t.label == "string" ? (r(), y("div", zt, [
|
|
571
571
|
g(c, {
|
|
572
572
|
text: t.label,
|
|
@@ -574,23 +574,23 @@ function Lt(e, i, t, a, l, n) {
|
|
|
574
574
|
width: t.labelWidth - 4,
|
|
575
575
|
"text-align": t.labelAlign
|
|
576
576
|
}, null, 8, ["text", "width", "text-align"])
|
|
577
|
-
])) : typeof t.label == "function" ? (r(), y("div",
|
|
578
|
-
g(
|
|
577
|
+
])) : typeof t.label == "function" ? (r(), y("div", Lt, [
|
|
578
|
+
g(h, { "render-fn": t.label }, null, 8, ["render-fn"])
|
|
579
579
|
])) : C("", !0)
|
|
580
580
|
], 64)) : C("", !0)
|
|
581
581
|
], 4)) : C("", !0),
|
|
582
582
|
v("div", {
|
|
583
583
|
class: "form-item-input",
|
|
584
|
-
style:
|
|
584
|
+
style: U(n.inputStyle)
|
|
585
585
|
}, [
|
|
586
586
|
S(e.$slots, "default", {}, void 0, !0)
|
|
587
587
|
], 4)
|
|
588
588
|
], 6);
|
|
589
589
|
}
|
|
590
|
-
const
|
|
590
|
+
const I = /* @__PURE__ */ w(kt, [["render", At], ["__scopeId", "data-v-f423d1ed"]]), Ot = !1, Dt = !0, Y = "modelValue", Mt = "update:modelValue", Ht = {
|
|
591
591
|
name: "TmSelectFilter",
|
|
592
592
|
components: {
|
|
593
|
-
FormItemLayout:
|
|
593
|
+
FormItemLayout: I
|
|
594
594
|
},
|
|
595
595
|
props: {
|
|
596
596
|
[Y]: {
|
|
@@ -670,9 +670,9 @@ const E = /* @__PURE__ */ w(Ft, [["render", Lt], ["__scopeId", "data-v-f423d1ed"
|
|
|
670
670
|
},
|
|
671
671
|
data() {
|
|
672
672
|
return {
|
|
673
|
-
t:
|
|
673
|
+
t: D().t,
|
|
674
674
|
isVue2: Ot,
|
|
675
|
-
isVue3:
|
|
675
|
+
isVue3: Dt,
|
|
676
676
|
getDefaultSize: L,
|
|
677
677
|
optionsList: [],
|
|
678
678
|
loading: !1,
|
|
@@ -691,7 +691,7 @@ const E = /* @__PURE__ */ w(Ft, [["render", Lt], ["__scopeId", "data-v-f423d1ed"
|
|
|
691
691
|
const t = this[Y];
|
|
692
692
|
Array.isArray(t) && t.length > 0 && (i = typeof this.valueOnClear == "function" ? this.valueOnClear() : this.valueOnClear);
|
|
693
693
|
}
|
|
694
|
-
this.$emit(
|
|
694
|
+
this.$emit(Mt, i), this.$emit("change", i);
|
|
695
695
|
}
|
|
696
696
|
},
|
|
697
697
|
propMap() {
|
|
@@ -741,13 +741,13 @@ const E = /* @__PURE__ */ w(Ft, [["render", Lt], ["__scopeId", "data-v-f423d1ed"
|
|
|
741
741
|
}
|
|
742
742
|
}
|
|
743
743
|
}
|
|
744
|
-
},
|
|
744
|
+
}, Rt = {
|
|
745
745
|
key: 0,
|
|
746
746
|
class: "check-all-option"
|
|
747
747
|
};
|
|
748
|
-
function
|
|
749
|
-
const o = u("el-checkbox"), d = u("el-option"), c = u("el-select"),
|
|
750
|
-
return r(),
|
|
748
|
+
function Et(e, i, t, s, l, n) {
|
|
749
|
+
const o = u("el-checkbox"), d = u("el-option"), c = u("el-select"), h = u("FormItemLayout");
|
|
750
|
+
return r(), b(h, {
|
|
751
751
|
label: t.label,
|
|
752
752
|
"label-options": t.labelOptions,
|
|
753
753
|
field: t.field,
|
|
@@ -763,8 +763,8 @@ function Rt(e, i, t, a, l, n) {
|
|
|
763
763
|
class: "select",
|
|
764
764
|
onClear: n.handleClear,
|
|
765
765
|
modelValue: n.computedValue,
|
|
766
|
-
"onUpdate:modelValue": i[2] || (i[2] = (
|
|
767
|
-
},
|
|
766
|
+
"onUpdate:modelValue": i[2] || (i[2] = (m) => n.computedValue = m)
|
|
767
|
+
}, E(T({}, e.$attrs), {
|
|
768
768
|
size: l.getDefaultSize(),
|
|
769
769
|
filterable: t.filterable,
|
|
770
770
|
clearable: t.clearable,
|
|
@@ -772,48 +772,48 @@ function Rt(e, i, t, a, l, n) {
|
|
|
772
772
|
multiple: t.multiple,
|
|
773
773
|
placeholder: t.placeholder,
|
|
774
774
|
loading: l.loading
|
|
775
|
-
}),
|
|
775
|
+
}), H(l.isVue2 ? e.$listeners : {}), { loading: l.loading }), {
|
|
776
776
|
header: p(() => [
|
|
777
|
-
l.isVue3 && t.multiple && t.showCheckAll ? (r(),
|
|
777
|
+
l.isVue3 && t.multiple && t.showCheckAll ? (r(), b(o, {
|
|
778
778
|
key: 0,
|
|
779
779
|
modelValue: l.checkAll,
|
|
780
|
-
"onUpdate:modelValue": i[1] || (i[1] = (
|
|
780
|
+
"onUpdate:modelValue": i[1] || (i[1] = (m) => l.checkAll = m),
|
|
781
781
|
indeterminate: l.indeterminate,
|
|
782
782
|
size: l.getDefaultSize(),
|
|
783
783
|
onChange: n.handleCheckAll,
|
|
784
784
|
style: { width: "100%", height: "20px", "padding-left": "10px" }
|
|
785
785
|
}, {
|
|
786
786
|
default: p(() => [
|
|
787
|
-
|
|
787
|
+
k(x(l.t("all")), 1)
|
|
788
788
|
]),
|
|
789
789
|
_: 1
|
|
790
790
|
}, 8, ["modelValue", "indeterminate", "size", "onChange"])) : C("", !0)
|
|
791
791
|
]),
|
|
792
792
|
default: p(() => [
|
|
793
|
-
l.isVue2 && t.multiple && t.showCheckAll ? (r(), y("div",
|
|
793
|
+
l.isVue2 && t.multiple && t.showCheckAll ? (r(), y("div", Rt, [
|
|
794
794
|
g(o, {
|
|
795
795
|
style: { width: "100%" },
|
|
796
796
|
modelValue: l.checkAll,
|
|
797
|
-
"onUpdate:modelValue": i[0] || (i[0] = (
|
|
797
|
+
"onUpdate:modelValue": i[0] || (i[0] = (m) => l.checkAll = m),
|
|
798
798
|
indeterminate: l.indeterminate,
|
|
799
799
|
size: l.getDefaultSize(),
|
|
800
800
|
onChange: n.handleCheckAll
|
|
801
801
|
}, {
|
|
802
802
|
default: p(() => [
|
|
803
|
-
|
|
803
|
+
k(x(l.t("all")), 1)
|
|
804
804
|
]),
|
|
805
805
|
_: 1
|
|
806
806
|
}, 8, ["modelValue", "indeterminate", "size", "onChange"])
|
|
807
807
|
])) : C("", !0),
|
|
808
|
-
(r(!0), y(
|
|
809
|
-
key:
|
|
810
|
-
label:
|
|
811
|
-
value:
|
|
812
|
-
disabled:
|
|
808
|
+
(r(!0), y(z, null, O(l.optionsList, (m) => (r(), b(d, {
|
|
809
|
+
key: m[n.propMap.value],
|
|
810
|
+
label: m[n.propMap.label],
|
|
811
|
+
value: m[n.propMap.value],
|
|
812
|
+
disabled: m.disabled
|
|
813
813
|
}, {
|
|
814
814
|
default: p(() => [
|
|
815
|
-
S(e.$slots, "option", { item:
|
|
816
|
-
|
|
815
|
+
S(e.$slots, "option", { item: m }, () => [
|
|
816
|
+
k(x(m[n.propMap.label]), 1)
|
|
817
817
|
], !0)
|
|
818
818
|
]),
|
|
819
819
|
_: 2
|
|
@@ -825,11 +825,11 @@ function Rt(e, i, t, a, l, n) {
|
|
|
825
825
|
_: 3
|
|
826
826
|
}, 8, ["label", "label-options", "field", "onFieldChange", "label-width", "input-width", "direction", "label-align"]);
|
|
827
827
|
}
|
|
828
|
-
const
|
|
828
|
+
const xe = /* @__PURE__ */ w(Ht, [["render", Et], ["__scopeId", "data-v-ef8f7987"]]), It = {
|
|
829
829
|
name: "TmInputFilter",
|
|
830
830
|
components: {
|
|
831
|
-
MoreIcon:
|
|
832
|
-
FormItemLayout:
|
|
831
|
+
MoreIcon: rt,
|
|
832
|
+
FormItemLayout: I
|
|
833
833
|
},
|
|
834
834
|
props: {
|
|
835
835
|
label: {
|
|
@@ -878,7 +878,7 @@ const Se = /* @__PURE__ */ w(Mt, [["render", Rt], ["__scopeId", "data-v-ef8f7987
|
|
|
878
878
|
},
|
|
879
879
|
data() {
|
|
880
880
|
return {
|
|
881
|
-
t:
|
|
881
|
+
t: D().t,
|
|
882
882
|
getDefaultSize: L,
|
|
883
883
|
getCompatSize: Q,
|
|
884
884
|
exactValue: "",
|
|
@@ -942,10 +942,10 @@ const Se = /* @__PURE__ */ w(Mt, [["render", Rt], ["__scopeId", "data-v-ef8f7987
|
|
|
942
942
|
created() {
|
|
943
943
|
this.updateCurrentOptionMultiple();
|
|
944
944
|
}
|
|
945
|
-
},
|
|
946
|
-
function
|
|
947
|
-
const o = u("el-input"), d = u("el-button"), c = u("MoreIcon"),
|
|
948
|
-
return r(), m
|
|
945
|
+
}, Wt = { class: "popover-content" }, Pt = { class: "popover-subtitle" }, Nt = { class: "popover-footer" };
|
|
946
|
+
function Ut(e, i, t, s, l, n) {
|
|
947
|
+
const o = u("el-input"), d = u("el-button"), c = u("MoreIcon"), h = u("el-popover"), m = u("FormItemLayout");
|
|
948
|
+
return r(), b(m, {
|
|
949
949
|
label: t.label,
|
|
950
950
|
"label-options": t.labelOptions,
|
|
951
951
|
field: t.field,
|
|
@@ -964,11 +964,11 @@ function Pt(e, i, t, a, l, n) {
|
|
|
964
964
|
onKeyup: Be(n.handleEnter, ["enter", "native"]),
|
|
965
965
|
clearable: "",
|
|
966
966
|
class: "tm-input"
|
|
967
|
-
},
|
|
967
|
+
}, _e({ _: 2 }, [
|
|
968
968
|
n.shouldShowMultiple ? {
|
|
969
969
|
name: "append",
|
|
970
970
|
fn: p(() => [
|
|
971
|
-
g(
|
|
971
|
+
g(h, {
|
|
972
972
|
visible: l.isExactMode,
|
|
973
973
|
placement: "bottom-end",
|
|
974
974
|
width: 260,
|
|
@@ -979,8 +979,8 @@ function Pt(e, i, t, a, l, n) {
|
|
|
979
979
|
g(c, { style: { cursor: "pointer" } })
|
|
980
980
|
]),
|
|
981
981
|
default: p(() => [
|
|
982
|
-
v("div",
|
|
983
|
-
v("p",
|
|
982
|
+
v("div", Wt, [
|
|
983
|
+
v("p", Pt, x(l.t("accurateSearchTips")), 1),
|
|
984
984
|
g(o, {
|
|
985
985
|
size: l.getDefaultSize(),
|
|
986
986
|
type: "textarea",
|
|
@@ -997,7 +997,7 @@ function Pt(e, i, t, a, l, n) {
|
|
|
997
997
|
onClick: n.handleClear
|
|
998
998
|
}, {
|
|
999
999
|
default: p(() => [
|
|
1000
|
-
|
|
1000
|
+
k(x(l.t("clear")), 1)
|
|
1001
1001
|
]),
|
|
1002
1002
|
_: 1
|
|
1003
1003
|
}, 8, ["size", "onClick"]),
|
|
@@ -1006,7 +1006,7 @@ function Pt(e, i, t, a, l, n) {
|
|
|
1006
1006
|
onClick: n.handlePopoverClose
|
|
1007
1007
|
}, {
|
|
1008
1008
|
default: p(() => [
|
|
1009
|
-
|
|
1009
|
+
k(x(l.t("cancel")), 1)
|
|
1010
1010
|
]),
|
|
1011
1011
|
_: 1
|
|
1012
1012
|
}, 8, ["size", "onClick"]),
|
|
@@ -1016,7 +1016,7 @@ function Pt(e, i, t, a, l, n) {
|
|
|
1016
1016
|
onClick: n.handleExactSearch
|
|
1017
1017
|
}, {
|
|
1018
1018
|
default: p(() => [
|
|
1019
|
-
|
|
1019
|
+
k(x(l.t("search")), 1)
|
|
1020
1020
|
]),
|
|
1021
1021
|
_: 1
|
|
1022
1022
|
}, 8, ["size", "onClick"])
|
|
@@ -1033,10 +1033,10 @@ function Pt(e, i, t, a, l, n) {
|
|
|
1033
1033
|
_: 1
|
|
1034
1034
|
}, 8, ["label", "label-options", "field", "onFieldChange", "label-width", "input-width", "direction", "label-align"]);
|
|
1035
1035
|
}
|
|
1036
|
-
const
|
|
1036
|
+
const Te = /* @__PURE__ */ w(It, [["render", Ut], ["__scopeId", "data-v-90ce9bc0"]]), { t: F } = D(), Bt = !1, jt = !0, Kt = "modelValue", Jt = {
|
|
1037
1037
|
name: "TmDateFilter",
|
|
1038
1038
|
components: {
|
|
1039
|
-
FormItemLayout:
|
|
1039
|
+
FormItemLayout: I
|
|
1040
1040
|
},
|
|
1041
1041
|
props: {
|
|
1042
1042
|
value: {
|
|
@@ -1191,43 +1191,43 @@ const xe = /* @__PURE__ */ w(It, [["render", Pt], ["__scopeId", "data-v-90ce9bc0
|
|
|
1191
1191
|
{
|
|
1192
1192
|
text: F("today"),
|
|
1193
1193
|
onClick(t) {
|
|
1194
|
-
const
|
|
1195
|
-
i && (l.setHours(0, 0, 0, 0),
|
|
1194
|
+
const s = /* @__PURE__ */ new Date(), l = /* @__PURE__ */ new Date();
|
|
1195
|
+
i && (l.setHours(0, 0, 0, 0), s.setHours(23, 59, 59, 999)), t.$emit("pick", [l, s]);
|
|
1196
1196
|
}
|
|
1197
1197
|
},
|
|
1198
1198
|
{
|
|
1199
1199
|
text: F("yesterday"),
|
|
1200
1200
|
onClick(t) {
|
|
1201
|
-
const
|
|
1202
|
-
l.setTime(l.getTime() - 3600 * 1e3 * 24),
|
|
1201
|
+
const s = /* @__PURE__ */ new Date(), l = /* @__PURE__ */ new Date();
|
|
1202
|
+
l.setTime(l.getTime() - 3600 * 1e3 * 24), s.setTime(s.getTime() - 3600 * 1e3 * 24), i && (l.setHours(0, 0, 0, 0), s.setHours(23, 59, 59, 999)), t.$emit("pick", [l, s]);
|
|
1203
1203
|
}
|
|
1204
1204
|
},
|
|
1205
1205
|
{
|
|
1206
1206
|
text: F("last7days"),
|
|
1207
1207
|
onClick(t) {
|
|
1208
|
-
const
|
|
1209
|
-
l.setTime(l.getTime() - 3600 * 1e3 * 24 * 7), i && (l.setHours(0, 0, 0, 0),
|
|
1208
|
+
const s = /* @__PURE__ */ new Date(), l = /* @__PURE__ */ new Date();
|
|
1209
|
+
l.setTime(l.getTime() - 3600 * 1e3 * 24 * 7), i && (l.setHours(0, 0, 0, 0), s.setHours(23, 59, 59, 999)), t.$emit("pick", [l, s]);
|
|
1210
1210
|
}
|
|
1211
1211
|
},
|
|
1212
1212
|
{
|
|
1213
1213
|
text: F("last30days"),
|
|
1214
1214
|
onClick(t) {
|
|
1215
|
-
const
|
|
1216
|
-
l.setTime(l.getTime() - 3600 * 1e3 * 24 * 30), i && (l.setHours(0, 0, 0, 0),
|
|
1215
|
+
const s = /* @__PURE__ */ new Date(), l = /* @__PURE__ */ new Date();
|
|
1216
|
+
l.setTime(l.getTime() - 3600 * 1e3 * 24 * 30), i && (l.setHours(0, 0, 0, 0), s.setHours(23, 59, 59, 999)), t.$emit("pick", [l, s]);
|
|
1217
1217
|
}
|
|
1218
1218
|
},
|
|
1219
1219
|
{
|
|
1220
1220
|
text: F("thisMonth"),
|
|
1221
1221
|
onClick(t) {
|
|
1222
|
-
const
|
|
1223
|
-
l.setDate(1), i && (l.setHours(0, 0, 0, 0),
|
|
1222
|
+
const s = /* @__PURE__ */ new Date(), l = /* @__PURE__ */ new Date();
|
|
1223
|
+
l.setDate(1), i && (l.setHours(0, 0, 0, 0), s.setHours(23, 59, 59, 999)), t.$emit("pick", [l, s]);
|
|
1224
1224
|
}
|
|
1225
1225
|
},
|
|
1226
1226
|
{
|
|
1227
1227
|
text: F("lastMonth"),
|
|
1228
1228
|
onClick(t) {
|
|
1229
|
-
const
|
|
1230
|
-
l.setMonth(l.getMonth() - 1), l.setDate(1),
|
|
1229
|
+
const s = /* @__PURE__ */ new Date(), l = /* @__PURE__ */ new Date();
|
|
1230
|
+
l.setMonth(l.getMonth() - 1), l.setDate(1), s.setDate(0), i && (l.setHours(0, 0, 0, 0), s.setHours(23, 59, 59, 999)), t.$emit("pick", [l, s]);
|
|
1231
1231
|
}
|
|
1232
1232
|
}
|
|
1233
1233
|
];
|
|
@@ -1298,12 +1298,12 @@ const xe = /* @__PURE__ */ w(It, [["render", Pt], ["__scopeId", "data-v-90ce9bc0
|
|
|
1298
1298
|
if (this.type === "datetimerange" && Array.isArray(e))
|
|
1299
1299
|
return e.map((i) => {
|
|
1300
1300
|
if (typeof i == "string") {
|
|
1301
|
-
const t = /* @__PURE__ */ new Date(), [
|
|
1301
|
+
const t = /* @__PURE__ */ new Date(), [s, l, n] = i.split(":").map(Number);
|
|
1302
1302
|
return new Date(
|
|
1303
1303
|
t.getFullYear(),
|
|
1304
1304
|
t.getMonth(),
|
|
1305
1305
|
t.getDate(),
|
|
1306
|
-
|
|
1306
|
+
s,
|
|
1307
1307
|
l,
|
|
1308
1308
|
n || 0
|
|
1309
1309
|
);
|
|
@@ -1311,13 +1311,13 @@ const xe = /* @__PURE__ */ w(It, [["render", Pt], ["__scopeId", "data-v-90ce9bc0
|
|
|
1311
1311
|
return i;
|
|
1312
1312
|
});
|
|
1313
1313
|
if (this.type === "datetime" && typeof e == "string") {
|
|
1314
|
-
const i = /* @__PURE__ */ new Date(), [t,
|
|
1314
|
+
const i = /* @__PURE__ */ new Date(), [t, s, l] = e.split(":").map(Number);
|
|
1315
1315
|
return new Date(
|
|
1316
1316
|
i.getFullYear(),
|
|
1317
1317
|
i.getMonth(),
|
|
1318
1318
|
i.getDate(),
|
|
1319
1319
|
t,
|
|
1320
|
-
|
|
1320
|
+
s,
|
|
1321
1321
|
l || 0
|
|
1322
1322
|
);
|
|
1323
1323
|
}
|
|
@@ -1332,9 +1332,9 @@ const xe = /* @__PURE__ */ w(It, [["render", Pt], ["__scopeId", "data-v-90ce9bc0
|
|
|
1332
1332
|
return {
|
|
1333
1333
|
t: F,
|
|
1334
1334
|
isVue2: Bt,
|
|
1335
|
-
isVue3:
|
|
1335
|
+
isVue3: jt,
|
|
1336
1336
|
getDefaultSize: L,
|
|
1337
|
-
valueField:
|
|
1337
|
+
valueField: Kt
|
|
1338
1338
|
};
|
|
1339
1339
|
},
|
|
1340
1340
|
methods: {
|
|
@@ -1356,9 +1356,9 @@ const xe = /* @__PURE__ */ w(It, [["render", Pt], ["__scopeId", "data-v-90ce9bc0
|
|
|
1356
1356
|
}
|
|
1357
1357
|
}
|
|
1358
1358
|
};
|
|
1359
|
-
function
|
|
1359
|
+
function Qt(e, i, t, s, l, n) {
|
|
1360
1360
|
const o = u("el-date-picker"), d = u("FormItemLayout");
|
|
1361
|
-
return r(),
|
|
1361
|
+
return r(), b(d, {
|
|
1362
1362
|
label: t.label,
|
|
1363
1363
|
"label-options": t.labelOptions,
|
|
1364
1364
|
field: t.field,
|
|
@@ -1399,13 +1399,15 @@ function Kt(e, i, t, a, l, n) {
|
|
|
1399
1399
|
_: 1
|
|
1400
1400
|
}, 8, ["label", "label-options", "field", "onFieldChange", "label-width", "input-width", "direction", "label-align"]);
|
|
1401
1401
|
}
|
|
1402
|
-
const
|
|
1402
|
+
const we = /* @__PURE__ */ w(Jt, [["render", Qt], ["__scopeId", "data-v-cd8a2978"]]), qt = !1, ie = "modelValue", Yt = "update:modelValue";
|
|
1403
|
+
let Gt = 0;
|
|
1404
|
+
const Xt = {
|
|
1403
1405
|
name: "TmCascaderFilter",
|
|
1404
1406
|
components: {
|
|
1405
|
-
FormItemLayout:
|
|
1407
|
+
FormItemLayout: I
|
|
1406
1408
|
},
|
|
1407
1409
|
props: {
|
|
1408
|
-
|
|
1410
|
+
[ie]: {
|
|
1409
1411
|
type: [String, Number, Array],
|
|
1410
1412
|
default: ""
|
|
1411
1413
|
},
|
|
@@ -1442,6 +1444,10 @@ const Te = /* @__PURE__ */ w(Jt, [["render", Kt], ["__scopeId", "data-v-cd8a2978
|
|
|
1442
1444
|
type: Boolean,
|
|
1443
1445
|
default: !0
|
|
1444
1446
|
},
|
|
1447
|
+
showCheckAll: {
|
|
1448
|
+
type: Boolean,
|
|
1449
|
+
default: !1
|
|
1450
|
+
},
|
|
1445
1451
|
placeholder: {
|
|
1446
1452
|
type: String,
|
|
1447
1453
|
default: ""
|
|
@@ -1468,11 +1474,15 @@ const Te = /* @__PURE__ */ w(Jt, [["render", Kt], ["__scopeId", "data-v-cd8a2978
|
|
|
1468
1474
|
},
|
|
1469
1475
|
data() {
|
|
1470
1476
|
return {
|
|
1471
|
-
|
|
1477
|
+
t: D().t,
|
|
1478
|
+
isVue2: qt,
|
|
1472
1479
|
getDefaultSize: L,
|
|
1473
|
-
selectedValue: this
|
|
1480
|
+
selectedValue: this[ie],
|
|
1474
1481
|
optionsList: [],
|
|
1475
|
-
loading: !1
|
|
1482
|
+
loading: !1,
|
|
1483
|
+
checkAll: !1,
|
|
1484
|
+
indeterminate: !1,
|
|
1485
|
+
popperUid: `tm-cascader-popper-${++Gt}`
|
|
1476
1486
|
};
|
|
1477
1487
|
},
|
|
1478
1488
|
computed: {
|
|
@@ -1484,16 +1494,36 @@ const Te = /* @__PURE__ */ w(Jt, [["render", Kt], ["__scopeId", "data-v-cd8a2978
|
|
|
1484
1494
|
};
|
|
1485
1495
|
},
|
|
1486
1496
|
cascaderProps() {
|
|
1487
|
-
return
|
|
1497
|
+
return E(T({}, this.props), {
|
|
1488
1498
|
expandTrigger: this.props.expandTrigger || "hover"
|
|
1489
1499
|
});
|
|
1500
|
+
},
|
|
1501
|
+
isMultiple() {
|
|
1502
|
+
return !!this.cascaderProps.multiple;
|
|
1503
|
+
},
|
|
1504
|
+
checkAllEnabled() {
|
|
1505
|
+
return this.showCheckAll && this.isMultiple;
|
|
1506
|
+
},
|
|
1507
|
+
computedPopperClass() {
|
|
1508
|
+
return [this.$attrs["popper-class"] || this.$attrs.popperClass || "", this.popperUid].filter(Boolean).join(" ");
|
|
1509
|
+
},
|
|
1510
|
+
allLeafPaths() {
|
|
1511
|
+
const e = [], { value: i, children: t } = this.propMap, s = (l, n) => {
|
|
1512
|
+
if (Array.isArray(l))
|
|
1513
|
+
for (const o of l) {
|
|
1514
|
+
if (o.disabled) continue;
|
|
1515
|
+
const d = o[i], c = [...n, d], h = o[t];
|
|
1516
|
+
Array.isArray(h) && h.length ? s(h, c) : e.push(c);
|
|
1517
|
+
}
|
|
1518
|
+
};
|
|
1519
|
+
return s(this.optionsList, []), e;
|
|
1490
1520
|
}
|
|
1491
1521
|
},
|
|
1492
1522
|
watch: {
|
|
1493
|
-
|
|
1523
|
+
[ie]: {
|
|
1494
1524
|
immediate: !0,
|
|
1495
1525
|
handler(e) {
|
|
1496
|
-
this.selectedValue = e;
|
|
1526
|
+
this.selectedValue = e, this.syncCheckAllState(e);
|
|
1497
1527
|
}
|
|
1498
1528
|
},
|
|
1499
1529
|
options: {
|
|
@@ -1502,8 +1532,11 @@ const Te = /* @__PURE__ */ w(Jt, [["render", Kt], ["__scopeId", "data-v-cd8a2978
|
|
|
1502
1532
|
this.initOptions(e);
|
|
1503
1533
|
}
|
|
1504
1534
|
},
|
|
1535
|
+
optionsList() {
|
|
1536
|
+
this.syncCheckAllState(this.selectedValue);
|
|
1537
|
+
},
|
|
1505
1538
|
selectedValue(e) {
|
|
1506
|
-
this.$emit(
|
|
1539
|
+
this.$emit(Yt, e), this.$emit("change", e), this.syncCheckAllState(e);
|
|
1507
1540
|
}
|
|
1508
1541
|
},
|
|
1509
1542
|
methods: {
|
|
@@ -1519,12 +1552,42 @@ const Te = /* @__PURE__ */ w(Jt, [["render", Kt], ["__scopeId", "data-v-cd8a2978
|
|
|
1519
1552
|
this.loading = !1;
|
|
1520
1553
|
}
|
|
1521
1554
|
else Array.isArray(e) && (this.optionsList = e);
|
|
1555
|
+
},
|
|
1556
|
+
syncCheckAllState(e) {
|
|
1557
|
+
if (!this.checkAllEnabled) return;
|
|
1558
|
+
const i = this.allLeafPaths.length, t = Array.isArray(e) ? e.length : 0;
|
|
1559
|
+
i === 0 || t === 0 ? (this.checkAll = !1, this.indeterminate = !1) : t >= i ? (this.checkAll = !0, this.indeterminate = !1) : (this.checkAll = !1, this.indeterminate = !0);
|
|
1560
|
+
},
|
|
1561
|
+
handleCheckAll(e) {
|
|
1562
|
+
if (this.indeterminate = !1, e) {
|
|
1563
|
+
const i = this.cascaderProps.emitPath !== !1;
|
|
1564
|
+
this.selectedValue = i ? this.allLeafPaths.map((t) => t.slice()) : this.allLeafPaths.map((t) => t[t.length - 1]);
|
|
1565
|
+
} else
|
|
1566
|
+
this.selectedValue = [];
|
|
1567
|
+
},
|
|
1568
|
+
handleVisibleChange(e) {
|
|
1569
|
+
this.checkAllEnabled && e && this.$nextTick(() => this.mountCheckAll());
|
|
1570
|
+
},
|
|
1571
|
+
mountCheckAll() {
|
|
1572
|
+
if (typeof document == "undefined") return;
|
|
1573
|
+
const e = this.$refs.checkAllHost;
|
|
1574
|
+
if (!e) return;
|
|
1575
|
+
const i = e.firstElementChild;
|
|
1576
|
+
if (!i) return;
|
|
1577
|
+
const t = document.querySelector(`.${this.popperUid}`);
|
|
1578
|
+
if (!t) return;
|
|
1579
|
+
const s = t.querySelector(".el-cascader-panel");
|
|
1580
|
+
s && (i.parentNode !== t || s.previousSibling !== i) && t.insertBefore(i, s);
|
|
1522
1581
|
}
|
|
1523
1582
|
}
|
|
1524
|
-
},
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1583
|
+
}, Zt = { class: "cascader" }, $t = {
|
|
1584
|
+
key: 0,
|
|
1585
|
+
ref: "checkAllHost",
|
|
1586
|
+
class: "tm-cascader-check-all-host"
|
|
1587
|
+
}, ei = { class: "tm-cascader-check-all" };
|
|
1588
|
+
function ti(e, i, t, s, l, n) {
|
|
1589
|
+
const o = u("el-cascader"), d = u("el-checkbox"), c = u("FormItemLayout");
|
|
1590
|
+
return r(), b(c, {
|
|
1528
1591
|
label: t.label,
|
|
1529
1592
|
"label-width": t.labelWidth,
|
|
1530
1593
|
"input-width": t.inputWidth,
|
|
@@ -1532,12 +1595,12 @@ function Gt(e, i, t, a, l, n) {
|
|
|
1532
1595
|
"label-align": t.labelAlign
|
|
1533
1596
|
}, {
|
|
1534
1597
|
default: p(() => [
|
|
1535
|
-
v("div",
|
|
1598
|
+
v("div", Zt, [
|
|
1536
1599
|
g(o, _({
|
|
1537
1600
|
ref: "cascader",
|
|
1538
1601
|
modelValue: l.selectedValue,
|
|
1539
|
-
"onUpdate:modelValue": i[0] || (i[0] = (
|
|
1540
|
-
},
|
|
1602
|
+
"onUpdate:modelValue": i[0] || (i[0] = (h) => l.selectedValue = h)
|
|
1603
|
+
}, E(T({}, e.$attrs), {
|
|
1541
1604
|
size: l.getDefaultSize(),
|
|
1542
1605
|
filterable: t.filterable,
|
|
1543
1606
|
clearable: t.clearable,
|
|
@@ -1546,27 +1609,45 @@ function Gt(e, i, t, a, l, n) {
|
|
|
1546
1609
|
props: n.cascaderProps,
|
|
1547
1610
|
placeholder: t.placeholder,
|
|
1548
1611
|
options: l.optionsList,
|
|
1549
|
-
loading: l.loading
|
|
1550
|
-
|
|
1551
|
-
|
|
1612
|
+
loading: l.loading,
|
|
1613
|
+
popperClass: n.computedPopperClass
|
|
1614
|
+
}), { onVisibleChange: n.handleVisibleChange }, H(l.isVue2 ? e.$listeners : {})), {
|
|
1615
|
+
default: p(({ node: h, data: m }) => [
|
|
1552
1616
|
S(e.$slots, "default", {
|
|
1553
|
-
node:
|
|
1554
|
-
data:
|
|
1617
|
+
node: h,
|
|
1618
|
+
data: m
|
|
1555
1619
|
}, () => [
|
|
1556
|
-
v("span", null,
|
|
1620
|
+
v("span", null, x(m[n.propMap.label]), 1)
|
|
1557
1621
|
], !0)
|
|
1558
1622
|
]),
|
|
1559
1623
|
_: 3
|
|
1560
|
-
}, 16, ["modelValue"])
|
|
1624
|
+
}, 16, ["modelValue", "onVisibleChange"]),
|
|
1625
|
+
n.checkAllEnabled ? (r(), y("div", $t, [
|
|
1626
|
+
v("div", ei, [
|
|
1627
|
+
g(d, {
|
|
1628
|
+
modelValue: l.checkAll,
|
|
1629
|
+
"onUpdate:modelValue": i[1] || (i[1] = (h) => l.checkAll = h),
|
|
1630
|
+
indeterminate: l.indeterminate,
|
|
1631
|
+
size: l.getDefaultSize(),
|
|
1632
|
+
disabled: !n.allLeafPaths.length,
|
|
1633
|
+
onChange: n.handleCheckAll
|
|
1634
|
+
}, {
|
|
1635
|
+
default: p(() => [
|
|
1636
|
+
k(x(l.t("all")), 1)
|
|
1637
|
+
]),
|
|
1638
|
+
_: 1
|
|
1639
|
+
}, 8, ["modelValue", "indeterminate", "size", "disabled", "onChange"])
|
|
1640
|
+
])
|
|
1641
|
+
], 512)) : C("", !0)
|
|
1561
1642
|
])
|
|
1562
1643
|
]),
|
|
1563
1644
|
_: 3
|
|
1564
1645
|
}, 8, ["label", "label-width", "input-width", "direction", "label-align"]);
|
|
1565
1646
|
}
|
|
1566
|
-
const
|
|
1647
|
+
const Ve = /* @__PURE__ */ w(Xt, [["render", ti], ["__scopeId", "data-v-8431bd0f"]]), ii = !1, li = !0, ni = {
|
|
1567
1648
|
name: "TmRadioFilter",
|
|
1568
1649
|
components: {
|
|
1569
|
-
FormItemLayout:
|
|
1650
|
+
FormItemLayout: I
|
|
1570
1651
|
},
|
|
1571
1652
|
props: {
|
|
1572
1653
|
value: {
|
|
@@ -1619,8 +1700,8 @@ const we = /* @__PURE__ */ w(qt, [["render", Gt], ["__scopeId", "data-v-7c915d17
|
|
|
1619
1700
|
},
|
|
1620
1701
|
data() {
|
|
1621
1702
|
return {
|
|
1622
|
-
isVue2:
|
|
1623
|
-
isVue3:
|
|
1703
|
+
isVue2: ii,
|
|
1704
|
+
isVue3: li,
|
|
1624
1705
|
getDefaultSize: L,
|
|
1625
1706
|
selectedValue: this.value,
|
|
1626
1707
|
optionsList: [],
|
|
@@ -1668,9 +1749,9 @@ const we = /* @__PURE__ */ w(qt, [["render", Gt], ["__scopeId", "data-v-7c915d17
|
|
|
1668
1749
|
}
|
|
1669
1750
|
}
|
|
1670
1751
|
};
|
|
1671
|
-
function
|
|
1752
|
+
function si(e, i, t, s, l, n) {
|
|
1672
1753
|
const o = u("el-radio-button"), d = u("el-radio-group"), c = u("FormItemLayout");
|
|
1673
|
-
return r(),
|
|
1754
|
+
return r(), b(c, {
|
|
1674
1755
|
label: t.label,
|
|
1675
1756
|
"label-width": t.labelWidth,
|
|
1676
1757
|
"input-width": t.inputWidth,
|
|
@@ -1681,21 +1762,21 @@ function ei(e, i, t, a, l, n) {
|
|
|
1681
1762
|
g(d, _({
|
|
1682
1763
|
ref: "radioGroup",
|
|
1683
1764
|
modelValue: l.selectedValue,
|
|
1684
|
-
"onUpdate:modelValue": i[0] || (i[0] = (
|
|
1685
|
-
},
|
|
1765
|
+
"onUpdate:modelValue": i[0] || (i[0] = (h) => l.selectedValue = h)
|
|
1766
|
+
}, E(T({}, e.$attrs), {
|
|
1686
1767
|
size: l.getDefaultSize()
|
|
1687
|
-
}), { class: "radio-group" },
|
|
1768
|
+
}), { class: "radio-group" }, H(l.isVue2 ? e.$listeners : {})), {
|
|
1688
1769
|
default: p(() => [
|
|
1689
|
-
e.$slots.default ? S(e.$slots, "default", { key: 0 }, void 0, !0) : (r(!0), y(
|
|
1690
|
-
[l.isVue3 ? "value" : "label"]:
|
|
1691
|
-
disabled:
|
|
1770
|
+
e.$slots.default ? S(e.$slots, "default", { key: 0 }, void 0, !0) : (r(!0), y(z, { key: 1 }, O(l.optionsList, (h) => (r(), b(o, _({ ref_for: !0 }, {
|
|
1771
|
+
[l.isVue3 ? "value" : "label"]: h[n.propMap.value],
|
|
1772
|
+
disabled: h.disabled
|
|
1692
1773
|
}, {
|
|
1693
1774
|
style: { flex: "1" },
|
|
1694
|
-
key:
|
|
1775
|
+
key: h[n.propMap.value]
|
|
1695
1776
|
}), {
|
|
1696
1777
|
default: p(() => [
|
|
1697
|
-
S(e.$slots, "option", { item:
|
|
1698
|
-
|
|
1778
|
+
S(e.$slots, "option", { item: h }, () => [
|
|
1779
|
+
k(x(h[n.propMap.label]), 1)
|
|
1699
1780
|
], !0)
|
|
1700
1781
|
]),
|
|
1701
1782
|
_: 2
|
|
@@ -1707,10 +1788,10 @@ function ei(e, i, t, a, l, n) {
|
|
|
1707
1788
|
_: 3
|
|
1708
1789
|
}, 8, ["label", "label-width", "input-width", "direction", "label-align"]);
|
|
1709
1790
|
}
|
|
1710
|
-
const
|
|
1791
|
+
const Fe = /* @__PURE__ */ w(ni, [["render", si], ["__scopeId", "data-v-210a44fd"]]), ai = !1, oi = !0, ri = {
|
|
1711
1792
|
name: "TmCheckboxFilter",
|
|
1712
1793
|
components: {
|
|
1713
|
-
FormItemLayout:
|
|
1794
|
+
FormItemLayout: I
|
|
1714
1795
|
},
|
|
1715
1796
|
props: {
|
|
1716
1797
|
value: {
|
|
@@ -1758,8 +1839,8 @@ const Ve = /* @__PURE__ */ w($t, [["render", ei], ["__scopeId", "data-v-210a44fd
|
|
|
1758
1839
|
},
|
|
1759
1840
|
data() {
|
|
1760
1841
|
return {
|
|
1761
|
-
isVue2:
|
|
1762
|
-
isVue3:
|
|
1842
|
+
isVue2: ai,
|
|
1843
|
+
isVue3: oi,
|
|
1763
1844
|
getDefaultSize: L,
|
|
1764
1845
|
selectedValue: this.value || [],
|
|
1765
1846
|
optionsList: [],
|
|
@@ -1806,10 +1887,10 @@ const Ve = /* @__PURE__ */ w($t, [["render", ei], ["__scopeId", "data-v-210a44fd
|
|
|
1806
1887
|
else Array.isArray(e) && (this.optionsList = e);
|
|
1807
1888
|
}
|
|
1808
1889
|
}
|
|
1809
|
-
},
|
|
1810
|
-
function
|
|
1890
|
+
}, ui = { class: "checkbox-content" };
|
|
1891
|
+
function di(e, i, t, s, l, n) {
|
|
1811
1892
|
const o = u("el-checkbox-button"), d = u("el-checkbox-group"), c = u("FormItemLayout");
|
|
1812
|
-
return r(),
|
|
1893
|
+
return r(), b(c, {
|
|
1813
1894
|
label: t.label,
|
|
1814
1895
|
"label-width": t.labelWidth,
|
|
1815
1896
|
"input-width": t.inputWidth,
|
|
@@ -1817,24 +1898,24 @@ function ai(e, i, t, a, l, n) {
|
|
|
1817
1898
|
"label-align": t.labelAlign
|
|
1818
1899
|
}, {
|
|
1819
1900
|
default: p(() => [
|
|
1820
|
-
v("div",
|
|
1901
|
+
v("div", ui, [
|
|
1821
1902
|
g(d, _({
|
|
1822
1903
|
ref: "checkboxGroup",
|
|
1823
1904
|
modelValue: l.selectedValue,
|
|
1824
|
-
"onUpdate:modelValue": i[0] || (i[0] = (
|
|
1825
|
-
},
|
|
1905
|
+
"onUpdate:modelValue": i[0] || (i[0] = (h) => l.selectedValue = h)
|
|
1906
|
+
}, E(T({}, e.$attrs), {
|
|
1826
1907
|
size: l.getDefaultSize()
|
|
1827
|
-
}),
|
|
1908
|
+
}), H(l.isVue2 ? e.$listeners : {})), {
|
|
1828
1909
|
default: p(() => [
|
|
1829
|
-
e.$slots.default ? S(e.$slots, "default", { key: 0 }, void 0, !0) : (r(!0), y(
|
|
1830
|
-
key:
|
|
1910
|
+
e.$slots.default ? S(e.$slots, "default", { key: 0 }, void 0, !0) : (r(!0), y(z, { key: 1 }, O(l.optionsList, (h) => (r(), b(o, _({
|
|
1911
|
+
key: h[n.propMap.value]
|
|
1831
1912
|
}, { ref_for: !0 }, {
|
|
1832
|
-
[l.isVue3 ? "value" : "label"]:
|
|
1833
|
-
disabled:
|
|
1913
|
+
[l.isVue3 ? "value" : "label"]: h[n.propMap.value],
|
|
1914
|
+
disabled: h.disabled
|
|
1834
1915
|
}, { style: { flex: "1" } }), {
|
|
1835
1916
|
default: p(() => [
|
|
1836
|
-
S(e.$slots, "option", { item:
|
|
1837
|
-
|
|
1917
|
+
S(e.$slots, "option", { item: h }, () => [
|
|
1918
|
+
k(x(h[n.propMap.label]), 1)
|
|
1838
1919
|
], !0)
|
|
1839
1920
|
]),
|
|
1840
1921
|
_: 2
|
|
@@ -1847,10 +1928,10 @@ function ai(e, i, t, a, l, n) {
|
|
|
1847
1928
|
_: 3
|
|
1848
1929
|
}, 8, ["label", "label-width", "input-width", "direction", "label-align"]);
|
|
1849
1930
|
}
|
|
1850
|
-
const
|
|
1931
|
+
const ke = /* @__PURE__ */ w(ri, [["render", di], ["__scopeId", "data-v-39ef0641"]]), hi = !1, ci = {
|
|
1851
1932
|
name: "TmSwitchFilter",
|
|
1852
1933
|
components: {
|
|
1853
|
-
FormItemLayout:
|
|
1934
|
+
FormItemLayout: I
|
|
1854
1935
|
},
|
|
1855
1936
|
props: {
|
|
1856
1937
|
value: {
|
|
@@ -1883,7 +1964,7 @@ const Fe = /* @__PURE__ */ w(li, [["render", ai], ["__scopeId", "data-v-39ef0641
|
|
|
1883
1964
|
},
|
|
1884
1965
|
data() {
|
|
1885
1966
|
return {
|
|
1886
|
-
isVue2:
|
|
1967
|
+
isVue2: hi,
|
|
1887
1968
|
getDefaultSize: L,
|
|
1888
1969
|
switchValue: this.value
|
|
1889
1970
|
};
|
|
@@ -1899,10 +1980,10 @@ const Fe = /* @__PURE__ */ w(li, [["render", ai], ["__scopeId", "data-v-39ef0641
|
|
|
1899
1980
|
this.$emit("input", e), this.$emit("change", e);
|
|
1900
1981
|
}
|
|
1901
1982
|
}
|
|
1902
|
-
},
|
|
1903
|
-
function
|
|
1983
|
+
}, fi = { class: "switch-content" };
|
|
1984
|
+
function pi(e, i, t, s, l, n) {
|
|
1904
1985
|
const o = u("el-switch"), d = u("FormItemLayout");
|
|
1905
|
-
return r(),
|
|
1986
|
+
return r(), b(d, {
|
|
1906
1987
|
label: t.label,
|
|
1907
1988
|
"label-width": t.labelWidth,
|
|
1908
1989
|
"input-width": t.inputWidth,
|
|
@@ -1910,12 +1991,12 @@ function ui(e, i, t, a, l, n) {
|
|
|
1910
1991
|
"label-align": t.labelAlign
|
|
1911
1992
|
}, {
|
|
1912
1993
|
default: p(() => [
|
|
1913
|
-
v("div",
|
|
1994
|
+
v("div", fi, [
|
|
1914
1995
|
g(o, _({
|
|
1915
1996
|
ref: "switch",
|
|
1916
1997
|
modelValue: l.switchValue,
|
|
1917
1998
|
"onUpdate:modelValue": i[0] || (i[0] = (c) => l.switchValue = c)
|
|
1918
|
-
}, e.$attrs,
|
|
1999
|
+
}, e.$attrs, H(l.isVue2 ? e.$listeners : {}), {
|
|
1919
2000
|
size: l.getDefaultSize()
|
|
1920
2001
|
}), null, 16, ["modelValue", "size"])
|
|
1921
2002
|
])
|
|
@@ -1923,18 +2004,18 @@ function ui(e, i, t, a, l, n) {
|
|
|
1923
2004
|
_: 1
|
|
1924
2005
|
}, 8, ["label", "label-width", "input-width", "direction", "label-align"]);
|
|
1925
2006
|
}
|
|
1926
|
-
const ze = /* @__PURE__ */ w(
|
|
2007
|
+
const ze = /* @__PURE__ */ w(ci, [["render", pi], ["__scopeId", "data-v-7455db21"]]), mi = !1, gi = !0, be = "modelValue", le = "update:modelValue", bi = {
|
|
1927
2008
|
name: "TmTextareaFilter",
|
|
1928
2009
|
components: {
|
|
1929
|
-
FormItemLayout:
|
|
1930
|
-
CircleClose:
|
|
2010
|
+
FormItemLayout: I,
|
|
2011
|
+
CircleClose: qe
|
|
1931
2012
|
},
|
|
1932
2013
|
props: {
|
|
1933
2014
|
label: {
|
|
1934
2015
|
type: [String, Function, Object, Array],
|
|
1935
2016
|
default: ""
|
|
1936
2017
|
},
|
|
1937
|
-
[
|
|
2018
|
+
[be]: {
|
|
1938
2019
|
type: String,
|
|
1939
2020
|
default: ""
|
|
1940
2021
|
},
|
|
@@ -2017,8 +2098,8 @@ const ze = /* @__PURE__ */ w(oi, [["render", ui], ["__scopeId", "data-v-7455db21
|
|
|
2017
2098
|
},
|
|
2018
2099
|
data() {
|
|
2019
2100
|
return {
|
|
2020
|
-
isVue2:
|
|
2021
|
-
isVue3:
|
|
2101
|
+
isVue2: mi,
|
|
2102
|
+
isVue3: gi,
|
|
2022
2103
|
getDefaultSize: L,
|
|
2023
2104
|
inputValue: this.value
|
|
2024
2105
|
};
|
|
@@ -2029,19 +2110,19 @@ const ze = /* @__PURE__ */ w(oi, [["render", ui], ["__scopeId", "data-v-7455db21
|
|
|
2029
2110
|
}
|
|
2030
2111
|
},
|
|
2031
2112
|
watch: {
|
|
2032
|
-
[
|
|
2113
|
+
[be]: {
|
|
2033
2114
|
immediate: !0,
|
|
2034
2115
|
handler(e) {
|
|
2035
2116
|
this.inputValue = e;
|
|
2036
2117
|
}
|
|
2037
2118
|
},
|
|
2038
2119
|
inputValue(e) {
|
|
2039
|
-
this.$emit(
|
|
2120
|
+
this.$emit(le, e);
|
|
2040
2121
|
}
|
|
2041
2122
|
},
|
|
2042
2123
|
methods: {
|
|
2043
2124
|
handleInput(e) {
|
|
2044
|
-
this.inputValue = e, this.$emit(
|
|
2125
|
+
this.inputValue = e, this.$emit(le, e);
|
|
2045
2126
|
},
|
|
2046
2127
|
handleChange(e) {
|
|
2047
2128
|
this.$emit("change", e);
|
|
@@ -2053,7 +2134,7 @@ const ze = /* @__PURE__ */ w(oi, [["render", ui], ["__scopeId", "data-v-7455db21
|
|
|
2053
2134
|
this.$emit("blur", e);
|
|
2054
2135
|
},
|
|
2055
2136
|
handleClear() {
|
|
2056
|
-
this.inputValue = "", this.$emit(
|
|
2137
|
+
this.inputValue = "", this.$emit(le, ""), this.$emit("clear");
|
|
2057
2138
|
},
|
|
2058
2139
|
handleFieldChange(e) {
|
|
2059
2140
|
this.$emit("field-change", e);
|
|
@@ -2069,10 +2150,10 @@ const ze = /* @__PURE__ */ w(oi, [["render", ui], ["__scopeId", "data-v-7455db21
|
|
|
2069
2150
|
this.$refs.textarea.select();
|
|
2070
2151
|
}
|
|
2071
2152
|
}
|
|
2072
|
-
},
|
|
2073
|
-
function
|
|
2074
|
-
const o = u("el-input"), d = u("CircleClose"), c = u("el-icon"),
|
|
2075
|
-
return r(),
|
|
2153
|
+
}, yi = { class: "textarea" };
|
|
2154
|
+
function vi(e, i, t, s, l, n) {
|
|
2155
|
+
const o = u("el-input"), d = u("CircleClose"), c = u("el-icon"), h = u("FormItemLayout");
|
|
2156
|
+
return r(), b(h, {
|
|
2076
2157
|
label: t.label,
|
|
2077
2158
|
"label-options": t.labelOptions,
|
|
2078
2159
|
field: t.field,
|
|
@@ -2083,11 +2164,11 @@ function pi(e, i, t, a, l, n) {
|
|
|
2083
2164
|
"label-align": t.labelAlign
|
|
2084
2165
|
}, {
|
|
2085
2166
|
default: p(() => [
|
|
2086
|
-
v("div",
|
|
2167
|
+
v("div", yi, [
|
|
2087
2168
|
g(o, _({
|
|
2088
2169
|
ref: "textarea",
|
|
2089
2170
|
modelValue: l.inputValue,
|
|
2090
|
-
"onUpdate:modelValue": i[0] || (i[0] = (
|
|
2171
|
+
"onUpdate:modelValue": i[0] || (i[0] = (m) => l.inputValue = m),
|
|
2091
2172
|
size: l.getDefaultSize(),
|
|
2092
2173
|
placeholder: t.placeholder,
|
|
2093
2174
|
type: "textarea",
|
|
@@ -2100,7 +2181,7 @@ function pi(e, i, t, a, l, n) {
|
|
|
2100
2181
|
resize: t.resize,
|
|
2101
2182
|
tabindex: t.tabindex,
|
|
2102
2183
|
"validate-event": t.validateEvent
|
|
2103
|
-
}, e.$attrs,
|
|
2184
|
+
}, e.$attrs, H(l.isVue2 ? e.$listeners : {}), {
|
|
2104
2185
|
onInput: n.handleInput,
|
|
2105
2186
|
onChange: n.handleChange,
|
|
2106
2187
|
onFocus: n.handleFocus,
|
|
@@ -2108,7 +2189,7 @@ function pi(e, i, t, a, l, n) {
|
|
|
2108
2189
|
onClear: n.handleClear,
|
|
2109
2190
|
class: "textarea-input"
|
|
2110
2191
|
}), null, 16, ["modelValue", "size", "placeholder", "autosize", "maxlength", "minlength", "show-word-limit", "readonly", "disabled", "resize", "tabindex", "validate-event", "onInput", "onChange", "onFocus", "onBlur", "onClear"]),
|
|
2111
|
-
t.clearable && l.inputValue ? (r(),
|
|
2192
|
+
t.clearable && l.inputValue ? (r(), b(c, {
|
|
2112
2193
|
key: 0,
|
|
2113
2194
|
class: "textarea-clear-icon",
|
|
2114
2195
|
onClick: n.handleClear
|
|
@@ -2123,7 +2204,7 @@ function pi(e, i, t, a, l, n) {
|
|
|
2123
2204
|
_: 1
|
|
2124
2205
|
}, 8, ["label", "label-options", "field", "onFieldChange", "label-width", "input-width", "direction", "label-align"]);
|
|
2125
2206
|
}
|
|
2126
|
-
const
|
|
2207
|
+
const Le = /* @__PURE__ */ w(bi, [["render", vi], ["__scopeId", "data-v-9b0ae8e6"]]), Ci = {
|
|
2127
2208
|
name: "DynamicSlot",
|
|
2128
2209
|
props: {
|
|
2129
2210
|
name: {
|
|
@@ -2141,23 +2222,23 @@ const ke = /* @__PURE__ */ w(ci, [["render", pi], ["__scopeId", "data-v-9b0ae8e6
|
|
|
2141
2222
|
var o;
|
|
2142
2223
|
return n ? (o = n.$slots) == null ? void 0 : o[this.name] : null;
|
|
2143
2224
|
}, t = (n) => {
|
|
2144
|
-
var o, d, c,
|
|
2145
|
-
return n ? ((d = (o = n.$) == null ? void 0 : o.type) == null ? void 0 : d.name) === "TmTable" || ((
|
|
2225
|
+
var o, d, c, h;
|
|
2226
|
+
return n ? ((d = (o = n.$) == null ? void 0 : o.type) == null ? void 0 : d.name) === "TmTable" || ((h = (c = n.$) == null ? void 0 : c.type) == null ? void 0 : h.__name) === "TmTable" : !1;
|
|
2146
2227
|
};
|
|
2147
|
-
let
|
|
2148
|
-
if (!
|
|
2228
|
+
let s = i(this.$parent);
|
|
2229
|
+
if (!s) {
|
|
2149
2230
|
let n = (l = this.$parent) == null ? void 0 : l.$parent;
|
|
2150
|
-
for (; n && !
|
|
2231
|
+
for (; n && !s; ) {
|
|
2151
2232
|
if (t(n)) {
|
|
2152
|
-
|
|
2233
|
+
s = i(n);
|
|
2153
2234
|
break;
|
|
2154
2235
|
}
|
|
2155
2236
|
n = n.$parent;
|
|
2156
2237
|
}
|
|
2157
2238
|
}
|
|
2158
|
-
return
|
|
2239
|
+
return s ? typeof s == "function" ? s(this.slotProps) : s : null;
|
|
2159
2240
|
}
|
|
2160
|
-
}, { t:
|
|
2241
|
+
}, { t: _i } = D(), Si = !1, xi = !0, Ti = [
|
|
2161
2242
|
"date",
|
|
2162
2243
|
"daterange",
|
|
2163
2244
|
"datetime",
|
|
@@ -2169,18 +2250,18 @@ const ke = /* @__PURE__ */ w(ci, [["render", pi], ["__scopeId", "data-v-9b0ae8e6
|
|
|
2169
2250
|
"years",
|
|
2170
2251
|
"week",
|
|
2171
2252
|
"monthrange"
|
|
2172
|
-
],
|
|
2253
|
+
], wi = {
|
|
2173
2254
|
name: "TmTableSearch",
|
|
2174
2255
|
components: {
|
|
2175
|
-
TmSelect:
|
|
2176
|
-
TmInput:
|
|
2177
|
-
TmDate:
|
|
2178
|
-
TmCascader:
|
|
2179
|
-
TmRadio:
|
|
2180
|
-
TmCheckbox:
|
|
2256
|
+
TmSelect: xe,
|
|
2257
|
+
TmInput: Te,
|
|
2258
|
+
TmDate: we,
|
|
2259
|
+
TmCascader: Ve,
|
|
2260
|
+
TmRadio: Fe,
|
|
2261
|
+
TmCheckbox: ke,
|
|
2181
2262
|
TmSwitch: ze,
|
|
2182
|
-
TmTextarea:
|
|
2183
|
-
DynamicSlot:
|
|
2263
|
+
TmTextarea: Le,
|
|
2264
|
+
DynamicSlot: Ci
|
|
2184
2265
|
},
|
|
2185
2266
|
props: {
|
|
2186
2267
|
disabled: {
|
|
@@ -2217,12 +2298,12 @@ const ke = /* @__PURE__ */ w(ci, [["render", pi], ["__scopeId", "data-v-9b0ae8e6
|
|
|
2217
2298
|
},
|
|
2218
2299
|
data() {
|
|
2219
2300
|
return {
|
|
2220
|
-
t:
|
|
2221
|
-
isVue2:
|
|
2222
|
-
isVue3:
|
|
2301
|
+
t: _i,
|
|
2302
|
+
isVue2: Si,
|
|
2303
|
+
isVue3: xi,
|
|
2223
2304
|
getCompatSize: Q,
|
|
2224
2305
|
getDefaultSize: L,
|
|
2225
|
-
DATE_TYPES:
|
|
2306
|
+
DATE_TYPES: Ti,
|
|
2226
2307
|
// 用于存储初始默认值,重置时恢复
|
|
2227
2308
|
defaultValues: {}
|
|
2228
2309
|
};
|
|
@@ -2257,14 +2338,14 @@ const ke = /* @__PURE__ */ w(ci, [["render", pi], ["__scopeId", "data-v-9b0ae8e6
|
|
|
2257
2338
|
return e ? this.isVue2 ? !!e : e()[0].children.length > 0 : !1;
|
|
2258
2339
|
},
|
|
2259
2340
|
handleUpdate(e, i, t) {
|
|
2260
|
-
const
|
|
2261
|
-
|
|
2262
|
-
[
|
|
2341
|
+
const s = this.getFieldValue(e, t);
|
|
2342
|
+
s && this.$emit("update:search-form", E(T({}, this.computedSearchForm), {
|
|
2343
|
+
[s]: i
|
|
2263
2344
|
}));
|
|
2264
2345
|
},
|
|
2265
2346
|
handleUpdateDate(e, i) {
|
|
2266
|
-
const t = i || [],
|
|
2267
|
-
|
|
2347
|
+
const t = i || [], s = this.getFieldValue(e, "start"), l = this.getFieldValue(e, "end"), n = this.getFieldValue(e, "value"), o = {};
|
|
2348
|
+
s && (o[s] = t[0]), l && (o[l] = t[1]), n && (o[n] = t), this.$emit("update:search-form", T(T({}, this.computedSearchForm), o));
|
|
2268
2349
|
},
|
|
2269
2350
|
getFieldValue(e, i) {
|
|
2270
2351
|
if (typeof e == "string")
|
|
@@ -2294,12 +2375,12 @@ const ke = /* @__PURE__ */ w(ci, [["render", pi], ["__scopeId", "data-v-9b0ae8e6
|
|
|
2294
2375
|
const i = "$slots";
|
|
2295
2376
|
if (this[i][e])
|
|
2296
2377
|
return !0;
|
|
2297
|
-
let
|
|
2298
|
-
for (;
|
|
2299
|
-
const l =
|
|
2300
|
-
if (
|
|
2378
|
+
let s = this.$parent;
|
|
2379
|
+
for (; s; ) {
|
|
2380
|
+
const l = s[i];
|
|
2381
|
+
if (s.$options.name === "TmTable" && (l != null && l[e]))
|
|
2301
2382
|
return !0;
|
|
2302
|
-
|
|
2383
|
+
s = s.$parent;
|
|
2303
2384
|
}
|
|
2304
2385
|
return !1;
|
|
2305
2386
|
},
|
|
@@ -2309,34 +2390,34 @@ const ke = /* @__PURE__ */ w(ci, [["render", pi], ["__scopeId", "data-v-9b0ae8e6
|
|
|
2309
2390
|
const e = {};
|
|
2310
2391
|
this.searchColumns.forEach((i) => {
|
|
2311
2392
|
if (typeof i == "string" || !i.fields) return;
|
|
2312
|
-
const t = this.getFieldValue(i, "value"),
|
|
2393
|
+
const t = this.getFieldValue(i, "value"), s = this.getFieldValue(i, "label");
|
|
2313
2394
|
if (i.type === "input" && i.labelOptions && i.labelOptions.length > 0) {
|
|
2314
2395
|
const n = i.labelOptions[0];
|
|
2315
|
-
if (
|
|
2316
|
-
if (
|
|
2317
|
-
e[
|
|
2396
|
+
if (s)
|
|
2397
|
+
if (s in this.computedSearchForm)
|
|
2398
|
+
e[s] = this.computedSearchForm[s];
|
|
2318
2399
|
else {
|
|
2319
2400
|
const o = this.getFieldDefault(i, "label");
|
|
2320
|
-
o !== void 0 ? e[
|
|
2401
|
+
o !== void 0 ? e[s] = o : n && n.value !== void 0 && (e[s] = n.value);
|
|
2321
2402
|
}
|
|
2322
2403
|
t && !(t in this.computedSearchForm) && (e[t] = "");
|
|
2323
2404
|
} else if (this.isDateType(i.type) && i.labelOptions && i.labelOptions.length > 0) {
|
|
2324
2405
|
const n = i.labelOptions[0];
|
|
2325
|
-
if (t && !(t in this.computedSearchForm) && (e[t] = []),
|
|
2326
|
-
if (
|
|
2327
|
-
e[
|
|
2406
|
+
if (t && !(t in this.computedSearchForm) && (e[t] = []), s)
|
|
2407
|
+
if (s in this.computedSearchForm)
|
|
2408
|
+
e[s] = this.computedSearchForm[s];
|
|
2328
2409
|
else {
|
|
2329
2410
|
const o = this.getFieldDefault(i, "label");
|
|
2330
|
-
o !== void 0 ? e[
|
|
2411
|
+
o !== void 0 ? e[s] = o : n && n.value !== void 0 && (e[s] = n.value);
|
|
2331
2412
|
}
|
|
2332
2413
|
} else if (i.type === "select" && i.labelOptions && i.labelOptions.length > 0) {
|
|
2333
2414
|
const n = i.labelOptions[0];
|
|
2334
|
-
if (t && !(t in this.computedSearchForm) && (e[t] = i.multiple ? [] : ""),
|
|
2335
|
-
if (
|
|
2336
|
-
e[
|
|
2415
|
+
if (t && !(t in this.computedSearchForm) && (e[t] = i.multiple ? [] : ""), s)
|
|
2416
|
+
if (s in this.computedSearchForm)
|
|
2417
|
+
e[s] = this.computedSearchForm[s];
|
|
2337
2418
|
else {
|
|
2338
2419
|
const o = this.getFieldDefault(i, "label");
|
|
2339
|
-
o !== void 0 ? e[
|
|
2420
|
+
o !== void 0 ? e[s] = o : n && n.value !== void 0 && (e[s] = n.value);
|
|
2340
2421
|
}
|
|
2341
2422
|
}
|
|
2342
2423
|
const l = this.getFieldDefault(i, "value");
|
|
@@ -2344,7 +2425,7 @@ const ke = /* @__PURE__ */ w(ci, [["render", pi], ["__scopeId", "data-v-9b0ae8e6
|
|
|
2344
2425
|
const n = this.getFieldValue(i, "start"), o = this.getFieldValue(i, "end"), d = this.getFieldDefault(i, "start"), c = this.getFieldDefault(i, "end");
|
|
2345
2426
|
n && d !== void 0 && !(n in this.computedSearchForm) && (e[n] = d), o && c !== void 0 && !(o in this.computedSearchForm) && (e[o] = c);
|
|
2346
2427
|
}
|
|
2347
|
-
}), this.defaultValues = e, this.$emit("update:search-form",
|
|
2428
|
+
}), this.defaultValues = e, this.$emit("update:search-form", T(T({}, e), this.computedSearchForm));
|
|
2348
2429
|
},
|
|
2349
2430
|
// 获取表单数据
|
|
2350
2431
|
getSearchForm() {
|
|
@@ -2358,165 +2439,165 @@ const ke = /* @__PURE__ */ w(ci, [["render", pi], ["__scopeId", "data-v-9b0ae8e6
|
|
|
2358
2439
|
},
|
|
2359
2440
|
// 处理重置
|
|
2360
2441
|
handleReset() {
|
|
2361
|
-
this.$emit("update:search-form",
|
|
2442
|
+
this.$emit("update:search-form", T({}, this.defaultValues)), this.$emit("reset");
|
|
2362
2443
|
}
|
|
2363
2444
|
}
|
|
2364
|
-
},
|
|
2365
|
-
function
|
|
2366
|
-
const o = u("dynamic-slot"), d = u("tm-Input"), c = u("tm-date"),
|
|
2445
|
+
}, Vi = { class: "search-content" }, Fi = { class: "search-actions" };
|
|
2446
|
+
function ki(e, i, t, s, l, n) {
|
|
2447
|
+
const o = u("dynamic-slot"), d = u("tm-Input"), c = u("tm-date"), h = u("tm-select"), m = u("tm-cascader"), V = u("tm-radio"), A = u("tm-checkbox"), B = u("tm-switch"), j = u("tm-textarea"), W = u("el-button");
|
|
2367
2448
|
return r(), y("div", {
|
|
2368
2449
|
class: Z(["table-search", `table-search--${l.isVue2 ? "v2" : "v3"}`])
|
|
2369
2450
|
}, [
|
|
2370
|
-
v("div",
|
|
2371
|
-
n.hasDefaultSlot() ? S(e.$slots, "default", { key: 0 }, void 0, !0) : t.searchColumns && t.searchColumns.length ? (r(!0), y(
|
|
2372
|
-
typeof
|
|
2373
|
-
key: `str-${
|
|
2451
|
+
v("div", Vi, [
|
|
2452
|
+
n.hasDefaultSlot() ? S(e.$slots, "default", { key: 0 }, void 0, !0) : t.searchColumns && t.searchColumns.length ? (r(!0), y(z, { key: 1 }, O(t.searchColumns, (a, P) => (r(), y(z, null, [
|
|
2453
|
+
typeof a == "string" ? (r(), y("div", {
|
|
2454
|
+
key: `str-${a}-${P}`,
|
|
2374
2455
|
class: "search-item"
|
|
2375
2456
|
}, [
|
|
2376
|
-
(r(),
|
|
2377
|
-
name: `search-${
|
|
2457
|
+
(r(), b(o, {
|
|
2458
|
+
name: `search-${a}`,
|
|
2378
2459
|
"slot-props": { searchForm: t.searchForm },
|
|
2379
|
-
key:
|
|
2460
|
+
key: a
|
|
2380
2461
|
}, null, 8, ["name", "slot-props"]))
|
|
2381
2462
|
])) : (r(), y("div", {
|
|
2382
|
-
key: `obj-${
|
|
2463
|
+
key: `obj-${P}`,
|
|
2383
2464
|
class: "search-item"
|
|
2384
2465
|
}, [
|
|
2385
|
-
|
|
2386
|
-
n.hasSearchSlot(`search-${n.getFieldValue(
|
|
2387
|
-
name: `search-${n.getFieldValue(
|
|
2388
|
-
"slot-props": { searchForm: t.searchForm, col:
|
|
2389
|
-
key: n.getFieldValue(
|
|
2466
|
+
a.fields ? (r(), y(z, { key: 0 }, [
|
|
2467
|
+
n.hasSearchSlot(`search-${n.getFieldValue(a, "value")}`) ? (r(), b(o, {
|
|
2468
|
+
name: `search-${n.getFieldValue(a, "value")}`,
|
|
2469
|
+
"slot-props": { searchForm: t.searchForm, col: a },
|
|
2470
|
+
key: n.getFieldValue(a, "value")
|
|
2390
2471
|
}, null, 8, ["name", "slot-props"])) : (r(), y("div", {
|
|
2391
2472
|
style: { display: "flex" },
|
|
2392
|
-
key: n.getFieldValue(
|
|
2473
|
+
key: n.getFieldValue(a, "value") || `col-${P}`
|
|
2393
2474
|
}, [
|
|
2394
|
-
|
|
2475
|
+
a.type === "input" ? (r(), b(d, _({
|
|
2395
2476
|
key: 0,
|
|
2396
|
-
label:
|
|
2397
|
-
value: n.computedSearchForm[n.getFieldValue(
|
|
2398
|
-
field: n.computedSearchForm[n.getFieldValue(
|
|
2399
|
-
onValueChange: (
|
|
2400
|
-
onFieldChange: (
|
|
2401
|
-
multiple:
|
|
2402
|
-
labelOptions:
|
|
2403
|
-
placeholder:
|
|
2477
|
+
label: a.label,
|
|
2478
|
+
value: n.computedSearchForm[n.getFieldValue(a, "value")],
|
|
2479
|
+
field: n.computedSearchForm[n.getFieldValue(a, "label")],
|
|
2480
|
+
onValueChange: (f) => n.handleUpdate(a, f, "value"),
|
|
2481
|
+
onFieldChange: (f) => n.handleUpdate(a, f, "label"),
|
|
2482
|
+
multiple: a.multiple,
|
|
2483
|
+
labelOptions: a.labelOptions,
|
|
2484
|
+
placeholder: a.placeholder,
|
|
2404
2485
|
onSearch: n.handleSearch
|
|
2405
|
-
}, { ref_for: !0 }, n.getLayoutProps(
|
|
2406
|
-
n.isDateType(
|
|
2486
|
+
}, { ref_for: !0 }, n.getLayoutProps(a)), null, 16, ["label", "value", "field", "onValueChange", "onFieldChange", "multiple", "labelOptions", "placeholder", "onSearch"])) : C("", !0),
|
|
2487
|
+
n.isDateType(a.type) ? (r(), b(c, _({
|
|
2407
2488
|
key: 1,
|
|
2408
|
-
type:
|
|
2409
|
-
label:
|
|
2410
|
-
value: n.computedSearchForm[n.getFieldValue(
|
|
2411
|
-
field: n.computedSearchForm[n.getFieldValue(
|
|
2412
|
-
start: n.computedSearchForm[n.getFieldValue(
|
|
2413
|
-
end: n.computedSearchForm[n.getFieldValue(
|
|
2414
|
-
onFieldChange: (
|
|
2415
|
-
onValueChange: (
|
|
2416
|
-
onStartChange: (
|
|
2417
|
-
onEndChange: (
|
|
2418
|
-
labelOptions:
|
|
2419
|
-
"start-placeholder":
|
|
2420
|
-
"end-placeholder":
|
|
2421
|
-
placeholder:
|
|
2422
|
-
"range-separator":
|
|
2423
|
-
disabled:
|
|
2424
|
-
clearable:
|
|
2425
|
-
readonly:
|
|
2426
|
-
editable:
|
|
2427
|
-
align:
|
|
2428
|
-
"popper-class":
|
|
2429
|
-
"default-value":
|
|
2430
|
-
"default-time":
|
|
2431
|
-
shortcuts:
|
|
2432
|
-
"past-only":
|
|
2433
|
-
format:
|
|
2434
|
-
}, { ref_for: !0 }, n.getLayoutProps(
|
|
2435
|
-
|
|
2489
|
+
type: a.type,
|
|
2490
|
+
label: a.label,
|
|
2491
|
+
value: n.computedSearchForm[n.getFieldValue(a, "value")],
|
|
2492
|
+
field: n.computedSearchForm[n.getFieldValue(a, "label")],
|
|
2493
|
+
start: n.computedSearchForm[n.getFieldValue(a, "start")],
|
|
2494
|
+
end: n.computedSearchForm[n.getFieldValue(a, "end")],
|
|
2495
|
+
onFieldChange: (f) => n.handleUpdate(a, f, "label"),
|
|
2496
|
+
onValueChange: (f) => n.handleUpdateDate(a, f),
|
|
2497
|
+
onStartChange: (f) => n.handleUpdateDate(a, f),
|
|
2498
|
+
onEndChange: (f) => n.handleUpdateDate(a, f),
|
|
2499
|
+
labelOptions: a.labelOptions,
|
|
2500
|
+
"start-placeholder": a.startPlaceholder,
|
|
2501
|
+
"end-placeholder": a.endPlaceholder,
|
|
2502
|
+
placeholder: a.placeholder,
|
|
2503
|
+
"range-separator": a.rangeSeparator,
|
|
2504
|
+
disabled: a.disabled,
|
|
2505
|
+
clearable: a.clearable,
|
|
2506
|
+
readonly: a.readonly,
|
|
2507
|
+
editable: a.editable,
|
|
2508
|
+
align: a.align,
|
|
2509
|
+
"popper-class": a.popperClass,
|
|
2510
|
+
"default-value": a.defaultValue,
|
|
2511
|
+
"default-time": a.defaultTime,
|
|
2512
|
+
shortcuts: a.shortcuts,
|
|
2513
|
+
"past-only": a.pastOnly,
|
|
2514
|
+
format: a.format
|
|
2515
|
+
}, { ref_for: !0 }, n.getLayoutProps(a)), null, 16, ["type", "label", "value", "field", "start", "end", "onFieldChange", "onValueChange", "onStartChange", "onEndChange", "labelOptions", "start-placeholder", "end-placeholder", "placeholder", "range-separator", "disabled", "clearable", "readonly", "editable", "align", "popper-class", "default-value", "default-time", "shortcuts", "past-only", "format"])) : C("", !0),
|
|
2516
|
+
a.type === "select" ? (r(), b(h, _({
|
|
2436
2517
|
key: 2,
|
|
2437
|
-
label:
|
|
2438
|
-
modelValue: n.computedSearchForm[n.getFieldValue(
|
|
2439
|
-
"onUpdate:modelValue": (
|
|
2440
|
-
field: n.computedSearchForm[n.getFieldValue(
|
|
2441
|
-
options:
|
|
2442
|
-
labelOptions:
|
|
2443
|
-
placeholder:
|
|
2444
|
-
multiple:
|
|
2445
|
-
"show-check-all":
|
|
2446
|
-
"value-on-clear":
|
|
2447
|
-
clearable:
|
|
2448
|
-
onFieldChange: (
|
|
2449
|
-
}, { ref_for: !0 }, n.getLayoutProps(
|
|
2450
|
-
|
|
2518
|
+
label: a.label,
|
|
2519
|
+
modelValue: n.computedSearchForm[n.getFieldValue(a, "value")],
|
|
2520
|
+
"onUpdate:modelValue": (f) => n.computedSearchForm[n.getFieldValue(a, "value")] = f,
|
|
2521
|
+
field: n.computedSearchForm[n.getFieldValue(a, "label")],
|
|
2522
|
+
options: a.options,
|
|
2523
|
+
labelOptions: a.labelOptions,
|
|
2524
|
+
placeholder: a.placeholder,
|
|
2525
|
+
multiple: a.multiple,
|
|
2526
|
+
"show-check-all": a.checkAll,
|
|
2527
|
+
"value-on-clear": a.valueOnClear,
|
|
2528
|
+
clearable: a.clearable,
|
|
2529
|
+
onFieldChange: (f) => n.handleUpdate(a, f, "label")
|
|
2530
|
+
}, { ref_for: !0 }, n.getLayoutProps(a)), null, 16, ["label", "modelValue", "onUpdate:modelValue", "field", "options", "labelOptions", "placeholder", "multiple", "show-check-all", "value-on-clear", "clearable", "onFieldChange"])) : C("", !0),
|
|
2531
|
+
a.type === "cascader" ? (r(), b(m, _({
|
|
2451
2532
|
key: 3,
|
|
2452
|
-
modelValue: n.computedSearchForm[n.getFieldValue(
|
|
2453
|
-
"onUpdate:modelValue": (
|
|
2454
|
-
label:
|
|
2455
|
-
options:
|
|
2456
|
-
labelOptions:
|
|
2457
|
-
props:
|
|
2458
|
-
placeholder:
|
|
2459
|
-
"show-check-all":
|
|
2460
|
-
}, { ref_for: !0 }, n.getLayoutProps(
|
|
2461
|
-
|
|
2533
|
+
modelValue: n.computedSearchForm[n.getFieldValue(a, "value")],
|
|
2534
|
+
"onUpdate:modelValue": (f) => n.computedSearchForm[n.getFieldValue(a, "value")] = f,
|
|
2535
|
+
label: a.label,
|
|
2536
|
+
options: a.options,
|
|
2537
|
+
labelOptions: a.labelOptions,
|
|
2538
|
+
props: a.props,
|
|
2539
|
+
placeholder: a.placeholder,
|
|
2540
|
+
"show-check-all": a.checkAll
|
|
2541
|
+
}, { ref_for: !0 }, n.getLayoutProps(a)), null, 16, ["modelValue", "onUpdate:modelValue", "label", "options", "labelOptions", "props", "placeholder", "show-check-all"])) : C("", !0),
|
|
2542
|
+
a.type === "radio" ? (r(), b(V, _({
|
|
2462
2543
|
key: 4,
|
|
2463
|
-
modelValue: n.computedSearchForm[n.getFieldValue(
|
|
2464
|
-
"onUpdate:modelValue": (
|
|
2465
|
-
label:
|
|
2466
|
-
options:
|
|
2467
|
-
props:
|
|
2468
|
-
}, { ref_for: !0 }, n.getLayoutProps(
|
|
2469
|
-
|
|
2544
|
+
modelValue: n.computedSearchForm[n.getFieldValue(a, "value")],
|
|
2545
|
+
"onUpdate:modelValue": (f) => n.computedSearchForm[n.getFieldValue(a, "value")] = f,
|
|
2546
|
+
label: a.label,
|
|
2547
|
+
options: a.options,
|
|
2548
|
+
props: a.props
|
|
2549
|
+
}, { ref_for: !0 }, n.getLayoutProps(a)), null, 16, ["modelValue", "onUpdate:modelValue", "label", "options", "props"])) : C("", !0),
|
|
2550
|
+
a.type === "checkbox" ? (r(), b(A, _({
|
|
2470
2551
|
key: 5,
|
|
2471
|
-
modelValue: n.computedSearchForm[n.getFieldValue(
|
|
2472
|
-
"onUpdate:modelValue": (
|
|
2473
|
-
label:
|
|
2474
|
-
options:
|
|
2475
|
-
props:
|
|
2476
|
-
}, { ref_for: !0 }, n.getLayoutProps(
|
|
2477
|
-
|
|
2552
|
+
modelValue: n.computedSearchForm[n.getFieldValue(a, "value")],
|
|
2553
|
+
"onUpdate:modelValue": (f) => n.computedSearchForm[n.getFieldValue(a, "value")] = f,
|
|
2554
|
+
label: a.label,
|
|
2555
|
+
options: a.options,
|
|
2556
|
+
props: a.props
|
|
2557
|
+
}, { ref_for: !0 }, n.getLayoutProps(a)), null, 16, ["modelValue", "onUpdate:modelValue", "label", "options", "props"])) : C("", !0),
|
|
2558
|
+
a.type === "switch" ? (r(), b(B, _({
|
|
2478
2559
|
key: 6,
|
|
2479
|
-
modelValue: n.computedSearchForm[n.getFieldValue(
|
|
2480
|
-
"onUpdate:modelValue": (
|
|
2481
|
-
"active-text":
|
|
2482
|
-
"inactive-text":
|
|
2483
|
-
label:
|
|
2484
|
-
"active-color":
|
|
2485
|
-
"inactive-color":
|
|
2486
|
-
}, { ref_for: !0 }, n.getLayoutProps(
|
|
2487
|
-
|
|
2560
|
+
modelValue: n.computedSearchForm[n.getFieldValue(a, "value")],
|
|
2561
|
+
"onUpdate:modelValue": (f) => n.computedSearchForm[n.getFieldValue(a, "value")] = f,
|
|
2562
|
+
"active-text": a.activeText,
|
|
2563
|
+
"inactive-text": a.inactiveText,
|
|
2564
|
+
label: a.label,
|
|
2565
|
+
"active-color": a.activeColor,
|
|
2566
|
+
"inactive-color": a.inactiveColor
|
|
2567
|
+
}, { ref_for: !0 }, n.getLayoutProps(a)), null, 16, ["modelValue", "onUpdate:modelValue", "active-text", "inactive-text", "label", "active-color", "inactive-color"])) : C("", !0),
|
|
2568
|
+
a.type === "textarea" ? (r(), b(j, _({
|
|
2488
2569
|
key: 7,
|
|
2489
|
-
modelValue: n.computedSearchForm[n.getFieldValue(
|
|
2490
|
-
"onUpdate:modelValue": (
|
|
2491
|
-
field: n.computedSearchForm[n.getFieldValue(
|
|
2492
|
-
label:
|
|
2493
|
-
labelOptions:
|
|
2494
|
-
placeholder:
|
|
2495
|
-
autosize:
|
|
2496
|
-
maxlength:
|
|
2497
|
-
minlength:
|
|
2498
|
-
"show-word-limit":
|
|
2499
|
-
readonly:
|
|
2500
|
-
disabled:
|
|
2501
|
-
resize:
|
|
2502
|
-
clearable:
|
|
2503
|
-
onFieldChange: (
|
|
2504
|
-
}, { ref_for: !0 }, n.getLayoutProps(
|
|
2570
|
+
modelValue: n.computedSearchForm[n.getFieldValue(a, "value")],
|
|
2571
|
+
"onUpdate:modelValue": (f) => n.computedSearchForm[n.getFieldValue(a, "value")] = f,
|
|
2572
|
+
field: n.computedSearchForm[n.getFieldValue(a, "label")],
|
|
2573
|
+
label: a.label,
|
|
2574
|
+
labelOptions: a.labelOptions,
|
|
2575
|
+
placeholder: a.placeholder,
|
|
2576
|
+
autosize: a.autosize,
|
|
2577
|
+
maxlength: a.maxlength,
|
|
2578
|
+
minlength: a.minlength,
|
|
2579
|
+
"show-word-limit": a.showWordLimit,
|
|
2580
|
+
readonly: a.readonly,
|
|
2581
|
+
disabled: a.disabled,
|
|
2582
|
+
resize: a.resize,
|
|
2583
|
+
clearable: a.clearable,
|
|
2584
|
+
onFieldChange: (f) => n.handleUpdate(a, f, "label")
|
|
2585
|
+
}, { ref_for: !0 }, n.getLayoutProps(a)), null, 16, ["modelValue", "onUpdate:modelValue", "field", "label", "labelOptions", "placeholder", "autosize", "maxlength", "minlength", "show-word-limit", "readonly", "disabled", "resize", "clearable", "onFieldChange"])) : C("", !0)
|
|
2505
2586
|
]))
|
|
2506
2587
|
], 64)) : (r(), y("div", {
|
|
2507
|
-
key: `error-${
|
|
2588
|
+
key: `error-${P}`,
|
|
2508
2589
|
class: "search-error-message"
|
|
2509
2590
|
}, " 缺少 fields 配置,无法渲染此组件 "))
|
|
2510
2591
|
]))
|
|
2511
2592
|
], 64))), 256)) : C("", !0),
|
|
2512
|
-
v("div",
|
|
2593
|
+
v("div", Fi, [
|
|
2513
2594
|
g(W, {
|
|
2514
2595
|
type: "primary",
|
|
2515
2596
|
size: l.getDefaultSize(),
|
|
2516
2597
|
onClick: n.handleSearch
|
|
2517
2598
|
}, {
|
|
2518
2599
|
default: p(() => [
|
|
2519
|
-
|
|
2600
|
+
k(x(l.t("query")), 1)
|
|
2520
2601
|
]),
|
|
2521
2602
|
_: 1
|
|
2522
2603
|
}, 8, ["size", "onClick"]),
|
|
@@ -2525,7 +2606,7 @@ function xi(e, i, t, a, l, n) {
|
|
|
2525
2606
|
onClick: n.handleReset
|
|
2526
2607
|
}, {
|
|
2527
2608
|
default: p(() => [
|
|
2528
|
-
|
|
2609
|
+
k(x(l.t("reset")), 1)
|
|
2529
2610
|
]),
|
|
2530
2611
|
_: 1
|
|
2531
2612
|
}, 8, ["size", "onClick"])
|
|
@@ -2533,7 +2614,7 @@ function xi(e, i, t, a, l, n) {
|
|
|
2533
2614
|
])
|
|
2534
2615
|
], 2);
|
|
2535
2616
|
}
|
|
2536
|
-
const
|
|
2617
|
+
const Ae = /* @__PURE__ */ w(wi, [["render", ki], ["__scopeId", "data-v-8cd0172a"]]), zi = !1, Li = {
|
|
2537
2618
|
name: "TablePagination",
|
|
2538
2619
|
props: {
|
|
2539
2620
|
current: {
|
|
@@ -2555,7 +2636,7 @@ const Le = /* @__PURE__ */ w(Ci, [["render", xi], ["__scopeId", "data-v-8cd0172a
|
|
|
2555
2636
|
},
|
|
2556
2637
|
data() {
|
|
2557
2638
|
return {
|
|
2558
|
-
isVue2:
|
|
2639
|
+
isVue2: zi,
|
|
2559
2640
|
getCompatSize: Q
|
|
2560
2641
|
};
|
|
2561
2642
|
},
|
|
@@ -2567,14 +2648,14 @@ const Le = /* @__PURE__ */ w(Ci, [["render", xi], ["__scopeId", "data-v-8cd0172a
|
|
|
2567
2648
|
this.$emit("current-change", e);
|
|
2568
2649
|
}
|
|
2569
2650
|
}
|
|
2570
|
-
},
|
|
2571
|
-
function
|
|
2651
|
+
}, Ai = { class: "tm-pagination" };
|
|
2652
|
+
function Oi(e, i, t, s, l, n) {
|
|
2572
2653
|
const o = u("el-pagination");
|
|
2573
|
-
return r(), y("div",
|
|
2654
|
+
return r(), y("div", Ai, [
|
|
2574
2655
|
v("div", null, [
|
|
2575
2656
|
S(e.$slots, "pagination-left", {}, void 0, !0)
|
|
2576
2657
|
]),
|
|
2577
|
-
g(o, _(e.$attrs,
|
|
2658
|
+
g(o, _(e.$attrs, H(l.isVue2 ? e.$listeners : {}), {
|
|
2578
2659
|
style: { "text-align": "right" },
|
|
2579
2660
|
"current-page": t.current,
|
|
2580
2661
|
"page-size": t.pageSize,
|
|
@@ -2589,7 +2670,7 @@ function Fi(e, i, t, a, l, n) {
|
|
|
2589
2670
|
}), null, 16, ["current-page", "page-size", "total", "size", "onSizeChange", "onCurrentChange"])
|
|
2590
2671
|
]);
|
|
2591
2672
|
}
|
|
2592
|
-
const
|
|
2673
|
+
const Di = /* @__PURE__ */ w(Li, [["render", Oi], ["__scopeId", "data-v-ee768f31"]]), Mi = {
|
|
2593
2674
|
name: "TmTableMenu",
|
|
2594
2675
|
props: {
|
|
2595
2676
|
size: {
|
|
@@ -2597,22 +2678,22 @@ const zi = /* @__PURE__ */ w(wi, [["render", Fi], ["__scopeId", "data-v-ee768f31
|
|
|
2597
2678
|
default: "mini"
|
|
2598
2679
|
}
|
|
2599
2680
|
}
|
|
2600
|
-
},
|
|
2681
|
+
}, Hi = {
|
|
2601
2682
|
size: "small",
|
|
2602
2683
|
class: "tm-table-menu",
|
|
2603
2684
|
inline: ""
|
|
2604
|
-
},
|
|
2605
|
-
function
|
|
2606
|
-
return r(), y("div",
|
|
2607
|
-
v("div",
|
|
2685
|
+
}, Ri = { class: "left" }, Ei = { class: "right" };
|
|
2686
|
+
function Ii(e, i, t, s, l, n) {
|
|
2687
|
+
return r(), y("div", Hi, [
|
|
2688
|
+
v("div", Ri, [
|
|
2608
2689
|
S(e.$slots, "left", {}, void 0, !0)
|
|
2609
2690
|
]),
|
|
2610
|
-
v("div",
|
|
2691
|
+
v("div", Ei, [
|
|
2611
2692
|
S(e.$slots, "right", {}, void 0, !0)
|
|
2612
2693
|
])
|
|
2613
2694
|
]);
|
|
2614
2695
|
}
|
|
2615
|
-
const
|
|
2696
|
+
const Wi = /* @__PURE__ */ w(Mi, [["render", Ii], ["__scopeId", "data-v-579dd2c3"]]), G = (e) => e ? e.props || {} : {}, ne = (e, i) => {
|
|
2616
2697
|
e && (e.props || (e.props = {}), typeof i == "object" && Object.assign(e.props, i));
|
|
2617
2698
|
}, X = {
|
|
2618
2699
|
// 默认实现:使用localStorage获取配置
|
|
@@ -2642,20 +2723,20 @@ const Mi = /* @__PURE__ */ w(ki, [["render", Di], ["__scopeId", "data-v-579dd2c3
|
|
|
2642
2723
|
return Promise.reject(i);
|
|
2643
2724
|
}
|
|
2644
2725
|
}
|
|
2645
|
-
},
|
|
2726
|
+
}, Pi = (e) => X.getTableConfig(e.key), Ni = (e) => X.setTableConfig(e), Ui = (e) => {
|
|
2646
2727
|
e && (typeof e.getTableConfig == "function" && (X.getTableConfig = e.getTableConfig), typeof e.setTableConfig == "function" && (X.setTableConfig = e.setTableConfig));
|
|
2647
|
-
}, { t:
|
|
2648
|
-
formatter: (e, i, t,
|
|
2649
|
-
},
|
|
2728
|
+
}, { t: Bi } = D(), ji = !1, Ki = !0, Ji = {
|
|
2729
|
+
formatter: (e, i, t, s) => [void 0, null, ""].includes(t) ? "-" : t
|
|
2730
|
+
}, Qi = {
|
|
2650
2731
|
name: "TmColumnConfig",
|
|
2651
2732
|
components: {
|
|
2652
|
-
MoveIcon:
|
|
2653
|
-
FixedLeftIcon:
|
|
2654
|
-
FixedRightIcon:
|
|
2655
|
-
UploadIcon:
|
|
2656
|
-
DownloadIcon:
|
|
2657
|
-
DeleteIcon:
|
|
2658
|
-
MenuIcon:
|
|
2733
|
+
MoveIcon: ot,
|
|
2734
|
+
FixedLeftIcon: ut,
|
|
2735
|
+
FixedRightIcon: dt,
|
|
2736
|
+
UploadIcon: ht,
|
|
2737
|
+
DownloadIcon: ct,
|
|
2738
|
+
DeleteIcon: ft,
|
|
2739
|
+
MenuIcon: st,
|
|
2659
2740
|
tmEllipsisText: ee
|
|
2660
2741
|
},
|
|
2661
2742
|
props: {
|
|
@@ -2693,9 +2774,9 @@ const Mi = /* @__PURE__ */ w(ki, [["render", Di], ["__scopeId", "data-v-579dd2c3
|
|
|
2693
2774
|
},
|
|
2694
2775
|
data() {
|
|
2695
2776
|
return {
|
|
2696
|
-
t:
|
|
2697
|
-
isVue2:
|
|
2698
|
-
isVue3:
|
|
2777
|
+
t: Bi,
|
|
2778
|
+
isVue2: ji,
|
|
2779
|
+
isVue3: Ki,
|
|
2699
2780
|
getDefaultSize: L,
|
|
2700
2781
|
getCompatSize: Q,
|
|
2701
2782
|
buttonType: { link: !0, type: "primary" },
|
|
@@ -2790,17 +2871,17 @@ const Mi = /* @__PURE__ */ w(ki, [["render", Di], ["__scopeId", "data-v-579dd2c3
|
|
|
2790
2871
|
const e = this.columns || [];
|
|
2791
2872
|
let i = {};
|
|
2792
2873
|
this.defaultColumnsConfig = e.filter((t) => {
|
|
2793
|
-
const
|
|
2794
|
-
return !(!
|
|
2795
|
-
}).map((t,
|
|
2796
|
-
const l = G(t), n =
|
|
2797
|
-
|
|
2874
|
+
const s = G(t);
|
|
2875
|
+
return !(!s.prop || this.ignoredColumnConfigTypes.includes(s.type));
|
|
2876
|
+
}).map((t, s) => {
|
|
2877
|
+
const l = G(t), n = T(T({}, Ji), l);
|
|
2878
|
+
ne(t, n), l.prop && (i[l.prop] = t);
|
|
2798
2879
|
const o = l.hasOwnProperty("visible") ? l.visible !== !1 : !0;
|
|
2799
2880
|
return {
|
|
2800
2881
|
prop: l.prop,
|
|
2801
2882
|
// label: attrs.label, // 移除label,避免国际化导致比较不一致
|
|
2802
2883
|
fixed: l.fixed || "",
|
|
2803
|
-
sort:
|
|
2884
|
+
sort: s,
|
|
2804
2885
|
cancellable: l.hasOwnProperty("cancellable") ? l.cancellable : !0,
|
|
2805
2886
|
visible: o
|
|
2806
2887
|
};
|
|
@@ -2808,20 +2889,20 @@ const Mi = /* @__PURE__ */ w(ki, [["render", Di], ["__scopeId", "data-v-579dd2c3
|
|
|
2808
2889
|
},
|
|
2809
2890
|
// 加载列配置
|
|
2810
2891
|
loadColumnConfig() {
|
|
2811
|
-
|
|
2892
|
+
Pi({
|
|
2812
2893
|
key: this.computedTableKey
|
|
2813
2894
|
}).then((e) => {
|
|
2814
2895
|
var t;
|
|
2815
2896
|
if (e.data.code !== 200) return;
|
|
2816
2897
|
let i = JSON.parse(((t = e.data) == null ? void 0 : t.data) || null) || {};
|
|
2817
|
-
i.columnsConfig && JSON.stringify(this.defaultColumnsConfig) === JSON.stringify(i.defaultColumnsConfig) ? this.tableColumns = i.columnsConfig.map((
|
|
2898
|
+
i.columnsConfig && JSON.stringify(this.defaultColumnsConfig) === JSON.stringify(i.defaultColumnsConfig) ? this.tableColumns = i.columnsConfig.map((s) => T({}, s)) : this.tableColumns = this.defaultColumnsConfig.map((s) => T({}, s)), this.processedColumns = this.applyColumnConfig(this.tableColumns), this.isConfigLoaded = !0, this.$emit("complete", {
|
|
2818
2899
|
columns: this.processedColumns,
|
|
2819
2900
|
config: this.tableColumns,
|
|
2820
2901
|
// 传递配置元数据
|
|
2821
2902
|
isInitialLoad: !0
|
|
2822
2903
|
});
|
|
2823
2904
|
}).catch(() => {
|
|
2824
|
-
this.tableColumns = this.defaultColumnsConfig.map((e) =>
|
|
2905
|
+
this.tableColumns = this.defaultColumnsConfig.map((e) => T({}, e)), this.processedColumns = this.applyColumnConfig(this.tableColumns), this.isConfigLoaded = !0, this.$emit("complete", {
|
|
2825
2906
|
columns: this.processedColumns,
|
|
2826
2907
|
isInitialLoad: !0
|
|
2827
2908
|
});
|
|
@@ -2831,21 +2912,21 @@ const Mi = /* @__PURE__ */ w(ki, [["render", Di], ["__scopeId", "data-v-579dd2c3
|
|
|
2831
2912
|
let t = this.columns.filter((l) => {
|
|
2832
2913
|
const n = G(l);
|
|
2833
2914
|
return this.ignoredColumnConfigTypes.includes(n.type);
|
|
2834
|
-
}),
|
|
2915
|
+
}), s = [];
|
|
2835
2916
|
return [...e].sort((l, n) => {
|
|
2836
2917
|
const o = l.sort !== void 0 ? l.sort : 1 / 0, d = n.sort !== void 0 ? n.sort : 1 / 0;
|
|
2837
2918
|
return o - d;
|
|
2838
2919
|
}).forEach((l) => {
|
|
2839
2920
|
if (l.prop) {
|
|
2840
2921
|
let n = this.columnMap[l.prop];
|
|
2841
|
-
n && (
|
|
2922
|
+
n && (ne(n, {
|
|
2842
2923
|
fixed: l.fixed || void 0,
|
|
2843
2924
|
visible: l.visible
|
|
2844
|
-
}), (!i && l.visible || i) &&
|
|
2925
|
+
}), (!i && l.visible || i) && s.push(n));
|
|
2845
2926
|
}
|
|
2846
2927
|
}), t.forEach((l) => {
|
|
2847
|
-
|
|
2848
|
-
}), [...t, ...
|
|
2928
|
+
ne(l, { visible: !0 });
|
|
2929
|
+
}), [...t, ...s];
|
|
2849
2930
|
},
|
|
2850
2931
|
crateSortable() {
|
|
2851
2932
|
const e = this.$refs.sortListRef;
|
|
@@ -2868,29 +2949,29 @@ const Mi = /* @__PURE__ */ w(ki, [["render", Di], ["__scopeId", "data-v-579dd2c3
|
|
|
2868
2949
|
group: "columns",
|
|
2869
2950
|
dragClass: "sortable-drag",
|
|
2870
2951
|
onStart: ({ item: t }) => {
|
|
2871
|
-
const
|
|
2872
|
-
(n) => n.prop ===
|
|
2952
|
+
const s = t.getAttribute("data-prop"), l = this.sortedTableColumns.find(
|
|
2953
|
+
(n) => n.prop === s
|
|
2873
2954
|
);
|
|
2874
2955
|
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");
|
|
2875
2956
|
},
|
|
2876
2957
|
onMove: (t) => {
|
|
2877
|
-
const { target:
|
|
2878
|
-
if (!
|
|
2958
|
+
const { target: s, related: l } = t;
|
|
2959
|
+
if (!s || !l)
|
|
2879
2960
|
return !1;
|
|
2880
|
-
const n = l ? l.getAttribute("data-prop") : null, o = n ? this.sortedTableColumns.find((
|
|
2881
|
-
return this.isDraggingFrozen && !d || this.isDraggingFrozenRight && !c || !this.isDraggingFrozen && !this.isDraggingFrozenRight && (d || c) ? (
|
|
2882
|
-
|
|
2961
|
+
const n = l ? l.getAttribute("data-prop") : null, o = n ? this.sortedTableColumns.find((h) => h.prop === n) : null, d = o && o.fixed === "left", c = o && o.fixed === "right";
|
|
2962
|
+
return this.isDraggingFrozen && !d || this.isDraggingFrozenRight && !c || !this.isDraggingFrozen && !this.isDraggingFrozenRight && (d || c) ? (s.classList.add("no-drop-zone"), !1) : (document.querySelectorAll(".no-drop-zone").forEach((h) => {
|
|
2963
|
+
h.classList.remove("no-drop-zone");
|
|
2883
2964
|
}), !0);
|
|
2884
2965
|
},
|
|
2885
|
-
onEnd: ({ item: t, newIndex:
|
|
2886
|
-
if (
|
|
2966
|
+
onEnd: ({ item: t, newIndex: s, oldIndex: l }) => {
|
|
2967
|
+
if (s === void 0 || l === void 0 || s < 0 || l < 0 || s >= this.sortedTableColumns.length || l >= this.sortedTableColumns.length)
|
|
2887
2968
|
return;
|
|
2888
2969
|
document.querySelectorAll(".no-drop-zone").forEach((V) => {
|
|
2889
2970
|
V.classList.remove("no-drop-zone");
|
|
2890
2971
|
}), t.classList.remove("sortable-drag");
|
|
2891
|
-
const n = this.sortedTableColumns[l], o = n.fixed === "left", d = n.fixed === "right", c =
|
|
2892
|
-
let
|
|
2893
|
-
if (o ? (c && c.fixed !== "left" ||
|
|
2972
|
+
const n = this.sortedTableColumns[l], o = n.fixed === "left", d = n.fixed === "right", c = s > 0 ? this.sortedTableColumns[s - 1] : null, h = s < this.sortedTableColumns.length - 1 ? this.sortedTableColumns[s + 1] : null;
|
|
2973
|
+
let m = !1;
|
|
2974
|
+
if (o ? (c && c.fixed !== "left" || h && h.fixed === "right") && (m = !0) : d ? (c && c.fixed !== "right" || h && h.fixed !== "right") && (m = !0) : (c && c.fixed === "right" || h && h.fixed === "left") && (m = !0), m) {
|
|
2894
2975
|
this.rollbackSort();
|
|
2895
2976
|
return;
|
|
2896
2977
|
}
|
|
@@ -2905,8 +2986,8 @@ const Mi = /* @__PURE__ */ w(ki, [["render", Di], ["__scopeId", "data-v-579dd2c3
|
|
|
2905
2986
|
updateSortAfterDrag() {
|
|
2906
2987
|
const e = this.$refs.sortListRef;
|
|
2907
2988
|
if (!e) return;
|
|
2908
|
-
Array.from(e.children || []).filter((t) => t && t.dataset && t.dataset.prop).map((t) => t.dataset.prop).forEach((t,
|
|
2909
|
-
this.sortedTableColumns.some((l) => l.prop === t ? (l.sort =
|
|
2989
|
+
Array.from(e.children || []).filter((t) => t && t.dataset && t.dataset.prop).map((t) => t.dataset.prop).forEach((t, s) => {
|
|
2990
|
+
this.sortedTableColumns.some((l) => l.prop === t ? (l.sort = s, !0) : !1);
|
|
2910
2991
|
}), this.columnsCopy = JSON.parse(JSON.stringify(this.sortedTableColumns)), this.$emit("on-sort-change", this.sortedTableColumns);
|
|
2911
2992
|
},
|
|
2912
2993
|
// 移除了handleSearch方法,改用计算属性filteredSortedTableColumns
|
|
@@ -2978,7 +3059,7 @@ const Mi = /* @__PURE__ */ w(ki, [["render", Di], ["__scopeId", "data-v-579dd2c3
|
|
|
2978
3059
|
},
|
|
2979
3060
|
// 修改置顶方法,确保右侧固定列置顶时会取消固定
|
|
2980
3061
|
moveTop(e, i) {
|
|
2981
|
-
const t = this.sortedTableColumns,
|
|
3062
|
+
const t = this.sortedTableColumns, s = e.prop;
|
|
2982
3063
|
if (e.fixed === "right" && (e.fixed = ""), e.fixed === "left")
|
|
2983
3064
|
t.unshift(t.splice(i, 1)[0]);
|
|
2984
3065
|
else {
|
|
@@ -2996,7 +3077,7 @@ const Mi = /* @__PURE__ */ w(ki, [["render", Di], ["__scopeId", "data-v-579dd2c3
|
|
|
2996
3077
|
const l = this.$refs.sortListRef;
|
|
2997
3078
|
if (l) {
|
|
2998
3079
|
const n = Array.from(l.children).find(
|
|
2999
|
-
(o) => o.dataset && o.dataset.prop ===
|
|
3080
|
+
(o) => o.dataset && o.dataset.prop === s
|
|
3000
3081
|
);
|
|
3001
3082
|
n && n.scrollIntoView({ behavior: "smooth", block: "nearest" });
|
|
3002
3083
|
}
|
|
@@ -3005,32 +3086,32 @@ const Mi = /* @__PURE__ */ w(ki, [["render", Di], ["__scopeId", "data-v-579dd2c3
|
|
|
3005
3086
|
frozenLeftHandle(e) {
|
|
3006
3087
|
const i = this.sortedTableColumns, t = i.splice(e, 1)[0];
|
|
3007
3088
|
if (t.fixed = t.fixed === "left" ? "" : "left", t.fixed === "left") {
|
|
3008
|
-
const
|
|
3089
|
+
const s = this.findLastIndex(
|
|
3009
3090
|
this.sortedTableColumns,
|
|
3010
3091
|
(l) => l.fixed === "left"
|
|
3011
3092
|
);
|
|
3012
|
-
i.splice(
|
|
3093
|
+
i.splice(s + 1, 0, t);
|
|
3013
3094
|
} else {
|
|
3014
|
-
const
|
|
3095
|
+
const s = this.findLastIndex(
|
|
3015
3096
|
this.sortedTableColumns,
|
|
3016
3097
|
(l) => l.fixed === "left"
|
|
3017
3098
|
);
|
|
3018
|
-
i.splice(
|
|
3099
|
+
i.splice(s + 1, 0, t);
|
|
3019
3100
|
}
|
|
3020
3101
|
this.updateSortValues(), this.columnsCopy = JSON.parse(JSON.stringify(this.sortedTableColumns)), this.$emit("on-sort-change", this.sortedTableColumns);
|
|
3021
3102
|
},
|
|
3022
3103
|
frozenRightHandle(e) {
|
|
3023
3104
|
const i = this.sortedTableColumns, t = i.splice(e, 1)[0];
|
|
3024
3105
|
if (t.fixed = t.fixed === "right" ? "" : "right", t.fixed === "right") {
|
|
3025
|
-
const
|
|
3106
|
+
const s = i.findIndex(
|
|
3026
3107
|
(l) => l.fixed === "right"
|
|
3027
3108
|
);
|
|
3028
|
-
|
|
3109
|
+
s === -1 ? i.push(t) : i.splice(s, 0, t);
|
|
3029
3110
|
} else {
|
|
3030
|
-
const
|
|
3111
|
+
const s = i.findIndex(
|
|
3031
3112
|
(l) => l.fixed === "right"
|
|
3032
3113
|
);
|
|
3033
|
-
|
|
3114
|
+
s === -1 ? i.push(t) : i.splice(s, 0, t);
|
|
3034
3115
|
}
|
|
3035
3116
|
this.updateSortValues(), this.columnsCopy = JSON.parse(JSON.stringify(this.sortedTableColumns)), this.$emit("on-sort-change", this.sortedTableColumns);
|
|
3036
3117
|
},
|
|
@@ -3038,14 +3119,14 @@ const Mi = /* @__PURE__ */ w(ki, [["render", Di], ["__scopeId", "data-v-579dd2c3
|
|
|
3038
3119
|
var i;
|
|
3039
3120
|
this.updateSortValues();
|
|
3040
3121
|
const e = (i = this.tableColumns) == null ? void 0 : i.map((t) => {
|
|
3041
|
-
const
|
|
3122
|
+
const s = this.sortedTableColumns.find(
|
|
3042
3123
|
(d) => d.prop === t.prop
|
|
3043
3124
|
);
|
|
3044
|
-
|
|
3125
|
+
s && (t.sort = s.sort, t.fixed = s.fixed, t.visible = s.visible);
|
|
3045
3126
|
const o = t, { label: l } = o;
|
|
3046
|
-
return
|
|
3127
|
+
return de(o, ["label"]);
|
|
3047
3128
|
});
|
|
3048
|
-
|
|
3129
|
+
Ni({
|
|
3049
3130
|
key: this.computedTableKey,
|
|
3050
3131
|
info: JSON.stringify({
|
|
3051
3132
|
columnsConfig: e,
|
|
@@ -3078,24 +3159,24 @@ const Mi = /* @__PURE__ */ w(ki, [["render", Di], ["__scopeId", "data-v-579dd2c3
|
|
|
3078
3159
|
} catch (e) {
|
|
3079
3160
|
}
|
|
3080
3161
|
}
|
|
3081
|
-
},
|
|
3162
|
+
}, qi = {
|
|
3082
3163
|
key: 0,
|
|
3083
3164
|
class: "container"
|
|
3084
|
-
},
|
|
3165
|
+
}, Yi = { class: "main-container" }, Gi = { class: "left-content" }, Xi = { class: "title" }, Zi = { class: "option-list" }, $i = { style: { height: "100%", "overflow-y": "auto" } }, el = { class: "right-content" }, tl = { class: "search-box" }, il = {
|
|
3085
3166
|
key: 0,
|
|
3086
3167
|
class: "tips"
|
|
3087
|
-
},
|
|
3168
|
+
}, ll = {
|
|
3088
3169
|
class: "sort-list",
|
|
3089
3170
|
ref: "sortListRef"
|
|
3090
|
-
},
|
|
3171
|
+
}, nl = ["data-prop"], sl = {
|
|
3091
3172
|
key: 0,
|
|
3092
3173
|
class: "sort-item"
|
|
3093
|
-
},
|
|
3094
|
-
function
|
|
3095
|
-
const o = u("el-button"), d = u("TmEllipsisText"), c = u("el-checkbox"),
|
|
3096
|
-
return r(),
|
|
3174
|
+
}, al = { class: "row-title" }, ol = { class: "operation-btns" }, rl = { class: "footer" }, ul = { class: "footer-left" }, dl = { class: "footer-right" }, hl = { style: { display: "inline-block", "margin-left": "10px" } };
|
|
3175
|
+
function cl(e, i, t, s, l, n) {
|
|
3176
|
+
const o = u("el-button"), d = u("TmEllipsisText"), c = u("el-checkbox"), h = u("el-input"), m = u("MoveIcon"), V = u("DeleteIcon"), A = u("el-tooltip"), B = u("UploadIcon"), j = u("FixedLeftIcon"), W = u("FixedRightIcon"), a = u("MenuIcon"), P = u("el-popover");
|
|
3177
|
+
return r(), b(P, _({ "popper-class": "column-config-popover" }, {
|
|
3097
3178
|
[l.isVue3 ? "visible" : "value"]: l.popoverVisible
|
|
3098
|
-
},
|
|
3179
|
+
}, H({
|
|
3099
3180
|
[l.isVue3 ? "update:visible" : "input"]: n.handleVisibleChange
|
|
3100
3181
|
}), {
|
|
3101
3182
|
width: 680,
|
|
@@ -3106,8 +3187,8 @@ function ol(e, i, t, a, l, n) {
|
|
|
3106
3187
|
onHide: n.handlePopoverHide
|
|
3107
3188
|
}), {
|
|
3108
3189
|
reference: p(() => [
|
|
3109
|
-
v("div",
|
|
3110
|
-
g(
|
|
3190
|
+
v("div", hl, [
|
|
3191
|
+
g(A, _({
|
|
3111
3192
|
content: l.t("columnSetting")
|
|
3112
3193
|
}, l.afterOpenDelay, { placement: "top" }), {
|
|
3113
3194
|
default: p(() => [
|
|
@@ -3117,7 +3198,7 @@ function ol(e, i, t, a, l, n) {
|
|
|
3117
3198
|
circle: ""
|
|
3118
3199
|
}, {
|
|
3119
3200
|
default: p(() => [
|
|
3120
|
-
g(
|
|
3201
|
+
g(a)
|
|
3121
3202
|
]),
|
|
3122
3203
|
_: 1
|
|
3123
3204
|
}, 8, ["size"])
|
|
@@ -3127,37 +3208,37 @@ function ol(e, i, t, a, l, n) {
|
|
|
3127
3208
|
])
|
|
3128
3209
|
]),
|
|
3129
3210
|
default: p(() => [
|
|
3130
|
-
l.popoverVisible ? (r(), y("div",
|
|
3131
|
-
v("div",
|
|
3132
|
-
v("div",
|
|
3133
|
-
v("div",
|
|
3134
|
-
v("span", null,
|
|
3211
|
+
l.popoverVisible ? (r(), y("div", qi, [
|
|
3212
|
+
v("div", Yi, [
|
|
3213
|
+
v("div", Gi, [
|
|
3214
|
+
v("div", Xi, [
|
|
3215
|
+
v("span", null, x(l.t("SelectableFields")) + "(" + x(l.tableColumns.length) + ")", 1),
|
|
3135
3216
|
g(o, _({ style: { "margin-left": "10px" } }, l.buttonType, { onClick: n.handleSelectAll }), {
|
|
3136
3217
|
default: p(() => [
|
|
3137
|
-
|
|
3218
|
+
k(x(l.t("all")), 1)
|
|
3138
3219
|
]),
|
|
3139
3220
|
_: 1
|
|
3140
3221
|
}, 16, ["onClick"])
|
|
3141
3222
|
]),
|
|
3142
|
-
v("div",
|
|
3143
|
-
v("div",
|
|
3144
|
-
(r(!0), y(
|
|
3145
|
-
|
|
3223
|
+
v("div", Zi, [
|
|
3224
|
+
v("div", $i, [
|
|
3225
|
+
(r(!0), y(z, null, O(l.tableColumns, (f, N) => (r(), y(z, null, [
|
|
3226
|
+
f.prop ? (r(), y("div", {
|
|
3146
3227
|
style: { width: "110px", display: "inline-block" },
|
|
3147
|
-
key:
|
|
3228
|
+
key: N + f.prop
|
|
3148
3229
|
}, [
|
|
3149
3230
|
g(c, {
|
|
3150
|
-
disabled: !
|
|
3231
|
+
disabled: !f.cancellable,
|
|
3151
3232
|
class: "el-checkbox",
|
|
3152
|
-
modelValue:
|
|
3153
|
-
"onUpdate:modelValue": (
|
|
3154
|
-
label:
|
|
3155
|
-
value:
|
|
3233
|
+
modelValue: f.visible,
|
|
3234
|
+
"onUpdate:modelValue": (K) => f.visible = K,
|
|
3235
|
+
label: f.prop,
|
|
3236
|
+
value: f.prop
|
|
3156
3237
|
}, {
|
|
3157
3238
|
default: p(() => [
|
|
3158
3239
|
g(d, {
|
|
3159
3240
|
width: "80px",
|
|
3160
|
-
text: n.getColumnLabel(
|
|
3241
|
+
text: n.getColumnLabel(f.prop)
|
|
3161
3242
|
}, null, 8, ["text"])
|
|
3162
3243
|
]),
|
|
3163
3244
|
_: 2
|
|
@@ -3167,37 +3248,37 @@ function ol(e, i, t, a, l, n) {
|
|
|
3167
3248
|
])
|
|
3168
3249
|
])
|
|
3169
3250
|
]),
|
|
3170
|
-
v("div",
|
|
3171
|
-
v("div",
|
|
3172
|
-
g(
|
|
3251
|
+
v("div", el, [
|
|
3252
|
+
v("div", tl, [
|
|
3253
|
+
g(h, {
|
|
3173
3254
|
size: l.getCompatSize("small"),
|
|
3174
3255
|
class: "search-input",
|
|
3175
3256
|
clearable: "",
|
|
3176
3257
|
placeholder: l.t("search"),
|
|
3177
3258
|
modelValue: l.keyWord,
|
|
3178
|
-
"onUpdate:modelValue": i[0] || (i[0] = (
|
|
3259
|
+
"onUpdate:modelValue": i[0] || (i[0] = (f) => l.keyWord = f)
|
|
3179
3260
|
}, null, 8, ["size", "placeholder", "modelValue"])
|
|
3180
3261
|
]),
|
|
3181
|
-
n.showFixedLimitTips ? (r(), y("div",
|
|
3182
|
-
v("div",
|
|
3183
|
-
(r(!0), y(
|
|
3262
|
+
n.showFixedLimitTips ? (r(), y("div", il)) : C("", !0),
|
|
3263
|
+
v("div", ll, [
|
|
3264
|
+
(r(!0), y(z, null, O(n.filteredSortedTableColumns, (f, N) => (r(), y("div", {
|
|
3184
3265
|
class: Z(["sort-item-wrapper", [
|
|
3185
|
-
|
|
3186
|
-
|
|
3187
|
-
|
|
3266
|
+
f.fixed === "left" ? "frozen" : "",
|
|
3267
|
+
f.fixed === "right" ? "frozenRight" : "",
|
|
3268
|
+
f.fixed ? "" : "noFrozen"
|
|
3188
3269
|
]]),
|
|
3189
|
-
"data-prop":
|
|
3190
|
-
key:
|
|
3270
|
+
"data-prop": f.prop,
|
|
3271
|
+
key: f.prop
|
|
3191
3272
|
}, [
|
|
3192
|
-
|
|
3193
|
-
v("div",
|
|
3194
|
-
g(
|
|
3273
|
+
f.visible ? (r(), y("div", sl, [
|
|
3274
|
+
v("div", al, [
|
|
3275
|
+
g(m, { style: { "flex-shrink": "0" } }),
|
|
3195
3276
|
g(d, {
|
|
3196
|
-
text: n.getColumnLabel(
|
|
3277
|
+
text: n.getColumnLabel(f.prop)
|
|
3197
3278
|
}, null, 8, ["text"])
|
|
3198
3279
|
]),
|
|
3199
|
-
v("div",
|
|
3200
|
-
|
|
3280
|
+
v("div", ol, [
|
|
3281
|
+
f.cancellable ? (r(), b(A, _({
|
|
3201
3282
|
key: 0,
|
|
3202
3283
|
content: l.t("cancel"),
|
|
3203
3284
|
placement: "top"
|
|
@@ -3206,7 +3287,7 @@ function ol(e, i, t, a, l, n) {
|
|
|
3206
3287
|
g(o, _({ ref_for: !0 }, l.buttonType, {
|
|
3207
3288
|
size: l.getCompatSize("mini"),
|
|
3208
3289
|
class: "iconfont-button delete-button",
|
|
3209
|
-
onClick: (
|
|
3290
|
+
onClick: (K) => f.visible = !1
|
|
3210
3291
|
}), {
|
|
3211
3292
|
default: p(() => [
|
|
3212
3293
|
g(V)
|
|
@@ -3216,7 +3297,7 @@ function ol(e, i, t, a, l, n) {
|
|
|
3216
3297
|
]),
|
|
3217
3298
|
_: 2
|
|
3218
3299
|
}, 1040, ["content"])) : C("", !0),
|
|
3219
|
-
n.canMoveTop(
|
|
3300
|
+
n.canMoveTop(f, N) ? (r(), b(A, _({
|
|
3220
3301
|
key: 1,
|
|
3221
3302
|
content: l.t("top"),
|
|
3222
3303
|
placement: "top"
|
|
@@ -3225,27 +3306,27 @@ function ol(e, i, t, a, l, n) {
|
|
|
3225
3306
|
g(o, _({ ref_for: !0 }, l.buttonType, {
|
|
3226
3307
|
size: l.getCompatSize("mini"),
|
|
3227
3308
|
class: "iconfont-button top-button",
|
|
3228
|
-
onClick: (
|
|
3309
|
+
onClick: (K) => n.moveTop(f, N)
|
|
3229
3310
|
}), {
|
|
3230
3311
|
default: p(() => [
|
|
3231
|
-
g(
|
|
3312
|
+
g(B)
|
|
3232
3313
|
]),
|
|
3233
3314
|
_: 2
|
|
3234
3315
|
}, 1040, ["size", "onClick"])
|
|
3235
3316
|
]),
|
|
3236
3317
|
_: 2
|
|
3237
3318
|
}, 1040, ["content"])) : C("", !0),
|
|
3238
|
-
|
|
3319
|
+
f.fixed !== "right" ? (r(), b(A, _({
|
|
3239
3320
|
key: 2,
|
|
3240
|
-
content:
|
|
3321
|
+
content: f.fixed === "left" ? l.t("cancelLeftFixed") : l.t("leftFixed"),
|
|
3241
3322
|
placement: "top"
|
|
3242
3323
|
}, { ref_for: !0 }, l.afterOpenDelay), {
|
|
3243
3324
|
default: p(() => [
|
|
3244
3325
|
g(o, _({ ref_for: !0 }, l.buttonType, {
|
|
3245
3326
|
size: l.getCompatSize("mini"),
|
|
3246
|
-
class: ["iconfont-button left-fixed-btn", { "active-fixed":
|
|
3247
|
-
onClick: (
|
|
3248
|
-
disabled:
|
|
3327
|
+
class: ["iconfont-button left-fixed-btn", { "active-fixed": f.fixed === "left" }],
|
|
3328
|
+
onClick: (K) => n.frozenLeftHandle(N),
|
|
3329
|
+
disabled: f.fixed !== "left" && n.isThanMaxFrozen
|
|
3249
3330
|
}), {
|
|
3250
3331
|
default: p(() => [
|
|
3251
3332
|
g(j)
|
|
@@ -3255,17 +3336,17 @@ function ol(e, i, t, a, l, n) {
|
|
|
3255
3336
|
]),
|
|
3256
3337
|
_: 2
|
|
3257
3338
|
}, 1040, ["content"])) : C("", !0),
|
|
3258
|
-
|
|
3339
|
+
f.fixed !== "left" ? (r(), b(A, _({
|
|
3259
3340
|
key: 3,
|
|
3260
|
-
content:
|
|
3341
|
+
content: f.fixed === "right" ? l.t("cancelRightFixed") : l.t("rightFixed"),
|
|
3261
3342
|
placement: "top"
|
|
3262
3343
|
}, { ref_for: !0 }, l.afterOpenDelay), {
|
|
3263
3344
|
default: p(() => [
|
|
3264
3345
|
g(o, _({ ref_for: !0 }, l.buttonType, {
|
|
3265
3346
|
size: l.getCompatSize("mini"),
|
|
3266
|
-
class: ["iconfont-button right-fixed-btn", { "active-fixed":
|
|
3267
|
-
onClick: (
|
|
3268
|
-
disabled:
|
|
3347
|
+
class: ["iconfont-button right-fixed-btn", { "active-fixed": f.fixed === "right" }],
|
|
3348
|
+
onClick: (K) => n.frozenRightHandle(N),
|
|
3349
|
+
disabled: f.fixed !== "right" && n.isThanMaxRightFrozen
|
|
3269
3350
|
}), {
|
|
3270
3351
|
default: p(() => [
|
|
3271
3352
|
g(W)
|
|
@@ -3277,29 +3358,29 @@ function ol(e, i, t, a, l, n) {
|
|
|
3277
3358
|
}, 1040, ["content"])) : C("", !0)
|
|
3278
3359
|
])
|
|
3279
3360
|
])) : C("", !0)
|
|
3280
|
-
], 10,
|
|
3361
|
+
], 10, nl))), 128))
|
|
3281
3362
|
], 512)
|
|
3282
3363
|
])
|
|
3283
3364
|
]),
|
|
3284
|
-
v("div",
|
|
3285
|
-
v("div",
|
|
3365
|
+
v("div", rl, [
|
|
3366
|
+
v("div", ul, [
|
|
3286
3367
|
g(o, {
|
|
3287
3368
|
size: l.getCompatSize("mini"),
|
|
3288
3369
|
onClick: n.handleRestoreDefault
|
|
3289
3370
|
}, {
|
|
3290
3371
|
default: p(() => [
|
|
3291
|
-
|
|
3372
|
+
k(x(l.t("restoreDefault")), 1)
|
|
3292
3373
|
]),
|
|
3293
3374
|
_: 1
|
|
3294
3375
|
}, 8, ["size", "onClick"])
|
|
3295
3376
|
]),
|
|
3296
|
-
v("div",
|
|
3377
|
+
v("div", dl, [
|
|
3297
3378
|
g(o, {
|
|
3298
3379
|
size: l.getCompatSize("mini"),
|
|
3299
|
-
onClick: i[1] || (i[1] = (
|
|
3380
|
+
onClick: i[1] || (i[1] = (f) => l.popoverVisible = !1)
|
|
3300
3381
|
}, {
|
|
3301
3382
|
default: p(() => [
|
|
3302
|
-
|
|
3383
|
+
k(x(l.t("cancel")), 1)
|
|
3303
3384
|
]),
|
|
3304
3385
|
_: 1
|
|
3305
3386
|
}, 8, ["size"]),
|
|
@@ -3309,7 +3390,7 @@ function ol(e, i, t, a, l, n) {
|
|
|
3309
3390
|
onClick: n.onSave
|
|
3310
3391
|
}, {
|
|
3311
3392
|
default: p(() => [
|
|
3312
|
-
|
|
3393
|
+
k(x(l.t("saveAndApply")), 1)
|
|
3313
3394
|
]),
|
|
3314
3395
|
_: 1
|
|
3315
3396
|
}, 8, ["size", "onClick"])
|
|
@@ -3320,35 +3401,35 @@ function ol(e, i, t, a, l, n) {
|
|
|
3320
3401
|
_: 1
|
|
3321
3402
|
}, 16, ["placement", "onShow", "onHide"]);
|
|
3322
3403
|
}
|
|
3323
|
-
const
|
|
3324
|
-
function
|
|
3404
|
+
const fl = /* @__PURE__ */ w(Qi, [["render", cl], ["__scopeId", "data-v-fc286487"]]), ye = !1, ve = !0;
|
|
3405
|
+
function J(e) {
|
|
3325
3406
|
if (!Array.isArray(e))
|
|
3326
3407
|
return e;
|
|
3327
3408
|
const i = [];
|
|
3328
3409
|
for (const t of e)
|
|
3329
3410
|
if (t)
|
|
3330
3411
|
if (typeof t.type == "symbol" && t.children) {
|
|
3331
|
-
let
|
|
3332
|
-
if (typeof
|
|
3412
|
+
let s = t.children;
|
|
3413
|
+
if (typeof s == "function")
|
|
3333
3414
|
continue;
|
|
3334
|
-
if (Array.isArray(
|
|
3335
|
-
const l =
|
|
3415
|
+
if (Array.isArray(s)) {
|
|
3416
|
+
const l = J(s);
|
|
3336
3417
|
i.push(...l);
|
|
3337
3418
|
} else {
|
|
3338
|
-
const l =
|
|
3419
|
+
const l = J([s]);
|
|
3339
3420
|
i.push(...l);
|
|
3340
3421
|
}
|
|
3341
3422
|
} else
|
|
3342
3423
|
i.push(t);
|
|
3343
3424
|
return i;
|
|
3344
3425
|
}
|
|
3345
|
-
const
|
|
3426
|
+
const pl = {
|
|
3346
3427
|
name: "TmTable",
|
|
3347
3428
|
components: {
|
|
3348
|
-
TableSearch:
|
|
3349
|
-
TablePagination:
|
|
3350
|
-
TableMenu:
|
|
3351
|
-
ColumnConfig:
|
|
3429
|
+
TableSearch: Ae,
|
|
3430
|
+
TablePagination: Di,
|
|
3431
|
+
TableMenu: Wi,
|
|
3432
|
+
ColumnConfig: fl,
|
|
3352
3433
|
RefreshIcon: at,
|
|
3353
3434
|
// 用于渲染VNode的组件
|
|
3354
3435
|
ColumnRenderer: {
|
|
@@ -3460,9 +3541,9 @@ const ul = {
|
|
|
3460
3541
|
return {
|
|
3461
3542
|
getDefaultSize: L,
|
|
3462
3543
|
getCompatSize: Q,
|
|
3463
|
-
isVue3:
|
|
3464
|
-
isVue2:
|
|
3465
|
-
t:
|
|
3544
|
+
isVue3: ve,
|
|
3545
|
+
isVue2: ye,
|
|
3546
|
+
t: D().t,
|
|
3466
3547
|
tableData: [],
|
|
3467
3548
|
tableLoading: !1,
|
|
3468
3549
|
columnsLoading: !1,
|
|
@@ -3501,7 +3582,7 @@ const ul = {
|
|
|
3501
3582
|
slotsHash() {
|
|
3502
3583
|
{
|
|
3503
3584
|
this.slotsUpdateTrigger;
|
|
3504
|
-
const e = this.$slots.default ? this.$slots.default() : [], i =
|
|
3585
|
+
const e = this.$slots.default ? this.$slots.default() : [], i = J(e);
|
|
3505
3586
|
return this.getColumnsHash(i);
|
|
3506
3587
|
}
|
|
3507
3588
|
}
|
|
@@ -3548,21 +3629,21 @@ const ul = {
|
|
|
3548
3629
|
updateColumns() {
|
|
3549
3630
|
{
|
|
3550
3631
|
const e = this.$slots.default();
|
|
3551
|
-
this.originalColumns =
|
|
3632
|
+
this.originalColumns = J(e);
|
|
3552
3633
|
}
|
|
3553
3634
|
this.columnSettingButton ? this.isColumnConfigLoaded || (this.columnsLoading = !0) : (this.displayColumns = this.originalColumns, this.isColumnConfigLoaded = !0);
|
|
3554
3635
|
},
|
|
3555
3636
|
getColumnsHash(e) {
|
|
3556
3637
|
return e.map((i, t) => {
|
|
3557
|
-
var
|
|
3558
|
-
return i ? i.key || ((l = (
|
|
3638
|
+
var s, l, n, o, d;
|
|
3639
|
+
return i ? i.key || ((l = (s = i.data) == null ? void 0 : s.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}`;
|
|
3559
3640
|
}).join(",");
|
|
3560
3641
|
},
|
|
3561
3642
|
checkAndUpdateColumns() {
|
|
3562
3643
|
var e, i;
|
|
3563
3644
|
try {
|
|
3564
|
-
const t =
|
|
3565
|
-
|
|
3645
|
+
const t = ye ? this.$slots.default || [] : J(((i = (e = this.$slots).default) == null ? void 0 : i.call(e)) || []), s = this.getColumnsHash(t), l = this.lastSlotsHash || this.getColumnsHash(this.originalColumns);
|
|
3646
|
+
s !== l && (ve && this.slotsUpdateTrigger++, this.lastSlotsHash = s, this.originalColumns = t, !this.columnSettingButton || !this.isColumnConfigLoaded ? this.displayColumns = this.originalColumns : this.reapplyColumnConfig(), this.$nextTick(() => {
|
|
3566
3647
|
this.$refs.table && this.$refs.table.doLayout(), this.$forceUpdate();
|
|
3567
3648
|
}));
|
|
3568
3649
|
} catch (t) {
|
|
@@ -3594,8 +3675,8 @@ const ul = {
|
|
|
3594
3675
|
}), this.originalColumns.forEach((l) => {
|
|
3595
3676
|
const n = e(l), o = n.prop, d = n.type;
|
|
3596
3677
|
if (o && d !== "selection") {
|
|
3597
|
-
const c = this.savedColumnConfig.some((
|
|
3598
|
-
!c && !
|
|
3678
|
+
const c = this.savedColumnConfig.some((m) => m.prop === o), h = t.find((m) => e(m).prop === o);
|
|
3679
|
+
!c && !h && t.push(l);
|
|
3599
3680
|
}
|
|
3600
3681
|
}), this.displayColumns = t;
|
|
3601
3682
|
},
|
|
@@ -3620,10 +3701,10 @@ const ul = {
|
|
|
3620
3701
|
current: this.paginationInfo.current
|
|
3621
3702
|
},
|
|
3622
3703
|
params: this.searchForm
|
|
3623
|
-
}), { list: i, total: t, pageSize:
|
|
3704
|
+
}), { list: i, total: t, pageSize: s, current: l } = e;
|
|
3624
3705
|
this.tableData = i;
|
|
3625
|
-
let n =
|
|
3626
|
-
t !== void 0 && (n.total = t), l !== void 0 && (n.current = l),
|
|
3706
|
+
let n = T({}, this.paginationInfo);
|
|
3707
|
+
t !== void 0 && (n.total = t), l !== void 0 && (n.current = l), s !== void 0 && (n.pageSize = s), this.paginationInfo = n;
|
|
3627
3708
|
} catch (e) {
|
|
3628
3709
|
} finally {
|
|
3629
3710
|
this.tableLoading = !1;
|
|
@@ -3635,8 +3716,8 @@ const ul = {
|
|
|
3635
3716
|
this.isAutoHeight() ? this.$nextTick(() => {
|
|
3636
3717
|
const e = this.$refs.table, i = this.$refs.tmPagination;
|
|
3637
3718
|
if (!e) return;
|
|
3638
|
-
const t = e.$el,
|
|
3639
|
-
this.tableHeight = document.documentElement.clientHeight - t.offsetTop -
|
|
3719
|
+
const t = e.$el, s = i && i.$el && i.$el.offsetHeight || 0;
|
|
3720
|
+
this.tableHeight = document.documentElement.clientHeight - t.offsetTop - s - this.calcHeight;
|
|
3640
3721
|
}) : this.tableHeight = this.height, this.refreshTable();
|
|
3641
3722
|
},
|
|
3642
3723
|
// 处理查询
|
|
@@ -3674,14 +3755,14 @@ const ul = {
|
|
|
3674
3755
|
return this.$refs.table;
|
|
3675
3756
|
}
|
|
3676
3757
|
}
|
|
3677
|
-
},
|
|
3758
|
+
}, ml = {
|
|
3678
3759
|
class: "tm-table",
|
|
3679
3760
|
ref: "tablePage"
|
|
3680
3761
|
};
|
|
3681
|
-
function
|
|
3682
|
-
const o = u("table-search"), d = u("RefreshIcon"), c = u("el-button"),
|
|
3683
|
-
return r(), y("div",
|
|
3684
|
-
t.searchColumns && t.searchColumns.length > 0 ? (r(),
|
|
3762
|
+
function gl(e, i, t, s, l, n) {
|
|
3763
|
+
const o = u("table-search"), d = u("RefreshIcon"), c = u("el-button"), h = u("el-tooltip"), m = u("ColumnConfig"), V = u("table-menu"), A = u("columnRenderer"), B = u("el-table"), j = u("table-pagination"), W = je("loading");
|
|
3764
|
+
return r(), y("div", ml, [
|
|
3765
|
+
t.searchColumns && t.searchColumns.length > 0 ? (r(), b(o, {
|
|
3685
3766
|
key: 0,
|
|
3686
3767
|
ref: "search",
|
|
3687
3768
|
onSearch: n.search,
|
|
@@ -3701,13 +3782,13 @@ function hl(e, i, t, a, l, n) {
|
|
|
3701
3782
|
_: 3
|
|
3702
3783
|
}, 8, ["onSearch", "onReset", "onUpdate:searchForm", "disabled", "search-columns", "search-form", "label-width", "input-width", "direction", "label-align"])) : C("", !0),
|
|
3703
3784
|
S(e.$slots, "between-search-menu", {}, void 0, !0),
|
|
3704
|
-
t.showMenu ? (r(),
|
|
3785
|
+
t.showMenu ? (r(), b(V, { key: 1 }, {
|
|
3705
3786
|
left: p(() => [
|
|
3706
3787
|
S(e.$slots, "menu-left", {}, void 0, !0)
|
|
3707
3788
|
]),
|
|
3708
3789
|
right: p(() => [
|
|
3709
3790
|
S(e.$slots, "menu-right", {}, void 0, !0),
|
|
3710
|
-
t.refreshButton && typeof t.data == "function" ? (r(),
|
|
3791
|
+
t.refreshButton && typeof t.data == "function" ? (r(), b(h, _({
|
|
3711
3792
|
key: 0,
|
|
3712
3793
|
content: l.t("refresh"),
|
|
3713
3794
|
placement: "top"
|
|
@@ -3726,7 +3807,7 @@ function hl(e, i, t, a, l, n) {
|
|
|
3726
3807
|
]),
|
|
3727
3808
|
_: 1
|
|
3728
3809
|
}, 16, ["content"])) : C("", !0),
|
|
3729
|
-
t.columnSettingButton ? (r(), m
|
|
3810
|
+
t.columnSettingButton ? (r(), b(m, {
|
|
3730
3811
|
key: 1,
|
|
3731
3812
|
maxFixedLeftQuantity: t.maxFixedLeftQuantity,
|
|
3732
3813
|
maxFixedRightQuantity: t.maxFixedRightQuantity,
|
|
@@ -3738,7 +3819,7 @@ function hl(e, i, t, a, l, n) {
|
|
|
3738
3819
|
_: 3
|
|
3739
3820
|
})) : C("", !0),
|
|
3740
3821
|
S(e.$slots, "between-menu-table", {}, void 0, !0),
|
|
3741
|
-
|
|
3822
|
+
Ke((r(), b(B, _({ ref: "table" }, E(T({}, e.$attrs), { border: t.border }), H(l.isVue2 ? e.$listeners : {}), {
|
|
3742
3823
|
data: l.tableData,
|
|
3743
3824
|
height: l.tableHeight,
|
|
3744
3825
|
size: l.getCompatSize("mini"),
|
|
@@ -3746,9 +3827,9 @@ function hl(e, i, t, a, l, n) {
|
|
|
3746
3827
|
key: l.tableReload
|
|
3747
3828
|
}), {
|
|
3748
3829
|
default: p(() => [
|
|
3749
|
-
(r(!0), y(
|
|
3750
|
-
vnode:
|
|
3751
|
-
key: `${l.isVue3 ?
|
|
3830
|
+
(r(!0), y(z, null, O(l.displayColumns, (a) => (r(), b(A, {
|
|
3831
|
+
vnode: a,
|
|
3832
|
+
key: `${l.isVue3 ? a.id : a.data.attrs.prop}-${l.slotsUpdateTrigger}`
|
|
3752
3833
|
}, null, 8, ["vnode"]))), 128))
|
|
3753
3834
|
]),
|
|
3754
3835
|
_: 1
|
|
@@ -3756,7 +3837,7 @@ function hl(e, i, t, a, l, n) {
|
|
|
3756
3837
|
[W, n.pageLoading]
|
|
3757
3838
|
]),
|
|
3758
3839
|
S(e.$slots, "between-table-pagination", {}, void 0, !0),
|
|
3759
|
-
n.computedShowPagination ? (r(),
|
|
3840
|
+
n.computedShowPagination ? (r(), b(j, {
|
|
3760
3841
|
key: 2,
|
|
3761
3842
|
ref: "tmPagination",
|
|
3762
3843
|
"page-size": l.paginationInfo.pageSize,
|
|
@@ -3774,7 +3855,7 @@ function hl(e, i, t, a, l, n) {
|
|
|
3774
3855
|
S(e.$slots, "after-pagination", {}, void 0, !0)
|
|
3775
3856
|
], 512);
|
|
3776
3857
|
}
|
|
3777
|
-
const Oe = /* @__PURE__ */ w(
|
|
3858
|
+
const Oe = /* @__PURE__ */ w(pl, [["render", gl], ["__scopeId", "data-v-70e1ea9a"]]), bl = !1, yl = !0, vl = {
|
|
3778
3859
|
name: "TmTableColumn",
|
|
3779
3860
|
inheritAttrs: !1,
|
|
3780
3861
|
computed: {
|
|
@@ -3787,8 +3868,8 @@ const Oe = /* @__PURE__ */ w(ul, [["render", hl], ["__scopeId", "data-v-70e1ea9a
|
|
|
3787
3868
|
},
|
|
3788
3869
|
data() {
|
|
3789
3870
|
return {
|
|
3790
|
-
isVue2:
|
|
3791
|
-
isVue3:
|
|
3871
|
+
isVue2: bl,
|
|
3872
|
+
isVue3: yl
|
|
3792
3873
|
};
|
|
3793
3874
|
},
|
|
3794
3875
|
created() {
|
|
@@ -3798,21 +3879,21 @@ const Oe = /* @__PURE__ */ w(ul, [["render", hl], ["__scopeId", "data-v-70e1ea9a
|
|
|
3798
3879
|
});
|
|
3799
3880
|
}
|
|
3800
3881
|
};
|
|
3801
|
-
function
|
|
3882
|
+
function Cl(e, i, t, s, l, n) {
|
|
3802
3883
|
const o = u("el-table-column");
|
|
3803
|
-
return n.isVisible ? (r(),
|
|
3804
|
-
|
|
3884
|
+
return n.isVisible ? (r(), b(o, _({ key: 0 }, e.$attrs, H(l.isVue2 ? e.$listeners : {})), _e({ _: 2 }, [
|
|
3885
|
+
O(n.slots, (d, c) => ({
|
|
3805
3886
|
name: c,
|
|
3806
|
-
fn: p((
|
|
3807
|
-
S(e.$slots, c, Je(
|
|
3887
|
+
fn: p((h) => [
|
|
3888
|
+
S(e.$slots, c, Je(Qe(h)))
|
|
3808
3889
|
])
|
|
3809
3890
|
}))
|
|
3810
3891
|
]), 1040)) : C("", !0);
|
|
3811
3892
|
}
|
|
3812
|
-
const
|
|
3893
|
+
const De = /* @__PURE__ */ w(vl, [["render", Cl]]), { t: se } = D(), _l = {
|
|
3813
3894
|
name: "TmAdvancedEllipsisText",
|
|
3814
3895
|
components: {
|
|
3815
|
-
CopyIcon:
|
|
3896
|
+
CopyIcon: Se
|
|
3816
3897
|
},
|
|
3817
3898
|
props: {
|
|
3818
3899
|
rows: {
|
|
@@ -3929,7 +4010,7 @@ const Ae = /* @__PURE__ */ w(pl, [["render", ml]]), { t: ne } = H(), gl = {
|
|
|
3929
4010
|
},
|
|
3930
4011
|
handleCopy() {
|
|
3931
4012
|
navigator.clipboard && window.isSecureContext ? navigator.clipboard.writeText(this.originalText).then(() => {
|
|
3932
|
-
this.$message.success(
|
|
4013
|
+
this.$message.success(se("copySuccess"));
|
|
3933
4014
|
}).catch(() => {
|
|
3934
4015
|
this.fallbackCopy();
|
|
3935
4016
|
}) : this.fallbackCopy();
|
|
@@ -3938,9 +4019,9 @@ const Ae = /* @__PURE__ */ w(pl, [["render", ml]]), { t: ne } = H(), gl = {
|
|
|
3938
4019
|
const e = document.createElement("textarea");
|
|
3939
4020
|
e.value = this.originalText, e.style.position = "fixed", e.style.left = "-999999px", e.style.top = "-999999px", document.body.appendChild(e), e.focus(), e.select();
|
|
3940
4021
|
try {
|
|
3941
|
-
document.execCommand("copy"), this.$message.success(
|
|
4022
|
+
document.execCommand("copy"), this.$message.success(se("copySuccess"));
|
|
3942
4023
|
} catch (i) {
|
|
3943
|
-
this.$message.error(
|
|
4024
|
+
this.$message.error(se("copyFailed"));
|
|
3944
4025
|
}
|
|
3945
4026
|
document.body.removeChild(e);
|
|
3946
4027
|
},
|
|
@@ -3963,12 +4044,12 @@ const Ae = /* @__PURE__ */ w(pl, [["render", ml]]), { t: ne } = H(), gl = {
|
|
|
3963
4044
|
wordBreak: "break-all",
|
|
3964
4045
|
whiteSpace: "normal"
|
|
3965
4046
|
}), t.textContent = "测", t.offsetHeight;
|
|
3966
|
-
const
|
|
3967
|
-
t.innerHTML = "", this.lineHeight =
|
|
4047
|
+
const s = t.offsetHeight;
|
|
4048
|
+
t.innerHTML = "", this.lineHeight = s;
|
|
3968
4049
|
} else {
|
|
3969
|
-
const
|
|
3970
|
-
if (
|
|
3971
|
-
this.lineHeight = parseInt(
|
|
4050
|
+
const s = i.lineHeight;
|
|
4051
|
+
if (s && s !== "normal")
|
|
4052
|
+
this.lineHeight = parseInt(s);
|
|
3972
4053
|
else {
|
|
3973
4054
|
const l = parseInt(i.fontSize);
|
|
3974
4055
|
this.lineHeight = l * 1.2;
|
|
@@ -3997,7 +4078,7 @@ const Ae = /* @__PURE__ */ w(pl, [["render", ml]]), { t: ne } = H(), gl = {
|
|
|
3997
4078
|
if (this.getTextHeight(e) <= i)
|
|
3998
4079
|
this.frontLines = [], this.lastLineText = e, this.isLastLineEllipsis = this.checkIfTextOverflows(e);
|
|
3999
4080
|
else {
|
|
4000
|
-
const
|
|
4081
|
+
const s = this.lineHeight * (this.rows - 1), l = this.findTextForHeight(e, s);
|
|
4001
4082
|
this.frontLines = this.splitTextToLines(l);
|
|
4002
4083
|
const n = e.substring(l.length);
|
|
4003
4084
|
this.lastLineText = n, this.isLastLineEllipsis = n.length > 0 && this.checkIfTextOverflows(n);
|
|
@@ -4008,10 +4089,10 @@ const Ae = /* @__PURE__ */ w(pl, [["render", ml]]), { t: ne } = H(), gl = {
|
|
|
4008
4089
|
findTextForHeight(e, i) {
|
|
4009
4090
|
if (this.getTextHeight(e) <= i)
|
|
4010
4091
|
return e;
|
|
4011
|
-
let t = 0,
|
|
4012
|
-
for (; t <=
|
|
4013
|
-
const n = Math.floor((t +
|
|
4014
|
-
this.getTextHeight(o) <= i ? (l = o, t = n + 1) :
|
|
4092
|
+
let t = 0, s = e.length, l = "";
|
|
4093
|
+
for (; t <= s; ) {
|
|
4094
|
+
const n = Math.floor((t + s) / 2), o = e.substring(0, n);
|
|
4095
|
+
this.getTextHeight(o) <= i ? (l = o, t = n + 1) : s = n - 1;
|
|
4015
4096
|
}
|
|
4016
4097
|
return l;
|
|
4017
4098
|
},
|
|
@@ -4020,16 +4101,16 @@ const Ae = /* @__PURE__ */ w(pl, [["render", ml]]), { t: ne } = H(), gl = {
|
|
|
4020
4101
|
const i = [];
|
|
4021
4102
|
let t = e;
|
|
4022
4103
|
for (; t.length > 0; ) {
|
|
4023
|
-
const
|
|
4024
|
-
if (
|
|
4025
|
-
i.push(
|
|
4104
|
+
const s = this.findTextForHeight(t, this.lineHeight);
|
|
4105
|
+
if (s.length === 0) break;
|
|
4106
|
+
i.push(s), t = t.substring(s.length);
|
|
4026
4107
|
}
|
|
4027
4108
|
return i;
|
|
4028
4109
|
},
|
|
4029
4110
|
checkIfTextOverflows(e) {
|
|
4030
4111
|
if (!e) return !1;
|
|
4031
|
-
const i = this.getTextWidth(e), t = this.shouldShowToolbar && this.hasToolbarContent ? this.getToolbarWidth() : 0,
|
|
4032
|
-
return i >
|
|
4112
|
+
const i = this.getTextWidth(e), t = this.shouldShowToolbar && this.hasToolbarContent ? this.getToolbarWidth() : 0, s = this.containerWidth - t - 5;
|
|
4113
|
+
return i > s;
|
|
4033
4114
|
},
|
|
4034
4115
|
getToolbarWidth() {
|
|
4035
4116
|
let e = 0;
|
|
@@ -4048,15 +4129,15 @@ const Ae = /* @__PURE__ */ w(pl, [["render", ml]]), { t: ne } = H(), gl = {
|
|
|
4048
4129
|
measureText(e, i = {}) {
|
|
4049
4130
|
if (!this.$refs.containerRef || !this.$refs.measureRef)
|
|
4050
4131
|
return 0;
|
|
4051
|
-
const t = this.$refs.measureRef,
|
|
4132
|
+
const t = this.$refs.measureRef, s = t.style.cssText;
|
|
4052
4133
|
this.setMeasureElementStyle(t, i), t.textContent = e, t.offsetHeight;
|
|
4053
4134
|
const l = i.whiteSpace === "nowrap" ? t.offsetWidth : t.offsetHeight;
|
|
4054
|
-
return t.style.cssText =
|
|
4135
|
+
return t.style.cssText = s, t.innerHTML = "", l;
|
|
4055
4136
|
},
|
|
4056
4137
|
setMeasureElementStyle(e, i = {}) {
|
|
4057
4138
|
const t = window.getComputedStyle(this.$refs.containerRef);
|
|
4058
|
-
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(([
|
|
4059
|
-
e.style[
|
|
4139
|
+
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(([s, l]) => {
|
|
4140
|
+
e.style[s] = l;
|
|
4060
4141
|
});
|
|
4061
4142
|
},
|
|
4062
4143
|
handleMouseEnter() {
|
|
@@ -4094,29 +4175,29 @@ const Ae = /* @__PURE__ */ w(pl, [["render", ml]]), { t: ne } = H(), gl = {
|
|
|
4094
4175
|
this.tableRowElement && (this.tableRowElement.removeEventListener("mouseenter", this.handleMouseEnter), this.tableRowElement.removeEventListener("mouseleave", this.handleMouseLeave), this.tableRowElement = null);
|
|
4095
4176
|
}
|
|
4096
4177
|
}
|
|
4097
|
-
},
|
|
4178
|
+
}, Sl = { class: "tm-ellipsis-text-wrapper" }, xl = ["innerHTML"], Tl = { class: "tm-ellipsis-last-line" }, wl = ["innerHTML"], Vl = {
|
|
4098
4179
|
key: 0,
|
|
4099
4180
|
class: "tm-ellipsis-toolbar-part"
|
|
4100
|
-
},
|
|
4181
|
+
}, Fl = {
|
|
4101
4182
|
key: 1,
|
|
4102
4183
|
class: "tm-ellipsis-text-wrapper"
|
|
4103
|
-
},
|
|
4184
|
+
}, kl = ["innerHTML"], zl = { class: "tm-ellipsis-last-line" }, Ll = ["innerHTML"], Al = {
|
|
4104
4185
|
key: 0,
|
|
4105
4186
|
class: "tm-ellipsis-toolbar-part"
|
|
4106
|
-
},
|
|
4187
|
+
}, Ol = {
|
|
4107
4188
|
ref: "measureRef",
|
|
4108
4189
|
class: "tm-ellipsis-measure"
|
|
4109
4190
|
};
|
|
4110
|
-
function
|
|
4191
|
+
function Dl(e, i, t, s, l, n) {
|
|
4111
4192
|
const o = u("CopyIcon"), d = u("el-tooltip");
|
|
4112
4193
|
return r(), y("div", {
|
|
4113
4194
|
ref: "containerRef",
|
|
4114
|
-
style:
|
|
4195
|
+
style: U(n.containerStyle),
|
|
4115
4196
|
class: "tm-ellipsis-text",
|
|
4116
4197
|
onMouseenter: i[0] || (i[0] = (...c) => n.handleMouseEnter && n.handleMouseEnter(...c)),
|
|
4117
4198
|
onMouseleave: i[1] || (i[1] = (...c) => n.handleMouseLeave && n.handleMouseLeave(...c))
|
|
4118
4199
|
}, [
|
|
4119
|
-
t.showTooltip && l.isLastLineEllipsis ? (r(),
|
|
4200
|
+
t.showTooltip && l.isLastLineEllipsis ? (r(), b(d, _({
|
|
4120
4201
|
key: 0,
|
|
4121
4202
|
content: l.originalText,
|
|
4122
4203
|
disabled: !t.showTooltip || !l.isLastLineEllipsis
|
|
@@ -4124,19 +4205,19 @@ function zl(e, i, t, a, l, n) {
|
|
|
4124
4205
|
[l.isVue2 ? "open-delay" : "show-after"]: 300
|
|
4125
4206
|
}, { placement: "top" }), {
|
|
4126
4207
|
default: p(() => [
|
|
4127
|
-
v("div",
|
|
4128
|
-
(r(!0), y(
|
|
4129
|
-
key: "front-" +
|
|
4208
|
+
v("div", Sl, [
|
|
4209
|
+
(r(!0), y(z, null, O(l.frontLines, (c, h) => (r(), y("div", {
|
|
4210
|
+
key: "front-" + h,
|
|
4130
4211
|
class: "tm-ellipsis-line",
|
|
4131
4212
|
innerHTML: c
|
|
4132
|
-
}, null, 8,
|
|
4133
|
-
v("div",
|
|
4213
|
+
}, null, 8, xl))), 128)),
|
|
4214
|
+
v("div", Tl, [
|
|
4134
4215
|
v("div", {
|
|
4135
4216
|
class: "tm-ellipsis-text-part",
|
|
4136
4217
|
innerHTML: l.lastLineText
|
|
4137
|
-
}, null, 8,
|
|
4138
|
-
n.shouldShowToolbar && n.hasToolbarContent ? (r(), y("div",
|
|
4139
|
-
t.copyable ? (r(),
|
|
4218
|
+
}, null, 8, wl),
|
|
4219
|
+
n.shouldShowToolbar && n.hasToolbarContent ? (r(), y("div", Vl, [
|
|
4220
|
+
t.copyable ? (r(), b(o, {
|
|
4140
4221
|
key: 0,
|
|
4141
4222
|
class: "icon-item",
|
|
4142
4223
|
onClick: n.handleCopy
|
|
@@ -4147,19 +4228,19 @@ function zl(e, i, t, a, l, n) {
|
|
|
4147
4228
|
])
|
|
4148
4229
|
]),
|
|
4149
4230
|
_: 3
|
|
4150
|
-
}, 16, ["content", "disabled"])) : (r(), y("div",
|
|
4151
|
-
(r(!0), y(
|
|
4152
|
-
key: "front-" +
|
|
4231
|
+
}, 16, ["content", "disabled"])) : (r(), y("div", Fl, [
|
|
4232
|
+
(r(!0), y(z, null, O(l.frontLines, (c, h) => (r(), y("div", {
|
|
4233
|
+
key: "front-" + h,
|
|
4153
4234
|
class: "tm-ellipsis-line",
|
|
4154
4235
|
innerHTML: c
|
|
4155
|
-
}, null, 8,
|
|
4156
|
-
v("div",
|
|
4236
|
+
}, null, 8, kl))), 128)),
|
|
4237
|
+
v("div", zl, [
|
|
4157
4238
|
v("div", {
|
|
4158
4239
|
class: "tm-ellipsis-text-part",
|
|
4159
4240
|
innerHTML: l.lastLineText
|
|
4160
|
-
}, null, 8,
|
|
4161
|
-
n.shouldShowToolbar && n.hasToolbarContent ? (r(), y("div",
|
|
4162
|
-
t.copyable ? (r(),
|
|
4241
|
+
}, null, 8, Ll),
|
|
4242
|
+
n.shouldShowToolbar && n.hasToolbarContent ? (r(), y("div", Al, [
|
|
4243
|
+
t.copyable ? (r(), b(o, {
|
|
4163
4244
|
key: 0,
|
|
4164
4245
|
class: "icon-item",
|
|
4165
4246
|
onClick: n.handleCopy
|
|
@@ -4168,47 +4249,47 @@ function zl(e, i, t, a, l, n) {
|
|
|
4168
4249
|
])) : C("", !0)
|
|
4169
4250
|
])
|
|
4170
4251
|
])),
|
|
4171
|
-
v("div",
|
|
4252
|
+
v("div", Ol, null, 512)
|
|
4172
4253
|
], 36);
|
|
4173
4254
|
}
|
|
4174
|
-
const
|
|
4255
|
+
const Me = /* @__PURE__ */ w(_l, [["render", Dl], ["__scopeId", "data-v-14f27c2e"]]), Ml = {
|
|
4175
4256
|
install(e, i = {}) {
|
|
4176
|
-
[Oe,
|
|
4257
|
+
[Oe, De, ee, Me].forEach((t) => e.component(t.name, t)), i.tableConfigProvider && Ui(i.tableConfigProvider), i.lang && ae(i.lang || "zh-CN");
|
|
4177
4258
|
}
|
|
4178
|
-
},
|
|
4179
|
-
install:
|
|
4259
|
+
}, Hl = {
|
|
4260
|
+
install: Ml.install,
|
|
4180
4261
|
Table: Oe,
|
|
4181
|
-
Column:
|
|
4182
|
-
Search:
|
|
4183
|
-
Select:
|
|
4184
|
-
Input:
|
|
4185
|
-
Date:
|
|
4186
|
-
Cascader:
|
|
4187
|
-
Radio:
|
|
4188
|
-
Checkbox:
|
|
4262
|
+
Column: De,
|
|
4263
|
+
Search: Ae,
|
|
4264
|
+
Select: xe,
|
|
4265
|
+
Input: Te,
|
|
4266
|
+
Date: we,
|
|
4267
|
+
Cascader: Ve,
|
|
4268
|
+
Radio: Fe,
|
|
4269
|
+
Checkbox: ke,
|
|
4189
4270
|
Switch: ze,
|
|
4190
|
-
Textarea:
|
|
4271
|
+
Textarea: Le,
|
|
4191
4272
|
EllipsisText: ee,
|
|
4192
|
-
AdvancedEllipsisText:
|
|
4273
|
+
AdvancedEllipsisText: Me,
|
|
4193
4274
|
setLang: ae,
|
|
4194
|
-
useLocale:
|
|
4275
|
+
useLocale: D
|
|
4195
4276
|
};
|
|
4196
|
-
typeof window != "undefined" && window.Vue &&
|
|
4277
|
+
typeof window != "undefined" && window.Vue && Hl.install(window.Vue);
|
|
4197
4278
|
export {
|
|
4198
|
-
|
|
4199
|
-
|
|
4200
|
-
|
|
4201
|
-
|
|
4202
|
-
|
|
4279
|
+
Me as AdvancedEllipsisText,
|
|
4280
|
+
Ve as Cascader,
|
|
4281
|
+
ke as Checkbox,
|
|
4282
|
+
De as Column,
|
|
4283
|
+
we as Date,
|
|
4203
4284
|
ee as EllipsisText,
|
|
4204
|
-
|
|
4205
|
-
|
|
4206
|
-
|
|
4207
|
-
|
|
4285
|
+
Te as Input,
|
|
4286
|
+
Fe as Radio,
|
|
4287
|
+
Ae as Search,
|
|
4288
|
+
xe as Select,
|
|
4208
4289
|
ze as Switch,
|
|
4209
4290
|
Oe as Table,
|
|
4210
|
-
|
|
4211
|
-
|
|
4291
|
+
Le as Textarea,
|
|
4292
|
+
Hl as default,
|
|
4212
4293
|
ae as setLang,
|
|
4213
|
-
|
|
4294
|
+
D as useLocale
|
|
4214
4295
|
};
|