mgacn-commonsdk 1.2.5 → 1.2.7
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-admin.js +4 -1
- package/dist/mgacn-commonsdk.js +386 -379
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/mgacn-commonsdk.js
CHANGED
|
@@ -3,14 +3,14 @@ import { ElMessage as K, ElMessageBox as Oe } from "element-plus";
|
|
|
3
3
|
import mt from "cropperjs";
|
|
4
4
|
import * as $e from "ali-oss";
|
|
5
5
|
import { g as gt, _ as G, o as yt, k as Ie, t as vt, l as bt, m as Ae, 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
|
|
7
|
-
import { resolveComponent as F, openBlock as p, createElementBlock as
|
|
8
|
-
const Ft = $e.default ?? $e,
|
|
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 F, openBlock as p, createElementBlock as g, createElementVNode as k, toDisplayString as P, createCommentVNode as D, createTextVNode as j, Fragment as W, renderList as q, normalizeStyle as re, normalizeClass as z, createVNode as C, withCtx as S, withModifiers as de, withDirectives as ee, vShow as te, createBlock as T, computed as ye, ref as A, watch as se, onMounted as ve, reactive as Le, nextTick as Z, onBeforeUnmount as ze, withKeys as Ne, unref as ne, renderSlot as ae, mergeProps as Me, createSlots as St } from "vue";
|
|
8
|
+
const Ft = $e.default ?? $e, He = "__MGACN_COMMONSDK_OSS_URL__";
|
|
9
9
|
function $t(e = "") {
|
|
10
|
-
globalThis[
|
|
10
|
+
globalThis[He] = String(e || "").replace(/\/$/, "");
|
|
11
11
|
}
|
|
12
12
|
function Ee() {
|
|
13
|
-
return globalThis[
|
|
13
|
+
return globalThis[He] || "";
|
|
14
14
|
}
|
|
15
15
|
function Pe(e) {
|
|
16
16
|
return String(e).padStart(2, "0");
|
|
@@ -73,47 +73,47 @@ async function We(e = {}) {
|
|
|
73
73
|
const h = t || await _e({ dir: r, foldName: s }), $ = r || h.options.uploadDir || be(s);
|
|
74
74
|
let b = o;
|
|
75
75
|
if (!b) {
|
|
76
|
-
const V = n.name || "file",
|
|
76
|
+
const V = n.name || "file", H = V.lastIndexOf("."), J = H > -1 ? V.slice(H) : "";
|
|
77
77
|
b = `${$}${je(10)}${J}`;
|
|
78
78
|
}
|
|
79
79
|
const x = (V) => {
|
|
80
80
|
typeof m == "function" && m(Math.min(100, Math.max(0, Math.floor(Number(V) * 100))));
|
|
81
|
-
}, M = n.size > 1 * 1024 * 1024,
|
|
81
|
+
}, M = n.size > 1 * 1024 * 1024, c = {
|
|
82
82
|
progress: async (V) => {
|
|
83
83
|
x(V);
|
|
84
84
|
}
|
|
85
85
|
};
|
|
86
|
-
let
|
|
86
|
+
let u;
|
|
87
87
|
const d = async (V) => {
|
|
88
|
-
const
|
|
88
|
+
const H = V ? { "x-oss-object-acl": "public-read" } : void 0;
|
|
89
89
|
return M ? h.multipartUpload(b, n, {
|
|
90
|
-
...
|
|
91
|
-
...
|
|
90
|
+
...c,
|
|
91
|
+
...H ? { headers: H } : {}
|
|
92
92
|
}) : h.put(b, n, {
|
|
93
|
-
...
|
|
94
|
-
...
|
|
93
|
+
...c,
|
|
94
|
+
...H ? { headers: H } : {}
|
|
95
95
|
});
|
|
96
96
|
};
|
|
97
97
|
try {
|
|
98
|
-
x(0.01),
|
|
98
|
+
x(0.01), u = await d(!0);
|
|
99
99
|
} catch {
|
|
100
|
-
x(0.01),
|
|
100
|
+
x(0.01), u = await d(!1);
|
|
101
101
|
}
|
|
102
|
-
const
|
|
103
|
-
if (
|
|
102
|
+
const U = ((R = u == null ? void 0 : u.res) == null ? void 0 : R.statusCode) ?? ((X = u == null ? void 0 : u.res) == null ? void 0 : X.status);
|
|
103
|
+
if (U && U !== 200)
|
|
104
104
|
throw new Error("[mgacn-commonsdk] 上传失败");
|
|
105
105
|
x(1);
|
|
106
|
-
const L = (h.options.ossUrl || "").replace(/\/$/, ""),
|
|
107
|
-
let B =
|
|
106
|
+
const L = (h.options.ossUrl || "").replace(/\/$/, ""), y = L ? `${L}/${b}` : b;
|
|
107
|
+
let B = y;
|
|
108
108
|
try {
|
|
109
109
|
B = h.signatureUrl(b, { expires: 3600 * 24 });
|
|
110
110
|
} catch {
|
|
111
111
|
}
|
|
112
112
|
return {
|
|
113
113
|
name: b,
|
|
114
|
-
url:
|
|
114
|
+
url: y,
|
|
115
115
|
previewUrl: B,
|
|
116
|
-
raw:
|
|
116
|
+
raw: u,
|
|
117
117
|
client: h
|
|
118
118
|
};
|
|
119
119
|
}
|
|
@@ -487,7 +487,7 @@ const Dt = {
|
|
|
487
487
|
}, Vt = { class: "upload-image-cropper" }, Ot = ["multiple", "accept"], It = {
|
|
488
488
|
key: 0,
|
|
489
489
|
class: "grey-tips"
|
|
490
|
-
}, At = { key: 0 },
|
|
490
|
+
}, At = { key: 0 }, zt = { class: "list-box" }, Ht = {
|
|
491
491
|
key: 0,
|
|
492
492
|
class: "status-mask is-uploading"
|
|
493
493
|
}, Et = { class: "progress-wrap" }, jt = { class: "percent-text" }, Kt = {
|
|
@@ -501,9 +501,9 @@ 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 = F("el-image"), h = F("el-progress"), $ = F("CircleCloseFilled"), b = F("el-icon"), x = F("Delete"), M = F("Plus"),
|
|
505
|
-
return p(),
|
|
506
|
-
|
|
504
|
+
const m = F("el-image"), h = F("el-progress"), $ = F("CircleCloseFilled"), b = F("el-icon"), x = F("Delete"), M = F("Plus"), c = F("el-button"), u = F("el-dialog");
|
|
505
|
+
return p(), g("div", Vt, [
|
|
506
|
+
k("input", {
|
|
507
507
|
ref: "fileInput",
|
|
508
508
|
type: "file",
|
|
509
509
|
class: "file-input",
|
|
@@ -511,24 +511,24 @@ function Qt(e, t, n, r, s, o) {
|
|
|
511
511
|
accept: n.accept,
|
|
512
512
|
onChange: t[0] || (t[0] = (...d) => o.onFileChange && o.onFileChange(...d))
|
|
513
513
|
}, null, 40, Ot),
|
|
514
|
-
n.greyTips ? (p(),
|
|
515
|
-
n.otherTips ? (p(),
|
|
516
|
-
j(" " +
|
|
514
|
+
n.greyTips ? (p(), g("div", It, [
|
|
515
|
+
n.otherTips ? (p(), g("div", At, P(n.otherTips), 1)) : D("", !0),
|
|
516
|
+
j(" " + P(n.greyTips), 1)
|
|
517
517
|
])) : D("", !0),
|
|
518
|
-
|
|
519
|
-
(p(!0),
|
|
518
|
+
k("div", zt, [
|
|
519
|
+
(p(!0), g(W, null, q(s.fileList, (d, U) => (p(), g("div", {
|
|
520
520
|
key: d.uid,
|
|
521
|
-
class:
|
|
521
|
+
class: z(["image-box", [`is-${d.status}`]]),
|
|
522
522
|
style: re(n.imageStyle)
|
|
523
523
|
}, [
|
|
524
|
-
|
|
524
|
+
C(m, {
|
|
525
525
|
src: d.previewUrl || d.url,
|
|
526
526
|
fit: "cover",
|
|
527
527
|
class: "img"
|
|
528
528
|
}, null, 8, ["src"]),
|
|
529
|
-
d.status === "uploading" ? (p(),
|
|
530
|
-
|
|
531
|
-
|
|
529
|
+
d.status === "uploading" ? (p(), g("div", Ht, [
|
|
530
|
+
k("div", Et, [
|
|
531
|
+
C(h, {
|
|
532
532
|
type: "circle",
|
|
533
533
|
percentage: d.percent,
|
|
534
534
|
width: 30,
|
|
@@ -536,66 +536,66 @@ function Qt(e, t, n, r, s, o) {
|
|
|
536
536
|
"show-text": !1,
|
|
537
537
|
color: "var(--mg-primary, #ff5722)"
|
|
538
538
|
}, null, 8, ["percentage"]),
|
|
539
|
-
|
|
539
|
+
k("span", jt, P(d.percent) + "%", 1)
|
|
540
540
|
])
|
|
541
|
-
])) : d.status === "fail" ? (p(),
|
|
542
|
-
|
|
541
|
+
])) : d.status === "fail" ? (p(), g("div", Kt, [
|
|
542
|
+
C(b, {
|
|
543
543
|
class: "fail-icon",
|
|
544
544
|
size: 16
|
|
545
545
|
}, {
|
|
546
546
|
default: S(() => [
|
|
547
|
-
|
|
547
|
+
C($)
|
|
548
548
|
]),
|
|
549
549
|
_: 1
|
|
550
550
|
}),
|
|
551
|
-
t[5] || (t[5] =
|
|
552
|
-
|
|
551
|
+
t[5] || (t[5] = k("span", { class: "fail-text" }, "失败", -1)),
|
|
552
|
+
C(b, {
|
|
553
553
|
class: "remove-icon",
|
|
554
554
|
size: 14,
|
|
555
555
|
title: "删除",
|
|
556
|
-
onClick: de((L) => o.removeImg(
|
|
556
|
+
onClick: de((L) => o.removeImg(U), ["stop"])
|
|
557
557
|
}, {
|
|
558
558
|
default: S(() => [
|
|
559
|
-
|
|
559
|
+
C(x)
|
|
560
560
|
]),
|
|
561
561
|
_: 1
|
|
562
562
|
}, 8, ["onClick"])
|
|
563
|
-
])) : (p(),
|
|
563
|
+
])) : (p(), g("div", {
|
|
564
564
|
key: 2,
|
|
565
565
|
class: "status-mask is-success",
|
|
566
|
-
onClick: (L) => o.removeImg(
|
|
566
|
+
onClick: (L) => o.removeImg(U)
|
|
567
567
|
}, [
|
|
568
|
-
|
|
568
|
+
C(b, {
|
|
569
569
|
class: "remove-icon",
|
|
570
570
|
size: 16
|
|
571
571
|
}, {
|
|
572
572
|
default: S(() => [
|
|
573
|
-
|
|
573
|
+
C(x)
|
|
574
574
|
]),
|
|
575
575
|
_: 1
|
|
576
576
|
})
|
|
577
577
|
], 8, Wt))
|
|
578
578
|
], 6))), 128)),
|
|
579
|
-
ee(
|
|
579
|
+
ee(k("div", {
|
|
580
580
|
class: "image-box upload-btn",
|
|
581
581
|
style: re(n.imageStyle),
|
|
582
582
|
onClick: t[1] || (t[1] = (...d) => o.handleUpload && o.handleUpload(...d))
|
|
583
583
|
}, [
|
|
584
|
-
|
|
584
|
+
C(b, {
|
|
585
585
|
class: "icon",
|
|
586
586
|
size: 14
|
|
587
587
|
}, {
|
|
588
588
|
default: S(() => [
|
|
589
|
-
|
|
589
|
+
C(M)
|
|
590
590
|
]),
|
|
591
591
|
_: 1
|
|
592
592
|
}),
|
|
593
|
-
t[6] || (t[6] =
|
|
593
|
+
t[6] || (t[6] = k("div", null, "上传图片", -1))
|
|
594
594
|
], 4), [
|
|
595
595
|
[te, o.showUploadBtn]
|
|
596
596
|
])
|
|
597
597
|
]),
|
|
598
|
-
|
|
598
|
+
C(u, {
|
|
599
599
|
modelValue: s.dialogVisible,
|
|
600
600
|
"onUpdate:modelValue": t[4] || (t[4] = (d) => s.dialogVisible = d),
|
|
601
601
|
title: "裁剪图片",
|
|
@@ -607,8 +607,8 @@ function Qt(e, t, n, r, s, o) {
|
|
|
607
607
|
onClose: o.handleBack
|
|
608
608
|
}, {
|
|
609
609
|
footer: S(() => [
|
|
610
|
-
n.isDegree ? (p(),
|
|
611
|
-
|
|
610
|
+
n.isDegree ? (p(), g("div", Xt, [
|
|
611
|
+
C(c, {
|
|
612
612
|
onClick: t[2] || (t[2] = (d) => o.rotate(-n.degree))
|
|
613
613
|
}, {
|
|
614
614
|
default: S(() => [...t[7] || (t[7] = [
|
|
@@ -616,7 +616,7 @@ function Qt(e, t, n, r, s, o) {
|
|
|
616
616
|
])]),
|
|
617
617
|
_: 1
|
|
618
618
|
}),
|
|
619
|
-
|
|
619
|
+
C(c, {
|
|
620
620
|
onClick: t[3] || (t[3] = (d) => o.rotate(n.degree))
|
|
621
621
|
}, {
|
|
622
622
|
default: S(() => [...t[8] || (t[8] = [
|
|
@@ -625,17 +625,17 @@ function Qt(e, t, n, r, s, o) {
|
|
|
625
625
|
_: 1
|
|
626
626
|
})
|
|
627
627
|
])) : D("", !0),
|
|
628
|
-
|
|
629
|
-
|
|
628
|
+
k("div", Jt, [
|
|
629
|
+
C(c, {
|
|
630
630
|
type: "primary",
|
|
631
631
|
onClick: o.openFilePicker
|
|
632
632
|
}, {
|
|
633
633
|
default: S(() => [
|
|
634
|
-
j(
|
|
634
|
+
j(P(s.cropImageUrl ? "重新上传" : "点击上传"), 1)
|
|
635
635
|
]),
|
|
636
636
|
_: 1
|
|
637
637
|
}, 8, ["onClick"]),
|
|
638
|
-
|
|
638
|
+
C(c, {
|
|
639
639
|
type: "primary",
|
|
640
640
|
onClick: o.confirmCrop
|
|
641
641
|
}, {
|
|
@@ -647,15 +647,15 @@ function Qt(e, t, n, r, s, o) {
|
|
|
647
647
|
])
|
|
648
648
|
]),
|
|
649
649
|
default: S(() => [
|
|
650
|
-
|
|
651
|
-
ee(
|
|
650
|
+
k("div", Yt, [
|
|
651
|
+
ee(k("img", {
|
|
652
652
|
ref: "cropImage",
|
|
653
653
|
src: s.cropImageUrl,
|
|
654
654
|
class: "cropper-img"
|
|
655
655
|
}, null, 8, qt), [
|
|
656
656
|
[te, s.cropImageUrl]
|
|
657
657
|
]),
|
|
658
|
-
s.cropImageUrl ? D("", !0) : (p(),
|
|
658
|
+
s.cropImageUrl ? D("", !0) : (p(), g("div", Gt, "请选择图片后进行裁剪"))
|
|
659
659
|
])
|
|
660
660
|
]),
|
|
661
661
|
_: 1
|
|
@@ -922,97 +922,104 @@ const rn = {
|
|
|
922
922
|
class: "el-upload__tip"
|
|
923
923
|
}, dn = {
|
|
924
924
|
key: 2,
|
|
925
|
-
class: "
|
|
926
|
-
}, pn = { class: "
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
925
|
+
class: "mg-file-list"
|
|
926
|
+
}, pn = { class: "mg-file-item__row" }, fn = ["href", "target", "onClick"], hn = ["title"], mn = {
|
|
927
|
+
key: 0,
|
|
928
|
+
class: "mg-file-item__percent"
|
|
929
|
+
}, gn = ["onClick"];
|
|
930
|
+
function yn(e, t, n, r, s, o) {
|
|
931
|
+
const m = F("el-button"), h = F("Document"), $ = F("el-icon"), b = F("CircleCheck"), x = F("CircleClose"), M = F("Close"), c = F("el-progress");
|
|
932
|
+
return p(), g("div", on, [
|
|
933
|
+
k("input", {
|
|
931
934
|
ref: "fileInput",
|
|
932
935
|
type: "file",
|
|
933
936
|
class: "file-input",
|
|
934
937
|
multiple: o.multiple,
|
|
935
938
|
accept: n.accept,
|
|
936
939
|
disabled: n.disabled,
|
|
937
|
-
onChange: t[0] || (t[0] = (...
|
|
940
|
+
onChange: t[0] || (t[0] = (...u) => o.onFileChange && o.onFileChange(...u))
|
|
938
941
|
}, null, 40, un),
|
|
939
|
-
n.showButton ? (p(),
|
|
942
|
+
n.showButton ? (p(), T(m, {
|
|
940
943
|
key: 0,
|
|
941
944
|
type: "primary",
|
|
942
945
|
disabled: n.disabled || !o.showUploadBtn,
|
|
943
946
|
onClick: o.handleUpload
|
|
944
947
|
}, {
|
|
945
948
|
default: S(() => [
|
|
946
|
-
j(
|
|
949
|
+
j(P(n.buttonText), 1)
|
|
947
950
|
]),
|
|
948
951
|
_: 1
|
|
949
952
|
}, 8, ["disabled", "onClick"])) : D("", !0),
|
|
950
|
-
o.tipText ? (p(),
|
|
951
|
-
n.showFileList ? (p(),
|
|
952
|
-
(p(!0),
|
|
953
|
-
key:
|
|
954
|
-
class:
|
|
955
|
-
tabindex: "0"
|
|
953
|
+
o.tipText ? (p(), g("div", cn, P(o.tipText), 1)) : D("", !0),
|
|
954
|
+
n.showFileList ? (p(), g("ul", dn, [
|
|
955
|
+
(p(!0), g(W, null, q(s.fileList, (u, d) => (p(), g("li", {
|
|
956
|
+
key: u.uid,
|
|
957
|
+
class: z(["mg-file-item", [`is-${u.status}`]])
|
|
956
958
|
}, [
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
class: "
|
|
960
|
-
href:
|
|
961
|
-
target:
|
|
959
|
+
k("div", pn, [
|
|
960
|
+
k("a", {
|
|
961
|
+
class: "mg-file-item__name",
|
|
962
|
+
href: u.url || void 0,
|
|
963
|
+
target: u.url ? "_blank" : void 0,
|
|
962
964
|
rel: "noopener noreferrer",
|
|
963
|
-
onClick: de((
|
|
965
|
+
onClick: de((U) => o.onFileClick(u), ["prevent"])
|
|
964
966
|
}, [
|
|
965
|
-
|
|
967
|
+
C($, { class: "mg-file-item__doc" }, {
|
|
966
968
|
default: S(() => [
|
|
967
|
-
|
|
969
|
+
C(h)
|
|
968
970
|
]),
|
|
969
971
|
_: 1
|
|
970
972
|
}),
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
973
|
+
k("span", {
|
|
974
|
+
class: "mg-file-item__text",
|
|
975
|
+
title: u.name
|
|
976
|
+
}, P(u.name), 9, hn)
|
|
977
|
+
], 8, fn),
|
|
978
|
+
u.status === "uploading" ? (p(), g("span", mn, P(u.percent) + "% ", 1)) : u.status === "success" ? (p(), T($, {
|
|
979
|
+
key: 1,
|
|
980
|
+
class: "mg-file-item__status is-success"
|
|
978
981
|
}, {
|
|
979
982
|
default: S(() => [
|
|
980
|
-
|
|
983
|
+
C(b)
|
|
981
984
|
]),
|
|
982
985
|
_: 1
|
|
983
|
-
})) :
|
|
984
|
-
key:
|
|
985
|
-
class: "
|
|
986
|
+
})) : u.status === "fail" ? (p(), T($, {
|
|
987
|
+
key: 2,
|
|
988
|
+
class: "mg-file-item__status is-fail"
|
|
986
989
|
}, {
|
|
987
990
|
default: S(() => [
|
|
988
|
-
|
|
991
|
+
C(x)
|
|
989
992
|
]),
|
|
990
993
|
_: 1
|
|
991
|
-
})) : D("", !0)
|
|
994
|
+
})) : D("", !0),
|
|
995
|
+
u.status !== "uploading" ? (p(), g("button", {
|
|
996
|
+
key: 3,
|
|
997
|
+
type: "button",
|
|
998
|
+
class: "mg-file-item__remove",
|
|
999
|
+
title: "删除",
|
|
1000
|
+
onClick: de((U) => o.removeFile(d), ["stop"])
|
|
1001
|
+
}, [
|
|
1002
|
+
C($, { size: 14 }, {
|
|
1003
|
+
default: S(() => [
|
|
1004
|
+
C(M)
|
|
1005
|
+
]),
|
|
1006
|
+
_: 1
|
|
1007
|
+
})
|
|
1008
|
+
], 8, gn)) : D("", !0)
|
|
992
1009
|
]),
|
|
993
|
-
|
|
1010
|
+
u.status === "uploading" ? (p(), T(c, {
|
|
994
1011
|
key: 0,
|
|
995
|
-
class: "
|
|
996
|
-
title: "删除",
|
|
997
|
-
onClick: de((k) => o.removeFile(d), ["stop"])
|
|
998
|
-
}, {
|
|
999
|
-
default: S(() => [
|
|
1000
|
-
U(M)
|
|
1001
|
-
]),
|
|
1002
|
-
_: 1
|
|
1003
|
-
}, 8, ["onClick"])) : D("", !0),
|
|
1004
|
-
c.status === "uploading" ? (p(), P(u, {
|
|
1005
|
-
key: 1,
|
|
1006
|
-
class: "el-upload-list__item-progress",
|
|
1012
|
+
class: "mg-file-item__progress",
|
|
1007
1013
|
type: "line",
|
|
1008
|
-
percentage:
|
|
1009
|
-
"stroke-width":
|
|
1014
|
+
percentage: u.percent,
|
|
1015
|
+
"stroke-width": 4,
|
|
1016
|
+
"show-text": !1
|
|
1010
1017
|
}, null, 8, ["percentage"])) : D("", !0)
|
|
1011
1018
|
], 2))), 128))
|
|
1012
1019
|
])) : D("", !0)
|
|
1013
1020
|
]);
|
|
1014
1021
|
}
|
|
1015
|
-
const
|
|
1022
|
+
const vn = /* @__PURE__ */ G(rn, [["render", yn], ["__scopeId", "data-v-b070dc22"]]), bn = {
|
|
1016
1023
|
__name: "DateRangePicker",
|
|
1017
1024
|
props: {
|
|
1018
1025
|
start: {
|
|
@@ -1044,66 +1051,66 @@ const yn = /* @__PURE__ */ G(rn, [["render", gn], ["__scopeId", "data-v-0cf84609
|
|
|
1044
1051
|
emits: ["update:start", "update:end", "change"],
|
|
1045
1052
|
setup(e, { emit: t }) {
|
|
1046
1053
|
const n = t, r = e;
|
|
1047
|
-
function s(
|
|
1048
|
-
const
|
|
1049
|
-
return
|
|
1054
|
+
function s(c) {
|
|
1055
|
+
const u = new Date(c);
|
|
1056
|
+
return u.setHours(0, 0, 0, 0), u;
|
|
1050
1057
|
}
|
|
1051
|
-
function o(
|
|
1052
|
-
const
|
|
1053
|
-
return
|
|
1058
|
+
function o(c) {
|
|
1059
|
+
const u = new Date(c);
|
|
1060
|
+
return u.setHours(23, 59, 59, 0), u;
|
|
1054
1061
|
}
|
|
1055
|
-
function m(
|
|
1056
|
-
const
|
|
1057
|
-
return
|
|
1062
|
+
function m(c) {
|
|
1063
|
+
const u = o(/* @__PURE__ */ new Date()), d = s(/* @__PURE__ */ new Date());
|
|
1064
|
+
return c(d), [d, u];
|
|
1058
1065
|
}
|
|
1059
1066
|
const h = [
|
|
1060
1067
|
{
|
|
1061
1068
|
text: "七天内",
|
|
1062
|
-
value: () => m((
|
|
1063
|
-
|
|
1069
|
+
value: () => m((c) => {
|
|
1070
|
+
c.setDate(c.getDate() - 6);
|
|
1064
1071
|
})
|
|
1065
1072
|
},
|
|
1066
1073
|
{
|
|
1067
1074
|
text: "一个月内",
|
|
1068
|
-
value: () => m((
|
|
1069
|
-
|
|
1075
|
+
value: () => m((c) => {
|
|
1076
|
+
c.setMonth(c.getMonth() - 1);
|
|
1070
1077
|
})
|
|
1071
1078
|
},
|
|
1072
1079
|
{
|
|
1073
1080
|
text: "一年内",
|
|
1074
|
-
value: () => m((
|
|
1075
|
-
|
|
1081
|
+
value: () => m((c) => {
|
|
1082
|
+
c.setFullYear(c.getFullYear() - 1);
|
|
1076
1083
|
})
|
|
1077
1084
|
}
|
|
1078
1085
|
], $ = ye(() => {
|
|
1079
|
-
var
|
|
1086
|
+
var c;
|
|
1080
1087
|
if (r.showShortcuts)
|
|
1081
|
-
return (
|
|
1088
|
+
return (c = r.shortcuts) != null && c.length ? r.shortcuts : h;
|
|
1082
1089
|
}), b = A([]);
|
|
1083
|
-
function x(
|
|
1084
|
-
if (
|
|
1085
|
-
b.value = [
|
|
1090
|
+
function x(c, u) {
|
|
1091
|
+
if (c && u) {
|
|
1092
|
+
b.value = [c, u];
|
|
1086
1093
|
return;
|
|
1087
1094
|
}
|
|
1088
1095
|
b.value = [];
|
|
1089
1096
|
}
|
|
1090
1097
|
se(
|
|
1091
1098
|
() => [r.start, r.end],
|
|
1092
|
-
([
|
|
1093
|
-
x(
|
|
1099
|
+
([c, u]) => {
|
|
1100
|
+
x(c, u);
|
|
1094
1101
|
}
|
|
1095
1102
|
), ve(() => {
|
|
1096
1103
|
x(r.start, r.end);
|
|
1097
1104
|
});
|
|
1098
|
-
function M(
|
|
1099
|
-
const
|
|
1100
|
-
|
|
1105
|
+
function M(c) {
|
|
1106
|
+
const u = Array.isArray(c) ? c[0] : "", d = Array.isArray(c) ? c[1] : "";
|
|
1107
|
+
u && d ? (n("update:start", u), n("update:end", d)) : (n("update:start", ""), n("update:end", "")), n("change");
|
|
1101
1108
|
}
|
|
1102
|
-
return (
|
|
1109
|
+
return (c, u) => {
|
|
1103
1110
|
const d = F("el-date-picker");
|
|
1104
|
-
return p(),
|
|
1111
|
+
return p(), T(d, {
|
|
1105
1112
|
modelValue: b.value,
|
|
1106
|
-
"onUpdate:modelValue":
|
|
1113
|
+
"onUpdate:modelValue": u[0] || (u[0] = (U) => b.value = U),
|
|
1107
1114
|
type: e.type,
|
|
1108
1115
|
"range-separator": "至",
|
|
1109
1116
|
"start-placeholder": e.title ? `${e.title} 开始` : "开始",
|
|
@@ -1117,13 +1124,13 @@ const yn = /* @__PURE__ */ G(rn, [["render", gn], ["__scopeId", "data-v-0cf84609
|
|
|
1117
1124
|
}, null, 8, ["modelValue", "type", "start-placeholder", "value-format", "default-time", "shortcuts", "clearable"]);
|
|
1118
1125
|
};
|
|
1119
1126
|
}
|
|
1120
|
-
}, Ge = /* @__PURE__ */ G(
|
|
1127
|
+
}, Ge = /* @__PURE__ */ G(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 = {
|
|
1121
1128
|
key: 5,
|
|
1122
1129
|
class: "common-search__range"
|
|
1123
|
-
},
|
|
1130
|
+
}, xn = {
|
|
1124
1131
|
key: 0,
|
|
1125
1132
|
class: "common-search__actions is-inline"
|
|
1126
|
-
},
|
|
1133
|
+
}, Sn = { class: "common-search__actions-main" }, Fn = /* @__PURE__ */ Object.assign({ name: "MgSearchForm" }, {
|
|
1127
1134
|
__name: "SearchForm",
|
|
1128
1135
|
props: {
|
|
1129
1136
|
modelValue: { type: Object, default: () => ({}) },
|
|
@@ -1136,12 +1143,12 @@ const yn = /* @__PURE__ */ G(rn, [["render", gn], ["__scopeId", "data-v-0cf84609
|
|
|
1136
1143
|
function $(l, i) {
|
|
1137
1144
|
return JSON.stringify(l ?? {}) === JSON.stringify(i ?? {});
|
|
1138
1145
|
}
|
|
1139
|
-
const b = A(null), x = A(!1), M = A(!1),
|
|
1140
|
-
let L = null,
|
|
1146
|
+
const b = A(null), x = A(!1), M = A(!1), c = A(0), u = A(0), d = A(0), U = A(null);
|
|
1147
|
+
let L = null, y = !1, B = !1;
|
|
1141
1148
|
const R = ye(() => {
|
|
1142
|
-
if (!(!M.value ||
|
|
1149
|
+
if (!(!M.value || U.value == null))
|
|
1143
1150
|
return {
|
|
1144
|
-
maxHeight: `${
|
|
1151
|
+
maxHeight: `${U.value}px`,
|
|
1145
1152
|
overflow: "hidden"
|
|
1146
1153
|
};
|
|
1147
1154
|
});
|
|
@@ -1151,21 +1158,21 @@ const yn = /* @__PURE__ */ G(rn, [["render", gn], ["__scopeId", "data-v-0cf84609
|
|
|
1151
1158
|
function V(l = {}) {
|
|
1152
1159
|
return String(l.tip || X(l) || "").trim();
|
|
1153
1160
|
}
|
|
1154
|
-
function
|
|
1161
|
+
function H(l = "") {
|
|
1155
1162
|
const i = String(l).trim();
|
|
1156
1163
|
return !i || (/* @__PURE__ */ new Set(["全部", "或选择", "请输入或选择"])).has(i) ? "" : i.replace(/^请(输入|选择)/, "").trim() || i;
|
|
1157
1164
|
}
|
|
1158
1165
|
function J(l = {}, i = "") {
|
|
1159
1166
|
if (l.placeholder != null && l.placeholder !== "") {
|
|
1160
|
-
const
|
|
1161
|
-
if (
|
|
1167
|
+
const w = H(l.placeholder);
|
|
1168
|
+
if (w) return w;
|
|
1162
1169
|
}
|
|
1163
1170
|
const f = X(l);
|
|
1164
|
-
return f ||
|
|
1171
|
+
return f || H(i) || i;
|
|
1165
1172
|
}
|
|
1166
1173
|
function Ce(l = {}, i = "min") {
|
|
1167
|
-
const f = i === "min" ? l.minPlaceholder : l.maxPlaceholder,
|
|
1168
|
-
return f != null && f !== "" ?
|
|
1174
|
+
const f = i === "min" ? l.minPlaceholder : l.maxPlaceholder, _ = X(l), w = i === "min" ? "最小值" : "最大值", N = /* @__PURE__ */ new Set(["最小", "最大", "最小值", "最大值"]);
|
|
1175
|
+
return f != null && f !== "" ? _ && N.has(String(f).trim()) ? `${_}${f}` : f : _ ? `${_}${w}` : w;
|
|
1169
1176
|
}
|
|
1170
1177
|
se(
|
|
1171
1178
|
() => n.modelValue,
|
|
@@ -1184,39 +1191,39 @@ const yn = /* @__PURE__ */ G(rn, [["render", gn], ["__scopeId", "data-v-0cf84609
|
|
|
1184
1191
|
), se(
|
|
1185
1192
|
() => n.itemList,
|
|
1186
1193
|
() => {
|
|
1187
|
-
x.value = !1,
|
|
1194
|
+
x.value = !1, c.value = 0, Z(() => Q());
|
|
1188
1195
|
},
|
|
1189
1196
|
{ deep: !0 }
|
|
1190
1197
|
), ve(() => {
|
|
1191
1198
|
Z(() => Q()), typeof ResizeObserver < "u" && (L = new ResizeObserver(() => {
|
|
1192
|
-
!
|
|
1199
|
+
!y && !B && Q();
|
|
1193
1200
|
}), b.value && L.observe(b.value)), window.addEventListener("resize", ke);
|
|
1194
|
-
}),
|
|
1201
|
+
}), ze(() => {
|
|
1195
1202
|
L == null || L.disconnect(), window.removeEventListener("resize", ke);
|
|
1196
1203
|
});
|
|
1197
1204
|
function ke() {
|
|
1198
|
-
!
|
|
1205
|
+
!y && !B && Q();
|
|
1199
1206
|
}
|
|
1200
1207
|
function Je(l) {
|
|
1201
1208
|
const i = n.itemList.length;
|
|
1202
1209
|
if (!i) return !1;
|
|
1203
|
-
const f =
|
|
1210
|
+
const f = c.value > 0 ? c.value : i;
|
|
1204
1211
|
return l === Math.min(f, i) - 1;
|
|
1205
1212
|
}
|
|
1206
|
-
function Qe(l, i, f,
|
|
1207
|
-
let
|
|
1213
|
+
function Qe(l, i, f, _) {
|
|
1214
|
+
let w = 1, N = l[i].offsetWidth;
|
|
1208
1215
|
for (let O = i + 1; O < l.length; O += 1) {
|
|
1209
1216
|
const I = l[O].offsetWidth;
|
|
1210
|
-
N +
|
|
1217
|
+
N + _ + I > f ? (w += 1, N = I) : N += _ + I;
|
|
1211
1218
|
}
|
|
1212
|
-
return
|
|
1219
|
+
return w;
|
|
1213
1220
|
}
|
|
1214
|
-
function Ze(l, i, f,
|
|
1215
|
-
let
|
|
1221
|
+
function Ze(l, i, f, _) {
|
|
1222
|
+
let w = 0, N = 0;
|
|
1216
1223
|
for (let O = 0; O < l.length; O += 1) {
|
|
1217
|
-
const I = l[O].offsetWidth, Y =
|
|
1218
|
-
if (Y +
|
|
1219
|
-
|
|
1224
|
+
const I = l[O].offsetWidth, Y = w === 0 ? I : w + _ + I;
|
|
1225
|
+
if (Y + _ + f <= i)
|
|
1226
|
+
w = Y, N = O + 1;
|
|
1220
1227
|
else
|
|
1221
1228
|
break;
|
|
1222
1229
|
}
|
|
@@ -1231,9 +1238,9 @@ const yn = /* @__PURE__ */ G(rn, [["render", gn], ["__scopeId", "data-v-0cf84609
|
|
|
1231
1238
|
}
|
|
1232
1239
|
return;
|
|
1233
1240
|
}
|
|
1234
|
-
let
|
|
1235
|
-
const
|
|
1236
|
-
return { width:
|
|
1241
|
+
let _ = typeof l.width == "number" ? l.width : parseInt(String(l.width), 10);
|
|
1242
|
+
const w = typeof l.width == "number" || Number.isFinite(_) ? `${_}px` : l.width;
|
|
1243
|
+
return { width: w, minWidth: w };
|
|
1237
1244
|
}
|
|
1238
1245
|
function Ue(l, i) {
|
|
1239
1246
|
if (l == null) return "";
|
|
@@ -1254,20 +1261,20 @@ const yn = /* @__PURE__ */ G(rn, [["render", gn], ["__scopeId", "data-v-0cf84609
|
|
|
1254
1261
|
if (l == null || l === "") return;
|
|
1255
1262
|
const f = Ie(l, i);
|
|
1256
1263
|
if (f == null || f === "") return;
|
|
1257
|
-
const
|
|
1258
|
-
return Number.isFinite(
|
|
1264
|
+
const _ = Number(String(f).replace(/,/g, ""));
|
|
1265
|
+
return Number.isFinite(_) ? _ : void 0;
|
|
1259
1266
|
}
|
|
1260
1267
|
function fe(l) {
|
|
1261
|
-
const { startKey: i, endKey: f } = pe(l),
|
|
1262
|
-
let
|
|
1263
|
-
|
|
1268
|
+
const { startKey: i, endKey: f } = pe(l), _ = l.precision ?? 2;
|
|
1269
|
+
let w = xe(s.value[i], _), N = xe(s.value[f], _);
|
|
1270
|
+
w != null && N != null && w > N && ([w, N] = [N, w]), s.value[i] = w, s.value[f] = N;
|
|
1264
1271
|
}
|
|
1265
1272
|
function tt(l) {
|
|
1266
1273
|
fe(l), E();
|
|
1267
1274
|
}
|
|
1268
1275
|
function nt(l) {
|
|
1269
|
-
const { startKey: i, endKey: f } = pe(l),
|
|
1270
|
-
return
|
|
1276
|
+
const { startKey: i, endKey: f } = pe(l), _ = s.value[i], w = s.value[f];
|
|
1277
|
+
return _ != null && _ !== "" || w != null && w !== "";
|
|
1271
1278
|
}
|
|
1272
1279
|
function lt(l) {
|
|
1273
1280
|
if (l.disabled) return;
|
|
@@ -1286,51 +1293,51 @@ const yn = /* @__PURE__ */ G(rn, [["render", gn], ["__scopeId", "data-v-0cf84609
|
|
|
1286
1293
|
}
|
|
1287
1294
|
}
|
|
1288
1295
|
function he(l) {
|
|
1289
|
-
const i = l.style.maxHeight, f = l.style.overflow,
|
|
1296
|
+
const i = l.style.maxHeight, f = l.style.overflow, _ = l.style.transition;
|
|
1290
1297
|
l.style.transition = "none", l.style.maxHeight = "none", l.style.overflow = "visible";
|
|
1291
|
-
const
|
|
1292
|
-
return l.style.maxHeight = i, l.style.overflow = f, l.offsetHeight, l.style.transition =
|
|
1298
|
+
const w = l.scrollHeight;
|
|
1299
|
+
return l.style.maxHeight = i, l.style.overflow = f, l.offsetHeight, l.style.transition = _, w;
|
|
1293
1300
|
}
|
|
1294
1301
|
function Q() {
|
|
1295
1302
|
const l = b.value;
|
|
1296
|
-
if (!l ||
|
|
1297
|
-
|
|
1298
|
-
const i = l.closest(".common-search"), f = Array.from(l.querySelectorAll(".common-search__field")),
|
|
1303
|
+
if (!l || y || B) return;
|
|
1304
|
+
y = !0;
|
|
1305
|
+
const i = l.closest(".common-search"), f = Array.from(l.querySelectorAll(".common-search__field")), _ = l.querySelector(".common-search__actions");
|
|
1299
1306
|
if (!f.length || !i) {
|
|
1300
|
-
M.value = !1,
|
|
1307
|
+
M.value = !1, u.value = 0, d.value = 0, U.value = null, c.value = 0, y = !1;
|
|
1301
1308
|
return;
|
|
1302
1309
|
}
|
|
1303
|
-
|
|
1304
|
-
const
|
|
1310
|
+
u.value = f[0].offsetHeight, d.value = he(l);
|
|
1311
|
+
const w = 16, N = i.clientWidth, O = (_ == null ? void 0 : _.offsetWidth) || 220, I = Ze(f, N, O, w);
|
|
1305
1312
|
let Y = 1;
|
|
1306
|
-
f.length > I && (Y += Qe(f, I, N,
|
|
1307
|
-
const le =
|
|
1308
|
-
|
|
1313
|
+
f.length > I && (Y += Qe(f, I, N, w));
|
|
1314
|
+
const le = c.value;
|
|
1315
|
+
c.value = I;
|
|
1309
1316
|
const a = Y > 1, ue = M.value;
|
|
1310
|
-
M.value = a, a ? x.value ?
|
|
1317
|
+
M.value = a, a ? x.value ? U.value = null : U.value = u.value : (x.value = !1, U.value = null), y = !1, (ue !== a || le !== I) && Z(() => Q());
|
|
1311
1318
|
}
|
|
1312
1319
|
function at() {
|
|
1313
1320
|
const l = b.value;
|
|
1314
1321
|
if (!l || B) return;
|
|
1315
1322
|
B = !0;
|
|
1316
|
-
const i = l.getBoundingClientRect().height ||
|
|
1323
|
+
const i = l.getBoundingClientRect().height || u.value;
|
|
1317
1324
|
if (x.value)
|
|
1318
|
-
|
|
1325
|
+
U.value = i || he(l), x.value = !1, requestAnimationFrame(() => {
|
|
1319
1326
|
requestAnimationFrame(() => {
|
|
1320
|
-
|
|
1327
|
+
U.value = u.value;
|
|
1321
1328
|
});
|
|
1322
1329
|
});
|
|
1323
1330
|
else {
|
|
1324
|
-
|
|
1331
|
+
U.value = i;
|
|
1325
1332
|
const f = he(l);
|
|
1326
1333
|
d.value = f, x.value = !0, requestAnimationFrame(() => {
|
|
1327
1334
|
requestAnimationFrame(() => {
|
|
1328
|
-
|
|
1335
|
+
U.value = Math.max(f, u.value || 0);
|
|
1329
1336
|
});
|
|
1330
1337
|
});
|
|
1331
1338
|
}
|
|
1332
1339
|
window.setTimeout(() => {
|
|
1333
|
-
B = !1, x.value && (
|
|
1340
|
+
B = !1, x.value && (U.value = null), Q();
|
|
1334
1341
|
}, 380);
|
|
1335
1342
|
}
|
|
1336
1343
|
function rt() {
|
|
@@ -1349,41 +1356,41 @@ const yn = /* @__PURE__ */ G(rn, [["render", gn], ["__scopeId", "data-v-0cf84609
|
|
|
1349
1356
|
s.value = rt(), Se(), r("reset", { ...s.value }), r("change", { ...s.value });
|
|
1350
1357
|
}
|
|
1351
1358
|
return (l, i) => {
|
|
1352
|
-
const f = F("el-input"),
|
|
1353
|
-
return ee((p(),
|
|
1354
|
-
class:
|
|
1359
|
+
const f = F("el-input"), _ = F("el-option"), w = F("el-select"), N = F("el-input-number"), O = F("el-icon"), I = F("el-date-picker"), Y = F("el-tooltip"), le = F("el-button");
|
|
1360
|
+
return ee((p(), g("div", {
|
|
1361
|
+
class: z(["common-search", {
|
|
1355
1362
|
"is-single-row": !M.value,
|
|
1356
1363
|
"is-multi-row": M.value,
|
|
1357
1364
|
"is-expanded": M.value && x.value,
|
|
1358
1365
|
"is-collapsed": M.value && !x.value
|
|
1359
1366
|
}])
|
|
1360
1367
|
}, [
|
|
1361
|
-
|
|
1362
|
-
|
|
1368
|
+
k("div", _n, [
|
|
1369
|
+
k("div", {
|
|
1363
1370
|
ref_key: "fieldsRef",
|
|
1364
1371
|
ref: b,
|
|
1365
1372
|
class: "common-search__fields",
|
|
1366
1373
|
style: re(R.value)
|
|
1367
1374
|
}, [
|
|
1368
|
-
(p(!0),
|
|
1375
|
+
(p(!0), g(W, null, q(e.itemList, (a, ue) => (p(), g(W, {
|
|
1369
1376
|
key: a.prop || a.start || ue
|
|
1370
1377
|
}, [
|
|
1371
|
-
|
|
1372
|
-
class:
|
|
1378
|
+
k("div", {
|
|
1379
|
+
class: z(["common-search__field", [`is-${a.type}`, a.className]]),
|
|
1373
1380
|
style: re(et(a))
|
|
1374
1381
|
}, [
|
|
1375
|
-
|
|
1382
|
+
C(Y, {
|
|
1376
1383
|
content: V(a),
|
|
1377
1384
|
disabled: !V(a),
|
|
1378
1385
|
placement: "top",
|
|
1379
1386
|
"show-after": 280
|
|
1380
1387
|
}, {
|
|
1381
1388
|
default: S(() => [
|
|
1382
|
-
|
|
1383
|
-
a.type === "input" || a.type === "text" ? (p(),
|
|
1389
|
+
k("div", wn, [
|
|
1390
|
+
a.type === "input" || a.type === "text" ? (p(), T(f, {
|
|
1384
1391
|
key: 0,
|
|
1385
1392
|
modelValue: s.value[a.prop],
|
|
1386
|
-
"onUpdate:modelValue": (
|
|
1393
|
+
"onUpdate:modelValue": (v) => s.value[a.prop] = v,
|
|
1387
1394
|
modelModifiers: { trim: !0 },
|
|
1388
1395
|
clearable: "",
|
|
1389
1396
|
placeholder: J(a, "请输入"),
|
|
@@ -1392,10 +1399,10 @@ const yn = /* @__PURE__ */ G(rn, [["render", gn], ["__scopeId", "data-v-0cf84609
|
|
|
1392
1399
|
class: "common-search__control",
|
|
1393
1400
|
onKeyup: Ne(E, ["enter"]),
|
|
1394
1401
|
onClear: E
|
|
1395
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder", "maxlength", "disabled"])) : a.type === "select" ? (p(),
|
|
1402
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder", "maxlength", "disabled"])) : a.type === "select" ? (p(), T(w, {
|
|
1396
1403
|
key: 1,
|
|
1397
1404
|
modelValue: s.value[a.prop],
|
|
1398
|
-
"onUpdate:modelValue": (
|
|
1405
|
+
"onUpdate:modelValue": (v) => s.value[a.prop] = v,
|
|
1399
1406
|
placeholder: J(a, "请选择"),
|
|
1400
1407
|
clearable: "",
|
|
1401
1408
|
filterable: a.filterable !== !1,
|
|
@@ -1407,18 +1414,18 @@ const yn = /* @__PURE__ */ G(rn, [["render", gn], ["__scopeId", "data-v-0cf84609
|
|
|
1407
1414
|
onChange: E
|
|
1408
1415
|
}, {
|
|
1409
1416
|
default: S(() => [
|
|
1410
|
-
(p(!0),
|
|
1411
|
-
key: `${ie(
|
|
1412
|
-
label: Ue(
|
|
1413
|
-
value: ie(
|
|
1414
|
-
disabled: typeof
|
|
1417
|
+
(p(!0), g(W, null, q(a.options || [], (v, me) => (p(), T(_, {
|
|
1418
|
+
key: `${ie(v, a)}-${me}`,
|
|
1419
|
+
label: Ue(v, a),
|
|
1420
|
+
value: ie(v, a),
|
|
1421
|
+
disabled: typeof v == "object" && (v == null ? void 0 : v.disabled)
|
|
1415
1422
|
}, null, 8, ["label", "value", "disabled"]))), 128))
|
|
1416
1423
|
]),
|
|
1417
1424
|
_: 2
|
|
1418
|
-
}, 1032, ["modelValue", "onUpdate:modelValue", "placeholder", "filterable", "multiple", "collapse-tags", "collapse-tags-tooltip", "disabled"])) : a.type === "remote-select" || a.type === "remoteSelect" ? (p(),
|
|
1425
|
+
}, 1032, ["modelValue", "onUpdate:modelValue", "placeholder", "filterable", "multiple", "collapse-tags", "collapse-tags-tooltip", "disabled"])) : a.type === "remote-select" || a.type === "remoteSelect" ? (p(), T(w, {
|
|
1419
1426
|
key: 2,
|
|
1420
1427
|
modelValue: s.value[a.prop],
|
|
1421
|
-
"onUpdate:modelValue": (
|
|
1428
|
+
"onUpdate:modelValue": (v) => s.value[a.prop] = v,
|
|
1422
1429
|
placeholder: J(a, "请输入关键词搜索"),
|
|
1423
1430
|
clearable: "",
|
|
1424
1431
|
filterable: "",
|
|
@@ -1427,66 +1434,66 @@ const yn = /* @__PURE__ */ G(rn, [["render", gn], ["__scopeId", "data-v-0cf84609
|
|
|
1427
1434
|
"collapse-tags": a.multiple,
|
|
1428
1435
|
"collapse-tags-tooltip": a.multiple,
|
|
1429
1436
|
"reserve-keyword": !1,
|
|
1430
|
-
"remote-method": (
|
|
1437
|
+
"remote-method": (v) => st(a, v),
|
|
1431
1438
|
loading: !!m[a.prop],
|
|
1432
1439
|
disabled: a.disabled,
|
|
1433
1440
|
class: "common-search__control",
|
|
1434
|
-
onClear: (
|
|
1441
|
+
onClear: (v) => o[a.prop] = [],
|
|
1435
1442
|
onChange: E
|
|
1436
1443
|
}, {
|
|
1437
1444
|
default: S(() => [
|
|
1438
|
-
(p(!0),
|
|
1439
|
-
key: `${ie(
|
|
1440
|
-
label: Ue(
|
|
1441
|
-
value: ie(
|
|
1442
|
-
disabled: typeof
|
|
1445
|
+
(p(!0), g(W, null, q(o[a.prop] || a.options || [], (v, me) => (p(), T(_, {
|
|
1446
|
+
key: `${ie(v, a)}-${me}`,
|
|
1447
|
+
label: Ue(v, a),
|
|
1448
|
+
value: ie(v, a),
|
|
1449
|
+
disabled: typeof v == "object" && (v == null ? void 0 : v.disabled)
|
|
1443
1450
|
}, null, 8, ["label", "value", "disabled"]))), 128))
|
|
1444
1451
|
]),
|
|
1445
1452
|
_: 2
|
|
1446
|
-
}, 1032, ["modelValue", "onUpdate:modelValue", "placeholder", "multiple", "collapse-tags", "collapse-tags-tooltip", "remote-method", "loading", "disabled", "onClear"])) : a.type === "number-range" || a.type === "numberRange" ? (p(),
|
|
1453
|
+
}, 1032, ["modelValue", "onUpdate:modelValue", "placeholder", "multiple", "collapse-tags", "collapse-tags-tooltip", "remote-method", "loading", "disabled", "onClear"])) : a.type === "number-range" || a.type === "numberRange" ? (p(), g("div", {
|
|
1447
1454
|
key: 3,
|
|
1448
1455
|
class: "common-search__range common-search__range--number",
|
|
1449
|
-
onKeyup: Ne((
|
|
1456
|
+
onKeyup: Ne((v) => tt(a), ["enter"])
|
|
1450
1457
|
}, [
|
|
1451
|
-
|
|
1458
|
+
C(N, {
|
|
1452
1459
|
modelValue: s.value[a.start || `${a.prop}Min`],
|
|
1453
|
-
"onUpdate:modelValue": (
|
|
1460
|
+
"onUpdate:modelValue": (v) => s.value[a.start || `${a.prop}Min`] = v,
|
|
1454
1461
|
controls: !1,
|
|
1455
1462
|
min: a.min,
|
|
1456
1463
|
max: a.max,
|
|
1457
1464
|
placeholder: Ce(a, "min"),
|
|
1458
1465
|
disabled: a.disabled,
|
|
1459
1466
|
class: "common-search__range-input",
|
|
1460
|
-
onBlur: (
|
|
1467
|
+
onBlur: (v) => fe(a)
|
|
1461
1468
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "min", "max", "placeholder", "disabled", "onBlur"]),
|
|
1462
|
-
|
|
1463
|
-
|
|
1469
|
+
k("span", kn, P(a.separator || "至"), 1),
|
|
1470
|
+
C(N, {
|
|
1464
1471
|
modelValue: s.value[a.end || `${a.prop}Max`],
|
|
1465
|
-
"onUpdate:modelValue": (
|
|
1472
|
+
"onUpdate:modelValue": (v) => s.value[a.end || `${a.prop}Max`] = v,
|
|
1466
1473
|
controls: !1,
|
|
1467
1474
|
min: a.min,
|
|
1468
1475
|
max: a.max,
|
|
1469
1476
|
placeholder: Ce(a, "max"),
|
|
1470
1477
|
disabled: a.disabled,
|
|
1471
1478
|
class: "common-search__range-input",
|
|
1472
|
-
onBlur: (
|
|
1479
|
+
onBlur: (v) => fe(a)
|
|
1473
1480
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "min", "max", "placeholder", "disabled", "onBlur"]),
|
|
1474
|
-
a.clearable !== !1 && nt(a) ? (p(),
|
|
1481
|
+
a.clearable !== !1 && nt(a) ? (p(), T(O, {
|
|
1475
1482
|
key: 0,
|
|
1476
1483
|
class: "common-search__range-clear",
|
|
1477
1484
|
onMousedown: i[0] || (i[0] = de(() => {
|
|
1478
1485
|
}, ["prevent"])),
|
|
1479
|
-
onClick: (
|
|
1486
|
+
onClick: (v) => lt(a)
|
|
1480
1487
|
}, {
|
|
1481
1488
|
default: S(() => [
|
|
1482
|
-
|
|
1489
|
+
C(ne(Ve))
|
|
1483
1490
|
]),
|
|
1484
1491
|
_: 1
|
|
1485
1492
|
}, 8, ["onClick"])) : D("", !0)
|
|
1486
|
-
], 40,
|
|
1493
|
+
], 40, Cn)) : a.type === "date" ? (p(), T(I, {
|
|
1487
1494
|
key: 4,
|
|
1488
1495
|
modelValue: s.value[a.prop],
|
|
1489
|
-
"onUpdate:modelValue": (
|
|
1496
|
+
"onUpdate:modelValue": (v) => s.value[a.prop] = v,
|
|
1490
1497
|
type: a.dateType || "date",
|
|
1491
1498
|
placeholder: J(a, "年/月/日"),
|
|
1492
1499
|
"value-format": a.valueFormat || "YYYY-MM-DD",
|
|
@@ -1495,12 +1502,12 @@ const yn = /* @__PURE__ */ G(rn, [["render", gn], ["__scopeId", "data-v-0cf84609
|
|
|
1495
1502
|
disabled: a.disabled,
|
|
1496
1503
|
class: "common-search__control",
|
|
1497
1504
|
onChange: E
|
|
1498
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "type", "placeholder", "value-format", "format", "clearable", "disabled"])) : a.type === "daterange" || a.type === "dateRange" ? (p(),
|
|
1499
|
-
|
|
1505
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "type", "placeholder", "value-format", "format", "clearable", "disabled"])) : a.type === "daterange" || a.type === "dateRange" ? (p(), g("div", Un, [
|
|
1506
|
+
C(Ge, {
|
|
1500
1507
|
start: s.value[a.start || a.startProp],
|
|
1501
|
-
"onUpdate:start": (
|
|
1508
|
+
"onUpdate:start": (v) => s.value[a.start || a.startProp] = v,
|
|
1502
1509
|
end: s.value[a.end || a.endProp],
|
|
1503
|
-
"onUpdate:end": (
|
|
1510
|
+
"onUpdate:end": (v) => s.value[a.end || a.endProp] = v,
|
|
1504
1511
|
title: a.label || a.title || "",
|
|
1505
1512
|
type: a.dateType || a.pickerType || "daterange",
|
|
1506
1513
|
"value-format": a.valueFormat || "YYYY-MM-DD HH:mm:ss",
|
|
@@ -1519,14 +1526,14 @@ const yn = /* @__PURE__ */ G(rn, [["render", gn], ["__scopeId", "data-v-0cf84609
|
|
|
1519
1526
|
_: 2
|
|
1520
1527
|
}, 1032, ["content", "disabled"])
|
|
1521
1528
|
], 6),
|
|
1522
|
-
Je(ue) ? (p(),
|
|
1523
|
-
|
|
1529
|
+
Je(ue) ? (p(), g("div", xn, [
|
|
1530
|
+
k("div", Sn, [
|
|
1524
1531
|
ae(l.$slots, "actions", {
|
|
1525
1532
|
search: E,
|
|
1526
1533
|
reset: Fe,
|
|
1527
1534
|
form: s.value
|
|
1528
1535
|
}, () => [
|
|
1529
|
-
|
|
1536
|
+
C(le, {
|
|
1530
1537
|
class: "common-search__reset",
|
|
1531
1538
|
onClick: Fe
|
|
1532
1539
|
}, {
|
|
@@ -1535,7 +1542,7 @@ const yn = /* @__PURE__ */ G(rn, [["render", gn], ["__scopeId", "data-v-0cf84609
|
|
|
1535
1542
|
])]),
|
|
1536
1543
|
_: 1
|
|
1537
1544
|
}),
|
|
1538
|
-
|
|
1545
|
+
C(le, {
|
|
1539
1546
|
type: "primary",
|
|
1540
1547
|
class: "common-search__submit",
|
|
1541
1548
|
onClick: E
|
|
@@ -1546,17 +1553,17 @@ const yn = /* @__PURE__ */ G(rn, [["render", gn], ["__scopeId", "data-v-0cf84609
|
|
|
1546
1553
|
_: 1
|
|
1547
1554
|
})
|
|
1548
1555
|
], !0),
|
|
1549
|
-
M.value ? (p(),
|
|
1556
|
+
M.value ? (p(), T(le, {
|
|
1550
1557
|
key: 0,
|
|
1551
1558
|
link: "",
|
|
1552
1559
|
type: "primary",
|
|
1553
1560
|
onClick: at
|
|
1554
1561
|
}, {
|
|
1555
1562
|
default: S(() => [
|
|
1556
|
-
j(
|
|
1557
|
-
|
|
1563
|
+
j(P(x.value ? "收起" : "展开") + " ", 1),
|
|
1564
|
+
C(O, { class: "el-icon--right" }, {
|
|
1558
1565
|
default: S(() => [
|
|
1559
|
-
x.value ? (p(),
|
|
1566
|
+
x.value ? (p(), T(ne(ft), { key: 0 })) : (p(), T(ne(ht), { key: 1 }))
|
|
1560
1567
|
]),
|
|
1561
1568
|
_: 1
|
|
1562
1569
|
})
|
|
@@ -1573,7 +1580,7 @@ const yn = /* @__PURE__ */ G(rn, [["render", gn], ["__scopeId", "data-v-0cf84609
|
|
|
1573
1580
|
]);
|
|
1574
1581
|
};
|
|
1575
1582
|
}
|
|
1576
|
-
}),
|
|
1583
|
+
}), $n = /* @__PURE__ */ G(Fn, [["__scopeId", "data-v-006c1ace"]]), Ln = {
|
|
1577
1584
|
name: "MgOverflowHid",
|
|
1578
1585
|
props: {
|
|
1579
1586
|
label: String,
|
|
@@ -1596,65 +1603,65 @@ const yn = /* @__PURE__ */ G(rn, [["render", gn], ["__scopeId", "data-v-0cf84609
|
|
|
1596
1603
|
return n && n.length > t && (n = n.slice(0, t) + "..."), n;
|
|
1597
1604
|
}
|
|
1598
1605
|
}
|
|
1599
|
-
},
|
|
1600
|
-
function
|
|
1606
|
+
}, Nn = { class: "tableOverflowHid" }, Mn = ["innerHTML"], Pn = { class: "name-wrapper" }, Tn = ["innerHTML"], Rn = { key: 1 }, Bn = ["innerHTML"];
|
|
1607
|
+
function Dn(e, t, n, r, s, o) {
|
|
1601
1608
|
const m = F("el-popover");
|
|
1602
|
-
return p(),
|
|
1603
|
-
n.value && n.value.length > n.maxLength ? (p(),
|
|
1609
|
+
return p(), g("div", Nn, [
|
|
1610
|
+
n.value && n.value.length > n.maxLength ? (p(), T(m, {
|
|
1604
1611
|
key: 0,
|
|
1605
1612
|
trigger: "hover",
|
|
1606
1613
|
placement: "bottom",
|
|
1607
1614
|
width: "400"
|
|
1608
1615
|
}, {
|
|
1609
1616
|
reference: S(() => [
|
|
1610
|
-
|
|
1611
|
-
ee(
|
|
1612
|
-
class:
|
|
1613
|
-
},
|
|
1617
|
+
k("div", Pn, [
|
|
1618
|
+
ee(k("span", {
|
|
1619
|
+
class: z(n.labelClassName)
|
|
1620
|
+
}, P(n.label) + ":", 3), [
|
|
1614
1621
|
[te, n.label]
|
|
1615
1622
|
]),
|
|
1616
|
-
|
|
1617
|
-
class:
|
|
1623
|
+
k("span", {
|
|
1624
|
+
class: z(n.valueClassName),
|
|
1618
1625
|
innerHTML: o.cutString(n.value, n.maxLength)
|
|
1619
|
-
}, null, 10,
|
|
1626
|
+
}, null, 10, Tn)
|
|
1620
1627
|
])
|
|
1621
1628
|
]),
|
|
1622
1629
|
default: S(() => [
|
|
1623
|
-
ee(
|
|
1624
|
-
class:
|
|
1625
|
-
},
|
|
1630
|
+
ee(k("span", {
|
|
1631
|
+
class: z(n.labelClassName)
|
|
1632
|
+
}, P(n.label) + ":", 3), [
|
|
1626
1633
|
[te, n.label]
|
|
1627
1634
|
]),
|
|
1628
|
-
|
|
1635
|
+
k("span", { innerHTML: n.value }, null, 8, Mn)
|
|
1629
1636
|
]),
|
|
1630
1637
|
_: 1
|
|
1631
|
-
})) : (p(),
|
|
1632
|
-
ee(
|
|
1633
|
-
class:
|
|
1634
|
-
},
|
|
1638
|
+
})) : (p(), g("div", Rn, [
|
|
1639
|
+
ee(k("span", {
|
|
1640
|
+
class: z(n.labelClassName)
|
|
1641
|
+
}, P(n.label) + ":", 3), [
|
|
1635
1642
|
[te, n.label]
|
|
1636
1643
|
]),
|
|
1637
|
-
|
|
1638
|
-
class:
|
|
1644
|
+
k("span", {
|
|
1645
|
+
class: z([n.valueClassName, "value"])
|
|
1639
1646
|
}, [
|
|
1640
|
-
|
|
1647
|
+
k("span", { innerHTML: n.value }, null, 8, Bn)
|
|
1641
1648
|
], 2)
|
|
1642
1649
|
]))
|
|
1643
1650
|
]);
|
|
1644
1651
|
}
|
|
1645
|
-
const Xe = /* @__PURE__ */ G(
|
|
1652
|
+
const Xe = /* @__PURE__ */ G(Ln, [["render", Dn], ["__scopeId", "data-v-ef86ea54"]]), Vn = { class: "common-table__main" }, On = { key: 0 }, In = { key: 1 }, An = {
|
|
1646
1653
|
key: 2,
|
|
1647
1654
|
class: "price-text"
|
|
1648
|
-
},
|
|
1655
|
+
}, zn = {
|
|
1649
1656
|
key: 3,
|
|
1650
1657
|
class: "rate-text"
|
|
1651
1658
|
}, Hn = {
|
|
1652
1659
|
key: 4,
|
|
1653
1660
|
class: "bold-text"
|
|
1654
|
-
},
|
|
1661
|
+
}, En = {
|
|
1655
1662
|
key: 0,
|
|
1656
1663
|
class: "common-table__pagination"
|
|
1657
|
-
},
|
|
1664
|
+
}, jn = /* @__PURE__ */ Object.assign({ name: "MgDataTable" }, {
|
|
1658
1665
|
__name: "DataTable",
|
|
1659
1666
|
props: {
|
|
1660
1667
|
/** 列配置:el-table-column 属性 + slotName */
|
|
@@ -1736,36 +1743,36 @@ const Xe = /* @__PURE__ */ G($n, [["render", Bn], ["__scopeId", "data-v-ef86ea54
|
|
|
1736
1743
|
headerCellStyle: s,
|
|
1737
1744
|
...n.tableBind
|
|
1738
1745
|
}));
|
|
1739
|
-
function m(
|
|
1740
|
-
const { slotName:
|
|
1746
|
+
function m(c) {
|
|
1747
|
+
const { slotName: u, headerSlotName: d, maxLength: U, ...L } = c || {};
|
|
1741
1748
|
return {
|
|
1742
1749
|
...L
|
|
1743
1750
|
};
|
|
1744
1751
|
}
|
|
1745
|
-
function h(
|
|
1746
|
-
return n.pagination ? (n.pagination.page - 1) * n.pagination.limit +
|
|
1752
|
+
function h(c) {
|
|
1753
|
+
return n.pagination ? (n.pagination.page - 1) * n.pagination.limit + c + 1 : c + 1;
|
|
1747
1754
|
}
|
|
1748
|
-
function $(
|
|
1749
|
-
var
|
|
1750
|
-
r("pageChange", { page: (
|
|
1755
|
+
function $(c) {
|
|
1756
|
+
var u;
|
|
1757
|
+
r("pageChange", { page: (u = n.pagination) == null ? void 0 : u.page, limit: c });
|
|
1751
1758
|
}
|
|
1752
|
-
function b(
|
|
1753
|
-
var
|
|
1754
|
-
r("pageChange", { page:
|
|
1759
|
+
function b(c) {
|
|
1760
|
+
var u;
|
|
1761
|
+
r("pageChange", { page: c, limit: (u = n.pagination) == null ? void 0 : u.limit });
|
|
1755
1762
|
}
|
|
1756
|
-
function x(
|
|
1757
|
-
r("cellClick",
|
|
1763
|
+
function x(c, u, d, U) {
|
|
1764
|
+
r("cellClick", c, u, d, U), n.canCellClick && (u == null ? void 0 : u.label) !== "操作" && window.getSelection().toString();
|
|
1758
1765
|
}
|
|
1759
|
-
function M(
|
|
1760
|
-
r("selectionChange",
|
|
1766
|
+
function M(c) {
|
|
1767
|
+
r("selectionChange", c);
|
|
1761
1768
|
}
|
|
1762
|
-
return (
|
|
1763
|
-
const d = F("el-table-column"),
|
|
1764
|
-
return p(),
|
|
1765
|
-
class:
|
|
1769
|
+
return (c, u) => {
|
|
1770
|
+
const d = F("el-table-column"), U = F("el-table"), L = F("el-pagination");
|
|
1771
|
+
return p(), g("div", {
|
|
1772
|
+
class: z(["common-table", { "is-fill-height": e.fillHeight }])
|
|
1766
1773
|
}, [
|
|
1767
|
-
|
|
1768
|
-
U
|
|
1774
|
+
k("div", Vn, [
|
|
1775
|
+
C(U, Me({
|
|
1769
1776
|
data: e.dataList,
|
|
1770
1777
|
height: e.fillHeight ? "100%" : void 0,
|
|
1771
1778
|
class: { "common-pointer-table": e.canCellClick }
|
|
@@ -1774,7 +1781,7 @@ const Xe = /* @__PURE__ */ G($n, [["render", Bn], ["__scopeId", "data-v-ef86ea54
|
|
|
1774
1781
|
onSelectionChange: M
|
|
1775
1782
|
}), {
|
|
1776
1783
|
default: S(() => [
|
|
1777
|
-
e.showSelection ? (p(),
|
|
1784
|
+
e.showSelection ? (p(), T(d, {
|
|
1778
1785
|
key: 0,
|
|
1779
1786
|
type: "selection",
|
|
1780
1787
|
width: e.selectionWidth,
|
|
@@ -1782,7 +1789,7 @@ const Xe = /* @__PURE__ */ G($n, [["render", Bn], ["__scopeId", "data-v-ef86ea54
|
|
|
1782
1789
|
selectable: e.selectable,
|
|
1783
1790
|
fixed: "left"
|
|
1784
1791
|
}, null, 8, ["width", "selectable"])) : D("", !0),
|
|
1785
|
-
e.showIndex ? (p(),
|
|
1792
|
+
e.showIndex ? (p(), T(d, {
|
|
1786
1793
|
key: 1,
|
|
1787
1794
|
type: "index",
|
|
1788
1795
|
label: e.indexLabel,
|
|
@@ -1790,49 +1797,49 @@ const Xe = /* @__PURE__ */ G($n, [["render", Bn], ["__scopeId", "data-v-ef86ea54
|
|
|
1790
1797
|
index: h,
|
|
1791
1798
|
align: "center"
|
|
1792
1799
|
}, null, 8, ["label", "width"])) : D("", !0),
|
|
1793
|
-
(p(!0),
|
|
1794
|
-
key:
|
|
1795
|
-
}, { ref_for: !0 }, m(
|
|
1796
|
-
|
|
1800
|
+
(p(!0), g(W, null, q(e.propList, (y, B) => (p(), T(d, Me({
|
|
1801
|
+
key: y.prop || y.slotName || B
|
|
1802
|
+
}, { ref_for: !0 }, m(y)), St({ _: 2 }, [
|
|
1803
|
+
y.headerSlotName ? {
|
|
1797
1804
|
name: "header",
|
|
1798
1805
|
fn: S(() => [
|
|
1799
|
-
ae(
|
|
1806
|
+
ae(c.$slots, y.headerSlotName, { column: y }, void 0, !0)
|
|
1800
1807
|
]),
|
|
1801
1808
|
key: "0"
|
|
1802
1809
|
} : void 0,
|
|
1803
|
-
|
|
1810
|
+
y.slotName ? {
|
|
1804
1811
|
name: "default",
|
|
1805
1812
|
fn: S((R) => [
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
value: String(R.row[
|
|
1809
|
-
"max-length":
|
|
1813
|
+
y.slotName === "overtext" ? (p(), g("div", On, [
|
|
1814
|
+
C(Xe, {
|
|
1815
|
+
value: String(R.row[y.prop] ?? ""),
|
|
1816
|
+
"max-length": y.maxLength || 18
|
|
1810
1817
|
}, null, 8, ["value", "max-length"])
|
|
1811
|
-
])) :
|
|
1812
|
-
|
|
1813
|
-
class:
|
|
1814
|
-
"whether-yes": R.row[
|
|
1815
|
-
"whether-no": R.row[
|
|
1818
|
+
])) : y.slotName === "whether" ? (p(), g("div", In, [
|
|
1819
|
+
k("span", {
|
|
1820
|
+
class: z({
|
|
1821
|
+
"whether-yes": R.row[y.prop] == 1,
|
|
1822
|
+
"whether-no": R.row[y.prop] == 0
|
|
1816
1823
|
})
|
|
1817
|
-
},
|
|
1818
|
-
])) :
|
|
1824
|
+
}, P(R.row[y.prop] == 0 ? "否" : R.row[y.prop] == 1 ? "是" : ""), 3)
|
|
1825
|
+
])) : y.slotName === "price" ? (p(), g("div", An, P(ne(Ie)(R.row[y.prop], 2)), 1)) : y.slotName === "rate" ? (p(), g("div", zn, P(ne(vt)(R.row[y.prop], 2, "toPercentText")), 1)) : y.slotName === "boldtext" ? (p(), g("div", Hn, P(R.row[y.prop]), 1)) : ae(c.$slots, y.slotName, {
|
|
1819
1826
|
row: R.row,
|
|
1820
1827
|
index: R.$index,
|
|
1821
|
-
column:
|
|
1828
|
+
column: y
|
|
1822
1829
|
}, () => [
|
|
1823
|
-
j(
|
|
1830
|
+
j(P(ne(bt)(R.row[y.prop])), 1)
|
|
1824
1831
|
], !0, 5)
|
|
1825
1832
|
]),
|
|
1826
1833
|
key: "1"
|
|
1827
1834
|
} : void 0
|
|
1828
1835
|
]), 1040))), 128)),
|
|
1829
|
-
ae(
|
|
1836
|
+
ae(c.$slots, "default", {}, void 0, !0)
|
|
1830
1837
|
]),
|
|
1831
1838
|
_: 3
|
|
1832
1839
|
}, 16, ["data", "height", "class"])
|
|
1833
1840
|
]),
|
|
1834
|
-
e.pagination ? (p(),
|
|
1835
|
-
|
|
1841
|
+
e.pagination ? (p(), g("div", En, [
|
|
1842
|
+
C(L, {
|
|
1836
1843
|
background: "",
|
|
1837
1844
|
"current-page": e.pagination.page,
|
|
1838
1845
|
"page-size": e.pagination.limit,
|
|
@@ -1846,10 +1853,10 @@ const Xe = /* @__PURE__ */ G($n, [["render", Bn], ["__scopeId", "data-v-ef86ea54
|
|
|
1846
1853
|
], 2);
|
|
1847
1854
|
};
|
|
1848
1855
|
}
|
|
1849
|
-
}),
|
|
1856
|
+
}), Kn = /* @__PURE__ */ G(jn, [["__scopeId", "data-v-bea5678b"]]), Wn = ["aria-checked", "disabled", "onClick"], Yn = { class: "segmented__label" }, qn = {
|
|
1850
1857
|
key: 0,
|
|
1851
1858
|
class: "segmented__badge"
|
|
1852
|
-
},
|
|
1859
|
+
}, Gn = {
|
|
1853
1860
|
__name: "SegmentedControl",
|
|
1854
1861
|
props: {
|
|
1855
1862
|
modelValue: { type: [String, Number, Boolean], default: void 0 },
|
|
@@ -1869,67 +1876,67 @@ const Xe = /* @__PURE__ */ G($n, [["render", Bn], ["__scopeId", "data-v-ef86ea54
|
|
|
1869
1876
|
function x(d) {
|
|
1870
1877
|
return d.count != null ? d.count : d.badge;
|
|
1871
1878
|
}
|
|
1872
|
-
function M(d,
|
|
1873
|
-
d && (o.value[
|
|
1879
|
+
function M(d, U) {
|
|
1880
|
+
d && (o.value[U] = d);
|
|
1874
1881
|
}
|
|
1875
|
-
function
|
|
1882
|
+
function c() {
|
|
1876
1883
|
const d = s.value;
|
|
1877
1884
|
if (!d) return;
|
|
1878
|
-
const
|
|
1885
|
+
const U = n.options.findIndex((R) => R.value === n.modelValue), L = o.value[U];
|
|
1879
1886
|
if (!L) {
|
|
1880
1887
|
h.value = { width: "0px", transform: "translateX(0px)" };
|
|
1881
1888
|
return;
|
|
1882
1889
|
}
|
|
1883
|
-
const
|
|
1890
|
+
const y = d.getBoundingClientRect(), B = L.getBoundingClientRect();
|
|
1884
1891
|
h.value = {
|
|
1885
1892
|
width: `${B.width}px`,
|
|
1886
|
-
transform: `translateX(${B.left -
|
|
1893
|
+
transform: `translateX(${B.left - y.left}px)`
|
|
1887
1894
|
}, m.value = !0;
|
|
1888
1895
|
}
|
|
1889
|
-
function
|
|
1896
|
+
function u(d) {
|
|
1890
1897
|
d.disabled || (r("update:modelValue", d.value), r("change", d.value));
|
|
1891
1898
|
}
|
|
1892
1899
|
return se(
|
|
1893
1900
|
() => [n.modelValue, n.options],
|
|
1894
1901
|
async () => {
|
|
1895
|
-
await Z(),
|
|
1902
|
+
await Z(), c();
|
|
1896
1903
|
},
|
|
1897
1904
|
{ deep: !0 }
|
|
1898
1905
|
), ve(async () => {
|
|
1899
|
-
await Z(),
|
|
1900
|
-
}),
|
|
1906
|
+
await Z(), c(), typeof ResizeObserver < "u" && s.value && ($ = new ResizeObserver(() => c()), $.observe(s.value));
|
|
1907
|
+
}), ze(() => {
|
|
1901
1908
|
$ == null || $.disconnect(), $ = null;
|
|
1902
|
-
}), (d,
|
|
1909
|
+
}), (d, U) => (p(), g("div", {
|
|
1903
1910
|
ref_key: "rootRef",
|
|
1904
1911
|
ref: s,
|
|
1905
1912
|
class: "segmented",
|
|
1906
1913
|
role: "radiogroup"
|
|
1907
1914
|
}, [
|
|
1908
|
-
|
|
1909
|
-
class:
|
|
1915
|
+
k("div", {
|
|
1916
|
+
class: z(["segmented__thumb", { "is-ready": m.value }]),
|
|
1910
1917
|
style: re(h.value)
|
|
1911
1918
|
}, null, 6),
|
|
1912
|
-
(p(!0),
|
|
1919
|
+
(p(!0), g(W, null, q(e.options, (L, y) => (p(), g("button", {
|
|
1913
1920
|
key: String(L.value),
|
|
1914
1921
|
ref_for: !0,
|
|
1915
|
-
ref: (B) => M(B,
|
|
1922
|
+
ref: (B) => M(B, y),
|
|
1916
1923
|
type: "button",
|
|
1917
|
-
class:
|
|
1924
|
+
class: z(["segmented__item", { "is-active": e.modelValue === L.value }]),
|
|
1918
1925
|
role: "radio",
|
|
1919
1926
|
"aria-checked": e.modelValue === L.value,
|
|
1920
1927
|
disabled: L.disabled,
|
|
1921
|
-
onClick: (B) =>
|
|
1928
|
+
onClick: (B) => u(L)
|
|
1922
1929
|
}, [
|
|
1923
|
-
|
|
1924
|
-
b(L) ? (p(),
|
|
1925
|
-
], 10,
|
|
1930
|
+
k("span", Yn, P(L.label), 1),
|
|
1931
|
+
b(L) ? (p(), g("span", qn, P(x(L)), 1)) : D("", !0)
|
|
1932
|
+
], 10, Wn))), 128))
|
|
1926
1933
|
], 512));
|
|
1927
1934
|
}
|
|
1928
|
-
},
|
|
1929
|
-
function
|
|
1935
|
+
}, Xn = /* @__PURE__ */ G(Gn, [["__scopeId", "data-v-b7b0abe9"]]);
|
|
1936
|
+
function Jn(e) {
|
|
1930
1937
|
return e == null || e === "" ? [] : Array.isArray(e) ? e.map((t) => String(t).trim()).filter(Boolean) : String(e).split(",").map((t) => t.trim()).filter(Boolean);
|
|
1931
1938
|
}
|
|
1932
|
-
function
|
|
1939
|
+
function Qn(e) {
|
|
1933
1940
|
if (!e.parentNode) {
|
|
1934
1941
|
e.style.display = "none";
|
|
1935
1942
|
return;
|
|
@@ -1941,12 +1948,12 @@ function Jn(e) {
|
|
|
1941
1948
|
e.parentNode.removeChild(e);
|
|
1942
1949
|
}
|
|
1943
1950
|
function ge(e, t, n, r = !1) {
|
|
1944
|
-
const s =
|
|
1951
|
+
const s = Jn(t.value);
|
|
1945
1952
|
if (!s.length) return;
|
|
1946
1953
|
let o = Ae(s, n);
|
|
1947
|
-
r && (o = !o), o ||
|
|
1954
|
+
r && (o = !o), o || Qn(e);
|
|
1948
1955
|
}
|
|
1949
|
-
function
|
|
1956
|
+
function Zn(e) {
|
|
1950
1957
|
e.directive("hasPermission", {
|
|
1951
1958
|
mounted(t, n) {
|
|
1952
1959
|
ge(t, n, "and");
|
|
@@ -1961,59 +1968,59 @@ function Qn(e) {
|
|
|
1961
1968
|
}
|
|
1962
1969
|
});
|
|
1963
1970
|
}
|
|
1964
|
-
const
|
|
1971
|
+
const el = {
|
|
1965
1972
|
MgImageUpload: Zt,
|
|
1966
|
-
MgFileUpload:
|
|
1973
|
+
MgFileUpload: vn,
|
|
1967
1974
|
MgFilePreview: _t,
|
|
1968
|
-
MgSearchForm:
|
|
1969
|
-
MgDataTable:
|
|
1975
|
+
MgSearchForm: $n,
|
|
1976
|
+
MgDataTable: Kn,
|
|
1970
1977
|
MgDateRangePicker: Ge,
|
|
1971
|
-
MgSegmentedControl:
|
|
1978
|
+
MgSegmentedControl: Xn,
|
|
1972
1979
|
MgOverflowHid: Xe
|
|
1973
|
-
},
|
|
1974
|
-
Object.entries(
|
|
1980
|
+
}, tl = (e, t = {}) => {
|
|
1981
|
+
Object.entries(el).forEach(([s, o]) => {
|
|
1975
1982
|
e.component(o.name || s, o);
|
|
1976
|
-
}), t.ossUrl && $t(t.ossUrl), typeof t.getPermissions == "function" && wt(t.getPermissions),
|
|
1983
|
+
}), t.ossUrl && $t(t.ossUrl), typeof t.getPermissions == "function" && wt(t.getPermissions), Zn(e);
|
|
1977
1984
|
const n = Ct(t), r = kt(n);
|
|
1978
1985
|
Ut(n), xt(r), e.config.globalProperties.$request = n, e.config.globalProperties.$api = r, e.config.globalProperties.$hasPermission = Ae;
|
|
1979
|
-
},
|
|
1980
|
-
install:
|
|
1986
|
+
}, ol = {
|
|
1987
|
+
install: tl,
|
|
1981
1988
|
version: "1.2.2"
|
|
1982
1989
|
};
|
|
1983
1990
|
export {
|
|
1984
|
-
|
|
1991
|
+
Kn as DataTable,
|
|
1985
1992
|
Ge as DateRangePicker,
|
|
1986
|
-
|
|
1993
|
+
cl as FILE_PREVIEW_ROUTE_PATH,
|
|
1987
1994
|
_t as FilePreview,
|
|
1988
|
-
|
|
1995
|
+
vn as FileUpload,
|
|
1989
1996
|
Zt as ImageUpload,
|
|
1990
|
-
|
|
1991
|
-
|
|
1997
|
+
$n as SearchForm,
|
|
1998
|
+
Xn as SegmentedControl,
|
|
1992
1999
|
Xe as TableOverflowHid,
|
|
1993
2000
|
Ye as aliOssMixin,
|
|
1994
|
-
|
|
1995
|
-
|
|
2001
|
+
dl as buildFilePreviewHref,
|
|
2002
|
+
pl as checkPermission,
|
|
1996
2003
|
kt as createApi,
|
|
1997
2004
|
_e as createOssClient,
|
|
1998
2005
|
Ct as createRequest,
|
|
1999
|
-
|
|
2000
|
-
|
|
2006
|
+
fl as createService,
|
|
2007
|
+
ol as default,
|
|
2001
2008
|
gt as getApi,
|
|
2002
2009
|
Ke as getOssSts,
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2010
|
+
hl as getPermissionGetter,
|
|
2011
|
+
ml as getRequest,
|
|
2012
|
+
gl as getSystemId,
|
|
2013
|
+
yl as getUserId,
|
|
2007
2014
|
Ae as hasPermission,
|
|
2008
|
-
|
|
2009
|
-
|
|
2015
|
+
tl as install,
|
|
2016
|
+
Zn as installPermissionDirectives,
|
|
2010
2017
|
yt as openFilePreview,
|
|
2011
2018
|
xt as setApi,
|
|
2012
2019
|
$t as setDefaultOssUrl,
|
|
2013
2020
|
wt as setPermissionGetter,
|
|
2014
2021
|
Ut as setRequest,
|
|
2015
|
-
|
|
2016
|
-
|
|
2022
|
+
vl as setSystemId,
|
|
2023
|
+
bl as setUserId,
|
|
2017
2024
|
We as uploadToOss,
|
|
2018
|
-
|
|
2025
|
+
_l as utils
|
|
2019
2026
|
};
|