@lingshugroup/web-plus 2.6.0 → 2.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/captchaVerify/index.cjs +1 -0
- package/lib/captchaVerify/index.js +12 -0
- package/lib/index/index.cjs +1 -1
- package/lib/index/index.js +58 -54
- package/lib/index/index.js.br +0 -0
- package/lib/index/index.js.gz +0 -0
- package/lib/index.css +1 -1
- package/lib/index.css.br +0 -0
- package/lib/index.css.gz +0 -0
- package/lib/packages/ls-components/components/captchaVerify/Index.vue/index.cjs +1 -0
- package/lib/packages/ls-components/components/captchaVerify/Index.vue/index.js +7 -0
- package/lib/packages/ls-components/components/captchaVerify/Index.vue/index2.cjs +1 -0
- package/lib/packages/ls-components/components/captchaVerify/Index.vue/index2.js +239 -0
- package/lib/packages/ls-components/components/captchaVerify/Index.vue/index2.js.br +0 -0
- package/lib/packages/ls-components/components/captchaVerify/Index.vue/index2.js.gz +0 -0
- package/lib/packages/ls-components/components/captchaVerify/types/index.cjs +1 -0
- package/lib/packages/ls-components/components/captchaVerify/types/index.js +37 -0
- package/lib/packages/ls-components/components/index/index.cjs +1 -1
- package/lib/packages/ls-components/components/index/index.js +52 -48
- package/lib/packages/ls-components/components/index/index.js.br +0 -0
- package/lib/packages/ls-components/components/index/index.js.gz +0 -0
- package/lib/packages/ls-components/components/sliceUpload/Index.vue/index.cjs +1 -0
- package/lib/packages/ls-components/components/sliceUpload/Index.vue/index.js +7 -0
- package/lib/packages/ls-components/components/sliceUpload/Index.vue/index2.cjs +1 -0
- package/lib/packages/ls-components/components/sliceUpload/Index.vue/index2.js +181 -0
- package/lib/packages/ls-components/components/sliceUpload/Index.vue/index2.js.br +0 -0
- package/lib/packages/ls-components/components/sliceUpload/Index.vue/index2.js.gz +0 -0
- package/lib/packages/ls-components/components/sliceUpload/types/index.cjs +1 -0
- package/lib/packages/ls-components/components/sliceUpload/types/index.js +57 -0
- package/lib/packages/ls-components/components/sliceUpload/types/index.js.br +0 -0
- package/lib/packages/ls-components/components/sliceUpload/types/index.js.gz +0 -0
- package/lib/packages/ls-components/components/upload/Index.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/upload/Index.vue/index.js +2 -2
- package/lib/packages/ls-components/components/upload/Index.vue/index2.cjs +1 -1
- package/lib/packages/ls-components/components/upload/Index.vue/index2.js +145 -145
- package/lib/packages/ls-components/components/upload/Index.vue/index2.js.br +0 -0
- package/lib/packages/ls-components/components/upload/Index.vue/index2.js.gz +0 -0
- package/lib/sliceUpload/index.cjs +1 -0
- package/lib/sliceUpload/index.js +12 -0
- package/package.json +23 -15
|
@@ -4,20 +4,20 @@ import { ElIcon as je } from "../../../../../node_modules/.pnpm/element-plus@2.1
|
|
|
4
4
|
import { ElAvatar as Ze } from "../../../../../node_modules/.pnpm/element-plus@2.13.5_typescript@5.9.3_vue@3.5.18_typescript@5.9.3_/node_modules/element-plus/es/components/avatar/index/index.js";
|
|
5
5
|
import { ElImageViewer as Ge } from "../../../../../node_modules/.pnpm/element-plus@2.13.5_typescript@5.9.3_vue@3.5.18_typescript@5.9.3_/node_modules/element-plus/es/components/image-viewer/index/index.js";
|
|
6
6
|
import { ElUpload as Ke } from "../../../../../node_modules/.pnpm/element-plus@2.13.5_typescript@5.9.3_vue@3.5.18_typescript@5.9.3_/node_modules/element-plus/es/components/upload/index/index.js";
|
|
7
|
-
import { ElMessage as
|
|
7
|
+
import { ElMessage as D } from "../../../../../node_modules/.pnpm/element-plus@2.13.5_typescript@5.9.3_vue@3.5.18_typescript@5.9.3_/node_modules/element-plus/es/components/message/index/index.js";
|
|
8
8
|
/* empty css */
|
|
9
9
|
/* empty css */
|
|
10
10
|
/* empty css */
|
|
11
11
|
/* empty css */
|
|
12
12
|
/* empty css */
|
|
13
13
|
/* empty css */
|
|
14
|
-
import { defineComponent as We, useSlots as Xe, useAttrs as Ye, ref as
|
|
14
|
+
import { defineComponent as We, useSlots as Xe, useAttrs as Ye, ref as H, reactive as fe, watch as oe, computed as u, resolveComponent as le, createElementBlock as f, openBlock as c, normalizeClass as O, unref as l, createVNode as h, createBlock as y, mergeProps as Je, createSlots as Qe, withCtx as v, renderSlot as V, toDisplayString as j, Fragment as w, createCommentVNode as E, createTextVNode as x, createElementVNode as _, Teleport as et, toRefs as ve } from "vue";
|
|
15
15
|
import { useNamespace as tt } from "../../_hooks/useNamespace/index.js";
|
|
16
|
-
import { getVariable as
|
|
16
|
+
import { getVariable as it } from "../../_utils/config/index.js";
|
|
17
17
|
import A from "../../button/Button.vue/index.js";
|
|
18
18
|
import pe from "../../icon/Index.vue/index.js";
|
|
19
|
-
import
|
|
20
|
-
import { lsUploadProps as
|
|
19
|
+
import ot from "../../../../../preview_image/index.js";
|
|
20
|
+
import { lsUploadProps as lt, UPLOAD_TYPE_MAP as nt, fileTypeMap as st, UPLOAD_STATUS_MAP as at, IMG_SUFFIX_LIST as rt } from "../types/index.js";
|
|
21
21
|
/* empty css */
|
|
22
22
|
/* empty css */
|
|
23
23
|
const ut = { class: "ls-drag" }, ct = { class: "drag-txt ls-color-brand6" }, dt = {
|
|
@@ -26,14 +26,14 @@ const ut = { class: "ls-drag" }, ct = { class: "drag-txt ls-color-brand6" }, dt
|
|
|
26
26
|
}, mt = {
|
|
27
27
|
key: 0,
|
|
28
28
|
class: "ls-tip"
|
|
29
|
-
}, ft = ["src"], vt = { class: "el-upload-list__item-actions" }, pt = ["onClick"], gt = ["onClick"], yt = ["onClick"],
|
|
29
|
+
}, ft = ["src"], vt = { class: "el-upload-list__item-actions" }, pt = ["onClick"], gt = ["onClick"], yt = ["onClick"], Vt = /* @__PURE__ */ We({
|
|
30
30
|
name: "LSUpload",
|
|
31
31
|
inheritAttrs: !1,
|
|
32
32
|
__name: "Index",
|
|
33
|
-
props:
|
|
33
|
+
props: lt,
|
|
34
34
|
emits: ["uploadErrorFunc", "onChangeFunc", "httpResponseFunc", "onHandleCropper"],
|
|
35
35
|
setup(Z, { expose: G, emit: ge }) {
|
|
36
|
-
const
|
|
36
|
+
const i = Z, T = ge, K = Xe(), F = Ye(), ye = tt("upload").b(), m = H(), d = H(!1), C = fe({
|
|
37
37
|
isCover: !0,
|
|
38
38
|
accept: "",
|
|
39
39
|
disabled: !1
|
|
@@ -42,9 +42,9 @@ const ut = { class: "ls-drag" }, ct = { class: "drag-txt ls-color-brand6" }, dt
|
|
|
42
42
|
initUploadStatus: !0,
|
|
43
43
|
showPreview: !1,
|
|
44
44
|
sourcePreview: "",
|
|
45
|
-
iconColor:
|
|
45
|
+
iconColor: it("colorText1")
|
|
46
46
|
});
|
|
47
|
-
|
|
47
|
+
oe(
|
|
48
48
|
() => F["file-list"],
|
|
49
49
|
(e) => {
|
|
50
50
|
n.uploadFileList = e || [];
|
|
@@ -54,74 +54,74 @@ const ut = { class: "ls-drag" }, ct = { class: "drag-txt ls-color-brand6" }, dt
|
|
|
54
54
|
deep: !0
|
|
55
55
|
}
|
|
56
56
|
);
|
|
57
|
-
const
|
|
57
|
+
const R = u(() => {
|
|
58
58
|
var e, t;
|
|
59
|
-
return !!((e =
|
|
59
|
+
return !!((e = i == null ? void 0 : i.item) != null && e.isToast || typeof ((t = i == null ? void 0 : i.item) == null ? void 0 : t.isToast) > "u");
|
|
60
60
|
}), b = u(() => {
|
|
61
61
|
var t;
|
|
62
|
-
const e = (t =
|
|
62
|
+
const e = (t = i == null ? void 0 : i.item) == null ? void 0 : t.isCover;
|
|
63
63
|
return typeof e > "u" ? !0 : e;
|
|
64
64
|
}), L = u(() => F.multiple), k = u(() => {
|
|
65
65
|
const e = F["auto-upload"];
|
|
66
66
|
return typeof e > "u" ? !0 : e;
|
|
67
67
|
}), he = u(() => {
|
|
68
68
|
var e;
|
|
69
|
-
return ((e =
|
|
70
|
-
}), W = u(() => F["list-type"]),
|
|
69
|
+
return ((e = i == null ? void 0 : i.item) == null ? void 0 : e.emptyFileMsg) || "";
|
|
70
|
+
}), W = u(() => F["list-type"]), M = u(() => W.value === nt.picCard), Fe = u(() => !W.value || W.value === "text"), z = u(() => {
|
|
71
71
|
var e;
|
|
72
|
-
return ((e =
|
|
72
|
+
return ((e = i == null ? void 0 : i.item) == null ? void 0 : e.limitFile) || [];
|
|
73
73
|
}), be = u(() => {
|
|
74
74
|
var e;
|
|
75
|
-
return ((e =
|
|
75
|
+
return ((e = i == null ? void 0 : i.item) == null ? void 0 : e.limitFileMsg) || "";
|
|
76
76
|
}), N = u(() => {
|
|
77
77
|
var e;
|
|
78
|
-
return ((e =
|
|
78
|
+
return ((e = i == null ? void 0 : i.item) == null ? void 0 : e.limitSize) || 2;
|
|
79
79
|
}), _e = u(() => {
|
|
80
80
|
var e;
|
|
81
|
-
return ((e =
|
|
81
|
+
return ((e = i == null ? void 0 : i.item) == null ? void 0 : e.limitSizeMsg) || "";
|
|
82
82
|
}), X = u(() => {
|
|
83
83
|
var e;
|
|
84
|
-
return ((e =
|
|
84
|
+
return ((e = i == null ? void 0 : i.item) == null ? void 0 : e.limitUnit) || "MB";
|
|
85
85
|
}), Ce = u(() => {
|
|
86
86
|
var e;
|
|
87
|
-
return ((e =
|
|
87
|
+
return ((e = i == null ? void 0 : i.item) == null ? void 0 : e.limitNumMsg) || "";
|
|
88
88
|
}), ke = u(() => {
|
|
89
89
|
var e;
|
|
90
|
-
return (e =
|
|
90
|
+
return (e = i == null ? void 0 : i.item) == null ? void 0 : e.limitAllFail;
|
|
91
91
|
}), ne = u(() => {
|
|
92
92
|
var e;
|
|
93
|
-
return ((e =
|
|
93
|
+
return ((e = i == null ? void 0 : i.item) == null ? void 0 : e.profile) || !1;
|
|
94
94
|
}), I = u(() => F.drag), we = u(() => {
|
|
95
95
|
var e;
|
|
96
|
-
return ((e =
|
|
96
|
+
return ((e = i == null ? void 0 : i.item) == null ? void 0 : e.hideCoverBtn) && b.value && n.uploadFileList.length > 0;
|
|
97
97
|
}), S = u(() => F.disabled), Y = u(() => {
|
|
98
|
-
const e =
|
|
98
|
+
const e = M.value ? "图片" : "文件";
|
|
99
99
|
let t = `选择${e}`;
|
|
100
100
|
return d.value ? t = "正在上传..." : b.value && !L.value ? k.value ? n.initUploadStatus ? t = "点击上传" : t = "重新上传" : n.initUploadStatus ? t = `选择${e}` : t = "重新上传" : k.value && (t = "点击上传"), t;
|
|
101
101
|
}), Le = u(() => {
|
|
102
102
|
let e = "不限制上传格式,";
|
|
103
|
-
return
|
|
103
|
+
return M.value && (e = "文件须为图片格式,"), `${e}文件大小不超过${N.value}${X.value}`;
|
|
104
104
|
}), Se = u(() => {
|
|
105
105
|
var e;
|
|
106
|
-
return ((e =
|
|
106
|
+
return ((e = i == null ? void 0 : i.item) == null ? void 0 : e.tipContent) || "";
|
|
107
107
|
}), J = u(() => {
|
|
108
108
|
var e;
|
|
109
|
-
return (e =
|
|
109
|
+
return (e = i == null ? void 0 : i.item) == null ? void 0 : e.httpRequestFunc;
|
|
110
110
|
}), Pe = u(() => {
|
|
111
111
|
var t;
|
|
112
112
|
const e = Number(F.limit || 0);
|
|
113
|
-
return e ? ((t =
|
|
113
|
+
return e ? ((t = i == null ? void 0 : i.item) == null ? void 0 : t.hideBtnReachLimit) && n.uploadFileList.length >= e : !1;
|
|
114
114
|
});
|
|
115
|
-
|
|
116
|
-
[b, J],
|
|
117
|
-
([e, t]) => {
|
|
118
|
-
C.isCover = e, t && typeof t == "function" && (C["http-request"] = ze);
|
|
115
|
+
oe(
|
|
116
|
+
[b, J, () => i.httpRequest],
|
|
117
|
+
([e, t, o]) => {
|
|
118
|
+
C.isCover = e, (t && typeof t == "function" || o && typeof o == "function") && (C["http-request"] = ze);
|
|
119
119
|
},
|
|
120
120
|
{
|
|
121
121
|
immediate: !0,
|
|
122
122
|
deep: !0
|
|
123
123
|
}
|
|
124
|
-
),
|
|
124
|
+
), oe(
|
|
125
125
|
() => z.value,
|
|
126
126
|
(e) => {
|
|
127
127
|
e && e.length > 0 && Ue(e);
|
|
@@ -138,34 +138,34 @@ const ut = { class: "ls-drag" }, ct = { class: "drag-txt ls-color-brand6" }, dt
|
|
|
138
138
|
});
|
|
139
139
|
}
|
|
140
140
|
s(Ue, "updateFileAccept");
|
|
141
|
-
function
|
|
142
|
-
const { formRuleFunc: t, formValidateFunc: o } = ve(
|
|
141
|
+
function B(e) {
|
|
142
|
+
const { formRuleFunc: t, formValidateFunc: o } = ve(i == null ? void 0 : i.item);
|
|
143
143
|
if (t.value && typeof t.value == "function" && o && typeof o.value == "function") {
|
|
144
144
|
const a = t.value(), { message: r } = a;
|
|
145
145
|
a.message = e, o.value(), a.message = r;
|
|
146
146
|
}
|
|
147
147
|
T("uploadErrorFunc", e);
|
|
148
148
|
}
|
|
149
|
-
s(
|
|
149
|
+
s(B, "validateForm");
|
|
150
150
|
async function $e(e, t) {
|
|
151
|
-
if (d.value = !1,
|
|
152
|
-
return
|
|
151
|
+
if (d.value = !1, i.onExceed)
|
|
152
|
+
return i.onExceed(e, t);
|
|
153
153
|
const o = Number(F.limit || 0);
|
|
154
154
|
let a = 0;
|
|
155
155
|
ke.value || (a = o - n.uploadFileList.length, a > 0 && (Ne(e.slice(0, a)), k.value && ee()));
|
|
156
156
|
const r = Ce.value || `当前限制选择 ${o} 个文件,本次选择了 ${e.length} 个文件,已成功上传 ${a} 个文件`;
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
}, 200) :
|
|
157
|
+
R.value ? setTimeout(() => {
|
|
158
|
+
D.warning(r);
|
|
159
|
+
}, 200) : B(r);
|
|
160
160
|
}
|
|
161
161
|
s($e, "onExceedAction");
|
|
162
162
|
function Ee(e) {
|
|
163
|
-
if (
|
|
164
|
-
const o =
|
|
165
|
-
return o && b.value && !L.value &&
|
|
163
|
+
if (i.beforeUpload) {
|
|
164
|
+
const o = i.beforeUpload(e);
|
|
165
|
+
return o && b.value && !L.value && q(), o;
|
|
166
166
|
}
|
|
167
167
|
const t = Q(e, !0);
|
|
168
|
-
return t && k.value && b.value && !L.value &&
|
|
168
|
+
return t && k.value && b.value && !L.value && q(), t;
|
|
169
169
|
}
|
|
170
170
|
s(Ee, "beforeUploadAction");
|
|
171
171
|
function Q(e, t) {
|
|
@@ -184,22 +184,22 @@ const ut = { class: "ls-drag" }, ct = { class: "drag-txt ls-color-brand6" }, dt
|
|
|
184
184
|
break;
|
|
185
185
|
}
|
|
186
186
|
if (P) {
|
|
187
|
-
const p = be.value || `上传文件 ${e.name} 只能是 ${z.value.filter((
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
}, 200) :
|
|
187
|
+
const p = be.value || `上传文件 ${e.name} 只能是 ${z.value.filter((ie) => ie).join(",").toLocaleLowerCase()} 格式!`;
|
|
188
|
+
R.value && t ? setTimeout(() => {
|
|
189
|
+
D.error(p);
|
|
190
|
+
}, 200) : B(p), o = !1;
|
|
191
191
|
}
|
|
192
192
|
if (U) {
|
|
193
193
|
const p = _e.value || `上传文件 ${e.name} 大小不能超过 ${N.value}${X.value}!`;
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
}, 200) :
|
|
194
|
+
R.value && t ? setTimeout(() => {
|
|
195
|
+
D.error(p);
|
|
196
|
+
}, 200) : B(p), o = !1;
|
|
197
197
|
}
|
|
198
|
-
if (!P &&
|
|
198
|
+
if (!P && M.value && !se(r, rt)) {
|
|
199
199
|
const p = `上传文件 ${e.name} 不是图片格式的文件!`;
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
}, 200) :
|
|
200
|
+
R.value && t ? setTimeout(() => {
|
|
201
|
+
D.error(p);
|
|
202
|
+
}, 200) : B(p), o = !1;
|
|
203
203
|
}
|
|
204
204
|
return o;
|
|
205
205
|
}
|
|
@@ -216,20 +216,20 @@ const ut = { class: "ls-drag" }, ct = { class: "drag-txt ls-color-brand6" }, dt
|
|
|
216
216
|
return !1;
|
|
217
217
|
}
|
|
218
218
|
s(se, "fileTypeMatch");
|
|
219
|
-
function
|
|
219
|
+
function q(e, t) {
|
|
220
220
|
n.uploadFileList.splice(e || 0, t || n.uploadFileList.length - 1);
|
|
221
221
|
}
|
|
222
|
-
s(
|
|
222
|
+
s(q, "updateCoverFileList");
|
|
223
223
|
function Ae(e, t) {
|
|
224
224
|
n.uploadFileList = t;
|
|
225
225
|
const o = e.raw && Q(e.raw, !k.value);
|
|
226
|
-
if (o && b.value && !L.value &&
|
|
227
|
-
return
|
|
226
|
+
if (o && b.value && !L.value && q(), i.onChange)
|
|
227
|
+
return i.onChange(e, t);
|
|
228
228
|
const { size: a = 0 } = e;
|
|
229
229
|
if (a <= 0) {
|
|
230
230
|
ae();
|
|
231
231
|
const r = he.value || "禁止上传空文件,请检查后重新上传!";
|
|
232
|
-
|
|
232
|
+
R.value ? D.error(r) : B(r);
|
|
233
233
|
return;
|
|
234
234
|
}
|
|
235
235
|
e.raw && (!k.value && !o ? ae() : (e.blob = URL.createObjectURL(e.raw) || "", T("onChangeFunc", e)));
|
|
@@ -237,26 +237,26 @@ const ut = { class: "ls-drag" }, ct = { class: "drag-txt ls-color-brand6" }, dt
|
|
|
237
237
|
s(Ae, "onChangeAction");
|
|
238
238
|
function ae() {
|
|
239
239
|
let e = 0;
|
|
240
|
-
n.uploadFileList.length > 1 && (e = n.uploadFileList.length - 1),
|
|
240
|
+
n.uploadFileList.length > 1 && (e = n.uploadFileList.length - 1), q(e, 1), T("onChangeFunc", {});
|
|
241
241
|
}
|
|
242
242
|
s(ae, "setChangeRes");
|
|
243
243
|
function Te(e, t, o) {
|
|
244
244
|
d.value = !1, n.initUploadStatus = !1;
|
|
245
|
-
const { formRuleFunc: a, formValidateFunc: r } = ve(
|
|
246
|
-
if (a.value && typeof a.value == "function" && r.value && typeof r.value == "function" && r.value(),
|
|
247
|
-
return
|
|
245
|
+
const { formRuleFunc: a, formValidateFunc: r } = ve(i == null ? void 0 : i.item);
|
|
246
|
+
if (a.value && typeof a.value == "function" && r.value && typeof r.value == "function" && r.value(), i.onSuccess)
|
|
247
|
+
return i.onSuccess(e, t, o);
|
|
248
248
|
}
|
|
249
249
|
s(Te, "onSuccessAction");
|
|
250
|
-
function
|
|
251
|
-
if (d.value = !1,
|
|
252
|
-
return
|
|
250
|
+
function Re(e, t, o) {
|
|
251
|
+
if (d.value = !1, i.onError)
|
|
252
|
+
return i.onError(e, t, o);
|
|
253
253
|
}
|
|
254
|
-
s(
|
|
255
|
-
function
|
|
256
|
-
if (d.value = !1, n.initUploadStatus = !t.length, n.uploadFileList = n.uploadFileList.filter((o) => o.uid === e.uid || o.name === e.name ? null : o),
|
|
257
|
-
return
|
|
254
|
+
s(Re, "onErrorAction");
|
|
255
|
+
function Me(e, t) {
|
|
256
|
+
if (d.value = !1, n.initUploadStatus = !t.length, n.uploadFileList = n.uploadFileList.filter((o) => o.uid === e.uid || o.name === e.name ? null : o), i.onRemove)
|
|
257
|
+
return i.onRemove(e, t);
|
|
258
258
|
}
|
|
259
|
-
s(
|
|
259
|
+
s(Me, "onRemoveAction");
|
|
260
260
|
async function ze(e) {
|
|
261
261
|
const { file: t } = e;
|
|
262
262
|
if (!t)
|
|
@@ -264,8 +264,8 @@ const ut = { class: "ls-drag" }, ct = { class: "drag-txt ls-color-brand6" }, dt
|
|
|
264
264
|
const { size: o } = t;
|
|
265
265
|
if (o <= 0 || !Q(t, !1))
|
|
266
266
|
return;
|
|
267
|
-
if (
|
|
268
|
-
return
|
|
267
|
+
if (i.httpRequest)
|
|
268
|
+
return i.httpRequest(e);
|
|
269
269
|
const a = new FormData();
|
|
270
270
|
if (a.append("file", t), typeof J.value == "function") {
|
|
271
271
|
d.value = !0;
|
|
@@ -317,77 +317,77 @@ const ut = { class: "ls-drag" }, ct = { class: "drag-txt ls-color-brand6" }, dt
|
|
|
317
317
|
});
|
|
318
318
|
}
|
|
319
319
|
s(Ie, "cancelUpload");
|
|
320
|
-
function
|
|
321
|
-
if (d.value = !0,
|
|
322
|
-
return
|
|
320
|
+
function Be(e, t, o) {
|
|
321
|
+
if (d.value = !0, i.onProgress)
|
|
322
|
+
return i.onProgress(e, t, o);
|
|
323
323
|
}
|
|
324
|
-
s(
|
|
325
|
-
function
|
|
326
|
-
if (
|
|
327
|
-
return
|
|
328
|
-
if (
|
|
324
|
+
s(Be, "onProgressAction");
|
|
325
|
+
function De(e) {
|
|
326
|
+
if (i.onPreview)
|
|
327
|
+
return i.onPreview(e);
|
|
328
|
+
if (M.value) {
|
|
329
329
|
const { url: t } = e || {};
|
|
330
330
|
t && (n.sourcePreview = t, n.showPreview = !0);
|
|
331
331
|
}
|
|
332
332
|
}
|
|
333
|
-
s(
|
|
334
|
-
function
|
|
333
|
+
s(De, "onPreviewAction");
|
|
334
|
+
function Ve() {
|
|
335
335
|
n.showPreview = !1, n.sourcePreview = "";
|
|
336
336
|
}
|
|
337
|
-
s(
|
|
338
|
-
const te =
|
|
337
|
+
s(Ve, "closePreview");
|
|
338
|
+
const te = H(!1), ce = H([]);
|
|
339
339
|
function xe(e, t) {
|
|
340
340
|
var o;
|
|
341
341
|
ce.value = [((o = n.uploadFileList[t]) == null ? void 0 : o.url) || (e == null ? void 0 : e.url)], te.value = !0;
|
|
342
342
|
}
|
|
343
343
|
s(xe, "onHandlePreview");
|
|
344
|
-
function
|
|
344
|
+
function qe(e) {
|
|
345
345
|
ue(e);
|
|
346
346
|
}
|
|
347
|
-
s(
|
|
348
|
-
function
|
|
347
|
+
s(qe, "onHandleRemove");
|
|
348
|
+
function He(e, t) {
|
|
349
349
|
T("onHandleCropper", e, t);
|
|
350
350
|
}
|
|
351
|
-
return s(
|
|
351
|
+
return s(He, "onHandleCropper"), G({
|
|
352
352
|
uploadRef: m
|
|
353
353
|
}), (e, t) => {
|
|
354
|
-
const o = Ze, a =
|
|
354
|
+
const o = Ze, a = le("Crop"), r = je, P = le("ZoomIn"), U = le("Delete"), p = Ke, ie = Ge;
|
|
355
355
|
return c(), f("div", {
|
|
356
356
|
class: O([
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
357
|
+
l(ye),
|
|
358
|
+
l(I) ? "ls-upload-drag" : "",
|
|
359
|
+
l(ne) ? "ls-profile" : "",
|
|
360
|
+
l(we) ? "hide-cover-btn" : "",
|
|
361
|
+
l(Pe) ? "hide-btn" : ""
|
|
362
362
|
])
|
|
363
363
|
}, [
|
|
364
364
|
h(p, Je({
|
|
365
365
|
ref_key: "uploadRef",
|
|
366
366
|
ref: m
|
|
367
|
-
}, Object.assign(
|
|
367
|
+
}, Object.assign(l(C), e.$attrs), {
|
|
368
368
|
"on-exceed": $e,
|
|
369
369
|
"before-upload": Ee,
|
|
370
370
|
"on-change": Ae,
|
|
371
371
|
"on-success": Te,
|
|
372
|
-
"on-error":
|
|
373
|
-
"on-remove":
|
|
374
|
-
"on-progress":
|
|
375
|
-
"on-preview":
|
|
372
|
+
"on-error": Re,
|
|
373
|
+
"on-remove": Me,
|
|
374
|
+
"on-progress": Be,
|
|
375
|
+
"on-preview": De
|
|
376
376
|
}), Qe({
|
|
377
377
|
trigger: v(() => [
|
|
378
|
-
|
|
378
|
+
l(ne) ? e.item.defProfile && l(n).uploadFileList.length < 1 ? (c(), y(o, {
|
|
379
379
|
key: 1,
|
|
380
380
|
size: 60,
|
|
381
381
|
src: e.item.defProfile,
|
|
382
382
|
fit: "contain"
|
|
383
383
|
}, null, 8, ["src"])) : E("", !0) : (c(), f(w, { key: 0 }, [
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
384
|
+
l(K).trigger ? V(e.$slots, "trigger", { key: 1 }, void 0, !0) : (c(), f(w, { key: 0 }, [
|
|
385
|
+
l(I) ? (c(), f(w, { key: 0 }, [
|
|
386
|
+
l(d) ? (c(), y(A, {
|
|
387
387
|
key: 0,
|
|
388
388
|
text: "",
|
|
389
|
-
loading:
|
|
390
|
-
disabled:
|
|
389
|
+
loading: l(d),
|
|
390
|
+
disabled: l(S)
|
|
391
391
|
}, null, 8, ["loading", "disabled"])) : (c(), y(pe, {
|
|
392
392
|
key: 1,
|
|
393
393
|
class: "upload-icon",
|
|
@@ -396,36 +396,36 @@ const ut = { class: "ls-drag" }, ct = { class: "drag-txt ls-color-brand6" }, dt
|
|
|
396
396
|
color: "#E7E7E7"
|
|
397
397
|
})),
|
|
398
398
|
_("div", ut, [
|
|
399
|
-
_("div", ct, j(
|
|
400
|
-
|
|
399
|
+
_("div", ct, j(l(Y)), 1),
|
|
400
|
+
l(d) ? E("", !0) : (c(), f(w, { key: 0 }, [
|
|
401
401
|
t[2] || (t[2] = x(" / ", -1)),
|
|
402
402
|
t[3] || (t[3] = _("div", { class: "drag-txt ls-color-text2" }, " 拖拽到此区域 ", -1))
|
|
403
403
|
], 64))
|
|
404
404
|
])
|
|
405
405
|
], 64)) : (c(), f(w, { key: 1 }, [
|
|
406
|
-
|
|
407
|
-
|
|
406
|
+
l(M) ? (c(), f("div", dt, [
|
|
407
|
+
l(d) ? (c(), y(A, {
|
|
408
408
|
key: 0,
|
|
409
409
|
text: "",
|
|
410
|
-
loading:
|
|
411
|
-
disabled:
|
|
410
|
+
loading: l(d),
|
|
411
|
+
disabled: l(S)
|
|
412
412
|
}, null, 8, ["loading", "disabled"])) : (c(), y(pe, {
|
|
413
413
|
key: 1,
|
|
414
414
|
class: "upload-btn-plus",
|
|
415
415
|
name: "Plus",
|
|
416
416
|
size: 28,
|
|
417
|
-
color:
|
|
417
|
+
color: l(n).iconColor
|
|
418
418
|
}, null, 8, ["color"])),
|
|
419
|
-
_("div", null, j(
|
|
419
|
+
_("div", null, j(l(Y)), 1)
|
|
420
420
|
])) : (c(), y(A, {
|
|
421
421
|
key: 1,
|
|
422
422
|
plain: "",
|
|
423
423
|
icon: "upload",
|
|
424
|
-
loading:
|
|
425
|
-
disabled:
|
|
424
|
+
loading: l(d),
|
|
425
|
+
disabled: l(S)
|
|
426
426
|
}, {
|
|
427
427
|
default: v(() => [
|
|
428
|
-
x(j(
|
|
428
|
+
x(j(l(Y)), 1)
|
|
429
429
|
]),
|
|
430
430
|
_: 1
|
|
431
431
|
}, 8, ["loading", "disabled"]))
|
|
@@ -434,17 +434,17 @@ const ut = { class: "ls-drag" }, ct = { class: "drag-txt ls-color-brand6" }, dt
|
|
|
434
434
|
], 64))
|
|
435
435
|
]),
|
|
436
436
|
default: v(() => [
|
|
437
|
-
|
|
438
|
-
!
|
|
437
|
+
l(K).default ? V(e.$slots, "default", { key: 1 }, void 0, !0) : (c(), f(w, { key: 0 }, [
|
|
438
|
+
!l(k) && (l(Fe) || l(I)) ? (c(), f("div", {
|
|
439
439
|
key: 0,
|
|
440
|
-
class: O(["upload-btn-handle", [
|
|
440
|
+
class: O(["upload-btn-handle", [l(I) ? "drag-css" : "nor-css", !l(b) || l(L) ? "multi-css" : ""]])
|
|
441
441
|
}, [
|
|
442
|
-
|
|
443
|
-
!
|
|
442
|
+
l(I) ? (c(), f(w, { key: 1 }, [
|
|
443
|
+
!l(b) || l(L) ? (c(), y(A, {
|
|
444
444
|
key: 0,
|
|
445
445
|
type: "primary",
|
|
446
|
-
loading:
|
|
447
|
-
disabled:
|
|
446
|
+
loading: l(d),
|
|
447
|
+
disabled: l(S),
|
|
448
448
|
class: "ls-upload-btn-com ls-upload-btn-cancel",
|
|
449
449
|
onClick: Ie
|
|
450
450
|
}, {
|
|
@@ -457,8 +457,8 @@ const ut = { class: "ls-drag" }, ct = { class: "drag-txt ls-color-brand6" }, dt
|
|
|
457
457
|
h(A, {
|
|
458
458
|
class: O(["start-upload ls-upload-btn-com ls-upload-btn-comfirm", { "is-ready": re() }]),
|
|
459
459
|
type: "primary",
|
|
460
|
-
loading:
|
|
461
|
-
disabled:
|
|
460
|
+
loading: l(d),
|
|
461
|
+
disabled: l(S),
|
|
462
462
|
onClick: ee
|
|
463
463
|
}, {
|
|
464
464
|
default: v(() => t[6] || (t[6] = [
|
|
@@ -471,8 +471,8 @@ const ut = { class: "ls-drag" }, ct = { class: "drag-txt ls-color-brand6" }, dt
|
|
|
471
471
|
key: 0,
|
|
472
472
|
type: "primary",
|
|
473
473
|
class: O(["ls-upload-btn-com ls-upload-btn-comfirm", { "is-ready": re() }]),
|
|
474
|
-
loading:
|
|
475
|
-
disabled:
|
|
474
|
+
loading: l(d),
|
|
475
|
+
disabled: l(S),
|
|
476
476
|
onClick: ee
|
|
477
477
|
}, {
|
|
478
478
|
default: v(() => t[4] || (t[4] = [
|
|
@@ -485,7 +485,7 @@ const ut = { class: "ls-drag" }, ct = { class: "drag-txt ls-color-brand6" }, dt
|
|
|
485
485
|
], 64))
|
|
486
486
|
]),
|
|
487
487
|
tip: v(() => [
|
|
488
|
-
|
|
488
|
+
l(K).tip ? V(e.$slots, "tip", { key: 1 }, void 0, !0) : (c(), f("div", mt, j(l(Se) || l(Le)), 1))
|
|
489
489
|
]),
|
|
490
490
|
_: 2
|
|
491
491
|
}, [
|
|
@@ -495,18 +495,18 @@ const ut = { class: "ls-drag" }, ct = { class: "drag-txt ls-color-brand6" }, dt
|
|
|
495
495
|
var de;
|
|
496
496
|
return [
|
|
497
497
|
_("img", {
|
|
498
|
-
src: ((de =
|
|
498
|
+
src: ((de = l(n).uploadFileList[$]) == null ? void 0 : de.url) || g.url,
|
|
499
499
|
class: "el-upload-list__item-thumbnail"
|
|
500
500
|
}, null, 8, ft),
|
|
501
501
|
_("div", vt, [
|
|
502
|
-
|
|
502
|
+
V(e.$slots, "default", {
|
|
503
503
|
file: g,
|
|
504
504
|
index: $
|
|
505
505
|
}, void 0, !0),
|
|
506
506
|
e.hasCropper ? (c(), f("span", {
|
|
507
507
|
key: 0,
|
|
508
508
|
class: "el-upload-list__item-cropper",
|
|
509
|
-
onClick: /* @__PURE__ */ s((me) =>
|
|
509
|
+
onClick: /* @__PURE__ */ s((me) => He(g, $), "onClick")
|
|
510
510
|
}, [
|
|
511
511
|
h(r, null, {
|
|
512
512
|
default: v(() => [
|
|
@@ -528,7 +528,7 @@ const ut = { class: "ls-drag" }, ct = { class: "drag-txt ls-color-brand6" }, dt
|
|
|
528
528
|
], 8, gt),
|
|
529
529
|
_("span", {
|
|
530
530
|
class: "el-upload-list__item-delete",
|
|
531
|
-
onClick: /* @__PURE__ */ s((me) =>
|
|
531
|
+
onClick: /* @__PURE__ */ s((me) => qe(g), "onClick")
|
|
532
532
|
}, [
|
|
533
533
|
h(r, null, {
|
|
534
534
|
default: v(() => [
|
|
@@ -544,7 +544,7 @@ const ut = { class: "ls-drag" }, ct = { class: "drag-txt ls-color-brand6" }, dt
|
|
|
544
544
|
} : {
|
|
545
545
|
name: "file",
|
|
546
546
|
fn: v(({ file: g, index: $ }) => [
|
|
547
|
-
|
|
547
|
+
V(e.$slots, "file", {
|
|
548
548
|
file: g,
|
|
549
549
|
index: $
|
|
550
550
|
}, void 0, !0)
|
|
@@ -552,16 +552,16 @@ const ut = { class: "ls-drag" }, ct = { class: "drag-txt ls-color-brand6" }, dt
|
|
|
552
552
|
key: "1"
|
|
553
553
|
}
|
|
554
554
|
]), 1040),
|
|
555
|
-
h(
|
|
556
|
-
modelValue:
|
|
557
|
-
"onUpdate:modelValue": t[0] || (t[0] = (g) =>
|
|
558
|
-
source:
|
|
559
|
-
"on-close":
|
|
555
|
+
h(l(ot), {
|
|
556
|
+
modelValue: l(n).showPreview,
|
|
557
|
+
"onUpdate:modelValue": t[0] || (t[0] = (g) => l(n).showPreview = g),
|
|
558
|
+
source: l(n).sourcePreview,
|
|
559
|
+
"on-close": Ve
|
|
560
560
|
}, null, 8, ["modelValue", "source"]),
|
|
561
561
|
(c(), y(et, { to: "body" }, [
|
|
562
|
-
|
|
562
|
+
l(te) ? (c(), y(ie, {
|
|
563
563
|
key: 0,
|
|
564
|
-
"url-list":
|
|
564
|
+
"url-list": l(ce),
|
|
565
565
|
onClose: t[1] || (t[1] = (g) => te.value = !1)
|
|
566
566
|
}, null, 8, ["url-list"])) : E("", !0)
|
|
567
567
|
]))
|
|
@@ -570,5 +570,5 @@ const ut = { class: "ls-drag" }, ct = { class: "drag-txt ls-color-brand6" }, dt
|
|
|
570
570
|
}
|
|
571
571
|
});
|
|
572
572
|
export {
|
|
573
|
-
|
|
573
|
+
Vt as default
|
|
574
574
|
};
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var o=Object.defineProperty;var n=(e,l)=>o(e,"name",{value:l,configurable:!0});Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("../packages/ls-components/components/_utils/config/index.cjs"),t=require("../packages/ls-components/components/sliceUpload/Index.vue/index.cjs"),u=Object.assign(t.default,{install:n((e,l)=>{a.setGlobalConfig(e,l),t.default.name&&e.component(t.default.name,t.default)},"install")});exports.default=u;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
var a = Object.defineProperty;
|
|
2
|
+
var t = (o, l) => a(o, "name", { value: l, configurable: !0 });
|
|
3
|
+
import { setGlobalConfig as i } from "../packages/ls-components/components/_utils/config/index.js";
|
|
4
|
+
import e from "../packages/ls-components/components/sliceUpload/Index.vue/index.js";
|
|
5
|
+
const c = Object.assign(e, {
|
|
6
|
+
install: /* @__PURE__ */ t((o, l) => {
|
|
7
|
+
i(o, l), e.name && o.component(e.name, e);
|
|
8
|
+
}, "install")
|
|
9
|
+
});
|
|
10
|
+
export {
|
|
11
|
+
c as default
|
|
12
|
+
};
|