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