@lingshugroup/web-plus 1.0.35 → 1.0.37
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/index.css +1 -1
- package/lib/index.css.br +0 -0
- package/lib/index.css.gz +0 -0
- package/lib/packages/ls-components/components/preview_docx/Docx.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/preview_docx/Docx.vue/index.js +2 -2
- package/lib/packages/ls-components/components/preview_docx/Index.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/preview_docx/Index.vue/index.js +2 -2
- package/lib/packages/ls-components/components/preview_docx/Index.vue/index2.cjs +1 -1
- package/lib/packages/ls-components/components/preview_docx/Index.vue/index2.js +42 -42
- package/lib/packages/ls-components/components/preview_docx/Index.vue/index2.js.br +0 -0
- package/lib/packages/ls-components/components/preview_docx/Index.vue/index2.js.gz +0 -0
- package/lib/packages/ls-components/components/preview_image/Image.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/preview_image/Image.vue/index.js +2 -2
- package/lib/packages/ls-components/components/preview_image/Image.vue/index2.cjs +1 -1
- package/lib/packages/ls-components/components/preview_image/Image.vue/index2.js +159 -149
- package/lib/packages/ls-components/components/preview_image/Image.vue/index2.js.br +0 -0
- package/lib/packages/ls-components/components/preview_image/Image.vue/index2.js.gz +0 -0
- package/lib/packages/ls-components/components/preview_image/Index.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/preview_image/Index.vue/index.js +2 -2
- package/lib/packages/ls-components/components/preview_image/Index.vue/index2.cjs +1 -1
- package/lib/packages/ls-components/components/preview_image/Index.vue/index2.js +44 -44
- package/lib/packages/ls-components/components/preview_image/Index.vue/index2.js.br +0 -0
- package/lib/packages/ls-components/components/preview_image/Index.vue/index2.js.gz +0 -0
- package/lib/packages/ls-components/components/preview_pdf/Index.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/preview_pdf/Index.vue/index.js +4 -4
- package/lib/packages/ls-components/components/preview_pdf/Index.vue/index2.cjs +1 -1
- package/lib/packages/ls-components/components/preview_pdf/Index.vue/index2.js +38 -38
- package/lib/packages/ls-components/components/preview_pdf/Index.vue/index2.js.br +0 -0
- package/lib/packages/ls-components/components/preview_pdf/Index.vue/index2.js.gz +0 -0
- package/lib/packages/ls-components/components/preview_xlsx/Index.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/preview_xlsx/Index.vue/index.js +1 -1
- package/lib/packages/ls-components/components/preview_xlsx/Index.vue/index2.cjs +1 -1
- package/lib/packages/ls-components/components/preview_xlsx/Index.vue/index2.js +41 -41
- package/lib/packages/ls-components/components/preview_xlsx/Index.vue/index2.js.br +0 -0
- package/lib/packages/ls-components/components/preview_xlsx/Index.vue/index2.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 +111 -104
- 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/packages/ls-components/components/upload/types/index.cjs +1 -1
- package/lib/packages/ls-components/components/upload/types/index.js +4 -0
- package/lib/packages/ls-components/components/upload/types/index.js.br +0 -0
- package/lib/packages/ls-components/components/upload/types/index.js.gz +0 -0
- package/package.json +1 -1
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
var
|
|
2
|
-
var s = (V, O) =>
|
|
1
|
+
var Te = Object.defineProperty;
|
|
2
|
+
var s = (V, O) => Te(V, "name", { value: O, configurable: !0 });
|
|
3
3
|
/* empty css */
|
|
4
4
|
/* empty css */
|
|
5
5
|
/* empty css */
|
|
6
6
|
/* empty css */
|
|
7
|
-
import { defineComponent as
|
|
8
|
-
import { lsUploadProps as
|
|
9
|
-
import { getVariable as
|
|
10
|
-
import { useNamespace as
|
|
7
|
+
import { defineComponent as $e, useSlots as xe, useAttrs as Me, ref as ie, reactive as ne, watch as Y, computed as l, openBlock as r, createElementBlock as m, normalizeClass as B, unref as n, createVNode as oe, mergeProps as Re, createSlots as _e, withCtx as p, Fragment as h, createBlock as F, createElementVNode as D, toDisplayString as N, createTextVNode as T, createCommentVNode as q, renderSlot as I, toRefs as le } from "vue";
|
|
8
|
+
import { lsUploadProps as ze, UPLOAD_TYPE_MAP as Be, fileTypeMap as De, UPLOAD_STATUS_MAP as Ne, IMG_SUFFIX_LIST as qe } from "../types/index.js";
|
|
9
|
+
import { getVariable as Ie } from "../../_utils/config/index.js";
|
|
10
|
+
import { useNamespace as Ve } from "../../_hooks/useNamespace/index.js";
|
|
11
11
|
import L from "../../button/Button.vue/index.js";
|
|
12
12
|
import ae from "../../icon/Index.vue/index.js";
|
|
13
13
|
/* empty css */
|
|
14
14
|
/* empty css */
|
|
15
|
-
import { ElMessage as
|
|
16
|
-
import { ElAvatar as
|
|
17
|
-
import { ElUpload as
|
|
18
|
-
const
|
|
15
|
+
import { ElMessage as $ } from "../../../../../node_modules/.pnpm/element-plus@2.8.1_vue@3.5.13_typescript@5.5.4_/node_modules/element-plus/es/components/message/index/index.js";
|
|
16
|
+
import { ElAvatar as Oe } from "../../../../../node_modules/.pnpm/element-plus@2.8.1_vue@3.5.13_typescript@5.5.4_/node_modules/element-plus/es/components/avatar/index/index.js";
|
|
17
|
+
import { ElUpload as je } from "../../../../../node_modules/.pnpm/element-plus@2.8.1_vue@3.5.13_typescript@5.5.4_/node_modules/element-plus/es/components/upload/index/index.js";
|
|
18
|
+
const Ge = { class: "ls-drag" }, He = { class: "drag-txt ls-color-brand6" }, Ke = {
|
|
19
19
|
key: 0,
|
|
20
20
|
class: "btn-picture-card"
|
|
21
|
-
},
|
|
21
|
+
}, We = {
|
|
22
22
|
key: 0,
|
|
23
23
|
class: "ls-tip"
|
|
24
|
-
},
|
|
24
|
+
}, ft = /* @__PURE__ */ $e({
|
|
25
25
|
name: "LSUpload",
|
|
26
26
|
inheritAttrs: !1,
|
|
27
27
|
__name: "Index",
|
|
28
|
-
props:
|
|
28
|
+
props: ze,
|
|
29
29
|
emits: ["uploadErrorFunc", "onChangeFunc", "httpResponseFunc"],
|
|
30
30
|
setup(V, { expose: O, emit: se }) {
|
|
31
|
-
const x =
|
|
31
|
+
const x = xe(), y = Me(), re = Ve("upload").b(), f = ie(), d = ie(!1), b = ne({
|
|
32
32
|
isCover: !0,
|
|
33
33
|
accept: "",
|
|
34
34
|
disabled: !1
|
|
@@ -38,7 +38,7 @@ const je = { class: "ls-drag" }, Ge = { class: "drag-txt ls-color-brand6" }, He
|
|
|
38
38
|
showPreview: !1,
|
|
39
39
|
typePreview: "",
|
|
40
40
|
sourcePreview: "",
|
|
41
|
-
iconColor:
|
|
41
|
+
iconColor: Ie("colorText1")
|
|
42
42
|
}), i = V, M = se;
|
|
43
43
|
Y(
|
|
44
44
|
() => y["file-list"],
|
|
@@ -50,54 +50,54 @@ const je = { class: "ls-drag" }, Ge = { class: "drag-txt ls-color-brand6" }, He
|
|
|
50
50
|
deep: !0
|
|
51
51
|
}
|
|
52
52
|
);
|
|
53
|
-
const U =
|
|
53
|
+
const U = l(() => {
|
|
54
54
|
var e, t;
|
|
55
55
|
return (((e = i == null ? void 0 : i.item) == null ? void 0 : e.isToast) || typeof ((t = i == null ? void 0 : i.item) == null ? void 0 : t.isToast)) === "undefined";
|
|
56
|
-
}), v =
|
|
56
|
+
}), v = l(() => {
|
|
57
57
|
var t;
|
|
58
58
|
const e = (t = i == null ? void 0 : i.item) == null ? void 0 : t.isCover;
|
|
59
59
|
return typeof e > "u" ? !0 : e;
|
|
60
|
-
}), k =
|
|
60
|
+
}), k = l(() => y.multiple), C = l(() => {
|
|
61
61
|
const e = y["auto-upload"];
|
|
62
62
|
return typeof e > "u" ? !0 : e;
|
|
63
|
-
}), ue =
|
|
63
|
+
}), ue = l(() => {
|
|
64
64
|
var e;
|
|
65
65
|
return ((e = i == null ? void 0 : i.item) == null ? void 0 : e.emptyFileMsg) || "";
|
|
66
|
-
}), j =
|
|
66
|
+
}), j = l(() => y["list-type"]), R = l(() => j.value === Be.picCard), ce = l(() => !j.value || j.value == "text"), P = l(() => {
|
|
67
67
|
var e;
|
|
68
68
|
return ((e = i == null ? void 0 : i.item) == null ? void 0 : e.limitFile) || [];
|
|
69
|
-
}), de =
|
|
69
|
+
}), de = l(() => {
|
|
70
70
|
var e;
|
|
71
71
|
return ((e = i == null ? void 0 : i.item) == null ? void 0 : e.limitFileMsg) || "";
|
|
72
|
-
}),
|
|
72
|
+
}), w = l(() => {
|
|
73
73
|
var e;
|
|
74
74
|
return ((e = i == null ? void 0 : i.item) == null ? void 0 : e.limitSize) || 2;
|
|
75
|
-
}), fe =
|
|
75
|
+
}), fe = l(() => {
|
|
76
76
|
var e;
|
|
77
77
|
return ((e = i == null ? void 0 : i.item) == null ? void 0 : e.limitSizeMsg) || "";
|
|
78
|
-
}), G =
|
|
78
|
+
}), G = l(() => {
|
|
79
79
|
var e;
|
|
80
80
|
return ((e = i == null ? void 0 : i.item) == null ? void 0 : e.limitUnit) || "MB";
|
|
81
|
-
}), me =
|
|
81
|
+
}), me = l(() => {
|
|
82
82
|
var e;
|
|
83
83
|
return ((e = i == null ? void 0 : i.item) == null ? void 0 : e.limitNumMsg) || "";
|
|
84
|
-
}), J =
|
|
84
|
+
}), J = l(() => {
|
|
85
85
|
var e;
|
|
86
86
|
return ((e = i == null ? void 0 : i.item) == null ? void 0 : e.profile) || !1;
|
|
87
|
-
}),
|
|
87
|
+
}), A = l(() => y.drag), ve = l(() => {
|
|
88
88
|
var e;
|
|
89
89
|
return ((e = i == null ? void 0 : i.item) == null ? void 0 : e.hideCoverBtn) && v.value && u.uploadFileList.length > 0;
|
|
90
|
-
}), S =
|
|
90
|
+
}), S = l(() => y.disabled), H = l(() => {
|
|
91
91
|
const e = R.value ? "图片" : "文件";
|
|
92
92
|
let t = `选择${e}`;
|
|
93
93
|
return d.value ? t = "正在上传..." : v.value && !k.value ? C.value ? u.initUploadStatus ? t = "点击上传" : t = "重新上传" : u.initUploadStatus ? t = `选择${e}` : t = "重新上传" : C.value && (t = "点击上传"), t;
|
|
94
|
-
}), ge =
|
|
94
|
+
}), ge = l(() => {
|
|
95
95
|
let e = "不限制上传格式,";
|
|
96
|
-
return R.value && (e = "文件须为图片格式,"), `${e}文件大小不超过${
|
|
97
|
-
}), pe =
|
|
96
|
+
return R.value && (e = "文件须为图片格式,"), `${e}文件大小不超过${w.value}${G.value}`;
|
|
97
|
+
}), pe = l(() => {
|
|
98
98
|
var e;
|
|
99
99
|
return ((e = i == null ? void 0 : i.item) == null ? void 0 : e.tipContent) || "";
|
|
100
|
-
}), K =
|
|
100
|
+
}), K = l(() => {
|
|
101
101
|
var e;
|
|
102
102
|
return (e = i == null ? void 0 : i.item) == null ? void 0 : e.httpRequestFunc;
|
|
103
103
|
});
|
|
@@ -111,7 +111,7 @@ const je = { class: "ls-drag" }, Ge = { class: "drag-txt ls-color-brand6" }, He
|
|
|
111
111
|
deep: !0
|
|
112
112
|
}
|
|
113
113
|
), Y(
|
|
114
|
-
() =>
|
|
114
|
+
() => P.value,
|
|
115
115
|
(e) => {
|
|
116
116
|
e && e.length > 0 && Fe(e);
|
|
117
117
|
},
|
|
@@ -122,80 +122,80 @@ const je = { class: "ls-drag" }, Ge = { class: "drag-txt ls-color-brand6" }, He
|
|
|
122
122
|
);
|
|
123
123
|
function Fe(e) {
|
|
124
124
|
b.accept = "", e.forEach((t) => {
|
|
125
|
-
const
|
|
126
|
-
|
|
125
|
+
const o = De[t] || "";
|
|
126
|
+
o && (b.accept && (b.accept += ","), b.accept += o);
|
|
127
127
|
});
|
|
128
128
|
}
|
|
129
129
|
s(Fe, "updateFileAccept");
|
|
130
|
-
function
|
|
131
|
-
const { formRuleFunc: t, formValidateFunc:
|
|
132
|
-
if (t && t.value instanceof Function &&
|
|
130
|
+
function E(e) {
|
|
131
|
+
const { formRuleFunc: t, formValidateFunc: o } = le(i == null ? void 0 : i.item);
|
|
132
|
+
if (t && t.value instanceof Function && o && o.value instanceof Function) {
|
|
133
133
|
const a = t.value(), { message: c } = a;
|
|
134
|
-
a.message = e,
|
|
134
|
+
a.message = e, o.value(), a.message = c;
|
|
135
135
|
}
|
|
136
136
|
M("uploadErrorFunc", e);
|
|
137
137
|
}
|
|
138
|
-
s(
|
|
138
|
+
s(E, "validateForm");
|
|
139
139
|
function ye(e, t) {
|
|
140
140
|
if (d.value = !1, i.onExceed)
|
|
141
141
|
return i.onExceed(e, t);
|
|
142
|
-
const
|
|
142
|
+
const o = `当前限制选择 ${y.limit} 个文件,本次选择了 ${e.length} 个文件,共选择了 ${e.length + t.length} 个文件` || me.value;
|
|
143
143
|
U.value ? setTimeout(() => {
|
|
144
|
-
|
|
145
|
-
}, 200) :
|
|
144
|
+
$.warning(o);
|
|
145
|
+
}, 200) : E(o);
|
|
146
146
|
}
|
|
147
147
|
s(ye, "onExceedAction");
|
|
148
148
|
function be(e) {
|
|
149
149
|
if (i.beforeUpload) {
|
|
150
|
-
const
|
|
151
|
-
return
|
|
150
|
+
const o = i.beforeUpload(e);
|
|
151
|
+
return o && v.value && !k.value && _(), o;
|
|
152
152
|
}
|
|
153
153
|
const t = W(e, !0);
|
|
154
154
|
return t && C.value && v.value && !k.value && _(), t;
|
|
155
155
|
}
|
|
156
156
|
s(be, "beforeUploadAction");
|
|
157
157
|
function W(e, t) {
|
|
158
|
-
let
|
|
159
|
-
const { size: a, name: c } = e, X =
|
|
158
|
+
let o = !0;
|
|
159
|
+
const { size: a, name: c } = e, X = P.value.length > 0 && !Q(c);
|
|
160
160
|
let z = !1;
|
|
161
161
|
switch (G.value) {
|
|
162
162
|
case "KB":
|
|
163
|
-
z = a / 1024 >
|
|
163
|
+
z = a / 1024 > w.value;
|
|
164
164
|
break;
|
|
165
165
|
case "MB":
|
|
166
|
-
z = a / 1024 / 1024 >
|
|
166
|
+
z = a / 1024 / 1024 > w.value;
|
|
167
167
|
break;
|
|
168
168
|
default:
|
|
169
|
-
z = a / 1024 / 1024 / 1024 >
|
|
169
|
+
z = a / 1024 / 1024 / 1024 > w.value;
|
|
170
170
|
break;
|
|
171
171
|
}
|
|
172
172
|
if (X) {
|
|
173
|
-
const g = de.value || `上传文件 ${e.name} 只能是 ${
|
|
173
|
+
const g = de.value || `上传文件 ${e.name} 只能是 ${P.value.filter((Ee) => Ee).join(",").toLocaleLowerCase()} 格式!`;
|
|
174
174
|
U.value && t ? setTimeout(() => {
|
|
175
|
-
|
|
176
|
-
}, 200) :
|
|
175
|
+
$.error(g);
|
|
176
|
+
}, 200) : E(g), o = !1;
|
|
177
177
|
}
|
|
178
178
|
if (z) {
|
|
179
|
-
const g = fe.value || `上传文件 ${e.name} 大小不能超过 ${
|
|
179
|
+
const g = fe.value || `上传文件 ${e.name} 大小不能超过 ${w.value}${G.value}!`;
|
|
180
180
|
U.value && t ? setTimeout(() => {
|
|
181
|
-
|
|
182
|
-
}, 200) :
|
|
181
|
+
$.error(g);
|
|
182
|
+
}, 200) : E(g), o = !1;
|
|
183
183
|
}
|
|
184
|
-
if (R.value && !Q(c,
|
|
184
|
+
if (R.value && !Q(c, qe)) {
|
|
185
185
|
const g = `上传文件 ${e.name} 不是图片格式的文件!`;
|
|
186
186
|
U.value && t ? setTimeout(() => {
|
|
187
|
-
|
|
188
|
-
}, 200) :
|
|
187
|
+
$.error(g);
|
|
188
|
+
}, 200) : E(g), o = !1;
|
|
189
189
|
}
|
|
190
|
-
return
|
|
190
|
+
return o;
|
|
191
191
|
}
|
|
192
192
|
s(W, "validateUploadFile");
|
|
193
193
|
function Q(e, t) {
|
|
194
|
-
let
|
|
195
|
-
if (
|
|
194
|
+
let o = [];
|
|
195
|
+
if (P.value.length > 0 ? o = P.value : t && (o = t), o.length <= 0)
|
|
196
196
|
return !0;
|
|
197
|
-
for (let a = 0; a <
|
|
198
|
-
const c = (
|
|
197
|
+
for (let a = 0; a < o.length; a++) {
|
|
198
|
+
const c = (o[a] || "").toLowerCase();
|
|
199
199
|
if (e.toLowerCase().endsWith(c))
|
|
200
200
|
return !0;
|
|
201
201
|
}
|
|
@@ -208,17 +208,17 @@ const je = { class: "ls-drag" }, Ge = { class: "drag-txt ls-color-brand6" }, He
|
|
|
208
208
|
s(_, "updateCoverFileList");
|
|
209
209
|
function he(e, t) {
|
|
210
210
|
u.uploadFileList = t;
|
|
211
|
-
const
|
|
212
|
-
if (
|
|
211
|
+
const o = e.raw && W(e.raw, !C.value);
|
|
212
|
+
if (o && v.value && !k.value && _(), i.onChange)
|
|
213
213
|
return i.onChange(e, t);
|
|
214
214
|
const { size: a } = e;
|
|
215
215
|
if (a <= 0) {
|
|
216
216
|
Z();
|
|
217
217
|
const c = ue.value || "禁止上传空文件,请检查后重新上传!";
|
|
218
|
-
U.value ?
|
|
218
|
+
U.value ? $.error(c) : E(c);
|
|
219
219
|
return;
|
|
220
220
|
}
|
|
221
|
-
e.raw && (!C.value && !
|
|
221
|
+
e.raw && (!C.value && !o ? Z() : (e.blob = URL.createObjectURL(e.raw) || "", M("onChangeFunc", e)));
|
|
222
222
|
}
|
|
223
223
|
s(he, "onChangeAction");
|
|
224
224
|
function Z() {
|
|
@@ -226,20 +226,20 @@ const je = { class: "ls-drag" }, Ge = { class: "drag-txt ls-color-brand6" }, He
|
|
|
226
226
|
u.uploadFileList.length > 1 && (e = u.uploadFileList.length - 1), _(e, 1), M("onChangeFunc", {});
|
|
227
227
|
}
|
|
228
228
|
s(Z, "setChangeRes");
|
|
229
|
-
function ke(e, t,
|
|
229
|
+
function ke(e, t, o) {
|
|
230
230
|
d.value = !1, u.initUploadStatus = !1;
|
|
231
|
-
const { formRuleFunc: a, formValidateFunc: c } =
|
|
231
|
+
const { formRuleFunc: a, formValidateFunc: c } = le(i == null ? void 0 : i.item);
|
|
232
232
|
if (a && a.value instanceof Function && c && c.value instanceof Function && c.value(), i.onSuccess)
|
|
233
|
-
return i.onSuccess(e, t,
|
|
233
|
+
return i.onSuccess(e, t, o);
|
|
234
234
|
}
|
|
235
235
|
s(ke, "onSuccessAction");
|
|
236
|
-
function Ce(e, t,
|
|
236
|
+
function Ce(e, t, o) {
|
|
237
237
|
if (d.value = !1, i.onError)
|
|
238
|
-
return i.onError(e, t,
|
|
238
|
+
return i.onError(e, t, o);
|
|
239
239
|
}
|
|
240
240
|
s(Ce, "onErrorAction");
|
|
241
241
|
function Se(e, t) {
|
|
242
|
-
if (u.initUploadStatus = !t.length, u.uploadFileList = u.uploadFileList.filter((
|
|
242
|
+
if (u.initUploadStatus = !t.length, u.uploadFileList = u.uploadFileList.filter((o) => o.uid === e.uid || o.name === e.name ? null : o), i.onRemove)
|
|
243
243
|
return i.onRemove(e, t);
|
|
244
244
|
}
|
|
245
245
|
s(Se, "onRemoveAction");
|
|
@@ -247,8 +247,8 @@ const je = { class: "ls-drag" }, Ge = { class: "drag-txt ls-color-brand6" }, He
|
|
|
247
247
|
const { file: t } = e;
|
|
248
248
|
if (!t)
|
|
249
249
|
return;
|
|
250
|
-
const { size:
|
|
251
|
-
if (
|
|
250
|
+
const { size: o } = t;
|
|
251
|
+
if (o <= 0 || !W(t, !1))
|
|
252
252
|
return;
|
|
253
253
|
if (i.httpRequest)
|
|
254
254
|
return i.httpRequest(e);
|
|
@@ -269,7 +269,7 @@ const je = { class: "ls-drag" }, Ge = { class: "drag-txt ls-color-brand6" }, He
|
|
|
269
269
|
function ee() {
|
|
270
270
|
let e = !1;
|
|
271
271
|
for (let t = 0; t < u.uploadFileList.length; t++)
|
|
272
|
-
if (u.uploadFileList[t].status ===
|
|
272
|
+
if (u.uploadFileList[t].status === Ne.ready) {
|
|
273
273
|
e = !0;
|
|
274
274
|
break;
|
|
275
275
|
}
|
|
@@ -285,7 +285,7 @@ const je = { class: "ls-drag" }, Ge = { class: "drag-txt ls-color-brand6" }, He
|
|
|
285
285
|
f == null || f.value.handleRemove(e);
|
|
286
286
|
}
|
|
287
287
|
s(Ue, "removeFile");
|
|
288
|
-
function
|
|
288
|
+
function Pe() {
|
|
289
289
|
u.uploadFileList.forEach((e) => {
|
|
290
290
|
var t;
|
|
291
291
|
if (e)
|
|
@@ -295,18 +295,24 @@ const je = { class: "ls-drag" }, Ge = { class: "drag-txt ls-color-brand6" }, He
|
|
|
295
295
|
}
|
|
296
296
|
});
|
|
297
297
|
}
|
|
298
|
-
s(
|
|
299
|
-
function
|
|
300
|
-
d.value = !0
|
|
298
|
+
s(Pe, "cancelUpload");
|
|
299
|
+
function we(e, t, o) {
|
|
300
|
+
if (d.value = !0, i.onProgress)
|
|
301
|
+
return i.onProgress(e, t, o);
|
|
301
302
|
}
|
|
302
|
-
|
|
303
|
+
s(we, "onProgressAction");
|
|
304
|
+
function Ae(e) {
|
|
305
|
+
if (i.onPreview)
|
|
306
|
+
return i.onPreview(e);
|
|
307
|
+
}
|
|
308
|
+
return s(Ae, "onPreviewAction"), O({
|
|
303
309
|
uploadRef: f
|
|
304
310
|
}), (e, t) => {
|
|
305
|
-
const
|
|
311
|
+
const o = Oe, a = je;
|
|
306
312
|
return r(), m("div", {
|
|
307
|
-
class: B([n(re), n(
|
|
313
|
+
class: B([n(re), n(A) ? "ls-upload-drag" : "", n(J) ? "ls-profile" : "", n(ve) ? "hide-cover-btn" : ""])
|
|
308
314
|
}, [
|
|
309
|
-
|
|
315
|
+
oe(a, Re({
|
|
310
316
|
ref_key: "uploadRef",
|
|
311
317
|
ref: f
|
|
312
318
|
}, Object.assign(n(b), e.$attrs), {
|
|
@@ -316,17 +322,18 @@ const je = { class: "ls-drag" }, Ge = { class: "drag-txt ls-color-brand6" }, He
|
|
|
316
322
|
"on-success": ke,
|
|
317
323
|
"on-error": Ce,
|
|
318
324
|
"on-remove": Se,
|
|
319
|
-
"on-progress":
|
|
320
|
-
|
|
325
|
+
"on-progress": we,
|
|
326
|
+
"on-preview": Ae
|
|
327
|
+
}), _e({
|
|
321
328
|
trigger: p(() => [
|
|
322
|
-
n(J) ? e.item.defProfile && n(u).uploadFileList.length < 1 ? (r(), F(
|
|
329
|
+
n(J) ? e.item.defProfile && n(u).uploadFileList.length < 1 ? (r(), F(o, {
|
|
323
330
|
key: 1,
|
|
324
331
|
size: 60,
|
|
325
332
|
src: e.item.defProfile,
|
|
326
333
|
fit: "contain"
|
|
327
334
|
}, null, 8, ["src"])) : q("", !0) : (r(), m(h, { key: 0 }, [
|
|
328
335
|
n(x).trigger ? I(e.$slots, "trigger", { key: 1 }, void 0, !0) : (r(), m(h, { key: 0 }, [
|
|
329
|
-
n(
|
|
336
|
+
n(A) ? (r(), m(h, { key: 0 }, [
|
|
330
337
|
n(d) ? (r(), F(L, {
|
|
331
338
|
key: 0,
|
|
332
339
|
text: "",
|
|
@@ -339,15 +346,15 @@ const je = { class: "ls-drag" }, Ge = { class: "drag-txt ls-color-brand6" }, He
|
|
|
339
346
|
size: "56",
|
|
340
347
|
color: "#E7E7E7"
|
|
341
348
|
})),
|
|
342
|
-
D("div",
|
|
343
|
-
D("div",
|
|
349
|
+
D("div", Ge, [
|
|
350
|
+
D("div", He, N(n(H)), 1),
|
|
344
351
|
n(d) ? q("", !0) : (r(), m(h, { key: 0 }, [
|
|
345
|
-
t[0] || (t[0] =
|
|
352
|
+
t[0] || (t[0] = T(" / ")),
|
|
346
353
|
t[1] || (t[1] = D("div", { class: "drag-txt ls-color-text2" }, "拖拽到此区域", -1))
|
|
347
354
|
], 64))
|
|
348
355
|
])
|
|
349
356
|
], 64)) : (r(), m(h, { key: 1 }, [
|
|
350
|
-
n(R) ? (r(), m("div",
|
|
357
|
+
n(R) ? (r(), m("div", Ke, [
|
|
351
358
|
n(d) ? (r(), F(L, {
|
|
352
359
|
key: 0,
|
|
353
360
|
text: "",
|
|
@@ -369,7 +376,7 @@ const je = { class: "ls-drag" }, Ge = { class: "drag-txt ls-color-brand6" }, He
|
|
|
369
376
|
disabled: n(S)
|
|
370
377
|
}, {
|
|
371
378
|
default: p(() => [
|
|
372
|
-
|
|
379
|
+
T(N(n(H)), 1)
|
|
373
380
|
]),
|
|
374
381
|
_: 1
|
|
375
382
|
}, 8, ["loading", "disabled"]))
|
|
@@ -379,25 +386,25 @@ const je = { class: "ls-drag" }, Ge = { class: "drag-txt ls-color-brand6" }, He
|
|
|
379
386
|
]),
|
|
380
387
|
default: p(() => [
|
|
381
388
|
n(x).default ? I(e.$slots, "default", { key: 1 }, void 0, !0) : (r(), m(h, { key: 0 }, [
|
|
382
|
-
!n(C) && (n(ce) || n(
|
|
389
|
+
!n(C) && (n(ce) || n(A)) ? (r(), m("div", {
|
|
383
390
|
key: 0,
|
|
384
|
-
class: B(["upload-btn-handle", [n(
|
|
391
|
+
class: B(["upload-btn-handle", [n(A) ? "drag-css" : "nor-css", !n(v) || n(k) ? "multi-css" : ""]])
|
|
385
392
|
}, [
|
|
386
|
-
n(
|
|
393
|
+
n(A) ? (r(), m(h, { key: 1 }, [
|
|
387
394
|
!n(v) || n(k) ? (r(), F(L, {
|
|
388
395
|
key: 0,
|
|
389
396
|
type: "primary",
|
|
390
397
|
loading: n(d),
|
|
391
398
|
disabled: n(S),
|
|
392
|
-
onClick:
|
|
399
|
+
onClick: Pe,
|
|
393
400
|
class: "ls-upload-btn-com ls-upload-btn-cancel"
|
|
394
401
|
}, {
|
|
395
402
|
default: p(() => t[3] || (t[3] = [
|
|
396
|
-
|
|
403
|
+
T("取消上传")
|
|
397
404
|
])),
|
|
398
405
|
_: 1
|
|
399
406
|
}, 8, ["loading", "disabled"])) : q("", !0),
|
|
400
|
-
|
|
407
|
+
oe(L, {
|
|
401
408
|
class: B(["start-upload ls-upload-btn-com ls-upload-btn-comfirm", { "is-ready": ee() }]),
|
|
402
409
|
type: "primary",
|
|
403
410
|
loading: n(d),
|
|
@@ -405,7 +412,7 @@ const je = { class: "ls-drag" }, Ge = { class: "drag-txt ls-color-brand6" }, He
|
|
|
405
412
|
onClick: te
|
|
406
413
|
}, {
|
|
407
414
|
default: p(() => t[4] || (t[4] = [
|
|
408
|
-
|
|
415
|
+
T("开始上传")
|
|
409
416
|
])),
|
|
410
417
|
_: 1
|
|
411
418
|
}, 8, ["class", "loading", "disabled"])
|
|
@@ -418,7 +425,7 @@ const je = { class: "ls-drag" }, Ge = { class: "drag-txt ls-color-brand6" }, He
|
|
|
418
425
|
onClick: te
|
|
419
426
|
}, {
|
|
420
427
|
default: p(() => t[2] || (t[2] = [
|
|
421
|
-
|
|
428
|
+
T("开始上传 ")
|
|
422
429
|
])),
|
|
423
430
|
_: 1
|
|
424
431
|
}, 8, ["class", "loading", "disabled"]))
|
|
@@ -426,7 +433,7 @@ const je = { class: "ls-drag" }, Ge = { class: "drag-txt ls-color-brand6" }, He
|
|
|
426
433
|
], 64))
|
|
427
434
|
]),
|
|
428
435
|
tip: p(() => [
|
|
429
|
-
n(x).tip ? I(e.$slots, "tip", { key: 1 }, void 0, !0) : (r(), m("div",
|
|
436
|
+
n(x).tip ? I(e.$slots, "tip", { key: 1 }, void 0, !0) : (r(), m("div", We, N(n(pe) || n(ge)), 1))
|
|
430
437
|
]),
|
|
431
438
|
_: 2
|
|
432
439
|
}, [
|
|
@@ -443,5 +450,5 @@ const je = { class: "ls-drag" }, Ge = { class: "drag-txt ls-color-brand6" }, He
|
|
|
443
450
|
}
|
|
444
451
|
});
|
|
445
452
|
export {
|
|
446
|
-
|
|
453
|
+
ft as default
|
|
447
454
|
};
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var i=Object.defineProperty;var p=(t,e)=>i(t,"name",{value:e,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../../_utils/runtime/index.cjs"),
|
|
1
|
+
"use strict";var i=Object.defineProperty;var p=(t,e)=>i(t,"name",{value:e,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../../_utils/runtime/index.cjs"),n=o.buildProps({item:{type:Object,default:p(()=>({}),"default")},onExceed:{type:Function,default:null},beforeUpload:{type:Function,default:null},onChange:{type:Function,default:null},onSuccess:{type:Function,default:null},onError:{type:Function,default:null},onRemove:{type:Function,default:null},onPreview:{type:Function,default:null},onProgress:{type:Function,default:null},httpRequest:{type:Function,default:null}}),a={text:"text",picCard:"picture-card",pic:"picture"},l=["jpeg","jpg","dds","psd","pdt","webp","xmp","gif","bmp","svg","tiff","png","ico"],c={ready:"ready",uploading:"uploading",success:"success",fail:"fail"},d={"3gpp":"audio/3gpp, video/3gpp",ac3:"audio/ac3",asf:"allpication/vnd.ms-asf",au:"audio/basic",css:"text/css",csv:"text/csv",doc:"application/msword",docx:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",dot:"application/msword",dotx:"application/vnd.openxmlformats-officedocument.wordprocessingml.template",dtd:"application/xml-dtd",dwg:"image/vnd.dwg",dxf:"image/vnd.dxf",gif:"image/gif",htm:"text/html",html:"text/html",jp2:"image/jp2",jpe:"image/jpeg",jpeg:"image/jpeg",jpg:"image/jpeg",js:"text/javascript, application/javascript",json:"application/json",mp2:"audio/mpeg, video/mpeg",mp3:"audio/mpeg",mp4:"audio/mp4, video/mp4",mpeg:"video/mpeg",mpg:"video/mpeg",mpp:"application/vnd.ms-project",ogg:"application/ogg, audio/ogg",pdf:"application/pdf",png:"image/png",pot:"application/vnd.ms-powerpoint",potx:"application/vnd.openxmlformats-officedocument.presentationml.template",pps:"application/vnd.ms-powerpoint",ppsx:"application/vnd.openxmlformats-officedocument.presentationml.slideshow",ppt:"application/vnd.ms-powerpoint",pptx:"application/vnd.openxmlformats-officedocument.presentationml.presentation",sldx:"application/vnd.openxmlformats-officedocument.presentationml.slide",rtf:"application/rtf, text/rtf",svf:"image/vnd.svf",tif:"image/tiff",tiff:"image/tiff",txt:"text/plain",wdb:"application/vnd.ms-works",wps:"application/vnd.ms-works",xhtml:"application/xhtml+xml",xlc:"application/vnd.ms-excel",xlm:"application/vnd.ms-excel",xls:"application/vnd.ms-excel",xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",xlsm:"application/vnd.ms-excel.addin.macroEnabled.12",xlsb:"application/vnd.ms-excel.sheet.binary.macroEnabled.12",xlt:"application/vnd.ms-excel",xltx:"application/vnd.openxmlformats-officedocument.spreadsheetml.template",xlw:"application/vnd.ms-excel",xml:"text/xml, application/xml",zip:"aplication/zip"};exports.IMG_SUFFIX_LIST=l;exports.UPLOAD_STATUS_MAP=c;exports.UPLOAD_TYPE_MAP=a;exports.fileTypeMap=d;exports.lsUploadProps=n;
|
|
Binary file
|
|
Binary file
|