@lingshugroup/web-plus 1.0.19 → 1.0.20
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/README.md +3 -1
- 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/dialog/Index.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/dialog/Index.vue/index.js +2 -2
- package/lib/packages/ls-components/components/dialog/Index.vue/index2.cjs +1 -1
- package/lib/packages/ls-components/components/dialog/Index.vue/index2.js +44 -39
- package/lib/packages/ls-components/components/dialog/Index.vue/index2.js.br +0 -0
- package/lib/packages/ls-components/components/dialog/Index.vue/index2.js.gz +0 -0
- package/lib/packages/ls-components/components/dialog/types/index.cjs +1 -1
- package/lib/packages/ls-components/components/dialog/types/index.js +10 -6
- package/lib/packages/ls-components/components/upload/Index.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/upload/Index.vue/index.js +1 -1
- package/lib/packages/ls-components/components/upload/Index.vue/index2.cjs +1 -1
- package/lib/packages/ls-components/components/upload/Index.vue/index2.js +155 -152
- 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/package.json +1 -1
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
1
|
+
var Te = Object.defineProperty;
|
|
2
|
+
var r = (F, W) => Te(F, "name", { value: W, 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 Me, useAttrs as Re, ref as ne, reactive as le, watch as J, computed as s, resolveComponent as ze, openBlock as c, createElementBlock as p, normalizeClass as D, unref as o, createVNode as Q, mergeProps as Be, createSlots as Ie, withCtx as w, Fragment as S, createBlock as y, createElementVNode as j, toDisplayString as N, createTextVNode as R, createCommentVNode as q, renderSlot as O, toRefs as ae, pushScopeId as Ve, popScopeId as De } from "vue";
|
|
8
|
+
import { lsUploadProps as Ne, UPLOAD_TYPE_MAP as qe, fileTypeMap as Oe, UPLOAD_STATUS_MAP as je, IMG_SUFFIX_LIST as We } from "../types/index.js";
|
|
9
|
+
import { getVariable as Ge } from "../../_utils/config/index.js";
|
|
10
|
+
import { useNamespace as He } from "../../_hooks/useNamespace/index.js";
|
|
11
11
|
import x from "../../button/Button.vue/index.js";
|
|
12
12
|
import se from "../../icon/Index.vue/index.js";
|
|
13
13
|
/* empty css */
|
|
14
14
|
/* empty css */
|
|
15
15
|
import { ElMessage as z } from "../../../../../node_modules/.pnpm/element-plus@2.8.1_vue@3.4.38_typescript@5.5.4_/node_modules/element-plus/es/components/message/index/index.js";
|
|
16
|
-
import { ElAvatar as
|
|
17
|
-
import { ElUpload as
|
|
18
|
-
const
|
|
16
|
+
import { ElAvatar as Ke } from "../../../../../node_modules/.pnpm/element-plus@2.8.1_vue@3.4.38_typescript@5.5.4_/node_modules/element-plus/es/components/avatar/index/index.js";
|
|
17
|
+
import { ElUpload as Xe } from "../../../../../node_modules/.pnpm/element-plus@2.8.1_vue@3.4.38_typescript@5.5.4_/node_modules/element-plus/es/components/upload/index/index.js";
|
|
18
|
+
const Ye = /* @__PURE__ */ r((F) => (Ve("data-v-7dbf6132"), F = F(), De(), F), "_withScopeId"), Je = { class: "ls-drag" }, Qe = { class: "drag-txt ls-color-brand6" }, Ze = /* @__PURE__ */ Ye(() => /* @__PURE__ */ j("div", { class: "drag-txt ls-color-text2" }, "拖拽到此区域", -1)), et = {
|
|
19
19
|
key: 0,
|
|
20
20
|
class: "btn-picture-card"
|
|
21
|
-
},
|
|
21
|
+
}, tt = {
|
|
22
22
|
key: 0,
|
|
23
23
|
class: "ls-tip"
|
|
24
|
-
},
|
|
24
|
+
}, yt = /* @__PURE__ */ $e({
|
|
25
25
|
name: "LSUpload",
|
|
26
26
|
inheritAttrs: !1,
|
|
27
27
|
__name: "Index",
|
|
28
|
-
props:
|
|
28
|
+
props: Ne,
|
|
29
29
|
emits: ["uploadErrorFunc", "onChangeFunc", "httpResponseFunc"],
|
|
30
30
|
setup(F, { expose: W, emit: re }) {
|
|
31
|
-
const B =
|
|
31
|
+
const B = Me(), b = Re(), ue = He("upload").b(), v = ne(), d = ne(!1), P = le({
|
|
32
32
|
isCover: !0,
|
|
33
33
|
accept: "",
|
|
34
34
|
disabled: !1
|
|
@@ -38,8 +38,8 @@ const Xe = /* @__PURE__ */ s((F) => (Ie("data-v-6c006232"), F = F(), Ve(), F), "
|
|
|
38
38
|
showPreview: !1,
|
|
39
39
|
typePreview: "",
|
|
40
40
|
sourcePreview: "",
|
|
41
|
-
iconColor:
|
|
42
|
-
}),
|
|
41
|
+
iconColor: Ge("colorText1")
|
|
42
|
+
}), t = F, I = re;
|
|
43
43
|
J(
|
|
44
44
|
() => b["file-list"],
|
|
45
45
|
(e) => {
|
|
@@ -50,61 +50,64 @@ const Xe = /* @__PURE__ */ s((F) => (Ie("data-v-6c006232"), F = F(), Ve(), F), "
|
|
|
50
50
|
deep: !0
|
|
51
51
|
}
|
|
52
52
|
);
|
|
53
|
-
const U =
|
|
54
|
-
var e,
|
|
55
|
-
return (((e =
|
|
56
|
-
}), g =
|
|
57
|
-
var
|
|
58
|
-
const e = (
|
|
53
|
+
const U = s(() => {
|
|
54
|
+
var e, i;
|
|
55
|
+
return (((e = t == null ? void 0 : t.item) == null ? void 0 : e.isToast) || typeof ((i = t == null ? void 0 : t.item) == null ? void 0 : i.isToast)) === "undefined";
|
|
56
|
+
}), g = s(() => {
|
|
57
|
+
var i;
|
|
58
|
+
const e = (i = t == null ? void 0 : t.item) == null ? void 0 : i.isCover;
|
|
59
59
|
return typeof e > "u" ? !0 : e;
|
|
60
|
-
}), C =
|
|
60
|
+
}), C = s(() => b.multiple), L = s(() => {
|
|
61
61
|
const e = b["auto-upload"];
|
|
62
62
|
return typeof e > "u" ? !0 : e;
|
|
63
|
-
}), ce =
|
|
63
|
+
}), ce = s(() => {
|
|
64
64
|
var e;
|
|
65
|
-
return ((e =
|
|
66
|
-
}), G =
|
|
65
|
+
return ((e = t == null ? void 0 : t.item) == null ? void 0 : e.emptyFileMsg) || "";
|
|
66
|
+
}), G = s(() => b["list-type"]), k = s(() => G.value === qe.picCard), de = s(() => !G.value || G.value == "text"), A = s(() => {
|
|
67
67
|
var e;
|
|
68
|
-
return ((e =
|
|
69
|
-
}), fe =
|
|
68
|
+
return ((e = t == null ? void 0 : t.item) == null ? void 0 : e.limitFile) || [];
|
|
69
|
+
}), fe = s(() => {
|
|
70
70
|
var e;
|
|
71
|
-
return ((e =
|
|
72
|
-
}), E =
|
|
71
|
+
return ((e = t == null ? void 0 : t.item) == null ? void 0 : e.limitFileMsg) || "";
|
|
72
|
+
}), E = s(() => {
|
|
73
73
|
var e;
|
|
74
|
-
return ((e =
|
|
75
|
-
}), me =
|
|
74
|
+
return ((e = t == null ? void 0 : t.item) == null ? void 0 : e.limitSize) || 2;
|
|
75
|
+
}), me = s(() => {
|
|
76
76
|
var e;
|
|
77
|
-
return ((e =
|
|
78
|
-
}), H =
|
|
77
|
+
return ((e = t == null ? void 0 : t.item) == null ? void 0 : e.limitSizeMsg) || "";
|
|
78
|
+
}), H = s(() => {
|
|
79
79
|
var e;
|
|
80
|
-
return ((e =
|
|
81
|
-
}), ve =
|
|
80
|
+
return ((e = t == null ? void 0 : t.item) == null ? void 0 : e.limitUnit) || "MB";
|
|
81
|
+
}), ve = s(() => {
|
|
82
82
|
var e;
|
|
83
|
-
return ((e =
|
|
84
|
-
}), Z =
|
|
83
|
+
return ((e = t == null ? void 0 : t.item) == null ? void 0 : e.limitNumMsg) || "";
|
|
84
|
+
}), Z = s(() => {
|
|
85
85
|
var e;
|
|
86
|
-
return ((e =
|
|
87
|
-
}), T =
|
|
86
|
+
return ((e = t == null ? void 0 : t.item) == null ? void 0 : e.profile) || !1;
|
|
87
|
+
}), T = s(() => b.drag), pe = s(() => {
|
|
88
88
|
var e;
|
|
89
|
-
return ((e =
|
|
90
|
-
}), _ =
|
|
89
|
+
return ((e = t == null ? void 0 : t.item) == null ? void 0 : e.hideCoverBtn) && g.value && l.uploadFileList.length > 0;
|
|
90
|
+
}), _ = s(() => b.disabled), K = s(() => {
|
|
91
91
|
const e = k.value ? "图片" : "文件";
|
|
92
|
-
let
|
|
93
|
-
return d.value ?
|
|
94
|
-
}), ge =
|
|
92
|
+
let i = `选择${e}`;
|
|
93
|
+
return d.value ? i = "正在上传..." : g.value && !C.value ? L.value ? l.initUploadStatus ? i = "点击上传" : i = "重新上传" : l.initUploadStatus ? i = `选择${e}` : i = "重新上传" : L.value && (i = "点击上传"), i;
|
|
94
|
+
}), ge = s(() => {
|
|
95
95
|
let e = "不限制上传格式,";
|
|
96
96
|
return k.value && (e = "文件须为图片格式,"), `${e}文件大小不超过${E.value}${H.value}`;
|
|
97
|
-
}),
|
|
97
|
+
}), he = s(() => {
|
|
98
98
|
var e;
|
|
99
|
-
return (e =
|
|
100
|
-
}),
|
|
99
|
+
return ((e = t == null ? void 0 : t.item) == null ? void 0 : e.tipContent) || "";
|
|
100
|
+
}), X = s(() => {
|
|
101
101
|
var e;
|
|
102
|
-
return (e =
|
|
102
|
+
return (e = t == null ? void 0 : t.item) == null ? void 0 : e.httpRequestFunc;
|
|
103
|
+
}), $ = s(() => {
|
|
104
|
+
var e;
|
|
105
|
+
return (e = t == null ? void 0 : t.item) == null ? void 0 : e.textPreview;
|
|
103
106
|
});
|
|
104
107
|
J(
|
|
105
108
|
[g, X],
|
|
106
|
-
([e,
|
|
107
|
-
P.isCover = e,
|
|
109
|
+
([e, i]) => {
|
|
110
|
+
P.isCover = e, i && i instanceof Function && (P["http-request"] = Le);
|
|
108
111
|
},
|
|
109
112
|
{
|
|
110
113
|
immediate: !0,
|
|
@@ -113,48 +116,48 @@ const Xe = /* @__PURE__ */ s((F) => (Ie("data-v-6c006232"), F = F(), Ve(), F), "
|
|
|
113
116
|
), J(
|
|
114
117
|
() => A.value,
|
|
115
118
|
(e) => {
|
|
116
|
-
e && e.length > 0 &&
|
|
119
|
+
e && e.length > 0 && we(e);
|
|
117
120
|
},
|
|
118
121
|
{
|
|
119
122
|
immediate: !0,
|
|
120
123
|
deep: !0
|
|
121
124
|
}
|
|
122
125
|
);
|
|
123
|
-
function
|
|
124
|
-
P.accept = "", e.forEach((
|
|
125
|
-
const n =
|
|
126
|
+
function we(e) {
|
|
127
|
+
P.accept = "", e.forEach((i) => {
|
|
128
|
+
const n = Oe[i] || "";
|
|
126
129
|
n && (P.accept && (P.accept += ","), P.accept += n);
|
|
127
130
|
});
|
|
128
131
|
}
|
|
129
|
-
|
|
132
|
+
r(we, "updateFileAccept");
|
|
130
133
|
function M(e) {
|
|
131
|
-
const { formRuleFunc:
|
|
132
|
-
if (
|
|
133
|
-
const a =
|
|
134
|
+
const { formRuleFunc: i, formValidateFunc: n } = ae(t == null ? void 0 : t.item);
|
|
135
|
+
if (i && i.value instanceof Function && n && n.value instanceof Function) {
|
|
136
|
+
const a = i.value(), { message: u } = a;
|
|
134
137
|
a.message = e, n.value(), a.message = u;
|
|
135
138
|
}
|
|
136
139
|
I("uploadErrorFunc", e);
|
|
137
140
|
}
|
|
138
|
-
|
|
139
|
-
function
|
|
140
|
-
if (d.value = !1,
|
|
141
|
-
return
|
|
142
|
-
const n = `当前限制选择 ${b.limit} 个文件,本次选择了 ${e.length} 个文件,共选择了 ${e.length +
|
|
141
|
+
r(M, "validateForm");
|
|
142
|
+
function ye(e, i) {
|
|
143
|
+
if (d.value = !1, t.onExceed)
|
|
144
|
+
return t.onExceed(e, i);
|
|
145
|
+
const n = `当前限制选择 ${b.limit} 个文件,本次选择了 ${e.length} 个文件,共选择了 ${e.length + i.length} 个文件` || ve.value;
|
|
143
146
|
U.value ? setTimeout(() => {
|
|
144
147
|
z.warning(n);
|
|
145
148
|
}, 200) : M(n);
|
|
146
149
|
}
|
|
147
|
-
|
|
148
|
-
function
|
|
149
|
-
if (
|
|
150
|
-
const n =
|
|
150
|
+
r(ye, "onExceedAction");
|
|
151
|
+
function Fe(e) {
|
|
152
|
+
if (t.beforeUpload) {
|
|
153
|
+
const n = t.beforeUpload(e);
|
|
151
154
|
return n && g.value && !C.value && V(), n;
|
|
152
155
|
}
|
|
153
|
-
const
|
|
154
|
-
return
|
|
156
|
+
const i = Y(e, !0);
|
|
157
|
+
return i && L.value && g.value && !C.value && V(), i;
|
|
155
158
|
}
|
|
156
|
-
|
|
157
|
-
function Y(e,
|
|
159
|
+
r(Fe, "beforeUploadAction");
|
|
160
|
+
function Y(e, i) {
|
|
158
161
|
let n = !0;
|
|
159
162
|
const { size: a, name: u } = e, f = A.value.length > 0 && !ee(u);
|
|
160
163
|
let m = !1;
|
|
@@ -170,29 +173,29 @@ const Xe = /* @__PURE__ */ s((F) => (Ie("data-v-6c006232"), F = F(), Ve(), F), "
|
|
|
170
173
|
break;
|
|
171
174
|
}
|
|
172
175
|
if (f) {
|
|
173
|
-
const h = fe.value || `上传文件 ${e.name} 只能是 ${A.value.filter((
|
|
174
|
-
U.value &&
|
|
176
|
+
const h = fe.value || `上传文件 ${e.name} 只能是 ${A.value.filter((Ee) => Ee).join(",").toLocaleLowerCase()} 格式!`;
|
|
177
|
+
U.value && i ? setTimeout(() => {
|
|
175
178
|
z.error(h);
|
|
176
179
|
}, 200) : M(h), n = !1;
|
|
177
180
|
}
|
|
178
181
|
if (m) {
|
|
179
182
|
const h = me.value || `上传文件 ${e.name} 大小不能超过 ${E.value}${H.value}!`;
|
|
180
|
-
U.value &&
|
|
183
|
+
U.value && i ? setTimeout(() => {
|
|
181
184
|
z.error(h);
|
|
182
185
|
}, 200) : M(h), n = !1;
|
|
183
186
|
}
|
|
184
|
-
if (k.value && !ee(u,
|
|
187
|
+
if (k.value && !ee(u, We)) {
|
|
185
188
|
const h = `上传文件 ${e.name} 不是图片格式的文件!`;
|
|
186
|
-
U.value &&
|
|
189
|
+
U.value && i ? setTimeout(() => {
|
|
187
190
|
z.error(h);
|
|
188
191
|
}, 200) : M(h), n = !1;
|
|
189
192
|
}
|
|
190
193
|
return n;
|
|
191
194
|
}
|
|
192
|
-
|
|
193
|
-
function ee(e,
|
|
195
|
+
r(Y, "validateUploadFile");
|
|
196
|
+
function ee(e, i) {
|
|
194
197
|
let n = [];
|
|
195
|
-
if (A.value.length > 0 ? n = A.value :
|
|
198
|
+
if (A.value.length > 0 ? n = A.value : i && (n = i), n.length <= 0)
|
|
196
199
|
return !0;
|
|
197
200
|
for (let a = 0; a < n.length; a++) {
|
|
198
201
|
const u = (n[a] || "").toLowerCase();
|
|
@@ -201,16 +204,16 @@ const Xe = /* @__PURE__ */ s((F) => (Ie("data-v-6c006232"), F = F(), Ve(), F), "
|
|
|
201
204
|
}
|
|
202
205
|
return !1;
|
|
203
206
|
}
|
|
204
|
-
|
|
205
|
-
function V(e,
|
|
206
|
-
l.uploadFileList.splice(e || 0,
|
|
207
|
+
r(ee, "fileTypeMatch");
|
|
208
|
+
function V(e, i) {
|
|
209
|
+
l.uploadFileList.splice(e || 0, i || l.uploadFileList.length - 1);
|
|
207
210
|
}
|
|
208
|
-
|
|
209
|
-
function
|
|
210
|
-
l.uploadFileList =
|
|
211
|
+
r(V, "updateCoverFileList");
|
|
212
|
+
function be(e, i) {
|
|
213
|
+
l.uploadFileList = i;
|
|
211
214
|
const n = e.raw && Y(e.raw, !L.value);
|
|
212
|
-
if (n && g.value && !C.value && V(),
|
|
213
|
-
return
|
|
215
|
+
if (n && g.value && !C.value && V(), t.onChange)
|
|
216
|
+
return t.onChange(e, i);
|
|
214
217
|
const { size: a } = e;
|
|
215
218
|
if (a <= 0) {
|
|
216
219
|
te();
|
|
@@ -220,51 +223,51 @@ const Xe = /* @__PURE__ */ s((F) => (Ie("data-v-6c006232"), F = F(), Ve(), F), "
|
|
|
220
223
|
}
|
|
221
224
|
e.raw && (!L.value && !n ? te() : (e.blob = URL.createObjectURL(e.raw) || "", I("onChangeFunc", e)));
|
|
222
225
|
}
|
|
223
|
-
|
|
226
|
+
r(be, "onChangeAction");
|
|
224
227
|
function te() {
|
|
225
228
|
let e = 0;
|
|
226
229
|
l.uploadFileList.length > 1 && (e = l.uploadFileList.length - 1), V(e, 1), I("onChangeFunc", {});
|
|
227
230
|
}
|
|
228
|
-
|
|
229
|
-
function
|
|
231
|
+
r(te, "setChangeRes");
|
|
232
|
+
function Pe(e, i, n) {
|
|
230
233
|
d.value = !1, l.initUploadStatus = !1;
|
|
231
|
-
const { formRuleFunc: a, formValidateFunc: u } = ae(
|
|
232
|
-
if (a && a.value instanceof Function && u && u.value instanceof Function && u.value(),
|
|
233
|
-
return
|
|
234
|
+
const { formRuleFunc: a, formValidateFunc: u } = ae(t == null ? void 0 : t.item);
|
|
235
|
+
if (a && a.value instanceof Function && u && u.value instanceof Function && u.value(), t.onSuccess)
|
|
236
|
+
return t.onSuccess(e, i, n);
|
|
234
237
|
}
|
|
235
|
-
|
|
236
|
-
function
|
|
237
|
-
if (d.value = !1,
|
|
238
|
-
return
|
|
238
|
+
r(Pe, "onSuccessAction");
|
|
239
|
+
function ke(e, i, n) {
|
|
240
|
+
if (d.value = !1, t.onError)
|
|
241
|
+
return t.onError(e, i, n);
|
|
239
242
|
}
|
|
240
|
-
|
|
241
|
-
function
|
|
242
|
-
if (l.initUploadStatus = !
|
|
243
|
-
return
|
|
243
|
+
r(ke, "onErrorAction");
|
|
244
|
+
function Se(e, i) {
|
|
245
|
+
if (l.initUploadStatus = !i.length, l.uploadFileList = l.uploadFileList.filter((n) => n.uid === e.uid || n.name === e.name ? null : n), t.onRemove)
|
|
246
|
+
return t.onRemove(e, i);
|
|
244
247
|
}
|
|
245
|
-
|
|
246
|
-
function
|
|
247
|
-
if (
|
|
248
|
-
return
|
|
249
|
-
const { raw:
|
|
250
|
-
|
|
248
|
+
r(Se, "onRemoveAction");
|
|
249
|
+
function Ce(e) {
|
|
250
|
+
if (t.onPreview)
|
|
251
|
+
return t.onPreview(e);
|
|
252
|
+
const { raw: i, url: n, blob: a, name: u } = e, { type: f } = i || {};
|
|
253
|
+
i ? $.value && $.value.length > 0 ? f != null && f.startsWith("image") ? (l.typePreview = "image", l.sourcePreview = k.value ? [n] : [a], l.showPreview = !0) : $.value.includes("pdf") && f == "application/pdf" ? (l.typePreview = "pdf", l.sourcePreview = a, l.showPreview = !0) : $.value.includes("xlsx") && ["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"].includes(f) ? (l.typePreview = "xlsx", fetch(a).then((m) => m.blob()).then((m) => {
|
|
251
254
|
l.sourcePreview = new File([m], u, { type: f }), l.showPreview = !0;
|
|
252
255
|
})) : $.value.includes("docx") && f == "application/vnd.openxmlformats-officedocument.wordprocessingml.document" && (l.typePreview = "docx", fetch(a).then((m) => m.blob()).then((m) => m.arrayBuffer()).then((m) => {
|
|
253
256
|
l.sourcePreview = m, l.showPreview = !0;
|
|
254
257
|
})) : k.value && f != null && f.startsWith("image") && (l.typePreview = "image", l.sourcePreview = [n], l.showPreview = !0) : k.value && (l.typePreview = "image", l.sourcePreview = [n], l.showPreview = !0);
|
|
255
258
|
}
|
|
256
|
-
|
|
257
|
-
async function
|
|
258
|
-
const { file:
|
|
259
|
-
if (!
|
|
259
|
+
r(Ce, "onPreviewAction");
|
|
260
|
+
async function Le(e) {
|
|
261
|
+
const { file: i } = e;
|
|
262
|
+
if (!i)
|
|
260
263
|
return;
|
|
261
|
-
const { size: n } =
|
|
262
|
-
if (n <= 0 || !Y(
|
|
264
|
+
const { size: n } = i;
|
|
265
|
+
if (n <= 0 || !Y(i, !1))
|
|
263
266
|
return;
|
|
264
|
-
if (
|
|
265
|
-
return
|
|
267
|
+
if (t.httpRequest)
|
|
268
|
+
return t.httpRequest(e);
|
|
266
269
|
const a = new FormData();
|
|
267
|
-
if (a.append("file",
|
|
270
|
+
if (a.append("file", i), X.value instanceof Function) {
|
|
268
271
|
d.value = !0;
|
|
269
272
|
let u = {};
|
|
270
273
|
try {
|
|
@@ -276,64 +279,64 @@ const Xe = /* @__PURE__ */ s((F) => (Ie("data-v-6c006232"), F = F(), Ve(), F), "
|
|
|
276
279
|
}
|
|
277
280
|
}
|
|
278
281
|
}
|
|
279
|
-
|
|
282
|
+
r(Le, "httpRequestAction");
|
|
280
283
|
function ie() {
|
|
281
284
|
let e = !1;
|
|
282
|
-
for (let
|
|
283
|
-
if (l.uploadFileList[
|
|
285
|
+
for (let i = 0; i < l.uploadFileList.length; i++)
|
|
286
|
+
if (l.uploadFileList[i].status === je.ready) {
|
|
284
287
|
e = !0;
|
|
285
288
|
break;
|
|
286
289
|
}
|
|
287
290
|
return e;
|
|
288
291
|
}
|
|
289
|
-
|
|
292
|
+
r(ie, "hasReadyFile");
|
|
290
293
|
function oe() {
|
|
291
294
|
var e;
|
|
292
295
|
(e = v == null ? void 0 : v.value) == null || e.submit();
|
|
293
296
|
}
|
|
294
|
-
|
|
295
|
-
function
|
|
297
|
+
r(oe, "comfirmUpload");
|
|
298
|
+
function _e(e) {
|
|
296
299
|
v == null || v.value.handleRemove(e);
|
|
297
300
|
}
|
|
298
|
-
|
|
299
|
-
function
|
|
301
|
+
r(_e, "removeFile");
|
|
302
|
+
function xe() {
|
|
300
303
|
l.uploadFileList.forEach((e) => {
|
|
301
|
-
var
|
|
304
|
+
var i;
|
|
302
305
|
if (e)
|
|
303
306
|
try {
|
|
304
|
-
(
|
|
307
|
+
(i = v == null ? void 0 : v.value) == null || i.abort(e), _e(e);
|
|
305
308
|
} catch {
|
|
306
309
|
}
|
|
307
310
|
});
|
|
308
311
|
}
|
|
309
|
-
|
|
310
|
-
function
|
|
312
|
+
r(xe, "cancelUpload");
|
|
313
|
+
function Ue() {
|
|
311
314
|
d.value = !0;
|
|
312
315
|
}
|
|
313
|
-
|
|
314
|
-
function
|
|
316
|
+
r(Ue, "onProgressAction");
|
|
317
|
+
function Ae() {
|
|
315
318
|
l.showPreview = !1, l.sourcePreview = "";
|
|
316
319
|
}
|
|
317
|
-
return
|
|
320
|
+
return r(Ae, "closePreview"), W({
|
|
318
321
|
uploadRef: v
|
|
319
|
-
}), (e,
|
|
320
|
-
const n =
|
|
322
|
+
}), (e, i) => {
|
|
323
|
+
const n = Ke, a = Xe, u = ze("LSPreview");
|
|
321
324
|
return c(), p("div", {
|
|
322
325
|
class: D([o(ue), o(T) ? "ls-upload-drag" : "", o(Z) ? "ls-profile" : "", o(pe) ? "hide-cover-btn" : ""])
|
|
323
326
|
}, [
|
|
324
|
-
Q(a,
|
|
327
|
+
Q(a, Be({
|
|
325
328
|
ref_key: "uploadRef",
|
|
326
329
|
ref: v
|
|
327
330
|
}, Object.assign(o(P), e.$attrs), {
|
|
328
|
-
"on-exceed":
|
|
329
|
-
"before-upload":
|
|
330
|
-
"on-change":
|
|
331
|
-
"on-success":
|
|
332
|
-
"on-error":
|
|
333
|
-
"on-remove":
|
|
334
|
-
"on-preview":
|
|
335
|
-
"on-progress":
|
|
336
|
-
}),
|
|
331
|
+
"on-exceed": ye,
|
|
332
|
+
"before-upload": Fe,
|
|
333
|
+
"on-change": be,
|
|
334
|
+
"on-success": Pe,
|
|
335
|
+
"on-error": ke,
|
|
336
|
+
"on-remove": Se,
|
|
337
|
+
"on-preview": Ce,
|
|
338
|
+
"on-progress": Ue
|
|
339
|
+
}), Ie({
|
|
337
340
|
trigger: w(() => [
|
|
338
341
|
o(Z) ? e.item.defProfile && o(l).uploadFileList.length < 1 ? (c(), y(n, {
|
|
339
342
|
key: 1,
|
|
@@ -355,15 +358,15 @@ const Xe = /* @__PURE__ */ s((F) => (Ie("data-v-6c006232"), F = F(), Ve(), F), "
|
|
|
355
358
|
size: "56",
|
|
356
359
|
color: "#E7E7E7"
|
|
357
360
|
})),
|
|
358
|
-
j("div",
|
|
359
|
-
j("div",
|
|
361
|
+
j("div", Je, [
|
|
362
|
+
j("div", Qe, N(o(K)), 1),
|
|
360
363
|
o(d) ? q("", !0) : (c(), p(S, { key: 0 }, [
|
|
361
364
|
R(" / "),
|
|
362
|
-
|
|
365
|
+
Ze
|
|
363
366
|
], 64))
|
|
364
367
|
])
|
|
365
368
|
], 64)) : (c(), p(S, { key: 1 }, [
|
|
366
|
-
o(k) ? (c(), p("div",
|
|
369
|
+
o(k) ? (c(), p("div", et, [
|
|
367
370
|
o(d) ? (c(), y(x, {
|
|
368
371
|
key: 0,
|
|
369
372
|
text: "",
|
|
@@ -405,7 +408,7 @@ const Xe = /* @__PURE__ */ s((F) => (Ie("data-v-6c006232"), F = F(), Ve(), F), "
|
|
|
405
408
|
type: "primary",
|
|
406
409
|
loading: o(d),
|
|
407
410
|
disabled: o(_),
|
|
408
|
-
onClick:
|
|
411
|
+
onClick: xe,
|
|
409
412
|
class: "ls-upload-btn-com ls-upload-btn-cancel"
|
|
410
413
|
}, {
|
|
411
414
|
default: w(() => [
|
|
@@ -442,7 +445,7 @@ const Xe = /* @__PURE__ */ s((F) => (Ie("data-v-6c006232"), F = F(), Ve(), F), "
|
|
|
442
445
|
], 64))
|
|
443
446
|
]),
|
|
444
447
|
tip: w(() => [
|
|
445
|
-
o(B).tip ? O(e.$slots, "tip", { key: 1 }, void 0, !0) : (c(), p("div",
|
|
448
|
+
o(B).tip ? O(e.$slots, "tip", { key: 1 }, void 0, !0) : (c(), p("div", tt, N(o(he) || o(ge)), 1))
|
|
446
449
|
]),
|
|
447
450
|
_: 2
|
|
448
451
|
}, [
|
|
@@ -456,8 +459,8 @@ const Xe = /* @__PURE__ */ s((F) => (Ie("data-v-6c006232"), F = F(), Ve(), F), "
|
|
|
456
459
|
]), 1040),
|
|
457
460
|
Q(u, {
|
|
458
461
|
modelValue: o(l).showPreview,
|
|
459
|
-
"onUpdate:modelValue":
|
|
460
|
-
"on-close":
|
|
462
|
+
"onUpdate:modelValue": i[0] || (i[0] = (f) => o(l).showPreview = f),
|
|
463
|
+
"on-close": Ae,
|
|
461
464
|
type: o(l).typePreview,
|
|
462
465
|
source: o(l).sourcePreview
|
|
463
466
|
}, null, 8, ["modelValue", "type", "source"])
|
|
@@ -466,5 +469,5 @@ const Xe = /* @__PURE__ */ s((F) => (Ie("data-v-6c006232"), F = F(), Ve(), F), "
|
|
|
466
469
|
}
|
|
467
470
|
});
|
|
468
471
|
export {
|
|
469
|
-
|
|
472
|
+
yt as default
|
|
470
473
|
};
|
|
Binary file
|
|
Binary file
|