mgacn-commonsdk 1.3.7 → 1.4.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/{FilePreview-Dx4GAw4K.js → FilePreview-DOmgqdvV.js} +400 -392
- package/dist/mgacn-admin.js +2 -2
- package/dist/mgacn-commonsdk.js +147 -147
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/mgacn-commonsdk.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { Plus as
|
|
1
|
+
import { Plus as ut, Delete as ct, CircleCloseFilled as dt, Document as pt, Close as ft, CircleClose as We, CircleCheck as ht, ArrowUp as gt, ArrowDown as mt } from "@element-plus/icons-vue";
|
|
2
2
|
import { ElMessage as G, ElMessageBox as Ye } from "element-plus";
|
|
3
|
-
import
|
|
4
|
-
import { _ as
|
|
5
|
-
import { i as fl, J as hl, j as gl, c as ml, K as vl, L as yl, M as bl, g as _l, N as wl, O as xl, b as Sl, P as kl, Q as Ul, R as Cl, S as Fl, o as Ll, T as Nl, a as Al, s as Rl, U as $l } from "./FilePreview-
|
|
6
|
-
import { resolveComponent as N, openBlock as d, createElementBlock as m, createElementVNode as b, toDisplayString as T, createCommentVNode as V, createTextVNode as q, Fragment as Q, renderList as
|
|
3
|
+
import vt from "cropperjs";
|
|
4
|
+
import { _ as ee, k as qe, u as Ge, t as Z, l as K, m as be, n as Je, p as Xe, q as yt, r as ie, v as _e, w as Ve, x as bt, y as Qe, z as _t, A as wt, B as Ze, F as xt, C as St, D as kt, E as Ut, G as Ct, H as Ft, I as Lt } from "./FilePreview-DOmgqdvV.js";
|
|
5
|
+
import { i as fl, J as hl, j as gl, c as ml, K as vl, L as yl, M as bl, g as _l, N as wl, O as xl, b as Sl, P as kl, Q as Ul, R as Cl, S as Fl, o as Ll, T as Nl, a as Al, s as Rl, U as $l } from "./FilePreview-DOmgqdvV.js";
|
|
6
|
+
import { resolveComponent as N, openBlock as d, createElementBlock as m, createElementVNode as b, toDisplayString as T, createCommentVNode as V, createTextVNode as q, Fragment as Q, renderList as ne, normalizeStyle as de, normalizeClass as j, createVNode as S, withCtx as F, withModifiers as we, withDirectives as oe, vShow as ue, createBlock as B, mergeProps as Ne, computed as xe, ref as O, watch as le, onMounted as Se, reactive as Ie, nextTick as J, onBeforeUnmount as Re, withKeys as Oe, unref as ce, renderSlot as ae, createSlots as Nt } from "vue";
|
|
7
7
|
let De = 0;
|
|
8
|
-
function
|
|
8
|
+
function et() {
|
|
9
9
|
return De += 1, `mg-img-${Date.now()}-${De}`;
|
|
10
10
|
}
|
|
11
11
|
function At(e) {
|
|
@@ -15,13 +15,13 @@ function Ee(e, t = "private") {
|
|
|
15
15
|
return e.map((n) => {
|
|
16
16
|
const l = String(n || "").trim();
|
|
17
17
|
if (!l) return null;
|
|
18
|
-
const r =
|
|
18
|
+
const r = Z(l, {});
|
|
19
19
|
return r ? {
|
|
20
|
-
uid:
|
|
20
|
+
uid: et(),
|
|
21
21
|
url: r,
|
|
22
22
|
status: "success",
|
|
23
23
|
percent: 100,
|
|
24
|
-
previewUrl:
|
|
24
|
+
previewUrl: K(l) ? l : ""
|
|
25
25
|
} : null;
|
|
26
26
|
}).filter(Boolean);
|
|
27
27
|
}
|
|
@@ -29,7 +29,7 @@ function ge(e = "") {
|
|
|
29
29
|
return String(e).startsWith("blob:");
|
|
30
30
|
}
|
|
31
31
|
function Rt(e = "") {
|
|
32
|
-
return
|
|
32
|
+
return Xe(e);
|
|
33
33
|
}
|
|
34
34
|
function $t(e = "") {
|
|
35
35
|
const t = e.lastIndexOf(".");
|
|
@@ -38,7 +38,7 @@ function $t(e = "") {
|
|
|
38
38
|
const Mt = {
|
|
39
39
|
name: "MgImageUpload",
|
|
40
40
|
mixins: [qe],
|
|
41
|
-
components: { CircleCloseFilled:
|
|
41
|
+
components: { CircleCloseFilled: dt, Delete: ct, Plus: ut },
|
|
42
42
|
props: {
|
|
43
43
|
/** v-model 统一为 string[](存 object key;公共读可为永久 URL);入参兼容 string / string[] */
|
|
44
44
|
modelValue: { type: [Array, String], default: () => [] },
|
|
@@ -95,7 +95,7 @@ const Mt = {
|
|
|
95
95
|
return this.accept.split(",").map((e) => e.replace(".", "").trim().toLowerCase()).filter(Boolean);
|
|
96
96
|
},
|
|
97
97
|
successUrls() {
|
|
98
|
-
return this.fileList.filter((e) => e.status === "success" && e.url).map((e) =>
|
|
98
|
+
return this.fileList.filter((e) => e.status === "success" && e.url).map((e) => Z(e.url, { bucketKind: this.bucketKind })).filter(Boolean);
|
|
99
99
|
}
|
|
100
100
|
},
|
|
101
101
|
watch: {
|
|
@@ -117,7 +117,7 @@ const Mt = {
|
|
|
117
117
|
handler(e) {
|
|
118
118
|
var U;
|
|
119
119
|
if ((U = this.initFileList) != null && U.length) return;
|
|
120
|
-
const t = At(e), n = t.map((h) =>
|
|
120
|
+
const t = At(e), n = t.map((h) => Z(h, { bucketKind: this.bucketKind })).filter(Boolean), l = this.successUrls;
|
|
121
121
|
if (n.length === l.length && n.every((h, C) => h === l[C]))
|
|
122
122
|
return;
|
|
123
123
|
const r = new Map(
|
|
@@ -158,15 +158,15 @@ const Mt = {
|
|
|
158
158
|
/** 私有桶回显:仅 key、无签名预览时走平台批量续签(禁止依赖 STS GetObject) */
|
|
159
159
|
async ensureSignedPreviews() {
|
|
160
160
|
const e = this.fileList.filter(
|
|
161
|
-
(t) => t.status === "success" && t.url && !ge(t.previewUrl) && !
|
|
161
|
+
(t) => t.status === "success" && t.url && !ge(t.previewUrl) && !K(t.previewUrl || "") && !Rt(t.previewUrl || t.url)
|
|
162
162
|
);
|
|
163
163
|
if (e.length)
|
|
164
164
|
try {
|
|
165
|
-
const t = e.map((a) =>
|
|
165
|
+
const t = e.map((a) => be(a.url)).filter(Boolean);
|
|
166
166
|
if (!t.length) return;
|
|
167
167
|
const n = await Je({ keys: t.slice(0, 50) }), l = Array.isArray(n == null ? void 0 : n.items) ? n.items : [], r = Object.fromEntries(l.map((a) => [a.key, a.url]));
|
|
168
168
|
e.forEach((a) => {
|
|
169
|
-
const u =
|
|
169
|
+
const u = be(a.url);
|
|
170
170
|
r[u] && (a.previewUrl = r[u]);
|
|
171
171
|
});
|
|
172
172
|
} catch (t) {
|
|
@@ -177,9 +177,9 @@ const Mt = {
|
|
|
177
177
|
const e = [...this.successUrls];
|
|
178
178
|
this.$emit("update:modelValue", e), this.$emit("sendFile", e);
|
|
179
179
|
},
|
|
180
|
-
/**
|
|
180
|
+
/** 规范化单条入库地址(保留域名,去掉签名 query) */
|
|
181
181
|
toSaveUrl(e) {
|
|
182
|
-
return
|
|
182
|
+
return Z(e, { bucketKind: this.bucketKind });
|
|
183
183
|
},
|
|
184
184
|
openFilePicker() {
|
|
185
185
|
const e = this.$refs.fileInput;
|
|
@@ -270,7 +270,7 @@ const Mt = {
|
|
|
270
270
|
return;
|
|
271
271
|
}
|
|
272
272
|
const r = URL.createObjectURL(l), a = {
|
|
273
|
-
uid:
|
|
273
|
+
uid: et(),
|
|
274
274
|
url: r,
|
|
275
275
|
previewUrl: r,
|
|
276
276
|
status: "uploading",
|
|
@@ -296,7 +296,7 @@ const Mt = {
|
|
|
296
296
|
bucketKind: this.bucketKind,
|
|
297
297
|
onProgress: n
|
|
298
298
|
});
|
|
299
|
-
if (e.url = this.toSaveUrl(l.
|
|
299
|
+
if (e.url = this.toSaveUrl(l.url || l.key) || l.url || l.key, e.previewUrl = l.previewUrl || "", ge(t))
|
|
300
300
|
try {
|
|
301
301
|
URL.revokeObjectURL(t);
|
|
302
302
|
} catch {
|
|
@@ -308,7 +308,7 @@ const Mt = {
|
|
|
308
308
|
},
|
|
309
309
|
initCropper() {
|
|
310
310
|
const e = this.$refs.cropImage;
|
|
311
|
-
!e || !this.cropImageUrl || (this.destroyCropper(), this.cropper = new
|
|
311
|
+
!e || !this.cropImageUrl || (this.destroyCropper(), this.cropper = new vt(e, {
|
|
312
312
|
aspectRatio: this.aspectRatio,
|
|
313
313
|
autoCropArea: 0.8,
|
|
314
314
|
viewMode: 1,
|
|
@@ -384,7 +384,7 @@ function Gt(e, t, n, l, r, a) {
|
|
|
384
384
|
q(" " + T(n.greyTips), 1)
|
|
385
385
|
])) : V("", !0),
|
|
386
386
|
b("div", It, [
|
|
387
|
-
(d(!0), m(Q, null,
|
|
387
|
+
(d(!0), m(Q, null, ne(r.fileList, (p, A) => (d(), m("div", {
|
|
388
388
|
key: p.uid,
|
|
389
389
|
class: j(["image-box", [`is-${p.status}`]]),
|
|
390
390
|
style: de(n.imageStyle)
|
|
@@ -444,7 +444,7 @@ function Gt(e, t, n, l, r, a) {
|
|
|
444
444
|
})
|
|
445
445
|
], 8, zt))
|
|
446
446
|
], 6))), 128)),
|
|
447
|
-
|
|
447
|
+
oe(b("div", {
|
|
448
448
|
class: "image-box upload-btn",
|
|
449
449
|
style: de(n.imageStyle),
|
|
450
450
|
onClick: t[1] || (t[1] = (...p) => a.handleUpload && a.handleUpload(...p))
|
|
@@ -460,7 +460,7 @@ function Gt(e, t, n, l, r, a) {
|
|
|
460
460
|
}),
|
|
461
461
|
t[6] || (t[6] = b("div", null, "上传图片", -1))
|
|
462
462
|
], 4), [
|
|
463
|
-
[
|
|
463
|
+
[ue, a.showUploadBtn]
|
|
464
464
|
])
|
|
465
465
|
]),
|
|
466
466
|
S(_, {
|
|
@@ -516,12 +516,12 @@ function Gt(e, t, n, l, r, a) {
|
|
|
516
516
|
]),
|
|
517
517
|
default: F(() => [
|
|
518
518
|
b("div", Kt, [
|
|
519
|
-
|
|
519
|
+
oe(b("img", {
|
|
520
520
|
ref: "cropImage",
|
|
521
521
|
src: r.cropImageUrl,
|
|
522
522
|
class: "cropper-img"
|
|
523
523
|
}, null, 8, jt), [
|
|
524
|
-
[
|
|
524
|
+
[ue, r.cropImageUrl]
|
|
525
525
|
]),
|
|
526
526
|
r.cropImageUrl ? V("", !0) : (d(), m("div", Wt, "请选择图片后进行裁剪"))
|
|
527
527
|
])
|
|
@@ -530,7 +530,7 @@ function Gt(e, t, n, l, r, a) {
|
|
|
530
530
|
}, 8, ["modelValue", "onClose"])
|
|
531
531
|
]);
|
|
532
532
|
}
|
|
533
|
-
const Jt = /* @__PURE__ */
|
|
533
|
+
const Jt = /* @__PURE__ */ ee(Mt, [["render", Gt], ["__scopeId", "data-v-80375d98"]]), Xt = ".mp4,.mov,.jpg,.jpeg,.m3u8,.png,.m4v,.doc,.docx,.xls,.xlsx,.pdf";
|
|
534
534
|
let He = 0;
|
|
535
535
|
function $e() {
|
|
536
536
|
return He += 1, `mg-file-${Date.now()}-${He}`;
|
|
@@ -542,7 +542,7 @@ function Zt(e) {
|
|
|
542
542
|
return Array.isArray(e) ? e.map((t) => {
|
|
543
543
|
const n = _e(t);
|
|
544
544
|
if (!n) return null;
|
|
545
|
-
const l = t && typeof t == "object" ? String(t.previewSrc || t.previewUrl || t.fileUrl || t.url || "").trim() : typeof t == "string" ? t.trim() : "", r =
|
|
545
|
+
const l = t && typeof t == "object" ? String(t.previewSrc || t.previewUrl || t.fileUrl || t.url || "").trim() : typeof t == "string" ? t.trim() : "", r = K(l) ? l : "";
|
|
546
546
|
return {
|
|
547
547
|
...n,
|
|
548
548
|
previewSrc: r
|
|
@@ -564,12 +564,12 @@ function Ae(e = "") {
|
|
|
564
564
|
}
|
|
565
565
|
function ze(e) {
|
|
566
566
|
return e.map((t) => {
|
|
567
|
-
const n =
|
|
567
|
+
const n = Z(t) || be(t) || t;
|
|
568
568
|
return {
|
|
569
569
|
uid: $e(),
|
|
570
570
|
name: Ae(t),
|
|
571
571
|
url: n,
|
|
572
|
-
previewSrc:
|
|
572
|
+
previewSrc: K(t) ? t : "",
|
|
573
573
|
status: "success",
|
|
574
574
|
percent: 100,
|
|
575
575
|
raw: null
|
|
@@ -586,7 +586,7 @@ function tn(e = []) {
|
|
|
586
586
|
id: n.id,
|
|
587
587
|
name: n.fileName,
|
|
588
588
|
url: n.fileUrl,
|
|
589
|
-
previewSrc:
|
|
589
|
+
previewSrc: K(String(l)) ? String(l) : "",
|
|
590
590
|
status: "success",
|
|
591
591
|
percent: 100,
|
|
592
592
|
raw: null
|
|
@@ -608,7 +608,7 @@ function nn(e = "") {
|
|
|
608
608
|
const ln = {
|
|
609
609
|
name: "MgFileUpload",
|
|
610
610
|
mixins: [qe],
|
|
611
|
-
components: { CircleCheck:
|
|
611
|
+
components: { CircleCheck: ht, CircleClose: We, Close: ft, Document: pt },
|
|
612
612
|
props: {
|
|
613
613
|
/** v-model:valueFormat=url 时为 string[];valueFormat=file 时为 { fileName, fileUrl }[] */
|
|
614
614
|
modelValue: { type: [Array, String], default: () => [] },
|
|
@@ -681,7 +681,7 @@ const ln = {
|
|
|
681
681
|
fileName: t.name,
|
|
682
682
|
fileUrl: t.url
|
|
683
683
|
})
|
|
684
|
-
).filter(Boolean) : e.map((t) =>
|
|
684
|
+
).filter(Boolean) : e.map((t) => Z(t.url) || t.url);
|
|
685
685
|
}
|
|
686
686
|
},
|
|
687
687
|
beforeUnmount() {
|
|
@@ -714,7 +714,7 @@ const ln = {
|
|
|
714
714
|
const h = typeof u == "string" ? u : (u == null ? void 0 : u.fileUrl) || (u == null ? void 0 : u.url) || "", C = r[U];
|
|
715
715
|
if (!C) return !0;
|
|
716
716
|
const L = typeof u == "object" ? u == null ? void 0 : u.id : void 0;
|
|
717
|
-
return
|
|
717
|
+
return Z(h) !== C.fileUrl || L != null && L !== "" && L !== C.id || Xe(h);
|
|
718
718
|
})) && this.$nextTick(() => this.emitFile());
|
|
719
719
|
return;
|
|
720
720
|
}
|
|
@@ -827,7 +827,7 @@ const ln = {
|
|
|
827
827
|
bucketKind: this.bucketKind,
|
|
828
828
|
onProgress: t
|
|
829
829
|
});
|
|
830
|
-
e.url = n.key || n.url, e.previewSrc = n.previewUrl || "", e.expireAt = n.expireAt, e.name = e.name || Ae(e.url), e.status = "success", t(100);
|
|
830
|
+
e.url = Z(n.url || n.key) || n.url || n.key, e.previewSrc = n.previewUrl || "", e.expireAt = n.expireAt, e.name = e.name || Ae(e.url), e.status = "success", t(100);
|
|
831
831
|
const l = e.raw;
|
|
832
832
|
e.raw = null, this.fileList.some((r) => r.uid === e.uid) || this.fileList.push(e), this.rememberSettled(e.name, e.url, e.previewSrc, e.expireAt), this.activeUploadCount = Math.max(0, this.activeUploadCount - 1), this.$emit("update:uploading", this.activeUploadCount > 0), this.emitFile(), this.$emit("success", n, { ...e, raw: l });
|
|
833
833
|
} catch (n) {
|
|
@@ -846,7 +846,7 @@ const ln = {
|
|
|
846
846
|
},
|
|
847
847
|
{ forceResign: !0 }
|
|
848
848
|
);
|
|
849
|
-
t != null && t.src && (e.previewSrc = t.src, e.expireAt =
|
|
849
|
+
t != null && t.src && (e.previewSrc = t.src, e.expireAt = ie(t.src) || e.expireAt);
|
|
850
850
|
},
|
|
851
851
|
removeFile(e) {
|
|
852
852
|
const t = this.fileList[e];
|
|
@@ -892,7 +892,7 @@ function gn(e, t, n, l, r, a) {
|
|
|
892
892
|
}, 8, ["disabled", "onClick"])) : V("", !0),
|
|
893
893
|
a.tipText ? (d(), m("div", an, T(a.tipText), 1)) : V("", !0),
|
|
894
894
|
n.showFileList ? (d(), m("ul", on, [
|
|
895
|
-
(d(!0), m(Q, null,
|
|
895
|
+
(d(!0), m(Q, null, ne(r.fileList, (c, _) => (d(), m("li", {
|
|
896
896
|
key: c.uid,
|
|
897
897
|
class: j(["mg-file-item", [`is-${c.status}`]])
|
|
898
898
|
}, [
|
|
@@ -956,7 +956,7 @@ function gn(e, t, n, l, r, a) {
|
|
|
956
956
|
])) : V("", !0)
|
|
957
957
|
]);
|
|
958
958
|
}
|
|
959
|
-
const mn = /* @__PURE__ */
|
|
959
|
+
const mn = /* @__PURE__ */ ee(ln, [["render", gn], ["__scopeId", "data-v-6d01c438"]]), vn = 12e4, je = 5e3, yn = {
|
|
960
960
|
name: "MgOssImg",
|
|
961
961
|
inheritAttrs: !1,
|
|
962
962
|
props: {
|
|
@@ -979,14 +979,14 @@ const mn = /* @__PURE__ */ Z(ln, [["render", gn], ["__scopeId", "data-v-4cd4fc2a
|
|
|
979
979
|
},
|
|
980
980
|
computed: {
|
|
981
981
|
displaySrc() {
|
|
982
|
-
return this.innerSrc ? this.innerSrc :
|
|
982
|
+
return this.innerSrc ? this.innerSrc : K(this.src) ? this.src : "";
|
|
983
983
|
},
|
|
984
984
|
resolveKey() {
|
|
985
|
-
const e =
|
|
985
|
+
const e = be(this.src) || (K(this.src) ? "" : String(this.src || "").trim());
|
|
986
986
|
return e || String(this.fileKey || "").trim();
|
|
987
987
|
},
|
|
988
988
|
resolveExpireAt() {
|
|
989
|
-
return this.innerExpireAt != null ? Number(this.innerExpireAt) : this.expireAt != null && this.expireAt !== "" ? Number(this.expireAt) :
|
|
989
|
+
return this.innerExpireAt != null ? Number(this.innerExpireAt) : this.expireAt != null && this.expireAt !== "" ? Number(this.expireAt) : ie(this.innerSrc || this.src);
|
|
990
990
|
}
|
|
991
991
|
},
|
|
992
992
|
watch: {
|
|
@@ -997,7 +997,7 @@ const mn = /* @__PURE__ */ Z(ln, [["render", gn], ["__scopeId", "data-v-4cd4fc2a
|
|
|
997
997
|
}
|
|
998
998
|
},
|
|
999
999
|
fileKey() {
|
|
1000
|
-
this.retried = !1, !
|
|
1000
|
+
this.retried = !1, !K(this.src) && !this.innerSrc && this.ensureSigned();
|
|
1001
1001
|
},
|
|
1002
1002
|
expireAt() {
|
|
1003
1003
|
this.scheduleRenew();
|
|
@@ -1014,8 +1014,8 @@ const mn = /* @__PURE__ */ Z(ln, [["render", gn], ["__scopeId", "data-v-4cd4fc2a
|
|
|
1014
1014
|
this.renewTimer != null && (clearTimeout(this.renewTimer), this.renewTimer = null);
|
|
1015
1015
|
},
|
|
1016
1016
|
resetAndBootstrap() {
|
|
1017
|
-
if (this.clearRenewTimer(), this.innerSrc = "", this.innerExpireAt = void 0, this.retried = !1,
|
|
1018
|
-
this.innerExpireAt = this.expireAt != null && this.expireAt !== "" ? Number(this.expireAt) :
|
|
1017
|
+
if (this.clearRenewTimer(), this.innerSrc = "", this.innerExpireAt = void 0, this.retried = !1, K(this.src)) {
|
|
1018
|
+
this.innerExpireAt = this.expireAt != null && this.expireAt !== "" ? Number(this.expireAt) : ie(this.src), this.scheduleRenew();
|
|
1019
1019
|
return;
|
|
1020
1020
|
}
|
|
1021
1021
|
this.ensureSigned();
|
|
@@ -1075,9 +1075,9 @@ const mn = /* @__PURE__ */ Z(ln, [["render", gn], ["__scopeId", "data-v-4cd4fc2a
|
|
|
1075
1075
|
this.signing = !0, this.lastRenewAt = Date.now();
|
|
1076
1076
|
try {
|
|
1077
1077
|
const n = await this.callResign(e), { url: l, expireAt: r } = this.pickSignedUrl(n, e);
|
|
1078
|
-
if (l &&
|
|
1078
|
+
if (l && K(l)) {
|
|
1079
1079
|
const a = l === this.innerSrc || l === this.src;
|
|
1080
|
-
this.innerSrc = l, this.innerExpireAt = r != null ? Number(r) :
|
|
1080
|
+
this.innerSrc = l, this.innerExpireAt = r != null ? Number(r) : ie(l), a || this.$emit("resign", { key: e, url: this.innerSrc, expireAt: this.innerExpireAt }), this.scheduleRenew();
|
|
1081
1081
|
}
|
|
1082
1082
|
} catch (n) {
|
|
1083
1083
|
console.warn("[MgOssImg] 到期续签失败", n);
|
|
@@ -1086,13 +1086,13 @@ const mn = /* @__PURE__ */ Z(ln, [["render", gn], ["__scopeId", "data-v-4cd4fc2a
|
|
|
1086
1086
|
}
|
|
1087
1087
|
},
|
|
1088
1088
|
async ensureSigned() {
|
|
1089
|
-
if (
|
|
1089
|
+
if (K(this.src) || this.signing) return;
|
|
1090
1090
|
const e = this.resolveKey;
|
|
1091
1091
|
if (e) {
|
|
1092
1092
|
this.signing = !0, this.lastRenewAt = Date.now();
|
|
1093
1093
|
try {
|
|
1094
1094
|
const t = await this.callResign(e), { url: n, expireAt: l } = this.pickSignedUrl(t, e);
|
|
1095
|
-
n &&
|
|
1095
|
+
n && K(n) && (this.innerSrc = n, this.innerExpireAt = l != null ? Number(l) : ie(n), this.$emit("resign", { key: e, url: this.innerSrc, expireAt: this.innerExpireAt }), this.scheduleRenew());
|
|
1096
1096
|
} catch (t) {
|
|
1097
1097
|
console.warn("[MgOssImg] 预签名失败", t);
|
|
1098
1098
|
} finally {
|
|
@@ -1107,7 +1107,7 @@ const mn = /* @__PURE__ */ Z(ln, [["render", gn], ["__scopeId", "data-v-4cd4fc2a
|
|
|
1107
1107
|
this.retried = !0;
|
|
1108
1108
|
try {
|
|
1109
1109
|
const n = await this.callResign(t), { url: l, expireAt: r } = this.pickSignedUrl(n, t);
|
|
1110
|
-
l &&
|
|
1110
|
+
l && K(l) && (this.innerSrc = l, this.innerExpireAt = r != null ? Number(r) : ie(l), this.$emit("resign", { key: t, url: this.innerSrc, expireAt: this.innerExpireAt }), this.scheduleRenew());
|
|
1111
1111
|
} catch (n) {
|
|
1112
1112
|
console.warn("[MgOssImg] 裂图续签失败", n);
|
|
1113
1113
|
}
|
|
@@ -1123,7 +1123,7 @@ function _n(e, t, n, l, r, a) {
|
|
|
1123
1123
|
onLoad: t[1] || (t[1] = (...u) => a.onLoad && a.onLoad(...u))
|
|
1124
1124
|
}), null, 16, bn);
|
|
1125
1125
|
}
|
|
1126
|
-
const wn = /* @__PURE__ */
|
|
1126
|
+
const wn = /* @__PURE__ */ ee(yn, [["render", _n], ["__scopeId", "data-v-5a56c5a2"]]), xn = {
|
|
1127
1127
|
__name: "DateRangePicker",
|
|
1128
1128
|
props: {
|
|
1129
1129
|
start: {
|
|
@@ -1198,7 +1198,7 @@ const wn = /* @__PURE__ */ Z(yn, [["render", _n], ["__scopeId", "data-v-5a56c5a2
|
|
|
1198
1198
|
}
|
|
1199
1199
|
C.value = [];
|
|
1200
1200
|
}
|
|
1201
|
-
|
|
1201
|
+
le(
|
|
1202
1202
|
() => [l.start, l.end],
|
|
1203
1203
|
([c, _]) => {
|
|
1204
1204
|
L(c, _);
|
|
@@ -1228,7 +1228,7 @@ const wn = /* @__PURE__ */ Z(yn, [["render", _n], ["__scopeId", "data-v-5a56c5a2
|
|
|
1228
1228
|
}, null, 8, ["modelValue", "type", "start-placeholder", "value-format", "default-time", "shortcuts", "clearable"]);
|
|
1229
1229
|
};
|
|
1230
1230
|
}
|
|
1231
|
-
},
|
|
1231
|
+
}, tt = /* @__PURE__ */ ee(xn, [["__scopeId", "data-v-0dfa12ab"]]), Sn = { class: "common-search__body" }, kn = { class: "common-search__control-wrap" }, Un = ["onKeyup"], Cn = { class: "common-search__range-sep" }, Fn = {
|
|
1232
1232
|
key: 5,
|
|
1233
1233
|
class: "common-search__range"
|
|
1234
1234
|
}, Ln = {
|
|
@@ -1278,7 +1278,7 @@ const wn = /* @__PURE__ */ Z(yn, [["render", _n], ["__scopeId", "data-v-5a56c5a2
|
|
|
1278
1278
|
const f = o === "min" ? s.minPlaceholder : s.maxPlaceholder, w = fe(s), x = o === "min" ? "最小值" : "最大值", R = /* @__PURE__ */ new Set(["最小", "最大", "最小值", "最大值"]);
|
|
1279
1279
|
return f != null && f !== "" ? w && R.has(String(f).trim()) ? `${w}${f}` : f : w ? `${w}${x}` : x;
|
|
1280
1280
|
}
|
|
1281
|
-
|
|
1281
|
+
le(
|
|
1282
1282
|
() => n.modelValue,
|
|
1283
1283
|
(s) => {
|
|
1284
1284
|
h(s, r.value) || (U = !0, r.value = { ...s || {} }, J(() => {
|
|
@@ -1286,27 +1286,27 @@ const wn = /* @__PURE__ */ Z(yn, [["render", _n], ["__scopeId", "data-v-5a56c5a2
|
|
|
1286
1286
|
}));
|
|
1287
1287
|
},
|
|
1288
1288
|
{ deep: !0, immediate: !0 }
|
|
1289
|
-
),
|
|
1289
|
+
), le(
|
|
1290
1290
|
r,
|
|
1291
1291
|
() => {
|
|
1292
1292
|
U || l("update:modelValue", { ...r.value });
|
|
1293
1293
|
},
|
|
1294
1294
|
{ deep: !0 }
|
|
1295
|
-
),
|
|
1295
|
+
), le(
|
|
1296
1296
|
() => n.itemList,
|
|
1297
1297
|
() => {
|
|
1298
|
-
L.value = !1, c.value = 0, J(() =>
|
|
1298
|
+
L.value = !1, c.value = 0, J(() => se());
|
|
1299
1299
|
},
|
|
1300
1300
|
{ deep: !0 }
|
|
1301
1301
|
), Se(() => {
|
|
1302
|
-
J(() =>
|
|
1303
|
-
!W && !D &&
|
|
1302
|
+
J(() => se()), typeof ResizeObserver < "u" && ($ = new ResizeObserver(() => {
|
|
1303
|
+
!W && !D && se();
|
|
1304
1304
|
}), C.value && $.observe(C.value)), window.addEventListener("resize", I);
|
|
1305
1305
|
}), Re(() => {
|
|
1306
1306
|
$ == null || $.disconnect(), window.removeEventListener("resize", I);
|
|
1307
1307
|
});
|
|
1308
1308
|
function I() {
|
|
1309
|
-
!W && !D &&
|
|
1309
|
+
!W && !D && se();
|
|
1310
1310
|
}
|
|
1311
1311
|
function X(s) {
|
|
1312
1312
|
const o = n.itemList.length;
|
|
@@ -1316,24 +1316,24 @@ const wn = /* @__PURE__ */ Z(yn, [["render", _n], ["__scopeId", "data-v-5a56c5a2
|
|
|
1316
1316
|
}
|
|
1317
1317
|
function k(s, o, f, w) {
|
|
1318
1318
|
let x = 1, R = s[o].offsetWidth;
|
|
1319
|
-
for (let
|
|
1320
|
-
const
|
|
1321
|
-
R + w +
|
|
1319
|
+
for (let H = o + 1; H < s.length; H += 1) {
|
|
1320
|
+
const z = s[H].offsetWidth;
|
|
1321
|
+
R + w + z > f ? (x += 1, R = z) : R += w + z;
|
|
1322
1322
|
}
|
|
1323
1323
|
return x;
|
|
1324
1324
|
}
|
|
1325
|
-
function
|
|
1325
|
+
function re(s, o, f, w) {
|
|
1326
1326
|
let x = 0, R = 0;
|
|
1327
|
-
for (let
|
|
1328
|
-
const
|
|
1329
|
-
if (
|
|
1330
|
-
x =
|
|
1327
|
+
for (let H = 0; H < s.length; H += 1) {
|
|
1328
|
+
const z = s[H].offsetWidth, te = x === 0 ? z : x + w + z;
|
|
1329
|
+
if (te + w + f <= o)
|
|
1330
|
+
x = te, R = H + 1;
|
|
1331
1331
|
else
|
|
1332
1332
|
break;
|
|
1333
1333
|
}
|
|
1334
1334
|
return R || 1;
|
|
1335
1335
|
}
|
|
1336
|
-
function
|
|
1336
|
+
function E(s) {
|
|
1337
1337
|
const o = s.type === "number-range" || s.type === "numberRange", f = 360;
|
|
1338
1338
|
if (!s.width) {
|
|
1339
1339
|
if (o) {
|
|
@@ -1363,7 +1363,7 @@ const wn = /* @__PURE__ */ Z(yn, [["render", _n], ["__scopeId", "data-v-5a56c5a2
|
|
|
1363
1363
|
}
|
|
1364
1364
|
function Te(s, o = 2) {
|
|
1365
1365
|
if (s == null || s === "") return;
|
|
1366
|
-
const f =
|
|
1366
|
+
const f = Qe(s, o);
|
|
1367
1367
|
if (f == null || f === "") return;
|
|
1368
1368
|
const w = Number(String(f).replace(/,/g, ""));
|
|
1369
1369
|
return Number.isFinite(w) ? w : void 0;
|
|
@@ -1373,19 +1373,19 @@ const wn = /* @__PURE__ */ Z(yn, [["render", _n], ["__scopeId", "data-v-5a56c5a2
|
|
|
1373
1373
|
let x = Te(r.value[o], w), R = Te(r.value[f], w);
|
|
1374
1374
|
x != null && R != null && x > R && ([x, R] = [R, x]), r.value[o] = x, r.value[f] = R;
|
|
1375
1375
|
}
|
|
1376
|
-
function
|
|
1376
|
+
function lt(s) {
|
|
1377
1377
|
Ue(s), Y();
|
|
1378
1378
|
}
|
|
1379
|
-
function
|
|
1379
|
+
function rt(s) {
|
|
1380
1380
|
const { startKey: o, endKey: f } = ke(s), w = r.value[o], x = r.value[f];
|
|
1381
1381
|
return w != null && w !== "" || x != null && x !== "";
|
|
1382
1382
|
}
|
|
1383
|
-
function
|
|
1383
|
+
function st(s) {
|
|
1384
1384
|
if (s.disabled) return;
|
|
1385
1385
|
const { startKey: o, endKey: f } = ke(s);
|
|
1386
1386
|
r.value[o] = void 0, r.value[f] = void 0, Y();
|
|
1387
1387
|
}
|
|
1388
|
-
async function
|
|
1388
|
+
async function it(s, o) {
|
|
1389
1389
|
if (typeof s.remoteMethod == "function") {
|
|
1390
1390
|
u[s.prop] = !0;
|
|
1391
1391
|
try {
|
|
@@ -1402,7 +1402,7 @@ const wn = /* @__PURE__ */ Z(yn, [["render", _n], ["__scopeId", "data-v-5a56c5a2
|
|
|
1402
1402
|
const x = s.scrollHeight;
|
|
1403
1403
|
return s.style.maxHeight = o, s.style.overflow = f, s.offsetHeight, s.style.transition = w, x;
|
|
1404
1404
|
}
|
|
1405
|
-
function
|
|
1405
|
+
function se() {
|
|
1406
1406
|
const s = C.value;
|
|
1407
1407
|
if (!s || W || D) return;
|
|
1408
1408
|
W = !0;
|
|
@@ -1412,15 +1412,15 @@ const wn = /* @__PURE__ */ Z(yn, [["render", _n], ["__scopeId", "data-v-5a56c5a2
|
|
|
1412
1412
|
return;
|
|
1413
1413
|
}
|
|
1414
1414
|
_.value = f[0].offsetHeight, p.value = Ce(s);
|
|
1415
|
-
const x = 16, R = o.clientWidth,
|
|
1416
|
-
let
|
|
1417
|
-
f.length >
|
|
1415
|
+
const x = 16, R = o.clientWidth, H = (w == null ? void 0 : w.offsetWidth) || 220, z = re(f, R, H, x);
|
|
1416
|
+
let te = 1;
|
|
1417
|
+
f.length > z && (te += k(f, z, R, x));
|
|
1418
1418
|
const he = c.value;
|
|
1419
|
-
c.value =
|
|
1420
|
-
const i =
|
|
1421
|
-
P.value = i, i ? L.value ? A.value = null : A.value = _.value : (L.value = !1, A.value = null), W = !1, (ye !== i || he !==
|
|
1419
|
+
c.value = z;
|
|
1420
|
+
const i = te > 1, ye = P.value;
|
|
1421
|
+
P.value = i, i ? L.value ? A.value = null : A.value = _.value : (L.value = !1, A.value = null), W = !1, (ye !== i || he !== z) && J(() => se());
|
|
1422
1422
|
}
|
|
1423
|
-
function
|
|
1423
|
+
function at() {
|
|
1424
1424
|
const s = C.value;
|
|
1425
1425
|
if (!s || D) return;
|
|
1426
1426
|
D = !0;
|
|
@@ -1441,10 +1441,10 @@ const wn = /* @__PURE__ */ Z(yn, [["render", _n], ["__scopeId", "data-v-5a56c5a2
|
|
|
1441
1441
|
});
|
|
1442
1442
|
}
|
|
1443
1443
|
window.setTimeout(() => {
|
|
1444
|
-
D = !1, L.value && (A.value = null),
|
|
1444
|
+
D = !1, L.value && (A.value = null), se();
|
|
1445
1445
|
}, 380);
|
|
1446
1446
|
}
|
|
1447
|
-
function
|
|
1447
|
+
function ot() {
|
|
1448
1448
|
const s = {};
|
|
1449
1449
|
return n.itemList.forEach((o) => {
|
|
1450
1450
|
o.type === "daterange" || o.type === "dateRange" ? (s[o.start || o.startProp] = void 0, s[o.end || o.endProp] = void 0) : o.type === "number-range" || o.type === "numberRange" ? (s[o.start || `${o.prop}Min`] = void 0, s[o.end || `${o.prop}Max`] = void 0) : o.multiple ? s[o.prop] = [] : o.prop && (s[o.prop] = void 0);
|
|
@@ -1457,11 +1457,11 @@ const wn = /* @__PURE__ */ Z(yn, [["render", _n], ["__scopeId", "data-v-5a56c5a2
|
|
|
1457
1457
|
Pe(), l("change", { ...r.value }), l("search", { ...r.value });
|
|
1458
1458
|
}
|
|
1459
1459
|
function Be() {
|
|
1460
|
-
r.value =
|
|
1460
|
+
r.value = ot(), Pe(), l("reset", { ...r.value }), l("change", { ...r.value });
|
|
1461
1461
|
}
|
|
1462
1462
|
return (s, o) => {
|
|
1463
|
-
const f = N("el-input"), w = N("el-option"), x = N("el-select"), R = N("el-input-number"),
|
|
1464
|
-
return
|
|
1463
|
+
const f = N("el-input"), w = N("el-option"), x = N("el-select"), R = N("el-input-number"), H = N("el-icon"), z = N("el-date-picker"), te = N("el-tooltip"), he = N("el-button");
|
|
1464
|
+
return oe((d(), m("div", {
|
|
1465
1465
|
class: j(["common-search", {
|
|
1466
1466
|
"is-single-row": !P.value,
|
|
1467
1467
|
"is-multi-row": P.value,
|
|
@@ -1476,14 +1476,14 @@ const wn = /* @__PURE__ */ Z(yn, [["render", _n], ["__scopeId", "data-v-5a56c5a2
|
|
|
1476
1476
|
class: "common-search__fields",
|
|
1477
1477
|
style: de(pe.value)
|
|
1478
1478
|
}, [
|
|
1479
|
-
(d(!0), m(Q, null,
|
|
1479
|
+
(d(!0), m(Q, null, ne(e.itemList, (i, ye) => (d(), m(Q, {
|
|
1480
1480
|
key: i.prop || i.start || ye
|
|
1481
1481
|
}, [
|
|
1482
1482
|
b("div", {
|
|
1483
1483
|
class: j(["common-search__field", [`is-${i.type}`, i.className]]),
|
|
1484
|
-
style: de(
|
|
1484
|
+
style: de(E(i))
|
|
1485
1485
|
}, [
|
|
1486
|
-
S(
|
|
1486
|
+
S(te, {
|
|
1487
1487
|
content: me(i),
|
|
1488
1488
|
disabled: !me(i),
|
|
1489
1489
|
placement: "top",
|
|
@@ -1518,7 +1518,7 @@ const wn = /* @__PURE__ */ Z(yn, [["render", _n], ["__scopeId", "data-v-5a56c5a2
|
|
|
1518
1518
|
onChange: Y
|
|
1519
1519
|
}, {
|
|
1520
1520
|
default: F(() => [
|
|
1521
|
-
(d(!0), m(Q, null,
|
|
1521
|
+
(d(!0), m(Q, null, ne(i.options || [], (v, Fe) => (d(), B(w, {
|
|
1522
1522
|
key: `${ve(v, i)}-${Fe}`,
|
|
1523
1523
|
label: Me(v, i),
|
|
1524
1524
|
value: ve(v, i),
|
|
@@ -1538,7 +1538,7 @@ const wn = /* @__PURE__ */ Z(yn, [["render", _n], ["__scopeId", "data-v-5a56c5a2
|
|
|
1538
1538
|
"collapse-tags": i.multiple,
|
|
1539
1539
|
"collapse-tags-tooltip": i.multiple,
|
|
1540
1540
|
"reserve-keyword": !1,
|
|
1541
|
-
"remote-method": (v) =>
|
|
1541
|
+
"remote-method": (v) => it(i, v),
|
|
1542
1542
|
loading: !!u[i.prop],
|
|
1543
1543
|
disabled: i.disabled,
|
|
1544
1544
|
class: "common-search__control",
|
|
@@ -1546,7 +1546,7 @@ const wn = /* @__PURE__ */ Z(yn, [["render", _n], ["__scopeId", "data-v-5a56c5a2
|
|
|
1546
1546
|
onChange: Y
|
|
1547
1547
|
}, {
|
|
1548
1548
|
default: F(() => [
|
|
1549
|
-
(d(!0), m(Q, null,
|
|
1549
|
+
(d(!0), m(Q, null, ne(a[i.prop] || i.options || [], (v, Fe) => (d(), B(w, {
|
|
1550
1550
|
key: `${ve(v, i)}-${Fe}`,
|
|
1551
1551
|
label: Me(v, i),
|
|
1552
1552
|
value: ve(v, i),
|
|
@@ -1557,7 +1557,7 @@ const wn = /* @__PURE__ */ Z(yn, [["render", _n], ["__scopeId", "data-v-5a56c5a2
|
|
|
1557
1557
|
}, 1032, ["modelValue", "onUpdate:modelValue", "placeholder", "multiple", "collapse-tags", "collapse-tags-tooltip", "remote-method", "loading", "disabled", "onClear"])) : i.type === "number-range" || i.type === "numberRange" ? (d(), m("div", {
|
|
1558
1558
|
key: 3,
|
|
1559
1559
|
class: "common-search__range common-search__range--number",
|
|
1560
|
-
onKeyup: Oe((v) =>
|
|
1560
|
+
onKeyup: Oe((v) => lt(i), ["enter"])
|
|
1561
1561
|
}, [
|
|
1562
1562
|
S(R, {
|
|
1563
1563
|
modelValue: r.value[i.start || `${i.prop}Min`],
|
|
@@ -1582,19 +1582,19 @@ const wn = /* @__PURE__ */ Z(yn, [["render", _n], ["__scopeId", "data-v-5a56c5a2
|
|
|
1582
1582
|
class: "common-search__range-input",
|
|
1583
1583
|
onBlur: (v) => Ue(i)
|
|
1584
1584
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "min", "max", "placeholder", "disabled", "onBlur"]),
|
|
1585
|
-
i.clearable !== !1 &&
|
|
1585
|
+
i.clearable !== !1 && rt(i) ? (d(), B(H, {
|
|
1586
1586
|
key: 0,
|
|
1587
1587
|
class: "common-search__range-clear",
|
|
1588
1588
|
onMousedown: o[0] || (o[0] = we(() => {
|
|
1589
1589
|
}, ["prevent"])),
|
|
1590
|
-
onClick: (v) =>
|
|
1590
|
+
onClick: (v) => st(i)
|
|
1591
1591
|
}, {
|
|
1592
1592
|
default: F(() => [
|
|
1593
|
-
S(
|
|
1593
|
+
S(ce(We))
|
|
1594
1594
|
]),
|
|
1595
1595
|
_: 1
|
|
1596
1596
|
}, 8, ["onClick"])) : V("", !0)
|
|
1597
|
-
], 40, Un)) : i.type === "date" ? (d(), B(
|
|
1597
|
+
], 40, Un)) : i.type === "date" ? (d(), B(z, {
|
|
1598
1598
|
key: 4,
|
|
1599
1599
|
modelValue: r.value[i.prop],
|
|
1600
1600
|
"onUpdate:modelValue": (v) => r.value[i.prop] = v,
|
|
@@ -1607,7 +1607,7 @@ const wn = /* @__PURE__ */ Z(yn, [["render", _n], ["__scopeId", "data-v-5a56c5a2
|
|
|
1607
1607
|
class: "common-search__control",
|
|
1608
1608
|
onChange: Y
|
|
1609
1609
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "type", "placeholder", "value-format", "format", "clearable", "disabled"])) : i.type === "daterange" || i.type === "dateRange" ? (d(), m("div", Fn, [
|
|
1610
|
-
S(
|
|
1610
|
+
S(tt, {
|
|
1611
1611
|
start: r.value[i.start || i.startProp],
|
|
1612
1612
|
"onUpdate:start": (v) => r.value[i.start || i.startProp] = v,
|
|
1613
1613
|
end: r.value[i.end || i.endProp],
|
|
@@ -1621,7 +1621,7 @@ const wn = /* @__PURE__ */ Z(yn, [["render", _n], ["__scopeId", "data-v-5a56c5a2
|
|
|
1621
1621
|
"can-clearable": i.clearable !== !1,
|
|
1622
1622
|
onChange: Y
|
|
1623
1623
|
}, null, 8, ["start", "onUpdate:start", "end", "onUpdate:end", "title", "type", "value-format", "format", "show-shortcuts", "shortcuts", "can-clearable"])
|
|
1624
|
-
])) :
|
|
1624
|
+
])) : ae(s.$slots, i.slotName || i.prop, {
|
|
1625
1625
|
item: i,
|
|
1626
1626
|
form: r.value
|
|
1627
1627
|
}, void 0, !0, 6)
|
|
@@ -1632,7 +1632,7 @@ const wn = /* @__PURE__ */ Z(yn, [["render", _n], ["__scopeId", "data-v-5a56c5a2
|
|
|
1632
1632
|
], 6),
|
|
1633
1633
|
X(ye) ? (d(), m("div", Ln, [
|
|
1634
1634
|
b("div", Nn, [
|
|
1635
|
-
|
|
1635
|
+
ae(s.$slots, "actions", {
|
|
1636
1636
|
search: Y,
|
|
1637
1637
|
reset: Be,
|
|
1638
1638
|
form: r.value
|
|
@@ -1661,13 +1661,13 @@ const wn = /* @__PURE__ */ Z(yn, [["render", _n], ["__scopeId", "data-v-5a56c5a2
|
|
|
1661
1661
|
key: 0,
|
|
1662
1662
|
link: "",
|
|
1663
1663
|
type: "primary",
|
|
1664
|
-
onClick:
|
|
1664
|
+
onClick: at
|
|
1665
1665
|
}, {
|
|
1666
1666
|
default: F(() => [
|
|
1667
1667
|
q(T(L.value ? "收起" : "展开") + " ", 1),
|
|
1668
|
-
S(
|
|
1668
|
+
S(H, { class: "el-icon--right" }, {
|
|
1669
1669
|
default: F(() => [
|
|
1670
|
-
L.value ? (d(), B(
|
|
1670
|
+
L.value ? (d(), B(ce(gt), { key: 0 })) : (d(), B(ce(mt), { key: 1 }))
|
|
1671
1671
|
]),
|
|
1672
1672
|
_: 1
|
|
1673
1673
|
})
|
|
@@ -1680,11 +1680,11 @@ const wn = /* @__PURE__ */ Z(yn, [["render", _n], ["__scopeId", "data-v-5a56c5a2
|
|
|
1680
1680
|
], 4)
|
|
1681
1681
|
])
|
|
1682
1682
|
], 2)), [
|
|
1683
|
-
[
|
|
1683
|
+
[ue, e.itemList.length]
|
|
1684
1684
|
]);
|
|
1685
1685
|
};
|
|
1686
1686
|
}
|
|
1687
|
-
}), Rn = /* @__PURE__ */
|
|
1687
|
+
}), Rn = /* @__PURE__ */ ee(An, [["__scopeId", "data-v-006c1ace"]]), $n = {
|
|
1688
1688
|
name: "MgOverflowHid",
|
|
1689
1689
|
props: {
|
|
1690
1690
|
label: String,
|
|
@@ -1719,10 +1719,10 @@ function On(e, t, n, l, r, a) {
|
|
|
1719
1719
|
}, {
|
|
1720
1720
|
reference: F(() => [
|
|
1721
1721
|
b("div", Pn, [
|
|
1722
|
-
|
|
1722
|
+
oe(b("span", {
|
|
1723
1723
|
class: j(n.labelClassName)
|
|
1724
1724
|
}, T(n.label) + ":", 3), [
|
|
1725
|
-
[
|
|
1725
|
+
[ue, n.label]
|
|
1726
1726
|
]),
|
|
1727
1727
|
b("span", {
|
|
1728
1728
|
class: j(n.valueClassName),
|
|
@@ -1731,19 +1731,19 @@ function On(e, t, n, l, r, a) {
|
|
|
1731
1731
|
])
|
|
1732
1732
|
]),
|
|
1733
1733
|
default: F(() => [
|
|
1734
|
-
|
|
1734
|
+
oe(b("span", {
|
|
1735
1735
|
class: j(n.labelClassName)
|
|
1736
1736
|
}, T(n.label) + ":", 3), [
|
|
1737
|
-
[
|
|
1737
|
+
[ue, n.label]
|
|
1738
1738
|
]),
|
|
1739
1739
|
b("span", { innerHTML: n.value }, null, 8, Tn)
|
|
1740
1740
|
]),
|
|
1741
1741
|
_: 1
|
|
1742
1742
|
})) : (d(), m("div", Vn, [
|
|
1743
|
-
|
|
1743
|
+
oe(b("span", {
|
|
1744
1744
|
class: j(n.labelClassName)
|
|
1745
1745
|
}, T(n.label) + ":", 3), [
|
|
1746
|
-
[
|
|
1746
|
+
[ue, n.label]
|
|
1747
1747
|
]),
|
|
1748
1748
|
b("span", {
|
|
1749
1749
|
class: j([n.valueClassName, "value"])
|
|
@@ -1753,7 +1753,7 @@ function On(e, t, n, l, r, a) {
|
|
|
1753
1753
|
]))
|
|
1754
1754
|
]);
|
|
1755
1755
|
}
|
|
1756
|
-
const
|
|
1756
|
+
const nt = /* @__PURE__ */ ee($n, [["render", On], ["__scopeId", "data-v-ef86ea54"]]), Dn = { key: 0 }, En = { key: 1 }, Hn = {
|
|
1757
1757
|
key: 2,
|
|
1758
1758
|
class: "price-text"
|
|
1759
1759
|
}, zn = {
|
|
@@ -1881,10 +1881,10 @@ const tt = /* @__PURE__ */ Z($n, [["render", On], ["__scopeId", "data-v-ef86ea54
|
|
|
1881
1881
|
r("cellClick", g, y, M, I), l.canCellClick && (y == null ? void 0 : y.label) !== "操作" && window.getSelection().toString();
|
|
1882
1882
|
}
|
|
1883
1883
|
function D(g, y, M) {
|
|
1884
|
-
var X, k,
|
|
1884
|
+
var X, k, re;
|
|
1885
1885
|
if (!l.showSelection || (y == null ? void 0 : y.type) === "selection") return;
|
|
1886
1886
|
const I = M == null ? void 0 : M.target;
|
|
1887
|
-
(X = I == null ? void 0 : I.closest) != null && X.call(I, "a, button, .el-button, .el-checkbox, .link-btn, input, textarea") || typeof l.selectable == "function" && !l.selectable(g, 0) || (
|
|
1887
|
+
(X = I == null ? void 0 : I.closest) != null && X.call(I, "a, button, .el-button, .el-checkbox, .link-btn, input, textarea") || typeof l.selectable == "function" && !l.selectable(g, 0) || (re = (k = a.value) == null ? void 0 : k.toggleRowSelection) == null || re.call(k, g);
|
|
1888
1888
|
}
|
|
1889
1889
|
function pe(g) {
|
|
1890
1890
|
r("selectionChange", g);
|
|
@@ -1903,7 +1903,7 @@ const tt = /* @__PURE__ */ Z($n, [["render", On], ["__scopeId", "data-v-ef86ea54
|
|
|
1903
1903
|
}), h.observe(u.value));
|
|
1904
1904
|
}), Re(() => {
|
|
1905
1905
|
h == null || h.disconnect(), h = null;
|
|
1906
|
-
}),
|
|
1906
|
+
}), le(
|
|
1907
1907
|
() => l.dataList,
|
|
1908
1908
|
() => {
|
|
1909
1909
|
J(() => {
|
|
@@ -1911,7 +1911,7 @@ const tt = /* @__PURE__ */ Z($n, [["render", On], ["__scopeId", "data-v-ef86ea54
|
|
|
1911
1911
|
p(), (y = (g = a.value) == null ? void 0 : g.doLayout) == null || y.call(g);
|
|
1912
1912
|
});
|
|
1913
1913
|
}
|
|
1914
|
-
),
|
|
1914
|
+
), le(
|
|
1915
1915
|
() => l.fillHeight,
|
|
1916
1916
|
(g) => {
|
|
1917
1917
|
g && J(() => {
|
|
@@ -1958,50 +1958,50 @@ const tt = /* @__PURE__ */ Z($n, [["render", On], ["__scopeId", "data-v-ef86ea54
|
|
|
1958
1958
|
index: _,
|
|
1959
1959
|
align: "center"
|
|
1960
1960
|
}, null, 8, ["label", "width"])) : V("", !0),
|
|
1961
|
-
(d(!0), m(Q, null,
|
|
1962
|
-
key: k.prop || k.slotName ||
|
|
1961
|
+
(d(!0), m(Q, null, ne(e.propList, (k, re) => (d(), B(M, Ne({
|
|
1962
|
+
key: k.prop || k.slotName || re
|
|
1963
1963
|
}, { ref_for: !0 }, c(k)), Nt({ _: 2 }, [
|
|
1964
1964
|
k.headerSlotName ? {
|
|
1965
1965
|
name: "header",
|
|
1966
1966
|
fn: F(() => [
|
|
1967
|
-
|
|
1967
|
+
ae(g.$slots, k.headerSlotName, { column: k }, void 0, !0)
|
|
1968
1968
|
]),
|
|
1969
1969
|
key: "0"
|
|
1970
1970
|
} : void 0,
|
|
1971
1971
|
k.slotName ? {
|
|
1972
1972
|
name: "default",
|
|
1973
|
-
fn: F((
|
|
1973
|
+
fn: F((E) => [
|
|
1974
1974
|
k.slotName === "overtext" ? (d(), m("div", Dn, [
|
|
1975
|
-
S(
|
|
1976
|
-
value: String(
|
|
1975
|
+
S(nt, {
|
|
1976
|
+
value: String(E.row[k.prop] ?? ""),
|
|
1977
1977
|
"max-length": k.maxLength || 18
|
|
1978
1978
|
}, null, 8, ["value", "max-length"])
|
|
1979
1979
|
])) : k.slotName === "whether" ? (d(), m("div", En, [
|
|
1980
1980
|
b("span", {
|
|
1981
1981
|
class: j({
|
|
1982
|
-
"whether-yes":
|
|
1983
|
-
"whether-no":
|
|
1982
|
+
"whether-yes": E.row[k.prop] == 1,
|
|
1983
|
+
"whether-no": E.row[k.prop] == 0
|
|
1984
1984
|
})
|
|
1985
|
-
}, T(
|
|
1986
|
-
])) : k.slotName === "price" ? (d(), m("div", Hn, T(
|
|
1987
|
-
row:
|
|
1988
|
-
index:
|
|
1985
|
+
}, T(E.row[k.prop] == 0 ? "否" : E.row[k.prop] == 1 ? "是" : ""), 3)
|
|
1986
|
+
])) : k.slotName === "price" ? (d(), m("div", Hn, T(ce(Qe)(E.row[k.prop], 2)), 1)) : k.slotName === "rate" ? (d(), m("div", zn, T(ce(_t)(E.row[k.prop], 2, "toPercentText")), 1)) : k.slotName === "boldtext" ? (d(), m("div", Kn, T(E.row[k.prop]), 1)) : ae(g.$slots, k.slotName, {
|
|
1987
|
+
row: E.row,
|
|
1988
|
+
index: E.$index,
|
|
1989
1989
|
column: k
|
|
1990
1990
|
}, () => [
|
|
1991
|
-
q(T(
|
|
1991
|
+
q(T(ce(wt)(E.row[k.prop])), 1)
|
|
1992
1992
|
], !0, 5)
|
|
1993
1993
|
]),
|
|
1994
1994
|
key: "1"
|
|
1995
1995
|
} : void 0
|
|
1996
1996
|
]), 1040))), 128)),
|
|
1997
|
-
|
|
1997
|
+
ae(g.$slots, "default", {}, void 0, !0)
|
|
1998
1998
|
]),
|
|
1999
1999
|
_: 3
|
|
2000
2000
|
}, 16, ["data", "height", "class"])
|
|
2001
2001
|
], 512),
|
|
2002
2002
|
e.pagination ? (d(), m("div", jn, [
|
|
2003
2003
|
b("div", Wn, [
|
|
2004
|
-
|
|
2004
|
+
ae(g.$slots, "pagination-left", {}, void 0, !0)
|
|
2005
2005
|
]),
|
|
2006
2006
|
S(X, {
|
|
2007
2007
|
class: "common-table__pagination-right",
|
|
@@ -2018,7 +2018,7 @@ const tt = /* @__PURE__ */ Z($n, [["render", On], ["__scopeId", "data-v-ef86ea54
|
|
|
2018
2018
|
], 2);
|
|
2019
2019
|
};
|
|
2020
2020
|
}
|
|
2021
|
-
}), qn = /* @__PURE__ */
|
|
2021
|
+
}), qn = /* @__PURE__ */ ee(Yn, [["__scopeId", "data-v-dd7169fd"]]), Gn = ["aria-checked", "disabled", "onClick"], Jn = { class: "segmented__label" }, Xn = {
|
|
2022
2022
|
key: 0,
|
|
2023
2023
|
class: "segmented__badge"
|
|
2024
2024
|
}, Qn = {
|
|
@@ -2061,7 +2061,7 @@ const tt = /* @__PURE__ */ Z($n, [["render", On], ["__scopeId", "data-v-ef86ea54
|
|
|
2061
2061
|
function _(p) {
|
|
2062
2062
|
p.disabled || (l("update:modelValue", p.value), l("change", p.value));
|
|
2063
2063
|
}
|
|
2064
|
-
return
|
|
2064
|
+
return le(
|
|
2065
2065
|
() => [n.modelValue, n.options],
|
|
2066
2066
|
async () => {
|
|
2067
2067
|
await J(), c();
|
|
@@ -2081,7 +2081,7 @@ const tt = /* @__PURE__ */ Z($n, [["render", On], ["__scopeId", "data-v-ef86ea54
|
|
|
2081
2081
|
class: j(["segmented__thumb", { "is-ready": u.value }]),
|
|
2082
2082
|
style: de(U.value)
|
|
2083
2083
|
}, null, 6),
|
|
2084
|
-
(d(!0), m(Q, null,
|
|
2084
|
+
(d(!0), m(Q, null, ne(e.options, ($, W) => (d(), m("button", {
|
|
2085
2085
|
key: String($.value),
|
|
2086
2086
|
ref_for: !0,
|
|
2087
2087
|
ref: (D) => P(D, W),
|
|
@@ -2097,7 +2097,7 @@ const tt = /* @__PURE__ */ Z($n, [["render", On], ["__scopeId", "data-v-ef86ea54
|
|
|
2097
2097
|
], 10, Gn))), 128))
|
|
2098
2098
|
], 512));
|
|
2099
2099
|
}
|
|
2100
|
-
}, Zn = /* @__PURE__ */
|
|
2100
|
+
}, Zn = /* @__PURE__ */ ee(Qn, [["__scopeId", "data-v-b7b0abe9"]]);
|
|
2101
2101
|
function el(e) {
|
|
2102
2102
|
return e == null || e === "" ? [] : Array.isArray(e) ? e.map((t) => String(t).trim()).filter(Boolean) : String(e).split(",").map((t) => t.trim()).filter(Boolean);
|
|
2103
2103
|
}
|
|
@@ -2115,7 +2115,7 @@ function tl(e) {
|
|
|
2115
2115
|
function Le(e, t, n, l = !1) {
|
|
2116
2116
|
const r = el(t.value);
|
|
2117
2117
|
if (!r.length) return;
|
|
2118
|
-
let a =
|
|
2118
|
+
let a = Ze(r, n);
|
|
2119
2119
|
l && (a = !a), a || tl(e);
|
|
2120
2120
|
}
|
|
2121
2121
|
function nl(e) {
|
|
@@ -2140,22 +2140,22 @@ const ll = {
|
|
|
2140
2140
|
MgOssImg: wn,
|
|
2141
2141
|
MgSearchForm: Rn,
|
|
2142
2142
|
MgDataTable: qn,
|
|
2143
|
-
MgDateRangePicker:
|
|
2143
|
+
MgDateRangePicker: tt,
|
|
2144
2144
|
MgSegmentedControl: Zn,
|
|
2145
|
-
MgOverflowHid:
|
|
2145
|
+
MgOverflowHid: nt
|
|
2146
2146
|
}, rl = (e, t = {}) => {
|
|
2147
2147
|
Object.entries(ll).forEach(([r, a]) => {
|
|
2148
2148
|
e.component(a.name || r, a);
|
|
2149
2149
|
}), t.ossUrl && St(t.ossUrl), typeof t.getPermissions == "function" && kt(t.getPermissions), nl(e);
|
|
2150
2150
|
const n = Ut(t), l = Ct(n);
|
|
2151
|
-
Ft(n), Lt(l), e.config.globalProperties.$request = n, e.config.globalProperties.$api = l, e.config.globalProperties.$hasPermission =
|
|
2151
|
+
Ft(n), Lt(l), e.config.globalProperties.$request = n, e.config.globalProperties.$api = l, e.config.globalProperties.$hasPermission = Ze;
|
|
2152
2152
|
}, cl = {
|
|
2153
2153
|
install: rl,
|
|
2154
2154
|
version: "1.2.2"
|
|
2155
2155
|
};
|
|
2156
2156
|
export {
|
|
2157
2157
|
qn as DataTable,
|
|
2158
|
-
|
|
2158
|
+
tt as DateRangePicker,
|
|
2159
2159
|
fl as FILE_PREVIEW_ROUTE_PATH,
|
|
2160
2160
|
xt as FilePreview,
|
|
2161
2161
|
mn as FileUpload,
|
|
@@ -2163,7 +2163,7 @@ export {
|
|
|
2163
2163
|
wn as OssImg,
|
|
2164
2164
|
Rn as SearchForm,
|
|
2165
2165
|
Zn as SegmentedControl,
|
|
2166
|
-
|
|
2166
|
+
nt as TableOverflowHid,
|
|
2167
2167
|
qe as aliOssMixin,
|
|
2168
2168
|
Je as batchSign,
|
|
2169
2169
|
hl as batchSignOss,
|
|
@@ -2175,7 +2175,7 @@ export {
|
|
|
2175
2175
|
Ut as createRequest,
|
|
2176
2176
|
bl as createService,
|
|
2177
2177
|
cl as default,
|
|
2178
|
-
|
|
2178
|
+
be as extractObjectKey,
|
|
2179
2179
|
_l as getApi,
|
|
2180
2180
|
wl as getOssSts,
|
|
2181
2181
|
xl as getPermissionGetter,
|
|
@@ -2183,16 +2183,16 @@ export {
|
|
|
2183
2183
|
kl as getSystemId,
|
|
2184
2184
|
Ul as getUploadSign,
|
|
2185
2185
|
Cl as getUserId,
|
|
2186
|
-
|
|
2186
|
+
Ze as hasPermission,
|
|
2187
2187
|
rl as install,
|
|
2188
2188
|
nl as installPermissionDirectives,
|
|
2189
2189
|
bt as isExpiringSoon,
|
|
2190
|
-
|
|
2191
|
-
|
|
2190
|
+
K as isHttpUrl,
|
|
2191
|
+
Xe as isSignedUrl,
|
|
2192
2192
|
Fl as normalizeAttachFile,
|
|
2193
2193
|
Ll as openFilePreview,
|
|
2194
2194
|
yt as openOssFile,
|
|
2195
|
-
|
|
2195
|
+
ie as parseExpireAtFromUrl,
|
|
2196
2196
|
Nl as resolveUploadPreviewUrl,
|
|
2197
2197
|
Lt as setApi,
|
|
2198
2198
|
St as setDefaultOssUrl,
|
|
@@ -2202,7 +2202,7 @@ export {
|
|
|
2202
2202
|
Rl as setUserId,
|
|
2203
2203
|
_e as toOssSaveFile,
|
|
2204
2204
|
Ve as toOssSaveFiles,
|
|
2205
|
-
|
|
2205
|
+
Z as toOssSaveUrl,
|
|
2206
2206
|
Ge as uploadToOss,
|
|
2207
2207
|
$l as utils
|
|
2208
2208
|
};
|