mgacn-commonsdk 1.2.9 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/mgacn-commonsdk.js +700 -659
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/mgacn-commonsdk.js
CHANGED
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
import { Plus as ot, Delete as it, CircleCloseFilled as ut, Document as ct, Close as dt, CircleClose as
|
|
2
|
-
import { ElMessage as
|
|
1
|
+
import { Plus as ot, Delete as it, CircleCloseFilled as ut, Document as ct, Close as dt, CircleClose as Ie, CircleCheck as pt, ArrowUp as ft, ArrowDown as ht } from "@element-plus/icons-vue";
|
|
2
|
+
import { ElMessage as G, ElMessageBox as Ae } from "element-plus";
|
|
3
3
|
import mt from "cropperjs";
|
|
4
|
-
import * as
|
|
5
|
-
import { g as gt, _ as
|
|
6
|
-
import { i as
|
|
7
|
-
import { resolveComponent as
|
|
8
|
-
const Ft =
|
|
4
|
+
import * as Ne from "ali-oss";
|
|
5
|
+
import { g as gt, _ as ne, o as yt, k as He, t as vt, l as bt, m as ze, F as _t, n as wt, p as Ct, q as kt, r as Ut, u as xt } from "./FilePreview-DVaCq1Fr.js";
|
|
6
|
+
import { i as cl, j as dl, c as pl, v as fl, w as hl, b as ml, x as gl, y as yl, a as vl, s as bl, z as _l } from "./FilePreview-DVaCq1Fr.js";
|
|
7
|
+
import { resolveComponent as L, openBlock as c, createElementBlock as g, createElementVNode as _, toDisplayString as D, createCommentVNode as I, createTextVNode as q, Fragment as J, renderList as ee, normalizeStyle as ue, normalizeClass as W, createVNode as U, withCtx as $, withModifiers as he, withDirectives as ae, vShow as re, createBlock as O, computed as me, ref as A, watch as te, onMounted as ge, reactive as Me, nextTick as X, onBeforeUnmount as Ce, withKeys as Pe, unref as oe, renderSlot as se, mergeProps as Re, createSlots as St } from "vue";
|
|
8
|
+
const Ft = Ne.default ?? Ne, Ee = "__MGACN_COMMONSDK_OSS_URL__";
|
|
9
9
|
function $t(e = "") {
|
|
10
|
-
globalThis[
|
|
10
|
+
globalThis[Ee] = String(e || "").replace(/\/$/, "");
|
|
11
11
|
}
|
|
12
|
-
function
|
|
13
|
-
return globalThis[
|
|
12
|
+
function je() {
|
|
13
|
+
return globalThis[Ee] || "";
|
|
14
14
|
}
|
|
15
|
-
function
|
|
15
|
+
function Te(e) {
|
|
16
16
|
return String(e).padStart(2, "0");
|
|
17
17
|
}
|
|
18
18
|
function Lt() {
|
|
19
19
|
const e = /* @__PURE__ */ new Date();
|
|
20
|
-
return `${e.getFullYear()}${
|
|
20
|
+
return `${e.getFullYear()}${Te(e.getMonth() + 1)}${Te(e.getDate())}`;
|
|
21
21
|
}
|
|
22
|
-
function
|
|
22
|
+
function Ke(e = 10) {
|
|
23
23
|
const t = "0123456789abcdefghijklmnopqrstuvwxyz";
|
|
24
24
|
let n = "";
|
|
25
25
|
for (let r = 0; r < e; r++)
|
|
26
26
|
n += t[Math.floor(Math.random() * t.length)];
|
|
27
27
|
return n;
|
|
28
28
|
}
|
|
29
|
-
function
|
|
29
|
+
function ke(e = "portal_cms") {
|
|
30
30
|
return `${e}/${Lt()}/`;
|
|
31
31
|
}
|
|
32
|
-
function
|
|
32
|
+
function We(e) {
|
|
33
33
|
return gt().getOssSts(e);
|
|
34
34
|
}
|
|
35
35
|
function Nt(e = {}) {
|
|
36
36
|
const t = e.accessKeyId || e.AccessKeyId || e.accessKeyID || "", n = e.accessKeySecret || e.AccessKeySecret || "", r = e.securityToken || e.SecurityToken || e.stsToken || e.token || "", s = e.bucketName || e.bucket || e.BucketName || "";
|
|
37
37
|
let o = String(e.endPoint || e.endpoint || e.EndPoint || "").replace(/^https?:\/\//i, "").replace(/\/$/, "");
|
|
38
38
|
s && o.startsWith(`${s}.`) && (o = o.slice(s.length + 1));
|
|
39
|
-
const m = e.region || (o.startsWith("oss-") ? o.replace(/\.aliyuncs\.com.*$/i, "") : ""),
|
|
39
|
+
const m = e.region || (o.startsWith("oss-") ? o.replace(/\.aliyuncs\.com.*$/i, "") : ""), p = String(e.ossUrl || e.domain || e.cdnDomain || "").replace(/\/$/, ""), N = s && o ? `https://${s}.${o}` : je();
|
|
40
40
|
return {
|
|
41
41
|
accessKeyId: t,
|
|
42
42
|
accessKeySecret: n,
|
|
@@ -44,77 +44,77 @@ function Nt(e = {}) {
|
|
|
44
44
|
bucketName: s,
|
|
45
45
|
endPoint: o,
|
|
46
46
|
region: m,
|
|
47
|
-
ossUrl:
|
|
47
|
+
ossUrl: p || N
|
|
48
48
|
};
|
|
49
49
|
}
|
|
50
|
-
async function
|
|
51
|
-
const { dir: t, foldName: n, getOss: r, ossinfo: s } = e, o = t ||
|
|
52
|
-
if (!
|
|
50
|
+
async function Ue(e = {}) {
|
|
51
|
+
const { dir: t, foldName: n, getOss: r, ossinfo: s } = e, o = t || ke(n || "portal_cms"), m = s || (typeof r == "function" ? await r(o) : await We(o)), p = Nt(m || {});
|
|
52
|
+
if (!p.accessKeyId || !p.accessKeySecret || !p.bucketName)
|
|
53
53
|
throw new Error("[mgacn-commonsdk] 获取 OSS STS 失败:凭证字段不完整");
|
|
54
|
-
if (!
|
|
54
|
+
if (!p.securityToken)
|
|
55
55
|
throw new Error("[mgacn-commonsdk] 获取 OSS STS 失败:缺少 securityToken");
|
|
56
|
-
const
|
|
57
|
-
bucket:
|
|
58
|
-
accessKeyId:
|
|
59
|
-
accessKeySecret:
|
|
60
|
-
stsToken:
|
|
56
|
+
const N = {
|
|
57
|
+
bucket: p.bucketName,
|
|
58
|
+
accessKeyId: p.accessKeyId,
|
|
59
|
+
accessKeySecret: p.accessKeySecret,
|
|
60
|
+
stsToken: p.securityToken,
|
|
61
61
|
secure: !0,
|
|
62
62
|
success_action_status: "200"
|
|
63
63
|
};
|
|
64
|
-
|
|
65
|
-
const
|
|
66
|
-
return
|
|
64
|
+
p.region && (N.region = p.region), p.endPoint && (N.endpoint = p.endPoint);
|
|
65
|
+
const b = new Ft(N);
|
|
66
|
+
return b.options.ossUrl = p.ossUrl || je(), b.options.uploadDir = o, b;
|
|
67
67
|
}
|
|
68
|
-
async function
|
|
69
|
-
var
|
|
68
|
+
async function Ye(e = {}) {
|
|
69
|
+
var y, x;
|
|
70
70
|
const { client: t, file: n, dir: r, foldName: s, fileName: o, onProgress: m } = e;
|
|
71
71
|
if (!n)
|
|
72
72
|
throw new Error("[mgacn-commonsdk] uploadToOss 缺少 file");
|
|
73
|
-
const
|
|
74
|
-
let
|
|
75
|
-
if (!
|
|
76
|
-
const
|
|
77
|
-
|
|
73
|
+
const p = t || await Ue({ dir: r, foldName: s }), N = r || p.options.uploadDir || ke(s);
|
|
74
|
+
let b = o;
|
|
75
|
+
if (!b) {
|
|
76
|
+
const M = n.name || "file", B = M.lastIndexOf("."), z = B > -1 ? M.slice(B) : "";
|
|
77
|
+
b = `${N}${Ke(10)}${z}`;
|
|
78
78
|
}
|
|
79
|
-
const S = (
|
|
80
|
-
typeof m == "function" && m(Math.min(100, Math.max(0, Math.floor(Number(
|
|
81
|
-
}, T = n.size > 1 * 1024 * 1024,
|
|
82
|
-
progress: async (
|
|
83
|
-
S(
|
|
79
|
+
const S = (M) => {
|
|
80
|
+
typeof m == "function" && m(Math.min(100, Math.max(0, Math.floor(Number(M) * 100))));
|
|
81
|
+
}, T = n.size > 1 * 1024 * 1024, f = {
|
|
82
|
+
progress: async (M) => {
|
|
83
|
+
S(M);
|
|
84
84
|
}
|
|
85
85
|
};
|
|
86
|
-
let
|
|
87
|
-
const
|
|
88
|
-
const
|
|
89
|
-
return T ?
|
|
90
|
-
...
|
|
91
|
-
...
|
|
92
|
-
}) :
|
|
93
|
-
...
|
|
94
|
-
...
|
|
86
|
+
let u;
|
|
87
|
+
const d = async (M) => {
|
|
88
|
+
const B = M ? { "x-oss-object-acl": "public-read" } : void 0;
|
|
89
|
+
return T ? p.multipartUpload(b, n, {
|
|
90
|
+
...f,
|
|
91
|
+
...B ? { headers: B } : {}
|
|
92
|
+
}) : p.put(b, n, {
|
|
93
|
+
...f,
|
|
94
|
+
...B ? { headers: B } : {}
|
|
95
95
|
});
|
|
96
96
|
};
|
|
97
97
|
try {
|
|
98
|
-
S(0.01),
|
|
98
|
+
S(0.01), u = await d(!0);
|
|
99
99
|
} catch {
|
|
100
|
-
S(0.01),
|
|
100
|
+
S(0.01), u = await d(!1);
|
|
101
101
|
}
|
|
102
|
-
const
|
|
103
|
-
if (
|
|
102
|
+
const F = ((y = u == null ? void 0 : u.res) == null ? void 0 : y.statusCode) ?? ((x = u == null ? void 0 : u.res) == null ? void 0 : x.status);
|
|
103
|
+
if (F && F !== 200)
|
|
104
104
|
throw new Error("[mgacn-commonsdk] 上传失败");
|
|
105
105
|
S(1);
|
|
106
|
-
const
|
|
107
|
-
let
|
|
106
|
+
const P = (p.options.ossUrl || "").replace(/\/$/, ""), H = P ? `${P}/${b}` : b;
|
|
107
|
+
let V = H;
|
|
108
108
|
try {
|
|
109
|
-
|
|
109
|
+
V = p.signatureUrl(b, { expires: 3600 * 24 });
|
|
110
110
|
} catch {
|
|
111
111
|
}
|
|
112
112
|
return {
|
|
113
|
-
name:
|
|
114
|
-
url:
|
|
115
|
-
previewUrl:
|
|
116
|
-
raw:
|
|
117
|
-
client:
|
|
113
|
+
name: b,
|
|
114
|
+
url: H,
|
|
115
|
+
previewUrl: V,
|
|
116
|
+
raw: u,
|
|
117
|
+
client: p
|
|
118
118
|
};
|
|
119
119
|
}
|
|
120
120
|
function Mt(e = "", t = "") {
|
|
@@ -134,7 +134,7 @@ function Mt(e = "", t = "") {
|
|
|
134
134
|
}
|
|
135
135
|
}
|
|
136
136
|
async function Pt(e, t = {}) {
|
|
137
|
-
const n = t.client || await
|
|
137
|
+
const n = t.client || await Ue(t), r = Mt(e, n.options.ossUrl);
|
|
138
138
|
if (!r) return e;
|
|
139
139
|
try {
|
|
140
140
|
return n.signatureUrl(r, { expires: t.expires || 3600 * 24 });
|
|
@@ -142,40 +142,40 @@ async function Pt(e, t = {}) {
|
|
|
142
142
|
return e;
|
|
143
143
|
}
|
|
144
144
|
}
|
|
145
|
-
const
|
|
145
|
+
const qe = {
|
|
146
146
|
methods: {
|
|
147
147
|
getDir() {
|
|
148
|
-
return
|
|
148
|
+
return ke(this.foldName || "portal_cms");
|
|
149
149
|
},
|
|
150
|
-
randomString:
|
|
150
|
+
randomString: Ke,
|
|
151
151
|
getOss() {
|
|
152
|
-
return
|
|
152
|
+
return We(this.getDir());
|
|
153
153
|
},
|
|
154
154
|
async createOssClient() {
|
|
155
|
-
return
|
|
155
|
+
return Ue({
|
|
156
156
|
dir: this.getDir(),
|
|
157
157
|
getOss: () => this.getOss()
|
|
158
158
|
});
|
|
159
159
|
}
|
|
160
160
|
}
|
|
161
161
|
};
|
|
162
|
-
let
|
|
163
|
-
function
|
|
164
|
-
return
|
|
162
|
+
let Be = 0;
|
|
163
|
+
function Ge() {
|
|
164
|
+
return Be += 1, `mg-img-${Date.now()}-${Be}`;
|
|
165
165
|
}
|
|
166
166
|
function Rt(e) {
|
|
167
167
|
return Array.isArray(e) ? e.filter(Boolean) : e ? [e] : [];
|
|
168
168
|
}
|
|
169
|
-
function
|
|
169
|
+
function De(e) {
|
|
170
170
|
return e.map((t) => ({
|
|
171
|
-
uid:
|
|
171
|
+
uid: Ge(),
|
|
172
172
|
url: t,
|
|
173
173
|
status: "success",
|
|
174
174
|
percent: 100,
|
|
175
175
|
previewUrl: ""
|
|
176
176
|
}));
|
|
177
177
|
}
|
|
178
|
-
function
|
|
178
|
+
function fe(e = "") {
|
|
179
179
|
return String(e).startsWith("blob:");
|
|
180
180
|
}
|
|
181
181
|
function Tt(e = "") {
|
|
@@ -187,7 +187,7 @@ function Bt(e = "") {
|
|
|
187
187
|
}
|
|
188
188
|
const Dt = {
|
|
189
189
|
name: "MgImageUpload",
|
|
190
|
-
mixins: [
|
|
190
|
+
mixins: [qe],
|
|
191
191
|
components: { CircleCloseFilled: ut, Delete: it, Plus: ot },
|
|
192
192
|
props: {
|
|
193
193
|
/** v-model 统一为 string[];入参兼容 string / string[] */
|
|
@@ -253,7 +253,7 @@ const Dt = {
|
|
|
253
253
|
deep: !0,
|
|
254
254
|
immediate: !0,
|
|
255
255
|
handler(e) {
|
|
256
|
-
e != null && e.length && (this.replaceList(
|
|
256
|
+
e != null && e.length && (this.replaceList(De(e)), this.ensureSignedPreviews());
|
|
257
257
|
}
|
|
258
258
|
},
|
|
259
259
|
modelValue: {
|
|
@@ -262,11 +262,11 @@ const Dt = {
|
|
|
262
262
|
var o;
|
|
263
263
|
if ((o = this.initFileList) != null && o.length) return;
|
|
264
264
|
const t = Rt(e), n = this.successUrls;
|
|
265
|
-
if (t.length === n.length && t.every((m,
|
|
265
|
+
if (t.length === n.length && t.every((m, p) => m === n[p]))
|
|
266
266
|
return;
|
|
267
267
|
const r = new Map(
|
|
268
268
|
this.fileList.map((m) => [m.url, m.previewUrl]).filter(([m]) => m)
|
|
269
|
-
), s =
|
|
269
|
+
), s = De(t).map((m) => ({
|
|
270
270
|
...m,
|
|
271
271
|
previewUrl: r.get(m.url) || ""
|
|
272
272
|
}));
|
|
@@ -288,21 +288,21 @@ const Dt = {
|
|
|
288
288
|
replaceList(e) {
|
|
289
289
|
const t = new Set(e.map((n) => n.previewUrl).filter(Boolean));
|
|
290
290
|
this.fileList.forEach((n) => {
|
|
291
|
-
|
|
291
|
+
fe(n.previewUrl) && !t.has(n.previewUrl) && URL.revokeObjectURL(n.previewUrl);
|
|
292
292
|
}), this.fileList = e;
|
|
293
293
|
},
|
|
294
294
|
revokePreview(e) {
|
|
295
|
-
|
|
295
|
+
fe(e == null ? void 0 : e.previewUrl) && URL.revokeObjectURL(e.previewUrl);
|
|
296
296
|
},
|
|
297
297
|
revokeAllPreviews() {
|
|
298
298
|
this.fileList.forEach((e) => {
|
|
299
|
-
|
|
299
|
+
fe(e.previewUrl) && URL.revokeObjectURL(e.previewUrl);
|
|
300
300
|
});
|
|
301
301
|
},
|
|
302
302
|
/** 私有桶回显:给已有 url 补签名预览 */
|
|
303
303
|
async ensureSignedPreviews() {
|
|
304
304
|
const e = this.fileList.filter(
|
|
305
|
-
(t) => t.status === "success" && t.url && !
|
|
305
|
+
(t) => t.status === "success" && t.url && !fe(t.previewUrl) && !Tt(t.previewUrl || t.url)
|
|
306
306
|
);
|
|
307
307
|
if (e.length)
|
|
308
308
|
try {
|
|
@@ -346,7 +346,7 @@ const Dt = {
|
|
|
346
346
|
handleUpload() {
|
|
347
347
|
if (!this.disabled) {
|
|
348
348
|
if (this.fileList.length >= this.fileNum) {
|
|
349
|
-
|
|
349
|
+
G.error(`文件数量不超过${this.fileNum}`);
|
|
350
350
|
return;
|
|
351
351
|
}
|
|
352
352
|
this.openFilePicker();
|
|
@@ -357,15 +357,15 @@ const Dt = {
|
|
|
357
357
|
if (!t.length) return;
|
|
358
358
|
const n = this.dialogVisible || this.isCropper, r = this.fileNum - this.fileList.length;
|
|
359
359
|
if (!n && t.length > r) {
|
|
360
|
-
|
|
360
|
+
G.error(`文件数量不超过${this.fileNum}个`);
|
|
361
361
|
return;
|
|
362
362
|
}
|
|
363
363
|
const s = [], o = [];
|
|
364
364
|
if (t.forEach((m) => {
|
|
365
365
|
this.acceptList.includes(Bt(m.name)) ? s.push(m) : o.push(m);
|
|
366
366
|
}), o.length) {
|
|
367
|
-
const m = o.map((
|
|
368
|
-
|
|
367
|
+
const m = o.map((p) => p.name).join(",");
|
|
368
|
+
Ae.confirm(
|
|
369
369
|
`已过滤以下 ${o.length} 个不符合要求的文件:<br/><p style="color:#f56c6c;font-size:12px;">${m}</p><br/>只接受:${this.acceptList.join("/")}`,
|
|
370
370
|
"提示",
|
|
371
371
|
{
|
|
@@ -406,11 +406,11 @@ const Dt = {
|
|
|
406
406
|
const t = this.maxFileSize * 1024 * 1024, n = [];
|
|
407
407
|
return e.forEach((r) => {
|
|
408
408
|
if (r.size > t) {
|
|
409
|
-
|
|
409
|
+
G.error(`「${r.name}」超出 ${this.maxFileSize}MB 限制`);
|
|
410
410
|
return;
|
|
411
411
|
}
|
|
412
412
|
const s = URL.createObjectURL(r), o = {
|
|
413
|
-
uid:
|
|
413
|
+
uid: Ge(),
|
|
414
414
|
url: s,
|
|
415
415
|
previewUrl: s,
|
|
416
416
|
status: "uploading",
|
|
@@ -428,14 +428,14 @@ const Dt = {
|
|
|
428
428
|
this.activeUploadCount += 1, this.$emit("update:uploading", !0);
|
|
429
429
|
try {
|
|
430
430
|
n(0);
|
|
431
|
-
const r = await
|
|
431
|
+
const r = await Ye({
|
|
432
432
|
file: e.raw,
|
|
433
433
|
dir: this.getDir(),
|
|
434
434
|
onProgress: n
|
|
435
435
|
});
|
|
436
436
|
e.url = r.url, e.previewUrl = t || r.previewUrl || r.url, e.status = "success", n(100), e.raw = null, this.activeUploadCount = Math.max(0, this.activeUploadCount - 1), this.$emit("update:uploading", this.activeUploadCount > 0), this.emitFile(), this.$emit("success", r, e);
|
|
437
437
|
} catch (r) {
|
|
438
|
-
e.status = "fail", n(0), this.activeUploadCount = Math.max(0, this.activeUploadCount - 1), this.$emit("update:uploading", this.activeUploadCount > 0),
|
|
438
|
+
e.status = "fail", n(0), this.activeUploadCount = Math.max(0, this.activeUploadCount - 1), this.$emit("update:uploading", this.activeUploadCount > 0), G.error((r == null ? void 0 : r.message) || "上传失败"), this.$emit("error", r, e);
|
|
439
439
|
}
|
|
440
440
|
},
|
|
441
441
|
initCropper() {
|
|
@@ -464,7 +464,7 @@ const Dt = {
|
|
|
464
464
|
},
|
|
465
465
|
confirmCrop() {
|
|
466
466
|
if (this.uploadingCount) {
|
|
467
|
-
|
|
467
|
+
G.error("上传中,请稍后!");
|
|
468
468
|
return;
|
|
469
469
|
}
|
|
470
470
|
if (!this.cropper) return;
|
|
@@ -473,7 +473,7 @@ const Dt = {
|
|
|
473
473
|
},
|
|
474
474
|
base64ToFile(e) {
|
|
475
475
|
const [t, n] = e.split(","), r = t.match(/:(.*?);/)[1], s = r.split("/")[1], o = atob(n), m = new Uint8Array(o.length);
|
|
476
|
-
for (let
|
|
476
|
+
for (let p = 0; p < o.length; p++) m[p] = o.charCodeAt(p);
|
|
477
477
|
return new File([m], `${Date.now()}.${s}`, { type: r });
|
|
478
478
|
},
|
|
479
479
|
handleBack() {
|
|
@@ -484,10 +484,10 @@ const Dt = {
|
|
|
484
484
|
!t || t.status === "uploading" || (this.revokePreview(t), this.fileList.splice(e, 1), this.emitFile());
|
|
485
485
|
}
|
|
486
486
|
}
|
|
487
|
-
},
|
|
487
|
+
}, Ot = { class: "upload-image-cropper" }, Vt = ["multiple", "accept"], It = {
|
|
488
488
|
key: 0,
|
|
489
489
|
class: "grey-tips"
|
|
490
|
-
}, At = { key: 0 },
|
|
490
|
+
}, At = { key: 0 }, Ht = { class: "list-box" }, zt = {
|
|
491
491
|
key: 0,
|
|
492
492
|
class: "status-mask is-uploading"
|
|
493
493
|
}, Et = { class: "progress-wrap" }, jt = { class: "percent-text" }, Kt = {
|
|
@@ -501,103 +501,103 @@ const Dt = {
|
|
|
501
501
|
class: "btn-box btn-box--rotate"
|
|
502
502
|
}, Jt = { class: "btn-box" };
|
|
503
503
|
function Qt(e, t, n, r, s, o) {
|
|
504
|
-
const m =
|
|
505
|
-
return
|
|
506
|
-
|
|
504
|
+
const m = L("el-image"), p = L("el-progress"), N = L("CircleCloseFilled"), b = L("el-icon"), S = L("Delete"), T = L("Plus"), f = L("el-button"), u = L("el-dialog");
|
|
505
|
+
return c(), g("div", Ot, [
|
|
506
|
+
_("input", {
|
|
507
507
|
ref: "fileInput",
|
|
508
508
|
type: "file",
|
|
509
509
|
class: "file-input",
|
|
510
510
|
multiple: o.multiple,
|
|
511
511
|
accept: n.accept,
|
|
512
|
-
onChange: t[0] || (t[0] = (...
|
|
513
|
-
}, null, 40,
|
|
514
|
-
n.greyTips ? (
|
|
515
|
-
n.otherTips ? (
|
|
516
|
-
|
|
517
|
-
])) :
|
|
518
|
-
|
|
519
|
-
(
|
|
520
|
-
key:
|
|
521
|
-
class:
|
|
522
|
-
style:
|
|
512
|
+
onChange: t[0] || (t[0] = (...d) => o.onFileChange && o.onFileChange(...d))
|
|
513
|
+
}, null, 40, Vt),
|
|
514
|
+
n.greyTips ? (c(), g("div", It, [
|
|
515
|
+
n.otherTips ? (c(), g("div", At, D(n.otherTips), 1)) : I("", !0),
|
|
516
|
+
q(" " + D(n.greyTips), 1)
|
|
517
|
+
])) : I("", !0),
|
|
518
|
+
_("div", Ht, [
|
|
519
|
+
(c(!0), g(J, null, ee(s.fileList, (d, F) => (c(), g("div", {
|
|
520
|
+
key: d.uid,
|
|
521
|
+
class: W(["image-box", [`is-${d.status}`]]),
|
|
522
|
+
style: ue(n.imageStyle)
|
|
523
523
|
}, [
|
|
524
|
-
|
|
525
|
-
src:
|
|
524
|
+
U(m, {
|
|
525
|
+
src: d.previewUrl || d.url,
|
|
526
526
|
fit: "cover",
|
|
527
527
|
class: "img"
|
|
528
528
|
}, null, 8, ["src"]),
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
529
|
+
d.status === "uploading" ? (c(), g("div", zt, [
|
|
530
|
+
_("div", Et, [
|
|
531
|
+
U(p, {
|
|
532
532
|
type: "circle",
|
|
533
|
-
percentage:
|
|
533
|
+
percentage: d.percent,
|
|
534
534
|
width: 30,
|
|
535
535
|
"stroke-width": 3,
|
|
536
536
|
"show-text": !1,
|
|
537
537
|
color: "var(--mg-primary, #ff5722)"
|
|
538
538
|
}, null, 8, ["percentage"]),
|
|
539
|
-
|
|
539
|
+
_("span", jt, D(d.percent) + "%", 1)
|
|
540
540
|
])
|
|
541
|
-
])) :
|
|
542
|
-
|
|
541
|
+
])) : d.status === "fail" ? (c(), g("div", Kt, [
|
|
542
|
+
U(b, {
|
|
543
543
|
class: "fail-icon",
|
|
544
544
|
size: 16
|
|
545
545
|
}, {
|
|
546
|
-
default:
|
|
547
|
-
|
|
546
|
+
default: $(() => [
|
|
547
|
+
U(N)
|
|
548
548
|
]),
|
|
549
549
|
_: 1
|
|
550
550
|
}),
|
|
551
|
-
t[5] || (t[5] =
|
|
552
|
-
|
|
551
|
+
t[5] || (t[5] = _("span", { class: "fail-text" }, "失败", -1)),
|
|
552
|
+
U(b, {
|
|
553
553
|
class: "remove-icon",
|
|
554
554
|
size: 14,
|
|
555
555
|
title: "删除",
|
|
556
|
-
onClick:
|
|
556
|
+
onClick: he((P) => o.removeImg(F), ["stop"])
|
|
557
557
|
}, {
|
|
558
|
-
default:
|
|
559
|
-
|
|
558
|
+
default: $(() => [
|
|
559
|
+
U(S)
|
|
560
560
|
]),
|
|
561
561
|
_: 1
|
|
562
562
|
}, 8, ["onClick"])
|
|
563
|
-
])) : (
|
|
563
|
+
])) : (c(), g("div", {
|
|
564
564
|
key: 2,
|
|
565
565
|
class: "status-mask is-success",
|
|
566
|
-
onClick: (
|
|
566
|
+
onClick: (P) => o.removeImg(F)
|
|
567
567
|
}, [
|
|
568
|
-
|
|
568
|
+
U(b, {
|
|
569
569
|
class: "remove-icon",
|
|
570
570
|
size: 16
|
|
571
571
|
}, {
|
|
572
|
-
default:
|
|
573
|
-
|
|
572
|
+
default: $(() => [
|
|
573
|
+
U(S)
|
|
574
574
|
]),
|
|
575
575
|
_: 1
|
|
576
576
|
})
|
|
577
577
|
], 8, Wt))
|
|
578
578
|
], 6))), 128)),
|
|
579
|
-
|
|
579
|
+
ae(_("div", {
|
|
580
580
|
class: "image-box upload-btn",
|
|
581
|
-
style:
|
|
582
|
-
onClick: t[1] || (t[1] = (...
|
|
581
|
+
style: ue(n.imageStyle),
|
|
582
|
+
onClick: t[1] || (t[1] = (...d) => o.handleUpload && o.handleUpload(...d))
|
|
583
583
|
}, [
|
|
584
|
-
|
|
584
|
+
U(b, {
|
|
585
585
|
class: "icon",
|
|
586
586
|
size: 14
|
|
587
587
|
}, {
|
|
588
|
-
default:
|
|
589
|
-
|
|
588
|
+
default: $(() => [
|
|
589
|
+
U(T)
|
|
590
590
|
]),
|
|
591
591
|
_: 1
|
|
592
592
|
}),
|
|
593
|
-
t[6] || (t[6] =
|
|
593
|
+
t[6] || (t[6] = _("div", null, "上传图片", -1))
|
|
594
594
|
], 4), [
|
|
595
|
-
[
|
|
595
|
+
[re, o.showUploadBtn]
|
|
596
596
|
])
|
|
597
597
|
]),
|
|
598
|
-
|
|
598
|
+
U(u, {
|
|
599
599
|
modelValue: s.dialogVisible,
|
|
600
|
-
"onUpdate:modelValue": t[4] || (t[4] = (
|
|
600
|
+
"onUpdate:modelValue": t[4] || (t[4] = (d) => s.dialogVisible = d),
|
|
601
601
|
title: "裁剪图片",
|
|
602
602
|
width: "650px",
|
|
603
603
|
top: "5vh",
|
|
@@ -606,66 +606,66 @@ function Qt(e, t, n, r, s, o) {
|
|
|
606
606
|
"close-on-click-modal": !1,
|
|
607
607
|
onClose: o.handleBack
|
|
608
608
|
}, {
|
|
609
|
-
footer:
|
|
610
|
-
n.isDegree ? (
|
|
611
|
-
|
|
612
|
-
onClick: t[2] || (t[2] = (
|
|
609
|
+
footer: $(() => [
|
|
610
|
+
n.isDegree ? (c(), g("div", Xt, [
|
|
611
|
+
U(f, {
|
|
612
|
+
onClick: t[2] || (t[2] = (d) => o.rotate(-n.degree))
|
|
613
613
|
}, {
|
|
614
|
-
default:
|
|
615
|
-
|
|
614
|
+
default: $(() => [...t[7] || (t[7] = [
|
|
615
|
+
q("向左旋转", -1)
|
|
616
616
|
])]),
|
|
617
617
|
_: 1
|
|
618
618
|
}),
|
|
619
|
-
|
|
620
|
-
onClick: t[3] || (t[3] = (
|
|
619
|
+
U(f, {
|
|
620
|
+
onClick: t[3] || (t[3] = (d) => o.rotate(n.degree))
|
|
621
621
|
}, {
|
|
622
|
-
default:
|
|
623
|
-
|
|
622
|
+
default: $(() => [...t[8] || (t[8] = [
|
|
623
|
+
q("向右旋转", -1)
|
|
624
624
|
])]),
|
|
625
625
|
_: 1
|
|
626
626
|
})
|
|
627
|
-
])) :
|
|
628
|
-
|
|
629
|
-
|
|
627
|
+
])) : I("", !0),
|
|
628
|
+
_("div", Jt, [
|
|
629
|
+
U(f, {
|
|
630
630
|
type: "primary",
|
|
631
631
|
onClick: o.openFilePicker
|
|
632
632
|
}, {
|
|
633
|
-
default:
|
|
634
|
-
|
|
633
|
+
default: $(() => [
|
|
634
|
+
q(D(s.cropImageUrl ? "重新上传" : "点击上传"), 1)
|
|
635
635
|
]),
|
|
636
636
|
_: 1
|
|
637
637
|
}, 8, ["onClick"]),
|
|
638
|
-
|
|
638
|
+
U(f, {
|
|
639
639
|
type: "primary",
|
|
640
640
|
onClick: o.confirmCrop
|
|
641
641
|
}, {
|
|
642
|
-
default:
|
|
643
|
-
|
|
642
|
+
default: $(() => [...t[9] || (t[9] = [
|
|
643
|
+
q("确定", -1)
|
|
644
644
|
])]),
|
|
645
645
|
_: 1
|
|
646
646
|
}, 8, ["onClick"])
|
|
647
647
|
])
|
|
648
648
|
]),
|
|
649
|
-
default:
|
|
650
|
-
|
|
651
|
-
|
|
649
|
+
default: $(() => [
|
|
650
|
+
_("div", Yt, [
|
|
651
|
+
ae(_("img", {
|
|
652
652
|
ref: "cropImage",
|
|
653
653
|
src: s.cropImageUrl,
|
|
654
654
|
class: "cropper-img"
|
|
655
655
|
}, null, 8, qt), [
|
|
656
|
-
[
|
|
656
|
+
[re, s.cropImageUrl]
|
|
657
657
|
]),
|
|
658
|
-
s.cropImageUrl ?
|
|
658
|
+
s.cropImageUrl ? I("", !0) : (c(), g("div", Gt, "请选择图片后进行裁剪"))
|
|
659
659
|
])
|
|
660
660
|
]),
|
|
661
661
|
_: 1
|
|
662
662
|
}, 8, ["modelValue", "onClose"])
|
|
663
663
|
]);
|
|
664
664
|
}
|
|
665
|
-
const Zt = /* @__PURE__ */
|
|
666
|
-
let
|
|
667
|
-
function
|
|
668
|
-
return
|
|
665
|
+
const Zt = /* @__PURE__ */ ne(Dt, [["render", Qt], ["__scopeId", "data-v-68531340"]]), en = ".mp4,.mov,.jpg,.jpeg,.m3u8,.png,.m4v,.doc,.docx,.xls,.xlsx,.pdf";
|
|
666
|
+
let Oe = 0;
|
|
667
|
+
function xe() {
|
|
668
|
+
return Oe += 1, `mg-file-${Date.now()}-${Oe}`;
|
|
669
669
|
}
|
|
670
670
|
function tn(e) {
|
|
671
671
|
return Array.isArray(e) ? e.filter(Boolean) : e ? [e] : [];
|
|
@@ -674,10 +674,10 @@ function nn(e) {
|
|
|
674
674
|
return Array.isArray(e) ? e.map((t) => {
|
|
675
675
|
if (!t) return null;
|
|
676
676
|
if (typeof t == "string")
|
|
677
|
-
return { fileName:
|
|
677
|
+
return { fileName: ce(t), fileUrl: t };
|
|
678
678
|
const n = t.fileUrl || t.url || "";
|
|
679
679
|
return n ? {
|
|
680
|
-
fileName: t.fileName || t.name ||
|
|
680
|
+
fileName: t.fileName || t.name || ce(n),
|
|
681
681
|
fileUrl: n
|
|
682
682
|
} : null;
|
|
683
683
|
}).filter(Boolean) : [];
|
|
@@ -688,17 +688,17 @@ function ln(e = [], t = []) {
|
|
|
688
688
|
return n.fileUrl === s.fileUrl && n.fileName === s.fileName;
|
|
689
689
|
});
|
|
690
690
|
}
|
|
691
|
-
function
|
|
691
|
+
function ce(e = "") {
|
|
692
692
|
try {
|
|
693
693
|
return decodeURIComponent(String(e).split("?")[0]).split("/").filter(Boolean).pop() || "file";
|
|
694
694
|
} catch {
|
|
695
695
|
return "file";
|
|
696
696
|
}
|
|
697
697
|
}
|
|
698
|
-
function
|
|
698
|
+
function Ve(e) {
|
|
699
699
|
return e.map((t) => ({
|
|
700
|
-
uid:
|
|
701
|
-
name:
|
|
700
|
+
uid: xe(),
|
|
701
|
+
name: ce(t),
|
|
702
702
|
url: t,
|
|
703
703
|
status: "success",
|
|
704
704
|
percent: 100,
|
|
@@ -707,8 +707,8 @@ function De(e) {
|
|
|
707
707
|
}
|
|
708
708
|
function sn(e = []) {
|
|
709
709
|
return e.map((t) => ({
|
|
710
|
-
uid:
|
|
711
|
-
name: t.fileName ||
|
|
710
|
+
uid: xe(),
|
|
711
|
+
name: t.fileName || ce(t.fileUrl),
|
|
712
712
|
url: t.fileUrl,
|
|
713
713
|
status: "success",
|
|
714
714
|
percent: 100,
|
|
@@ -721,8 +721,8 @@ function an(e = "") {
|
|
|
721
721
|
}
|
|
722
722
|
const rn = {
|
|
723
723
|
name: "MgFileUpload",
|
|
724
|
-
mixins: [
|
|
725
|
-
components: { CircleCheck: pt, CircleClose:
|
|
724
|
+
mixins: [qe],
|
|
725
|
+
components: { CircleCheck: pt, CircleClose: Ie, Close: dt, Document: ct },
|
|
726
726
|
props: {
|
|
727
727
|
/** v-model:valueFormat=url 时为 string[];valueFormat=file 时为 { fileName, fileUrl }[] */
|
|
728
728
|
modelValue: { type: [Array, String], default: () => [] },
|
|
@@ -798,7 +798,7 @@ const rn = {
|
|
|
798
798
|
deep: !0,
|
|
799
799
|
immediate: !0,
|
|
800
800
|
handler(e) {
|
|
801
|
-
e != null && e.length && (this.fileList =
|
|
801
|
+
e != null && e.length && (this.fileList = Ve(e));
|
|
802
802
|
}
|
|
803
803
|
},
|
|
804
804
|
modelValue: {
|
|
@@ -813,7 +813,7 @@ const rn = {
|
|
|
813
813
|
return;
|
|
814
814
|
}
|
|
815
815
|
const t = tn(e), n = this.successUrls;
|
|
816
|
-
t.length === n.length && t.every((s, o) => s === n[o]) || (this.fileList =
|
|
816
|
+
t.length === n.length && t.every((s, o) => s === n[o]) || (this.fileList = Ve(t));
|
|
817
817
|
}
|
|
818
818
|
}
|
|
819
819
|
},
|
|
@@ -832,7 +832,7 @@ const rn = {
|
|
|
832
832
|
handleUpload() {
|
|
833
833
|
if (!this.disabled) {
|
|
834
834
|
if (this.fileList.length >= this.fileNum) {
|
|
835
|
-
|
|
835
|
+
G.error(`文件数量不超过${this.fileNum}`);
|
|
836
836
|
return;
|
|
837
837
|
}
|
|
838
838
|
this.openFilePicker();
|
|
@@ -847,7 +847,7 @@ const rn = {
|
|
|
847
847
|
if (!t.length || this.disabled) return;
|
|
848
848
|
const n = this.fileNum - this.fileList.length;
|
|
849
849
|
if (t.length > n && !(this.resetFilelist || this.fileNum === 1)) {
|
|
850
|
-
|
|
850
|
+
G.error(`文件数量不超过${this.fileNum}个`);
|
|
851
851
|
return;
|
|
852
852
|
}
|
|
853
853
|
const r = [], s = [];
|
|
@@ -855,7 +855,7 @@ const rn = {
|
|
|
855
855
|
this.acceptList.includes(an(o.name)) ? r.push(o) : s.push(o);
|
|
856
856
|
}), s.length) {
|
|
857
857
|
const o = s.map((m) => m.name).join(",");
|
|
858
|
-
|
|
858
|
+
Ae.confirm(
|
|
859
859
|
`已过滤以下 ${s.length} 个不符合要求的文件:<br/><p style="color:#f56c6c;font-size:12px;">${o}</p><br/>只接受:${this.acceptList.join("/")}`,
|
|
860
860
|
"提示",
|
|
861
861
|
{
|
|
@@ -874,11 +874,11 @@ const rn = {
|
|
|
874
874
|
const t = this.maxFileSize * 1024 * 1024, n = [];
|
|
875
875
|
return e.forEach((r) => {
|
|
876
876
|
if (r.size > t) {
|
|
877
|
-
|
|
877
|
+
G.error(`「${r.name}」超出 ${this.maxFileSize}MB 限制`);
|
|
878
878
|
return;
|
|
879
879
|
}
|
|
880
880
|
const s = {
|
|
881
|
-
uid:
|
|
881
|
+
uid: xe(),
|
|
882
882
|
name: r.name,
|
|
883
883
|
url: "",
|
|
884
884
|
status: "uploading",
|
|
@@ -896,14 +896,14 @@ const rn = {
|
|
|
896
896
|
this.activeUploadCount += 1, this.$emit("update:uploading", !0);
|
|
897
897
|
try {
|
|
898
898
|
t(0);
|
|
899
|
-
const n = await
|
|
899
|
+
const n = await Ye({
|
|
900
900
|
file: e.raw,
|
|
901
901
|
dir: this.getDir(),
|
|
902
902
|
onProgress: t
|
|
903
903
|
});
|
|
904
|
-
e.url = n.url, e.name = e.name ||
|
|
904
|
+
e.url = n.url, e.name = e.name || ce(n.url), e.status = "success", t(100), e.raw = null, this.activeUploadCount = Math.max(0, this.activeUploadCount - 1), this.$emit("update:uploading", this.activeUploadCount > 0), this.emitFile(), this.$emit("success", n, e);
|
|
905
905
|
} catch (n) {
|
|
906
|
-
e.status = "fail", t(0), this.activeUploadCount = Math.max(0, this.activeUploadCount - 1), this.$emit("update:uploading", this.activeUploadCount > 0),
|
|
906
|
+
e.status = "fail", t(0), this.activeUploadCount = Math.max(0, this.activeUploadCount - 1), this.$emit("update:uploading", this.activeUploadCount > 0), G.error((n == null ? void 0 : n.message) || "上传失败"), this.$emit("error", n, e);
|
|
907
907
|
}
|
|
908
908
|
},
|
|
909
909
|
onFileClick(e) {
|
|
@@ -928,98 +928,98 @@ const rn = {
|
|
|
928
928
|
class: "mg-file-item__percent"
|
|
929
929
|
}, gn = ["onClick"];
|
|
930
930
|
function yn(e, t, n, r, s, o) {
|
|
931
|
-
const m =
|
|
932
|
-
return
|
|
933
|
-
|
|
931
|
+
const m = L("el-button"), p = L("Document"), N = L("el-icon"), b = L("CircleCheck"), S = L("CircleClose"), T = L("Close"), f = L("el-progress");
|
|
932
|
+
return c(), g("div", on, [
|
|
933
|
+
_("input", {
|
|
934
934
|
ref: "fileInput",
|
|
935
935
|
type: "file",
|
|
936
936
|
class: "file-input",
|
|
937
937
|
multiple: o.multiple,
|
|
938
938
|
accept: n.accept,
|
|
939
939
|
disabled: n.disabled,
|
|
940
|
-
onChange: t[0] || (t[0] = (...
|
|
940
|
+
onChange: t[0] || (t[0] = (...u) => o.onFileChange && o.onFileChange(...u))
|
|
941
941
|
}, null, 40, un),
|
|
942
|
-
n.showButton ? (
|
|
942
|
+
n.showButton ? (c(), O(m, {
|
|
943
943
|
key: 0,
|
|
944
944
|
type: "primary",
|
|
945
945
|
disabled: n.disabled || !o.showUploadBtn,
|
|
946
946
|
onClick: o.handleUpload
|
|
947
947
|
}, {
|
|
948
|
-
default:
|
|
949
|
-
|
|
948
|
+
default: $(() => [
|
|
949
|
+
q(D(n.buttonText), 1)
|
|
950
950
|
]),
|
|
951
951
|
_: 1
|
|
952
|
-
}, 8, ["disabled", "onClick"])) :
|
|
953
|
-
o.tipText ? (
|
|
954
|
-
n.showFileList ? (
|
|
955
|
-
(
|
|
956
|
-
key:
|
|
957
|
-
class:
|
|
952
|
+
}, 8, ["disabled", "onClick"])) : I("", !0),
|
|
953
|
+
o.tipText ? (c(), g("div", cn, D(o.tipText), 1)) : I("", !0),
|
|
954
|
+
n.showFileList ? (c(), g("ul", dn, [
|
|
955
|
+
(c(!0), g(J, null, ee(s.fileList, (u, d) => (c(), g("li", {
|
|
956
|
+
key: u.uid,
|
|
957
|
+
class: W(["mg-file-item", [`is-${u.status}`]])
|
|
958
958
|
}, [
|
|
959
|
-
|
|
960
|
-
|
|
959
|
+
_("div", pn, [
|
|
960
|
+
_("a", {
|
|
961
961
|
class: "mg-file-item__name",
|
|
962
|
-
href:
|
|
963
|
-
target:
|
|
962
|
+
href: u.url || void 0,
|
|
963
|
+
target: u.url ? "_blank" : void 0,
|
|
964
964
|
rel: "noopener noreferrer",
|
|
965
|
-
onClick:
|
|
965
|
+
onClick: he((F) => o.onFileClick(u), ["prevent"])
|
|
966
966
|
}, [
|
|
967
|
-
|
|
968
|
-
default:
|
|
969
|
-
|
|
967
|
+
U(N, { class: "mg-file-item__doc" }, {
|
|
968
|
+
default: $(() => [
|
|
969
|
+
U(p)
|
|
970
970
|
]),
|
|
971
971
|
_: 1
|
|
972
972
|
}),
|
|
973
|
-
|
|
973
|
+
_("span", {
|
|
974
974
|
class: "mg-file-item__text",
|
|
975
|
-
title:
|
|
976
|
-
},
|
|
975
|
+
title: u.name
|
|
976
|
+
}, D(u.name), 9, hn)
|
|
977
977
|
], 8, fn),
|
|
978
|
-
|
|
978
|
+
u.status === "uploading" ? (c(), g("span", mn, D(u.percent) + "% ", 1)) : u.status === "success" ? (c(), O(N, {
|
|
979
979
|
key: 1,
|
|
980
980
|
class: "mg-file-item__status is-success"
|
|
981
981
|
}, {
|
|
982
|
-
default:
|
|
983
|
-
|
|
982
|
+
default: $(() => [
|
|
983
|
+
U(b)
|
|
984
984
|
]),
|
|
985
985
|
_: 1
|
|
986
|
-
})) :
|
|
986
|
+
})) : u.status === "fail" ? (c(), O(N, {
|
|
987
987
|
key: 2,
|
|
988
988
|
class: "mg-file-item__status is-fail"
|
|
989
989
|
}, {
|
|
990
|
-
default:
|
|
991
|
-
|
|
990
|
+
default: $(() => [
|
|
991
|
+
U(S)
|
|
992
992
|
]),
|
|
993
993
|
_: 1
|
|
994
|
-
})) :
|
|
995
|
-
|
|
994
|
+
})) : I("", !0),
|
|
995
|
+
u.status !== "uploading" ? (c(), g("button", {
|
|
996
996
|
key: 3,
|
|
997
997
|
type: "button",
|
|
998
998
|
class: "mg-file-item__remove",
|
|
999
999
|
title: "删除",
|
|
1000
|
-
onClick:
|
|
1000
|
+
onClick: he((F) => o.removeFile(d), ["stop"])
|
|
1001
1001
|
}, [
|
|
1002
|
-
|
|
1003
|
-
default:
|
|
1004
|
-
|
|
1002
|
+
U(N, { size: 14 }, {
|
|
1003
|
+
default: $(() => [
|
|
1004
|
+
U(T)
|
|
1005
1005
|
]),
|
|
1006
1006
|
_: 1
|
|
1007
1007
|
})
|
|
1008
|
-
], 8, gn)) :
|
|
1008
|
+
], 8, gn)) : I("", !0)
|
|
1009
1009
|
]),
|
|
1010
|
-
|
|
1010
|
+
u.status === "uploading" ? (c(), O(f, {
|
|
1011
1011
|
key: 0,
|
|
1012
1012
|
class: "mg-file-item__progress",
|
|
1013
1013
|
type: "line",
|
|
1014
|
-
percentage:
|
|
1014
|
+
percentage: u.percent,
|
|
1015
1015
|
"stroke-width": 4,
|
|
1016
1016
|
"show-text": !1
|
|
1017
|
-
}, null, 8, ["percentage"])) :
|
|
1017
|
+
}, null, 8, ["percentage"])) : I("", !0)
|
|
1018
1018
|
], 2))), 128))
|
|
1019
|
-
])) :
|
|
1019
|
+
])) : I("", !0)
|
|
1020
1020
|
]);
|
|
1021
1021
|
}
|
|
1022
|
-
const vn = /* @__PURE__ */
|
|
1022
|
+
const vn = /* @__PURE__ */ ne(rn, [["render", yn], ["__scopeId", "data-v-8ca1b0c0"]]), bn = {
|
|
1023
1023
|
__name: "DateRangePicker",
|
|
1024
1024
|
props: {
|
|
1025
1025
|
start: {
|
|
@@ -1051,80 +1051,80 @@ const vn = /* @__PURE__ */ X(rn, [["render", yn], ["__scopeId", "data-v-8ca1b0c0
|
|
|
1051
1051
|
emits: ["update:start", "update:end", "change"],
|
|
1052
1052
|
setup(e, { emit: t }) {
|
|
1053
1053
|
const n = t, r = e;
|
|
1054
|
-
function s(
|
|
1055
|
-
const
|
|
1056
|
-
return
|
|
1054
|
+
function s(f) {
|
|
1055
|
+
const u = new Date(f);
|
|
1056
|
+
return u.setHours(0, 0, 0, 0), u;
|
|
1057
1057
|
}
|
|
1058
|
-
function o(
|
|
1059
|
-
const
|
|
1060
|
-
return
|
|
1058
|
+
function o(f) {
|
|
1059
|
+
const u = new Date(f);
|
|
1060
|
+
return u.setHours(23, 59, 59, 0), u;
|
|
1061
1061
|
}
|
|
1062
|
-
function m(
|
|
1063
|
-
const
|
|
1064
|
-
return
|
|
1062
|
+
function m(f) {
|
|
1063
|
+
const u = o(/* @__PURE__ */ new Date()), d = s(/* @__PURE__ */ new Date());
|
|
1064
|
+
return f(d), [d, u];
|
|
1065
1065
|
}
|
|
1066
|
-
const
|
|
1066
|
+
const p = [
|
|
1067
1067
|
{
|
|
1068
1068
|
text: "七天内",
|
|
1069
|
-
value: () => m((
|
|
1070
|
-
|
|
1069
|
+
value: () => m((f) => {
|
|
1070
|
+
f.setDate(f.getDate() - 6);
|
|
1071
1071
|
})
|
|
1072
1072
|
},
|
|
1073
1073
|
{
|
|
1074
1074
|
text: "一个月内",
|
|
1075
|
-
value: () => m((
|
|
1076
|
-
|
|
1075
|
+
value: () => m((f) => {
|
|
1076
|
+
f.setMonth(f.getMonth() - 1);
|
|
1077
1077
|
})
|
|
1078
1078
|
},
|
|
1079
1079
|
{
|
|
1080
1080
|
text: "一年内",
|
|
1081
|
-
value: () => m((
|
|
1082
|
-
|
|
1081
|
+
value: () => m((f) => {
|
|
1082
|
+
f.setFullYear(f.getFullYear() - 1);
|
|
1083
1083
|
})
|
|
1084
1084
|
}
|
|
1085
|
-
],
|
|
1086
|
-
var
|
|
1085
|
+
], N = me(() => {
|
|
1086
|
+
var f;
|
|
1087
1087
|
if (r.showShortcuts)
|
|
1088
|
-
return (
|
|
1089
|
-
}),
|
|
1090
|
-
function S(
|
|
1091
|
-
if (
|
|
1092
|
-
|
|
1088
|
+
return (f = r.shortcuts) != null && f.length ? r.shortcuts : p;
|
|
1089
|
+
}), b = A([]);
|
|
1090
|
+
function S(f, u) {
|
|
1091
|
+
if (f && u) {
|
|
1092
|
+
b.value = [f, u];
|
|
1093
1093
|
return;
|
|
1094
1094
|
}
|
|
1095
|
-
|
|
1095
|
+
b.value = [];
|
|
1096
1096
|
}
|
|
1097
|
-
|
|
1097
|
+
te(
|
|
1098
1098
|
() => [r.start, r.end],
|
|
1099
|
-
([
|
|
1100
|
-
S(
|
|
1099
|
+
([f, u]) => {
|
|
1100
|
+
S(f, u);
|
|
1101
1101
|
}
|
|
1102
|
-
),
|
|
1102
|
+
), ge(() => {
|
|
1103
1103
|
S(r.start, r.end);
|
|
1104
1104
|
});
|
|
1105
|
-
function T(
|
|
1106
|
-
const
|
|
1107
|
-
|
|
1105
|
+
function T(f) {
|
|
1106
|
+
const u = Array.isArray(f) ? f[0] : "", d = Array.isArray(f) ? f[1] : "";
|
|
1107
|
+
u && d ? (n("update:start", u), n("update:end", d)) : (n("update:start", ""), n("update:end", "")), n("change");
|
|
1108
1108
|
}
|
|
1109
|
-
return (
|
|
1110
|
-
const
|
|
1111
|
-
return
|
|
1112
|
-
modelValue:
|
|
1113
|
-
"onUpdate:modelValue":
|
|
1109
|
+
return (f, u) => {
|
|
1110
|
+
const d = L("el-date-picker");
|
|
1111
|
+
return c(), O(d, {
|
|
1112
|
+
modelValue: b.value,
|
|
1113
|
+
"onUpdate:modelValue": u[0] || (u[0] = (F) => b.value = F),
|
|
1114
1114
|
type: e.type,
|
|
1115
1115
|
"range-separator": "至",
|
|
1116
1116
|
"start-placeholder": e.title ? `${e.title} 开始` : "开始",
|
|
1117
1117
|
"end-placeholder": "结束",
|
|
1118
1118
|
"value-format": e.valueFormat,
|
|
1119
1119
|
"default-time": e.defaultTime,
|
|
1120
|
-
shortcuts:
|
|
1120
|
+
shortcuts: N.value,
|
|
1121
1121
|
class: "date-range-picker",
|
|
1122
1122
|
onChange: T,
|
|
1123
1123
|
clearable: e.canClearable
|
|
1124
1124
|
}, null, 8, ["modelValue", "type", "start-placeholder", "value-format", "default-time", "shortcuts", "clearable"]);
|
|
1125
1125
|
};
|
|
1126
1126
|
}
|
|
1127
|
-
},
|
|
1127
|
+
}, Xe = /* @__PURE__ */ ne(bn, [["__scopeId", "data-v-0dfa12ab"]]), _n = { class: "common-search__body" }, wn = { class: "common-search__control-wrap" }, Cn = ["onKeyup"], kn = { class: "common-search__range-sep" }, Un = {
|
|
1128
1128
|
key: 5,
|
|
1129
1129
|
class: "common-search__range"
|
|
1130
1130
|
}, xn = {
|
|
@@ -1138,272 +1138,272 @@ const vn = /* @__PURE__ */ X(rn, [["render", yn], ["__scopeId", "data-v-8ca1b0c0
|
|
|
1138
1138
|
},
|
|
1139
1139
|
emits: ["change", "search", "reset", "update:modelValue"],
|
|
1140
1140
|
setup(e, { emit: t }) {
|
|
1141
|
-
const n = e, r = t, s =
|
|
1142
|
-
let
|
|
1143
|
-
function
|
|
1144
|
-
return JSON.stringify(l ?? {}) === JSON.stringify(
|
|
1141
|
+
const n = e, r = t, s = A({}), o = Me({}), m = Me({});
|
|
1142
|
+
let p = !1;
|
|
1143
|
+
function N(l, i) {
|
|
1144
|
+
return JSON.stringify(l ?? {}) === JSON.stringify(i ?? {});
|
|
1145
1145
|
}
|
|
1146
|
-
const
|
|
1147
|
-
let
|
|
1148
|
-
const
|
|
1149
|
-
if (!(!T.value ||
|
|
1146
|
+
const b = A(null), S = A(!1), T = A(!1), f = A(0), u = A(0), d = A(0), F = A(null);
|
|
1147
|
+
let P = null, H = !1, V = !1;
|
|
1148
|
+
const y = me(() => {
|
|
1149
|
+
if (!(!T.value || F.value == null))
|
|
1150
1150
|
return {
|
|
1151
|
-
maxHeight: `${
|
|
1151
|
+
maxHeight: `${F.value}px`,
|
|
1152
1152
|
overflow: "hidden"
|
|
1153
1153
|
};
|
|
1154
1154
|
});
|
|
1155
|
-
function
|
|
1155
|
+
function x(l = {}) {
|
|
1156
1156
|
return String(l.label || l.title || "").trim();
|
|
1157
1157
|
}
|
|
1158
|
-
function
|
|
1159
|
-
return String(l.tip ||
|
|
1158
|
+
function M(l = {}) {
|
|
1159
|
+
return String(l.tip || x(l) || "").trim();
|
|
1160
1160
|
}
|
|
1161
|
-
function
|
|
1162
|
-
const
|
|
1163
|
-
return !
|
|
1161
|
+
function B(l = "") {
|
|
1162
|
+
const i = String(l).trim();
|
|
1163
|
+
return !i || (/* @__PURE__ */ new Set(["全部", "或选择", "请输入或选择"])).has(i) ? "" : i.replace(/^请(输入|选择)/, "").trim() || i;
|
|
1164
1164
|
}
|
|
1165
|
-
function
|
|
1165
|
+
function z(l = {}, i = "") {
|
|
1166
1166
|
if (l.placeholder != null && l.placeholder !== "") {
|
|
1167
|
-
const
|
|
1168
|
-
if (
|
|
1167
|
+
const k = B(l.placeholder);
|
|
1168
|
+
if (k) return k;
|
|
1169
1169
|
}
|
|
1170
|
-
const
|
|
1171
|
-
return
|
|
1170
|
+
const h = x(l);
|
|
1171
|
+
return h || B(i) || i;
|
|
1172
1172
|
}
|
|
1173
|
-
function
|
|
1174
|
-
const
|
|
1175
|
-
return
|
|
1173
|
+
function w(l = {}, i = "min") {
|
|
1174
|
+
const h = i === "min" ? l.minPlaceholder : l.maxPlaceholder, C = x(l), k = i === "min" ? "最小值" : "最大值", R = /* @__PURE__ */ new Set(["最小", "最大", "最小值", "最大值"]);
|
|
1175
|
+
return h != null && h !== "" ? C && R.has(String(h).trim()) ? `${C}${h}` : h : C ? `${C}${k}` : k;
|
|
1176
1176
|
}
|
|
1177
|
-
|
|
1177
|
+
te(
|
|
1178
1178
|
() => n.modelValue,
|
|
1179
1179
|
(l) => {
|
|
1180
|
-
|
|
1181
|
-
|
|
1180
|
+
N(l, s.value) || (p = !0, s.value = { ...l || {} }, X(() => {
|
|
1181
|
+
p = !1;
|
|
1182
1182
|
}));
|
|
1183
1183
|
},
|
|
1184
1184
|
{ deep: !0, immediate: !0 }
|
|
1185
|
-
),
|
|
1185
|
+
), te(
|
|
1186
1186
|
s,
|
|
1187
1187
|
() => {
|
|
1188
|
-
|
|
1188
|
+
p || r("update:modelValue", { ...s.value });
|
|
1189
1189
|
},
|
|
1190
1190
|
{ deep: !0 }
|
|
1191
|
-
),
|
|
1191
|
+
), te(
|
|
1192
1192
|
() => n.itemList,
|
|
1193
1193
|
() => {
|
|
1194
|
-
S.value = !1,
|
|
1194
|
+
S.value = !1, f.value = 0, X(() => le());
|
|
1195
1195
|
},
|
|
1196
1196
|
{ deep: !0 }
|
|
1197
|
-
),
|
|
1198
|
-
|
|
1199
|
-
!
|
|
1200
|
-
}),
|
|
1201
|
-
}),
|
|
1202
|
-
|
|
1197
|
+
), ge(() => {
|
|
1198
|
+
X(() => le()), typeof ResizeObserver < "u" && (P = new ResizeObserver(() => {
|
|
1199
|
+
!H && !V && le();
|
|
1200
|
+
}), b.value && P.observe(b.value)), window.addEventListener("resize", Q);
|
|
1201
|
+
}), Ce(() => {
|
|
1202
|
+
P == null || P.disconnect(), window.removeEventListener("resize", Q);
|
|
1203
1203
|
});
|
|
1204
|
-
function
|
|
1205
|
-
!
|
|
1204
|
+
function Q() {
|
|
1205
|
+
!H && !V && le();
|
|
1206
1206
|
}
|
|
1207
|
-
function
|
|
1208
|
-
const
|
|
1209
|
-
if (!
|
|
1210
|
-
const
|
|
1211
|
-
return l === Math.min(
|
|
1207
|
+
function E(l) {
|
|
1208
|
+
const i = n.itemList.length;
|
|
1209
|
+
if (!i) return !1;
|
|
1210
|
+
const h = f.value > 0 ? f.value : i;
|
|
1211
|
+
return l === Math.min(h, i) - 1;
|
|
1212
1212
|
}
|
|
1213
|
-
function Qe(l,
|
|
1214
|
-
let
|
|
1215
|
-
for (let
|
|
1216
|
-
const
|
|
1217
|
-
|
|
1213
|
+
function Qe(l, i, h, C) {
|
|
1214
|
+
let k = 1, R = l[i].offsetWidth;
|
|
1215
|
+
for (let j = i + 1; j < l.length; j += 1) {
|
|
1216
|
+
const K = l[j].offsetWidth;
|
|
1217
|
+
R + C + K > h ? (k += 1, R = K) : R += C + K;
|
|
1218
1218
|
}
|
|
1219
|
-
return
|
|
1219
|
+
return k;
|
|
1220
1220
|
}
|
|
1221
|
-
function Ze(l,
|
|
1222
|
-
let
|
|
1223
|
-
for (let
|
|
1224
|
-
const
|
|
1225
|
-
if (
|
|
1226
|
-
|
|
1221
|
+
function Ze(l, i, h, C) {
|
|
1222
|
+
let k = 0, R = 0;
|
|
1223
|
+
for (let j = 0; j < l.length; j += 1) {
|
|
1224
|
+
const K = l[j].offsetWidth, Z = k === 0 ? K : k + C + K;
|
|
1225
|
+
if (Z + C + h <= i)
|
|
1226
|
+
k = Z, R = j + 1;
|
|
1227
1227
|
else
|
|
1228
1228
|
break;
|
|
1229
1229
|
}
|
|
1230
|
-
return
|
|
1230
|
+
return R || 1;
|
|
1231
1231
|
}
|
|
1232
1232
|
function et(l) {
|
|
1233
|
-
const
|
|
1233
|
+
const i = l.type === "number-range" || l.type === "numberRange", h = 360;
|
|
1234
1234
|
if (!l.width) {
|
|
1235
|
-
if (
|
|
1236
|
-
const
|
|
1237
|
-
return { width:
|
|
1235
|
+
if (i) {
|
|
1236
|
+
const R = `${h}px`;
|
|
1237
|
+
return { width: R, minWidth: R };
|
|
1238
1238
|
}
|
|
1239
1239
|
return;
|
|
1240
1240
|
}
|
|
1241
|
-
let
|
|
1242
|
-
const
|
|
1243
|
-
return { width:
|
|
1241
|
+
let C = typeof l.width == "number" ? l.width : parseInt(String(l.width), 10);
|
|
1242
|
+
const k = typeof l.width == "number" || Number.isFinite(C) ? `${C}px` : l.width;
|
|
1243
|
+
return { width: k, minWidth: k };
|
|
1244
1244
|
}
|
|
1245
|
-
function
|
|
1245
|
+
function Se(l, i) {
|
|
1246
1246
|
if (l == null) return "";
|
|
1247
1247
|
if (typeof l != "object") return String(l);
|
|
1248
|
-
const
|
|
1249
|
-
return typeof
|
|
1248
|
+
const h = i.optionsLabel || "label";
|
|
1249
|
+
return typeof h == "string" ? l[h] : Array.isArray(h) ? `${l[h[0]]}(${l[h[1]]})` : l.label;
|
|
1250
1250
|
}
|
|
1251
|
-
function
|
|
1252
|
-
return l == null || typeof l != "object" ? l : l[
|
|
1251
|
+
function de(l, i) {
|
|
1252
|
+
return l == null || typeof l != "object" ? l : l[i.optionsValue || "value"];
|
|
1253
1253
|
}
|
|
1254
|
-
function
|
|
1254
|
+
function ye(l) {
|
|
1255
1255
|
return {
|
|
1256
1256
|
startKey: l.start || `${l.prop}Min`,
|
|
1257
1257
|
endKey: l.end || `${l.prop}Max`
|
|
1258
1258
|
};
|
|
1259
1259
|
}
|
|
1260
|
-
function
|
|
1260
|
+
function Fe(l, i = 2) {
|
|
1261
1261
|
if (l == null || l === "") return;
|
|
1262
|
-
const
|
|
1263
|
-
if (
|
|
1264
|
-
const
|
|
1265
|
-
return Number.isFinite(
|
|
1262
|
+
const h = He(l, i);
|
|
1263
|
+
if (h == null || h === "") return;
|
|
1264
|
+
const C = Number(String(h).replace(/,/g, ""));
|
|
1265
|
+
return Number.isFinite(C) ? C : void 0;
|
|
1266
1266
|
}
|
|
1267
|
-
function
|
|
1268
|
-
const { startKey:
|
|
1269
|
-
let
|
|
1270
|
-
|
|
1267
|
+
function ve(l) {
|
|
1268
|
+
const { startKey: i, endKey: h } = ye(l), C = l.precision ?? 2;
|
|
1269
|
+
let k = Fe(s.value[i], C), R = Fe(s.value[h], C);
|
|
1270
|
+
k != null && R != null && k > R && ([k, R] = [R, k]), s.value[i] = k, s.value[h] = R;
|
|
1271
1271
|
}
|
|
1272
1272
|
function tt(l) {
|
|
1273
|
-
|
|
1273
|
+
ve(l), Y();
|
|
1274
1274
|
}
|
|
1275
1275
|
function nt(l) {
|
|
1276
|
-
const { startKey:
|
|
1277
|
-
return
|
|
1276
|
+
const { startKey: i, endKey: h } = ye(l), C = s.value[i], k = s.value[h];
|
|
1277
|
+
return C != null && C !== "" || k != null && k !== "";
|
|
1278
1278
|
}
|
|
1279
1279
|
function lt(l) {
|
|
1280
1280
|
if (l.disabled) return;
|
|
1281
|
-
const { startKey:
|
|
1282
|
-
s.value[
|
|
1281
|
+
const { startKey: i, endKey: h } = ye(l);
|
|
1282
|
+
s.value[i] = void 0, s.value[h] = void 0, Y();
|
|
1283
1283
|
}
|
|
1284
|
-
async function st(l,
|
|
1284
|
+
async function st(l, i) {
|
|
1285
1285
|
if (typeof l.remoteMethod == "function") {
|
|
1286
1286
|
m[l.prop] = !0;
|
|
1287
1287
|
try {
|
|
1288
|
-
const
|
|
1289
|
-
o[l.prop] = Array.isArray(
|
|
1288
|
+
const h = await l.remoteMethod(i);
|
|
1289
|
+
o[l.prop] = Array.isArray(h) ? h : [];
|
|
1290
1290
|
} finally {
|
|
1291
1291
|
m[l.prop] = !1;
|
|
1292
1292
|
}
|
|
1293
1293
|
}
|
|
1294
1294
|
}
|
|
1295
|
-
function
|
|
1296
|
-
const
|
|
1295
|
+
function be(l) {
|
|
1296
|
+
const i = l.style.maxHeight, h = l.style.overflow, C = l.style.transition;
|
|
1297
1297
|
l.style.transition = "none", l.style.maxHeight = "none", l.style.overflow = "visible";
|
|
1298
|
-
const
|
|
1299
|
-
return l.style.maxHeight =
|
|
1298
|
+
const k = l.scrollHeight;
|
|
1299
|
+
return l.style.maxHeight = i, l.style.overflow = h, l.offsetHeight, l.style.transition = C, k;
|
|
1300
1300
|
}
|
|
1301
|
-
function
|
|
1302
|
-
const l =
|
|
1303
|
-
if (!l ||
|
|
1304
|
-
|
|
1305
|
-
const
|
|
1306
|
-
if (!
|
|
1307
|
-
T.value = !1,
|
|
1301
|
+
function le() {
|
|
1302
|
+
const l = b.value;
|
|
1303
|
+
if (!l || H || V) return;
|
|
1304
|
+
H = !0;
|
|
1305
|
+
const i = l.closest(".common-search"), h = Array.from(l.querySelectorAll(".common-search__field")), C = l.querySelector(".common-search__actions");
|
|
1306
|
+
if (!h.length || !i) {
|
|
1307
|
+
T.value = !1, u.value = 0, d.value = 0, F.value = null, f.value = 0, H = !1;
|
|
1308
1308
|
return;
|
|
1309
1309
|
}
|
|
1310
|
-
|
|
1311
|
-
const
|
|
1312
|
-
let
|
|
1313
|
-
|
|
1314
|
-
const
|
|
1315
|
-
|
|
1316
|
-
const a =
|
|
1317
|
-
T.value = a, a ? S.value ?
|
|
1310
|
+
u.value = h[0].offsetHeight, d.value = be(l);
|
|
1311
|
+
const k = 16, R = i.clientWidth, j = (C == null ? void 0 : C.offsetWidth) || 220, K = Ze(h, R, j, k);
|
|
1312
|
+
let Z = 1;
|
|
1313
|
+
h.length > K && (Z += Qe(h, K, R, k));
|
|
1314
|
+
const ie = f.value;
|
|
1315
|
+
f.value = K;
|
|
1316
|
+
const a = Z > 1, pe = T.value;
|
|
1317
|
+
T.value = a, a ? S.value ? F.value = null : F.value = u.value : (S.value = !1, F.value = null), H = !1, (pe !== a || ie !== K) && X(() => le());
|
|
1318
1318
|
}
|
|
1319
1319
|
function at() {
|
|
1320
|
-
const l =
|
|
1321
|
-
if (!l ||
|
|
1322
|
-
|
|
1323
|
-
const
|
|
1320
|
+
const l = b.value;
|
|
1321
|
+
if (!l || V) return;
|
|
1322
|
+
V = !0;
|
|
1323
|
+
const i = l.getBoundingClientRect().height || u.value;
|
|
1324
1324
|
if (S.value)
|
|
1325
|
-
|
|
1325
|
+
F.value = i || be(l), S.value = !1, requestAnimationFrame(() => {
|
|
1326
1326
|
requestAnimationFrame(() => {
|
|
1327
|
-
|
|
1327
|
+
F.value = u.value;
|
|
1328
1328
|
});
|
|
1329
1329
|
});
|
|
1330
1330
|
else {
|
|
1331
|
-
|
|
1332
|
-
const
|
|
1333
|
-
|
|
1331
|
+
F.value = i;
|
|
1332
|
+
const h = be(l);
|
|
1333
|
+
d.value = h, S.value = !0, requestAnimationFrame(() => {
|
|
1334
1334
|
requestAnimationFrame(() => {
|
|
1335
|
-
|
|
1335
|
+
F.value = Math.max(h, u.value || 0);
|
|
1336
1336
|
});
|
|
1337
1337
|
});
|
|
1338
1338
|
}
|
|
1339
1339
|
window.setTimeout(() => {
|
|
1340
|
-
|
|
1340
|
+
V = !1, S.value && (F.value = null), le();
|
|
1341
1341
|
}, 380);
|
|
1342
1342
|
}
|
|
1343
1343
|
function rt() {
|
|
1344
1344
|
const l = {};
|
|
1345
|
-
return n.itemList.forEach((
|
|
1346
|
-
|
|
1345
|
+
return n.itemList.forEach((i) => {
|
|
1346
|
+
i.type === "daterange" || i.type === "dateRange" ? (l[i.start || i.startProp] = void 0, l[i.end || i.endProp] = void 0) : i.type === "number-range" || i.type === "numberRange" ? (l[i.start || `${i.prop}Min`] = void 0, l[i.end || `${i.prop}Max`] = void 0) : i.multiple ? l[i.prop] = [] : i.prop && (l[i.prop] = void 0);
|
|
1347
1347
|
}), l;
|
|
1348
1348
|
}
|
|
1349
|
-
function
|
|
1349
|
+
function $e() {
|
|
1350
1350
|
r("update:modelValue", { ...s.value });
|
|
1351
1351
|
}
|
|
1352
|
-
function
|
|
1353
|
-
|
|
1352
|
+
function Y() {
|
|
1353
|
+
$e(), r("change", { ...s.value }), r("search", { ...s.value });
|
|
1354
1354
|
}
|
|
1355
|
-
function
|
|
1356
|
-
s.value = rt(),
|
|
1355
|
+
function Le() {
|
|
1356
|
+
s.value = rt(), $e(), r("reset", { ...s.value }), r("change", { ...s.value });
|
|
1357
1357
|
}
|
|
1358
|
-
return (l,
|
|
1359
|
-
const
|
|
1360
|
-
return
|
|
1361
|
-
class:
|
|
1358
|
+
return (l, i) => {
|
|
1359
|
+
const h = L("el-input"), C = L("el-option"), k = L("el-select"), R = L("el-input-number"), j = L("el-icon"), K = L("el-date-picker"), Z = L("el-tooltip"), ie = L("el-button");
|
|
1360
|
+
return ae((c(), g("div", {
|
|
1361
|
+
class: W(["common-search", {
|
|
1362
1362
|
"is-single-row": !T.value,
|
|
1363
1363
|
"is-multi-row": T.value,
|
|
1364
1364
|
"is-expanded": T.value && S.value,
|
|
1365
1365
|
"is-collapsed": T.value && !S.value
|
|
1366
1366
|
}])
|
|
1367
1367
|
}, [
|
|
1368
|
-
|
|
1369
|
-
|
|
1368
|
+
_("div", _n, [
|
|
1369
|
+
_("div", {
|
|
1370
1370
|
ref_key: "fieldsRef",
|
|
1371
|
-
ref:
|
|
1371
|
+
ref: b,
|
|
1372
1372
|
class: "common-search__fields",
|
|
1373
|
-
style:
|
|
1373
|
+
style: ue(y.value)
|
|
1374
1374
|
}, [
|
|
1375
|
-
(
|
|
1376
|
-
key: a.prop || a.start ||
|
|
1375
|
+
(c(!0), g(J, null, ee(e.itemList, (a, pe) => (c(), g(J, {
|
|
1376
|
+
key: a.prop || a.start || pe
|
|
1377
1377
|
}, [
|
|
1378
|
-
|
|
1379
|
-
class:
|
|
1380
|
-
style:
|
|
1378
|
+
_("div", {
|
|
1379
|
+
class: W(["common-search__field", [`is-${a.type}`, a.className]]),
|
|
1380
|
+
style: ue(et(a))
|
|
1381
1381
|
}, [
|
|
1382
|
-
|
|
1383
|
-
content:
|
|
1384
|
-
disabled: !
|
|
1382
|
+
U(Z, {
|
|
1383
|
+
content: M(a),
|
|
1384
|
+
disabled: !M(a),
|
|
1385
1385
|
placement: "top",
|
|
1386
1386
|
"show-after": 280
|
|
1387
1387
|
}, {
|
|
1388
|
-
default:
|
|
1389
|
-
|
|
1390
|
-
a.type === "input" || a.type === "text" ? (
|
|
1388
|
+
default: $(() => [
|
|
1389
|
+
_("div", wn, [
|
|
1390
|
+
a.type === "input" || a.type === "text" ? (c(), O(h, {
|
|
1391
1391
|
key: 0,
|
|
1392
1392
|
modelValue: s.value[a.prop],
|
|
1393
1393
|
"onUpdate:modelValue": (v) => s.value[a.prop] = v,
|
|
1394
1394
|
modelModifiers: { trim: !0 },
|
|
1395
1395
|
clearable: "",
|
|
1396
|
-
placeholder:
|
|
1396
|
+
placeholder: z(a, "请输入"),
|
|
1397
1397
|
maxlength: a.maxlength || 200,
|
|
1398
1398
|
disabled: a.disabled,
|
|
1399
1399
|
class: "common-search__control",
|
|
1400
|
-
onKeyup:
|
|
1401
|
-
onClear:
|
|
1402
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder", "maxlength", "disabled"])) : a.type === "select" ? (
|
|
1400
|
+
onKeyup: Pe(Y, ["enter"]),
|
|
1401
|
+
onClear: Y
|
|
1402
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder", "maxlength", "disabled"])) : a.type === "select" ? (c(), O(k, {
|
|
1403
1403
|
key: 1,
|
|
1404
1404
|
modelValue: s.value[a.prop],
|
|
1405
1405
|
"onUpdate:modelValue": (v) => s.value[a.prop] = v,
|
|
1406
|
-
placeholder:
|
|
1406
|
+
placeholder: z(a, "请选择"),
|
|
1407
1407
|
clearable: "",
|
|
1408
1408
|
filterable: a.filterable !== !1,
|
|
1409
1409
|
multiple: a.multiple,
|
|
@@ -1411,22 +1411,22 @@ const vn = /* @__PURE__ */ X(rn, [["render", yn], ["__scopeId", "data-v-8ca1b0c0
|
|
|
1411
1411
|
"collapse-tags-tooltip": a.multiple,
|
|
1412
1412
|
disabled: a.disabled,
|
|
1413
1413
|
class: "common-search__control",
|
|
1414
|
-
onChange:
|
|
1414
|
+
onChange: Y
|
|
1415
1415
|
}, {
|
|
1416
|
-
default:
|
|
1417
|
-
(
|
|
1418
|
-
key: `${
|
|
1419
|
-
label:
|
|
1420
|
-
value:
|
|
1416
|
+
default: $(() => [
|
|
1417
|
+
(c(!0), g(J, null, ee(a.options || [], (v, _e) => (c(), O(C, {
|
|
1418
|
+
key: `${de(v, a)}-${_e}`,
|
|
1419
|
+
label: Se(v, a),
|
|
1420
|
+
value: de(v, a),
|
|
1421
1421
|
disabled: typeof v == "object" && (v == null ? void 0 : v.disabled)
|
|
1422
1422
|
}, null, 8, ["label", "value", "disabled"]))), 128))
|
|
1423
1423
|
]),
|
|
1424
1424
|
_: 2
|
|
1425
|
-
}, 1032, ["modelValue", "onUpdate:modelValue", "placeholder", "filterable", "multiple", "collapse-tags", "collapse-tags-tooltip", "disabled"])) : a.type === "remote-select" || a.type === "remoteSelect" ? (
|
|
1425
|
+
}, 1032, ["modelValue", "onUpdate:modelValue", "placeholder", "filterable", "multiple", "collapse-tags", "collapse-tags-tooltip", "disabled"])) : a.type === "remote-select" || a.type === "remoteSelect" ? (c(), O(k, {
|
|
1426
1426
|
key: 2,
|
|
1427
1427
|
modelValue: s.value[a.prop],
|
|
1428
1428
|
"onUpdate:modelValue": (v) => s.value[a.prop] = v,
|
|
1429
|
-
placeholder:
|
|
1429
|
+
placeholder: z(a, "请输入关键词搜索"),
|
|
1430
1430
|
clearable: "",
|
|
1431
1431
|
filterable: "",
|
|
1432
1432
|
remote: "",
|
|
@@ -1439,71 +1439,71 @@ const vn = /* @__PURE__ */ X(rn, [["render", yn], ["__scopeId", "data-v-8ca1b0c0
|
|
|
1439
1439
|
disabled: a.disabled,
|
|
1440
1440
|
class: "common-search__control",
|
|
1441
1441
|
onClear: (v) => o[a.prop] = [],
|
|
1442
|
-
onChange:
|
|
1442
|
+
onChange: Y
|
|
1443
1443
|
}, {
|
|
1444
|
-
default:
|
|
1445
|
-
(
|
|
1446
|
-
key: `${
|
|
1447
|
-
label:
|
|
1448
|
-
value:
|
|
1444
|
+
default: $(() => [
|
|
1445
|
+
(c(!0), g(J, null, ee(o[a.prop] || a.options || [], (v, _e) => (c(), O(C, {
|
|
1446
|
+
key: `${de(v, a)}-${_e}`,
|
|
1447
|
+
label: Se(v, a),
|
|
1448
|
+
value: de(v, a),
|
|
1449
1449
|
disabled: typeof v == "object" && (v == null ? void 0 : v.disabled)
|
|
1450
1450
|
}, null, 8, ["label", "value", "disabled"]))), 128))
|
|
1451
1451
|
]),
|
|
1452
1452
|
_: 2
|
|
1453
|
-
}, 1032, ["modelValue", "onUpdate:modelValue", "placeholder", "multiple", "collapse-tags", "collapse-tags-tooltip", "remote-method", "loading", "disabled", "onClear"])) : a.type === "number-range" || a.type === "numberRange" ? (
|
|
1453
|
+
}, 1032, ["modelValue", "onUpdate:modelValue", "placeholder", "multiple", "collapse-tags", "collapse-tags-tooltip", "remote-method", "loading", "disabled", "onClear"])) : a.type === "number-range" || a.type === "numberRange" ? (c(), g("div", {
|
|
1454
1454
|
key: 3,
|
|
1455
1455
|
class: "common-search__range common-search__range--number",
|
|
1456
|
-
onKeyup:
|
|
1456
|
+
onKeyup: Pe((v) => tt(a), ["enter"])
|
|
1457
1457
|
}, [
|
|
1458
|
-
|
|
1458
|
+
U(R, {
|
|
1459
1459
|
modelValue: s.value[a.start || `${a.prop}Min`],
|
|
1460
1460
|
"onUpdate:modelValue": (v) => s.value[a.start || `${a.prop}Min`] = v,
|
|
1461
1461
|
controls: !1,
|
|
1462
1462
|
min: a.min,
|
|
1463
1463
|
max: a.max,
|
|
1464
|
-
placeholder:
|
|
1464
|
+
placeholder: w(a, "min"),
|
|
1465
1465
|
disabled: a.disabled,
|
|
1466
1466
|
class: "common-search__range-input",
|
|
1467
|
-
onBlur: (v) =>
|
|
1467
|
+
onBlur: (v) => ve(a)
|
|
1468
1468
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "min", "max", "placeholder", "disabled", "onBlur"]),
|
|
1469
|
-
|
|
1470
|
-
|
|
1469
|
+
_("span", kn, D(a.separator || "至"), 1),
|
|
1470
|
+
U(R, {
|
|
1471
1471
|
modelValue: s.value[a.end || `${a.prop}Max`],
|
|
1472
1472
|
"onUpdate:modelValue": (v) => s.value[a.end || `${a.prop}Max`] = v,
|
|
1473
1473
|
controls: !1,
|
|
1474
1474
|
min: a.min,
|
|
1475
1475
|
max: a.max,
|
|
1476
|
-
placeholder:
|
|
1476
|
+
placeholder: w(a, "max"),
|
|
1477
1477
|
disabled: a.disabled,
|
|
1478
1478
|
class: "common-search__range-input",
|
|
1479
|
-
onBlur: (v) =>
|
|
1479
|
+
onBlur: (v) => ve(a)
|
|
1480
1480
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "min", "max", "placeholder", "disabled", "onBlur"]),
|
|
1481
|
-
a.clearable !== !1 && nt(a) ? (
|
|
1481
|
+
a.clearable !== !1 && nt(a) ? (c(), O(j, {
|
|
1482
1482
|
key: 0,
|
|
1483
1483
|
class: "common-search__range-clear",
|
|
1484
|
-
onMousedown:
|
|
1484
|
+
onMousedown: i[0] || (i[0] = he(() => {
|
|
1485
1485
|
}, ["prevent"])),
|
|
1486
1486
|
onClick: (v) => lt(a)
|
|
1487
1487
|
}, {
|
|
1488
|
-
default:
|
|
1489
|
-
|
|
1488
|
+
default: $(() => [
|
|
1489
|
+
U(oe(Ie))
|
|
1490
1490
|
]),
|
|
1491
1491
|
_: 1
|
|
1492
|
-
}, 8, ["onClick"])) :
|
|
1493
|
-
], 40, Cn)) : a.type === "date" ? (
|
|
1492
|
+
}, 8, ["onClick"])) : I("", !0)
|
|
1493
|
+
], 40, Cn)) : a.type === "date" ? (c(), O(K, {
|
|
1494
1494
|
key: 4,
|
|
1495
1495
|
modelValue: s.value[a.prop],
|
|
1496
1496
|
"onUpdate:modelValue": (v) => s.value[a.prop] = v,
|
|
1497
1497
|
type: a.dateType || "date",
|
|
1498
|
-
placeholder:
|
|
1498
|
+
placeholder: z(a, "年/月/日"),
|
|
1499
1499
|
"value-format": a.valueFormat || "YYYY-MM-DD",
|
|
1500
1500
|
format: a.format || "YYYY/MM/DD",
|
|
1501
1501
|
clearable: a.clearable !== !1,
|
|
1502
1502
|
disabled: a.disabled,
|
|
1503
1503
|
class: "common-search__control",
|
|
1504
|
-
onChange:
|
|
1505
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "type", "placeholder", "value-format", "format", "clearable", "disabled"])) : a.type === "daterange" || a.type === "dateRange" ? (
|
|
1506
|
-
|
|
1504
|
+
onChange: Y
|
|
1505
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "type", "placeholder", "value-format", "format", "clearable", "disabled"])) : a.type === "daterange" || a.type === "dateRange" ? (c(), g("div", Un, [
|
|
1506
|
+
U(Xe, {
|
|
1507
1507
|
start: s.value[a.start || a.startProp],
|
|
1508
1508
|
"onUpdate:start": (v) => s.value[a.start || a.startProp] = v,
|
|
1509
1509
|
end: s.value[a.end || a.endProp],
|
|
@@ -1515,9 +1515,9 @@ const vn = /* @__PURE__ */ X(rn, [["render", yn], ["__scopeId", "data-v-8ca1b0c0
|
|
|
1515
1515
|
"show-shortcuts": a.showShortcuts !== !1,
|
|
1516
1516
|
shortcuts: a.shortcuts,
|
|
1517
1517
|
"can-clearable": a.clearable !== !1,
|
|
1518
|
-
onChange:
|
|
1518
|
+
onChange: Y
|
|
1519
1519
|
}, null, 8, ["start", "onUpdate:start", "end", "onUpdate:end", "title", "type", "value-format", "format", "show-shortcuts", "shortcuts", "can-clearable"])
|
|
1520
|
-
])) :
|
|
1520
|
+
])) : se(l.$slots, a.slotName || a.prop, {
|
|
1521
1521
|
item: a,
|
|
1522
1522
|
form: s.value
|
|
1523
1523
|
}, void 0, !0, 6)
|
|
@@ -1526,61 +1526,61 @@ const vn = /* @__PURE__ */ X(rn, [["render", yn], ["__scopeId", "data-v-8ca1b0c0
|
|
|
1526
1526
|
_: 2
|
|
1527
1527
|
}, 1032, ["content", "disabled"])
|
|
1528
1528
|
], 6),
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
search:
|
|
1533
|
-
reset:
|
|
1529
|
+
E(pe) ? (c(), g("div", xn, [
|
|
1530
|
+
_("div", Sn, [
|
|
1531
|
+
se(l.$slots, "actions", {
|
|
1532
|
+
search: Y,
|
|
1533
|
+
reset: Le,
|
|
1534
1534
|
form: s.value
|
|
1535
1535
|
}, () => [
|
|
1536
|
-
|
|
1536
|
+
U(ie, {
|
|
1537
1537
|
class: "common-search__reset",
|
|
1538
|
-
onClick:
|
|
1538
|
+
onClick: Le
|
|
1539
1539
|
}, {
|
|
1540
|
-
default:
|
|
1541
|
-
|
|
1540
|
+
default: $(() => [...i[1] || (i[1] = [
|
|
1541
|
+
q("重置", -1)
|
|
1542
1542
|
])]),
|
|
1543
1543
|
_: 1
|
|
1544
1544
|
}),
|
|
1545
|
-
|
|
1545
|
+
U(ie, {
|
|
1546
1546
|
type: "primary",
|
|
1547
1547
|
class: "common-search__submit",
|
|
1548
|
-
onClick:
|
|
1548
|
+
onClick: Y
|
|
1549
1549
|
}, {
|
|
1550
|
-
default:
|
|
1551
|
-
|
|
1550
|
+
default: $(() => [...i[2] || (i[2] = [
|
|
1551
|
+
q(" 搜索 ", -1)
|
|
1552
1552
|
])]),
|
|
1553
1553
|
_: 1
|
|
1554
1554
|
})
|
|
1555
1555
|
], !0),
|
|
1556
|
-
T.value ? (
|
|
1556
|
+
T.value ? (c(), O(ie, {
|
|
1557
1557
|
key: 0,
|
|
1558
1558
|
link: "",
|
|
1559
1559
|
type: "primary",
|
|
1560
1560
|
onClick: at
|
|
1561
1561
|
}, {
|
|
1562
|
-
default:
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
default:
|
|
1566
|
-
S.value ? (
|
|
1562
|
+
default: $(() => [
|
|
1563
|
+
q(D(S.value ? "收起" : "展开") + " ", 1),
|
|
1564
|
+
U(j, { class: "el-icon--right" }, {
|
|
1565
|
+
default: $(() => [
|
|
1566
|
+
S.value ? (c(), O(oe(ft), { key: 0 })) : (c(), O(oe(ht), { key: 1 }))
|
|
1567
1567
|
]),
|
|
1568
1568
|
_: 1
|
|
1569
1569
|
})
|
|
1570
1570
|
]),
|
|
1571
1571
|
_: 1
|
|
1572
|
-
})) :
|
|
1572
|
+
})) : I("", !0)
|
|
1573
1573
|
])
|
|
1574
|
-
])) :
|
|
1574
|
+
])) : I("", !0)
|
|
1575
1575
|
], 64))), 128))
|
|
1576
1576
|
], 4)
|
|
1577
1577
|
])
|
|
1578
1578
|
], 2)), [
|
|
1579
|
-
[
|
|
1579
|
+
[re, e.itemList.length]
|
|
1580
1580
|
]);
|
|
1581
1581
|
};
|
|
1582
1582
|
}
|
|
1583
|
-
}), $n = /* @__PURE__ */
|
|
1583
|
+
}), $n = /* @__PURE__ */ ne(Fn, [["__scopeId", "data-v-006c1ace"]]), Ln = {
|
|
1584
1584
|
name: "MgOverflowHid",
|
|
1585
1585
|
props: {
|
|
1586
1586
|
label: String,
|
|
@@ -1605,63 +1605,63 @@ const vn = /* @__PURE__ */ X(rn, [["render", yn], ["__scopeId", "data-v-8ca1b0c0
|
|
|
1605
1605
|
}
|
|
1606
1606
|
}, Nn = { class: "tableOverflowHid" }, Mn = ["innerHTML"], Pn = { class: "name-wrapper" }, Rn = ["innerHTML"], Tn = { key: 1 }, Bn = ["innerHTML"];
|
|
1607
1607
|
function Dn(e, t, n, r, s, o) {
|
|
1608
|
-
const m =
|
|
1609
|
-
return
|
|
1610
|
-
n.value && n.value.length > n.maxLength ? (
|
|
1608
|
+
const m = L("el-popover");
|
|
1609
|
+
return c(), g("div", Nn, [
|
|
1610
|
+
n.value && n.value.length > n.maxLength ? (c(), O(m, {
|
|
1611
1611
|
key: 0,
|
|
1612
1612
|
trigger: "hover",
|
|
1613
1613
|
placement: "bottom",
|
|
1614
1614
|
width: "400"
|
|
1615
1615
|
}, {
|
|
1616
|
-
reference:
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
class:
|
|
1620
|
-
},
|
|
1621
|
-
[
|
|
1616
|
+
reference: $(() => [
|
|
1617
|
+
_("div", Pn, [
|
|
1618
|
+
ae(_("span", {
|
|
1619
|
+
class: W(n.labelClassName)
|
|
1620
|
+
}, D(n.label) + ":", 3), [
|
|
1621
|
+
[re, n.label]
|
|
1622
1622
|
]),
|
|
1623
|
-
|
|
1624
|
-
class:
|
|
1623
|
+
_("span", {
|
|
1624
|
+
class: W(n.valueClassName),
|
|
1625
1625
|
innerHTML: o.cutString(n.value, n.maxLength)
|
|
1626
1626
|
}, null, 10, Rn)
|
|
1627
1627
|
])
|
|
1628
1628
|
]),
|
|
1629
|
-
default:
|
|
1630
|
-
|
|
1631
|
-
class:
|
|
1632
|
-
},
|
|
1633
|
-
[
|
|
1629
|
+
default: $(() => [
|
|
1630
|
+
ae(_("span", {
|
|
1631
|
+
class: W(n.labelClassName)
|
|
1632
|
+
}, D(n.label) + ":", 3), [
|
|
1633
|
+
[re, n.label]
|
|
1634
1634
|
]),
|
|
1635
|
-
|
|
1635
|
+
_("span", { innerHTML: n.value }, null, 8, Mn)
|
|
1636
1636
|
]),
|
|
1637
1637
|
_: 1
|
|
1638
|
-
})) : (
|
|
1639
|
-
|
|
1640
|
-
class:
|
|
1641
|
-
},
|
|
1642
|
-
[
|
|
1638
|
+
})) : (c(), g("div", Tn, [
|
|
1639
|
+
ae(_("span", {
|
|
1640
|
+
class: W(n.labelClassName)
|
|
1641
|
+
}, D(n.label) + ":", 3), [
|
|
1642
|
+
[re, n.label]
|
|
1643
1643
|
]),
|
|
1644
|
-
|
|
1645
|
-
class:
|
|
1644
|
+
_("span", {
|
|
1645
|
+
class: W([n.valueClassName, "value"])
|
|
1646
1646
|
}, [
|
|
1647
|
-
|
|
1647
|
+
_("span", { innerHTML: n.value }, null, 8, Bn)
|
|
1648
1648
|
], 2)
|
|
1649
1649
|
]))
|
|
1650
1650
|
]);
|
|
1651
1651
|
}
|
|
1652
|
-
const
|
|
1652
|
+
const Je = /* @__PURE__ */ ne(Ln, [["render", Dn], ["__scopeId", "data-v-ef86ea54"]]), On = { key: 0 }, Vn = { key: 1 }, In = {
|
|
1653
1653
|
key: 2,
|
|
1654
1654
|
class: "price-text"
|
|
1655
|
-
},
|
|
1655
|
+
}, An = {
|
|
1656
1656
|
key: 3,
|
|
1657
1657
|
class: "rate-text"
|
|
1658
1658
|
}, Hn = {
|
|
1659
1659
|
key: 4,
|
|
1660
1660
|
class: "bold-text"
|
|
1661
|
-
},
|
|
1661
|
+
}, zn = {
|
|
1662
1662
|
key: 0,
|
|
1663
1663
|
class: "common-table__pagination"
|
|
1664
|
-
},
|
|
1664
|
+
}, En = { class: "common-table__pagination-left" }, jn = /* @__PURE__ */ Object.assign({ name: "MgDataTable" }, {
|
|
1665
1665
|
__name: "DataTable",
|
|
1666
1666
|
props: {
|
|
1667
1667
|
/** 列配置:el-table-column 属性 + slotName */
|
|
@@ -1734,141 +1734,182 @@ const Xe = /* @__PURE__ */ X(Ln, [["render", Dn], ["__scopeId", "data-v-ef86ea54
|
|
|
1734
1734
|
},
|
|
1735
1735
|
emits: ["pageChange", "cellClick", "edit", "delete", "selectionChange"],
|
|
1736
1736
|
setup(e, { emit: t }) {
|
|
1737
|
-
const n = e, r = t, s =
|
|
1737
|
+
const n = e, r = t, s = A(null), o = A(null), m = A(360);
|
|
1738
|
+
let p = null;
|
|
1739
|
+
const N = me(() => {
|
|
1740
|
+
if (n.fillHeight)
|
|
1741
|
+
return m.value;
|
|
1742
|
+
}), b = {
|
|
1738
1743
|
background: "var(--brand-secondary)",
|
|
1739
1744
|
color: "var(--brand-text-regular)",
|
|
1740
1745
|
fontWeight: 600,
|
|
1741
1746
|
fontSize: "13px"
|
|
1742
|
-
},
|
|
1743
|
-
headerCellStyle:
|
|
1747
|
+
}, S = me(() => ({
|
|
1748
|
+
headerCellStyle: b,
|
|
1744
1749
|
...n.tableBind
|
|
1745
1750
|
}));
|
|
1746
|
-
function
|
|
1747
|
-
const { slotName:
|
|
1751
|
+
function T(y) {
|
|
1752
|
+
const { slotName: x, headerSlotName: M, maxLength: B, ...z } = y || {};
|
|
1748
1753
|
return {
|
|
1749
|
-
...
|
|
1754
|
+
...z
|
|
1750
1755
|
};
|
|
1751
1756
|
}
|
|
1752
|
-
function
|
|
1753
|
-
return n.pagination ? (n.pagination.page - 1) * n.pagination.limit +
|
|
1757
|
+
function f(y) {
|
|
1758
|
+
return n.pagination ? (n.pagination.page - 1) * n.pagination.limit + y + 1 : y + 1;
|
|
1754
1759
|
}
|
|
1755
|
-
function
|
|
1756
|
-
|
|
1757
|
-
|
|
1760
|
+
function u() {
|
|
1761
|
+
if (!n.fillHeight || !o.value) return;
|
|
1762
|
+
const y = Math.floor(o.value.clientHeight);
|
|
1763
|
+
y > 0 && y !== m.value && (m.value = y, X(() => {
|
|
1764
|
+
var x, M;
|
|
1765
|
+
return (M = (x = s.value) == null ? void 0 : x.doLayout) == null ? void 0 : M.call(x);
|
|
1766
|
+
}));
|
|
1758
1767
|
}
|
|
1759
|
-
function
|
|
1760
|
-
var
|
|
1761
|
-
r("pageChange", { page:
|
|
1768
|
+
function d(y) {
|
|
1769
|
+
var x;
|
|
1770
|
+
r("pageChange", { page: (x = n.pagination) == null ? void 0 : x.page, limit: y });
|
|
1762
1771
|
}
|
|
1763
|
-
function
|
|
1764
|
-
|
|
1772
|
+
function F(y) {
|
|
1773
|
+
var x;
|
|
1774
|
+
r("pageChange", { page: y, limit: (x = n.pagination) == null ? void 0 : x.limit });
|
|
1765
1775
|
}
|
|
1766
|
-
function
|
|
1767
|
-
|
|
1768
|
-
if (!n.showSelection || (g == null ? void 0 : g.type) === "selection") return;
|
|
1769
|
-
const M = w == null ? void 0 : w.target;
|
|
1770
|
-
(R = M == null ? void 0 : M.closest) != null && R.call(M, "a, button, .el-button, .el-checkbox, .link-btn, input, textarea") || typeof n.selectable == "function" && !n.selectable(i, 0) || (H = (b = s.value) == null ? void 0 : b.toggleRowSelection) == null || H.call(b, i);
|
|
1776
|
+
function P(y, x, M, B) {
|
|
1777
|
+
r("cellClick", y, x, M, B), n.canCellClick && (x == null ? void 0 : x.label) !== "操作" && window.getSelection().toString();
|
|
1771
1778
|
}
|
|
1772
|
-
function
|
|
1773
|
-
|
|
1779
|
+
function H(y, x, M) {
|
|
1780
|
+
var z, w, Q;
|
|
1781
|
+
if (!n.showSelection || (x == null ? void 0 : x.type) === "selection") return;
|
|
1782
|
+
const B = M == null ? void 0 : M.target;
|
|
1783
|
+
(z = B == null ? void 0 : B.closest) != null && z.call(B, "a, button, .el-button, .el-checkbox, .link-btn, input, textarea") || typeof n.selectable == "function" && !n.selectable(y, 0) || (Q = (w = s.value) == null ? void 0 : w.toggleRowSelection) == null || Q.call(w, y);
|
|
1774
1784
|
}
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1785
|
+
function V(y) {
|
|
1786
|
+
r("selectionChange", y);
|
|
1787
|
+
}
|
|
1788
|
+
return ge(() => {
|
|
1789
|
+
!n.fillHeight || !o.value || (u(), p = new ResizeObserver(() => {
|
|
1790
|
+
requestAnimationFrame(u);
|
|
1791
|
+
}), p.observe(o.value));
|
|
1792
|
+
}), Ce(() => {
|
|
1793
|
+
p == null || p.disconnect(), p = null;
|
|
1794
|
+
}), te(
|
|
1795
|
+
() => n.dataList,
|
|
1796
|
+
() => {
|
|
1797
|
+
X(() => {
|
|
1798
|
+
var y, x;
|
|
1799
|
+
u(), (x = (y = s.value) == null ? void 0 : y.doLayout) == null || x.call(y);
|
|
1800
|
+
});
|
|
1801
|
+
}
|
|
1802
|
+
), te(
|
|
1803
|
+
() => n.fillHeight,
|
|
1804
|
+
(y) => {
|
|
1805
|
+
y && X(() => {
|
|
1806
|
+
u(), !p && o.value && (p = new ResizeObserver(() => {
|
|
1807
|
+
requestAnimationFrame(u);
|
|
1808
|
+
}), p.observe(o.value));
|
|
1809
|
+
});
|
|
1810
|
+
}
|
|
1811
|
+
), (y, x) => {
|
|
1812
|
+
const M = L("el-table-column"), B = L("el-table"), z = L("el-pagination");
|
|
1813
|
+
return c(), g("div", {
|
|
1814
|
+
class: W(["common-table", { "is-fill-height": e.fillHeight }])
|
|
1779
1815
|
}, [
|
|
1780
|
-
|
|
1781
|
-
|
|
1816
|
+
_("div", {
|
|
1817
|
+
ref_key: "mainRef",
|
|
1818
|
+
ref: o,
|
|
1819
|
+
class: "common-table__main"
|
|
1820
|
+
}, [
|
|
1821
|
+
U(B, Re({
|
|
1782
1822
|
ref_key: "tableRef",
|
|
1783
1823
|
ref: s,
|
|
1784
1824
|
data: e.dataList,
|
|
1785
|
-
height:
|
|
1825
|
+
height: N.value,
|
|
1786
1826
|
class: { "common-pointer-table": e.canCellClick || e.showSelection }
|
|
1787
|
-
},
|
|
1788
|
-
onCellClick:
|
|
1789
|
-
onRowClick:
|
|
1790
|
-
onSelectionChange:
|
|
1827
|
+
}, S.value, {
|
|
1828
|
+
onCellClick: P,
|
|
1829
|
+
onRowClick: H,
|
|
1830
|
+
onSelectionChange: V
|
|
1791
1831
|
}), {
|
|
1792
|
-
default:
|
|
1793
|
-
e.showSelection ? (
|
|
1832
|
+
default: $(() => [
|
|
1833
|
+
e.showSelection ? (c(), O(M, {
|
|
1794
1834
|
key: 0,
|
|
1795
1835
|
type: "selection",
|
|
1796
1836
|
width: e.selectionWidth,
|
|
1797
1837
|
align: "center",
|
|
1798
1838
|
selectable: e.selectable,
|
|
1799
1839
|
fixed: "left"
|
|
1800
|
-
}, null, 8, ["width", "selectable"])) :
|
|
1801
|
-
e.showIndex ? (
|
|
1840
|
+
}, null, 8, ["width", "selectable"])) : I("", !0),
|
|
1841
|
+
e.showIndex ? (c(), O(M, {
|
|
1802
1842
|
key: 1,
|
|
1803
1843
|
type: "index",
|
|
1804
1844
|
label: e.indexLabel,
|
|
1805
1845
|
width: e.indexWidth,
|
|
1806
|
-
index:
|
|
1846
|
+
index: f,
|
|
1807
1847
|
align: "center"
|
|
1808
|
-
}, null, 8, ["label", "width"])) :
|
|
1809
|
-
(
|
|
1810
|
-
key:
|
|
1811
|
-
}, { ref_for: !0 },
|
|
1812
|
-
|
|
1848
|
+
}, null, 8, ["label", "width"])) : I("", !0),
|
|
1849
|
+
(c(!0), g(J, null, ee(e.propList, (w, Q) => (c(), O(M, Re({
|
|
1850
|
+
key: w.prop || w.slotName || Q
|
|
1851
|
+
}, { ref_for: !0 }, T(w)), St({ _: 2 }, [
|
|
1852
|
+
w.headerSlotName ? {
|
|
1813
1853
|
name: "header",
|
|
1814
|
-
fn:
|
|
1815
|
-
|
|
1854
|
+
fn: $(() => [
|
|
1855
|
+
se(y.$slots, w.headerSlotName, { column: w }, void 0, !0)
|
|
1816
1856
|
]),
|
|
1817
1857
|
key: "0"
|
|
1818
1858
|
} : void 0,
|
|
1819
|
-
|
|
1859
|
+
w.slotName ? {
|
|
1820
1860
|
name: "default",
|
|
1821
|
-
fn:
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
value: String(
|
|
1825
|
-
"max-length":
|
|
1861
|
+
fn: $((E) => [
|
|
1862
|
+
w.slotName === "overtext" ? (c(), g("div", On, [
|
|
1863
|
+
U(Je, {
|
|
1864
|
+
value: String(E.row[w.prop] ?? ""),
|
|
1865
|
+
"max-length": w.maxLength || 18
|
|
1826
1866
|
}, null, 8, ["value", "max-length"])
|
|
1827
|
-
])) :
|
|
1828
|
-
|
|
1829
|
-
class:
|
|
1830
|
-
"whether-yes":
|
|
1831
|
-
"whether-no":
|
|
1867
|
+
])) : w.slotName === "whether" ? (c(), g("div", Vn, [
|
|
1868
|
+
_("span", {
|
|
1869
|
+
class: W({
|
|
1870
|
+
"whether-yes": E.row[w.prop] == 1,
|
|
1871
|
+
"whether-no": E.row[w.prop] == 0
|
|
1832
1872
|
})
|
|
1833
|
-
},
|
|
1834
|
-
])) :
|
|
1835
|
-
row:
|
|
1836
|
-
index:
|
|
1837
|
-
column:
|
|
1873
|
+
}, D(E.row[w.prop] == 0 ? "否" : E.row[w.prop] == 1 ? "是" : ""), 3)
|
|
1874
|
+
])) : w.slotName === "price" ? (c(), g("div", In, D(oe(He)(E.row[w.prop], 2)), 1)) : w.slotName === "rate" ? (c(), g("div", An, D(oe(vt)(E.row[w.prop], 2, "toPercentText")), 1)) : w.slotName === "boldtext" ? (c(), g("div", Hn, D(E.row[w.prop]), 1)) : se(y.$slots, w.slotName, {
|
|
1875
|
+
row: E.row,
|
|
1876
|
+
index: E.$index,
|
|
1877
|
+
column: w
|
|
1838
1878
|
}, () => [
|
|
1839
|
-
|
|
1879
|
+
q(D(oe(bt)(E.row[w.prop])), 1)
|
|
1840
1880
|
], !0, 5)
|
|
1841
1881
|
]),
|
|
1842
1882
|
key: "1"
|
|
1843
1883
|
} : void 0
|
|
1844
1884
|
]), 1040))), 128)),
|
|
1845
|
-
|
|
1885
|
+
se(y.$slots, "default", {}, void 0, !0)
|
|
1846
1886
|
]),
|
|
1847
1887
|
_: 3
|
|
1848
1888
|
}, 16, ["data", "height", "class"])
|
|
1849
|
-
]),
|
|
1850
|
-
e.pagination ? (
|
|
1851
|
-
|
|
1852
|
-
|
|
1889
|
+
], 512),
|
|
1890
|
+
e.pagination ? (c(), g("div", zn, [
|
|
1891
|
+
_("div", En, [
|
|
1892
|
+
se(y.$slots, "pagination-left", {}, void 0, !0)
|
|
1853
1893
|
]),
|
|
1854
|
-
|
|
1894
|
+
U(z, {
|
|
1895
|
+
class: "common-table__pagination-right",
|
|
1855
1896
|
background: "",
|
|
1856
1897
|
"current-page": e.pagination.page,
|
|
1857
1898
|
"page-size": e.pagination.limit,
|
|
1858
1899
|
"page-sizes": e.pageSizes,
|
|
1859
1900
|
total: e.pagination.total,
|
|
1860
1901
|
layout: e.paginationLayout,
|
|
1861
|
-
onSizeChange:
|
|
1862
|
-
onCurrentChange:
|
|
1902
|
+
onSizeChange: d,
|
|
1903
|
+
onCurrentChange: F
|
|
1863
1904
|
}, null, 8, ["current-page", "page-size", "page-sizes", "total", "layout"])
|
|
1864
|
-
])) :
|
|
1905
|
+
])) : I("", !0)
|
|
1865
1906
|
], 2);
|
|
1866
1907
|
};
|
|
1867
1908
|
}
|
|
1868
|
-
}),
|
|
1909
|
+
}), Kn = /* @__PURE__ */ ne(jn, [["__scopeId", "data-v-5e578724"]]), Wn = ["aria-checked", "disabled", "onClick"], Yn = { class: "segmented__label" }, qn = {
|
|
1869
1910
|
key: 0,
|
|
1870
1911
|
class: "segmented__badge"
|
|
1871
|
-
},
|
|
1912
|
+
}, Gn = {
|
|
1872
1913
|
__name: "SegmentedControl",
|
|
1873
1914
|
props: {
|
|
1874
1915
|
modelValue: { type: [String, Number, Boolean], default: void 0 },
|
|
@@ -1877,78 +1918,78 @@ const Xe = /* @__PURE__ */ X(Ln, [["render", Dn], ["__scopeId", "data-v-ef86ea54
|
|
|
1877
1918
|
},
|
|
1878
1919
|
emits: ["update:modelValue", "change"],
|
|
1879
1920
|
setup(e, { emit: t }) {
|
|
1880
|
-
const n = e, r = t, s =
|
|
1921
|
+
const n = e, r = t, s = A(null), o = A([]), m = A(!1), p = A({
|
|
1881
1922
|
width: "0px",
|
|
1882
1923
|
transform: "translateX(0px)"
|
|
1883
1924
|
});
|
|
1884
|
-
let
|
|
1885
|
-
function
|
|
1886
|
-
return (
|
|
1925
|
+
let N = null;
|
|
1926
|
+
function b(d) {
|
|
1927
|
+
return (d == null ? void 0 : d.count) != null || (d == null ? void 0 : d.badge) != null;
|
|
1887
1928
|
}
|
|
1888
|
-
function S(
|
|
1889
|
-
return
|
|
1929
|
+
function S(d) {
|
|
1930
|
+
return d.count != null ? d.count : d.badge;
|
|
1890
1931
|
}
|
|
1891
|
-
function T(
|
|
1892
|
-
|
|
1932
|
+
function T(d, F) {
|
|
1933
|
+
d && (o.value[F] = d);
|
|
1893
1934
|
}
|
|
1894
|
-
function
|
|
1895
|
-
const
|
|
1896
|
-
if (!
|
|
1897
|
-
const
|
|
1898
|
-
if (!
|
|
1899
|
-
|
|
1935
|
+
function f() {
|
|
1936
|
+
const d = s.value;
|
|
1937
|
+
if (!d) return;
|
|
1938
|
+
const F = n.options.findIndex((y) => y.value === n.modelValue), P = o.value[F];
|
|
1939
|
+
if (!P) {
|
|
1940
|
+
p.value = { width: "0px", transform: "translateX(0px)" };
|
|
1900
1941
|
return;
|
|
1901
1942
|
}
|
|
1902
|
-
const
|
|
1903
|
-
|
|
1904
|
-
width: `${
|
|
1905
|
-
transform: `translateX(${
|
|
1943
|
+
const H = d.getBoundingClientRect(), V = P.getBoundingClientRect();
|
|
1944
|
+
p.value = {
|
|
1945
|
+
width: `${V.width}px`,
|
|
1946
|
+
transform: `translateX(${V.left - H.left}px)`
|
|
1906
1947
|
}, m.value = !0;
|
|
1907
1948
|
}
|
|
1908
|
-
function
|
|
1909
|
-
|
|
1949
|
+
function u(d) {
|
|
1950
|
+
d.disabled || (r("update:modelValue", d.value), r("change", d.value));
|
|
1910
1951
|
}
|
|
1911
|
-
return
|
|
1952
|
+
return te(
|
|
1912
1953
|
() => [n.modelValue, n.options],
|
|
1913
1954
|
async () => {
|
|
1914
|
-
await
|
|
1955
|
+
await X(), f();
|
|
1915
1956
|
},
|
|
1916
1957
|
{ deep: !0 }
|
|
1917
|
-
),
|
|
1918
|
-
await
|
|
1919
|
-
}),
|
|
1920
|
-
|
|
1921
|
-
}), (
|
|
1958
|
+
), ge(async () => {
|
|
1959
|
+
await X(), f(), typeof ResizeObserver < "u" && s.value && (N = new ResizeObserver(() => f()), N.observe(s.value));
|
|
1960
|
+
}), Ce(() => {
|
|
1961
|
+
N == null || N.disconnect(), N = null;
|
|
1962
|
+
}), (d, F) => (c(), g("div", {
|
|
1922
1963
|
ref_key: "rootRef",
|
|
1923
1964
|
ref: s,
|
|
1924
1965
|
class: "segmented",
|
|
1925
1966
|
role: "radiogroup"
|
|
1926
1967
|
}, [
|
|
1927
|
-
|
|
1928
|
-
class:
|
|
1929
|
-
style:
|
|
1968
|
+
_("div", {
|
|
1969
|
+
class: W(["segmented__thumb", { "is-ready": m.value }]),
|
|
1970
|
+
style: ue(p.value)
|
|
1930
1971
|
}, null, 6),
|
|
1931
|
-
(
|
|
1932
|
-
key: String(
|
|
1972
|
+
(c(!0), g(J, null, ee(e.options, (P, H) => (c(), g("button", {
|
|
1973
|
+
key: String(P.value),
|
|
1933
1974
|
ref_for: !0,
|
|
1934
|
-
ref: (
|
|
1975
|
+
ref: (V) => T(V, H),
|
|
1935
1976
|
type: "button",
|
|
1936
|
-
class:
|
|
1977
|
+
class: W(["segmented__item", { "is-active": e.modelValue === P.value }]),
|
|
1937
1978
|
role: "radio",
|
|
1938
|
-
"aria-checked": e.modelValue ===
|
|
1939
|
-
disabled:
|
|
1940
|
-
onClick: (
|
|
1979
|
+
"aria-checked": e.modelValue === P.value,
|
|
1980
|
+
disabled: P.disabled,
|
|
1981
|
+
onClick: (V) => u(P)
|
|
1941
1982
|
}, [
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
], 10,
|
|
1983
|
+
_("span", Yn, D(P.label), 1),
|
|
1984
|
+
b(P) ? (c(), g("span", qn, D(S(P)), 1)) : I("", !0)
|
|
1985
|
+
], 10, Wn))), 128))
|
|
1945
1986
|
], 512));
|
|
1946
1987
|
}
|
|
1947
|
-
},
|
|
1948
|
-
function
|
|
1988
|
+
}, Xn = /* @__PURE__ */ ne(Gn, [["__scopeId", "data-v-b7b0abe9"]]);
|
|
1989
|
+
function Jn(e) {
|
|
1949
1990
|
return e == null || e === "" ? [] : Array.isArray(e) ? e.map((t) => String(t).trim()).filter(Boolean) : String(e).split(",").map((t) => t.trim()).filter(Boolean);
|
|
1950
1991
|
}
|
|
1951
|
-
function
|
|
1992
|
+
function Qn(e) {
|
|
1952
1993
|
if (!e.parentNode) {
|
|
1953
1994
|
e.style.display = "none";
|
|
1954
1995
|
return;
|
|
@@ -1959,80 +2000,80 @@ function Zn(e) {
|
|
|
1959
2000
|
}
|
|
1960
2001
|
e.parentNode.removeChild(e);
|
|
1961
2002
|
}
|
|
1962
|
-
function
|
|
1963
|
-
const s =
|
|
2003
|
+
function we(e, t, n, r = !1) {
|
|
2004
|
+
const s = Jn(t.value);
|
|
1964
2005
|
if (!s.length) return;
|
|
1965
|
-
let o =
|
|
1966
|
-
r && (o = !o), o ||
|
|
2006
|
+
let o = ze(s, n);
|
|
2007
|
+
r && (o = !o), o || Qn(e);
|
|
1967
2008
|
}
|
|
1968
|
-
function
|
|
2009
|
+
function Zn(e) {
|
|
1969
2010
|
e.directive("hasPermission", {
|
|
1970
2011
|
mounted(t, n) {
|
|
1971
|
-
|
|
2012
|
+
we(t, n, "and");
|
|
1972
2013
|
}
|
|
1973
2014
|
}), e.directive("hasAnyPermission", {
|
|
1974
2015
|
mounted(t, n) {
|
|
1975
|
-
|
|
2016
|
+
we(t, n, "or");
|
|
1976
2017
|
}
|
|
1977
2018
|
}), e.directive("hasNoPermission", {
|
|
1978
2019
|
mounted(t, n) {
|
|
1979
|
-
|
|
2020
|
+
we(t, n, "or", !0);
|
|
1980
2021
|
}
|
|
1981
2022
|
});
|
|
1982
2023
|
}
|
|
1983
|
-
const
|
|
2024
|
+
const el = {
|
|
1984
2025
|
MgImageUpload: Zt,
|
|
1985
2026
|
MgFileUpload: vn,
|
|
1986
2027
|
MgFilePreview: _t,
|
|
1987
2028
|
MgSearchForm: $n,
|
|
1988
|
-
MgDataTable:
|
|
1989
|
-
MgDateRangePicker:
|
|
1990
|
-
MgSegmentedControl:
|
|
1991
|
-
MgOverflowHid:
|
|
1992
|
-
},
|
|
1993
|
-
Object.entries(
|
|
2029
|
+
MgDataTable: Kn,
|
|
2030
|
+
MgDateRangePicker: Xe,
|
|
2031
|
+
MgSegmentedControl: Xn,
|
|
2032
|
+
MgOverflowHid: Je
|
|
2033
|
+
}, tl = (e, t = {}) => {
|
|
2034
|
+
Object.entries(el).forEach(([s, o]) => {
|
|
1994
2035
|
e.component(o.name || s, o);
|
|
1995
|
-
}), t.ossUrl && $t(t.ossUrl), typeof t.getPermissions == "function" && wt(t.getPermissions),
|
|
2036
|
+
}), t.ossUrl && $t(t.ossUrl), typeof t.getPermissions == "function" && wt(t.getPermissions), Zn(e);
|
|
1996
2037
|
const n = Ct(t), r = kt(n);
|
|
1997
|
-
Ut(n), xt(r), e.config.globalProperties.$request = n, e.config.globalProperties.$api = r, e.config.globalProperties.$hasPermission =
|
|
1998
|
-
},
|
|
1999
|
-
install:
|
|
2038
|
+
Ut(n), xt(r), e.config.globalProperties.$request = n, e.config.globalProperties.$api = r, e.config.globalProperties.$hasPermission = ze;
|
|
2039
|
+
}, ol = {
|
|
2040
|
+
install: tl,
|
|
2000
2041
|
version: "1.2.2"
|
|
2001
2042
|
};
|
|
2002
2043
|
export {
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2044
|
+
Kn as DataTable,
|
|
2045
|
+
Xe as DateRangePicker,
|
|
2046
|
+
cl as FILE_PREVIEW_ROUTE_PATH,
|
|
2006
2047
|
_t as FilePreview,
|
|
2007
2048
|
vn as FileUpload,
|
|
2008
2049
|
Zt as ImageUpload,
|
|
2009
2050
|
$n as SearchForm,
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2051
|
+
Xn as SegmentedControl,
|
|
2052
|
+
Je as TableOverflowHid,
|
|
2053
|
+
qe as aliOssMixin,
|
|
2054
|
+
dl as buildFilePreviewHref,
|
|
2055
|
+
pl as checkPermission,
|
|
2015
2056
|
kt as createApi,
|
|
2016
|
-
|
|
2057
|
+
Ue as createOssClient,
|
|
2017
2058
|
Ct as createRequest,
|
|
2018
|
-
|
|
2019
|
-
|
|
2059
|
+
fl as createService,
|
|
2060
|
+
ol as default,
|
|
2020
2061
|
gt as getApi,
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2062
|
+
We as getOssSts,
|
|
2063
|
+
hl as getPermissionGetter,
|
|
2064
|
+
ml as getRequest,
|
|
2065
|
+
gl as getSystemId,
|
|
2066
|
+
yl as getUserId,
|
|
2067
|
+
ze as hasPermission,
|
|
2068
|
+
tl as install,
|
|
2069
|
+
Zn as installPermissionDirectives,
|
|
2029
2070
|
yt as openFilePreview,
|
|
2030
2071
|
xt as setApi,
|
|
2031
2072
|
$t as setDefaultOssUrl,
|
|
2032
2073
|
wt as setPermissionGetter,
|
|
2033
2074
|
Ut as setRequest,
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2075
|
+
vl as setSystemId,
|
|
2076
|
+
bl as setUserId,
|
|
2077
|
+
Ye as uploadToOss,
|
|
2078
|
+
_l as utils
|
|
2038
2079
|
};
|