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