@lingshugroup/web-plus 1.4.5 → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,69 +1,69 @@
1
- var $e = Object.defineProperty;
2
- var r = (q, O) => $e(q, "name", { value: O, configurable: !0 });
1
+ var Me = Object.defineProperty;
2
+ var u = (q, O) => Me(q, "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 xe, useSlots as Me, useAttrs as Re, ref as ne, reactive as oe, watch as Y, computed as s, openBlock as c, createElementBlock as m, normalizeClass as V, unref as n, createVNode as J, mergeProps as _e, createSlots as ze, withCtx as p, Fragment as h, createBlock as F, createElementVNode as B, toDisplayString as D, createTextVNode as $, createCommentVNode as I, renderSlot as N, toRefs as le } from "vue";
8
- import { lsUploadProps as Ve, UPLOAD_TYPE_MAP as Be, fileTypeMap as De, UPLOAD_STATUS_MAP as Ie, IMG_SUFFIX_LIST as Ne } from "../types/index.js";
9
- import { getVariable as qe } from "../../_utils/config/index.js";
10
- import { useNamespace as Oe } from "../../_hooks/useNamespace/index.js";
11
- import P from "../../button/Button.vue/index.js";
12
- import se from "../../icon/Index.vue/index.js";
13
- import je from "../../../../../preview_image/index.js";
7
+ import { defineComponent as Re, useSlots as _e, useAttrs as ze, ref as ne, reactive as le, watch as J, computed as s, openBlock as c, createElementBlock as m, normalizeClass as N, unref as n, createVNode as Q, mergeProps as Ne, createSlots as Ve, withCtx as p, Fragment as k, createBlock as F, createElementVNode as V, toDisplayString as B, createTextVNode as $, createCommentVNode as D, renderSlot as I, toRefs as oe } from "vue";
8
+ import { lsUploadProps as Be, UPLOAD_TYPE_MAP as De, fileTypeMap as Ie, UPLOAD_STATUS_MAP as qe, IMG_SUFFIX_LIST as Oe } from "../types/index.js";
9
+ import { getVariable as je } from "../../_utils/config/index.js";
10
+ import { useNamespace as He } from "../../_hooks/useNamespace/index.js";
11
+ import S from "../../button/Button.vue/index.js";
12
+ import ae from "../../icon/Index.vue/index.js";
13
+ import Ge from "../../../../../preview_image/index.js";
14
14
  /* empty css */
15
15
  /* empty css */
16
16
  import { ElMessage as x } 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";
17
- import { ElAvatar as Ge } 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";
18
- import { ElUpload as He } 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";
19
- const Ke = { class: "ls-drag" }, We = { class: "drag-txt ls-color-brand6" }, Xe = {
17
+ import { ElAvatar as Ke } 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";
18
+ import { ElUpload as We } 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";
19
+ const Xe = { class: "ls-drag" }, Ye = { class: "drag-txt ls-color-brand6" }, Je = {
20
20
  key: 0,
21
21
  class: "btn-picture-card"
22
- }, Ye = {
22
+ }, Qe = {
23
23
  key: 0,
24
24
  class: "ls-tip"
25
- }, gt = /* @__PURE__ */ xe({
25
+ }, Ft = /* @__PURE__ */ Re({
26
26
  name: "LSUpload",
27
27
  inheritAttrs: !1,
28
28
  __name: "Index",
29
- props: Ve,
29
+ props: Be,
30
30
  emits: ["uploadErrorFunc", "onChangeFunc", "httpResponseFunc"],
31
- setup(q, { expose: O, emit: ae }) {
32
- const M = Me(), y = Re(), re = Oe("upload").b(), f = ne(), d = ne(!1), b = oe({
31
+ setup(q, { expose: O, emit: se }) {
32
+ const M = _e(), y = ze(), re = He("upload").b(), f = ne(), d = ne(!1), b = le({
33
33
  isCover: !0,
34
34
  accept: "",
35
35
  disabled: !1
36
- }), l = oe({
36
+ }), o = le({
37
37
  uploadFileList: [],
38
38
  initUploadStatus: !0,
39
39
  showPreview: !1,
40
40
  sourcePreview: "",
41
- iconColor: qe("colorText1")
42
- }), i = q, R = ae;
43
- Y(
41
+ iconColor: je("colorText1")
42
+ }), i = q, R = se;
43
+ J(
44
44
  () => y["file-list"],
45
45
  (e) => {
46
- l.uploadFileList = e || [];
46
+ o.uploadFileList = e || [];
47
47
  },
48
48
  {
49
49
  immediate: !0,
50
50
  deep: !0
51
51
  }
52
52
  );
53
- const S = s(() => {
53
+ const L = s(() => {
54
54
  var e, t;
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";
55
+ 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");
56
56
  }), v = s(() => {
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 = s(() => y.multiple), w = s(() => {
60
+ }), w = s(() => y.multiple), h = s(() => {
61
61
  const e = y["auto-upload"];
62
62
  return typeof e > "u" ? !0 : e;
63
63
  }), ue = s(() => {
64
64
  var e;
65
65
  return ((e = i == null ? void 0 : i.item) == null ? void 0 : e.emptyFileMsg) || "";
66
- }), j = s(() => y["list-type"]), L = s(() => j.value === Be.picCard), ce = s(() => !j.value || j.value == "text"), U = s(() => {
66
+ }), j = s(() => y["list-type"]), P = s(() => j.value === De.picCard), ce = s(() => !j.value || j.value == "text"), U = s(() => {
67
67
  var e;
68
68
  return ((e = i == null ? void 0 : i.item) == null ? void 0 : e.limitFile) || [];
69
69
  }), de = s(() => {
@@ -75,90 +75,96 @@ const Ke = { class: "ls-drag" }, We = { class: "drag-txt ls-color-brand6" }, Xe
75
75
  }), fe = s(() => {
76
76
  var e;
77
77
  return ((e = i == null ? void 0 : i.item) == null ? void 0 : e.limitSizeMsg) || "";
78
- }), G = s(() => {
78
+ }), H = s(() => {
79
79
  var e;
80
80
  return ((e = i == null ? void 0 : i.item) == null ? void 0 : e.limitUnit) || "MB";
81
81
  }), me = s(() => {
82
82
  var e;
83
83
  return ((e = i == null ? void 0 : i.item) == null ? void 0 : e.limitNumMsg) || "";
84
- }), Q = s(() => {
84
+ }), ve = s(() => {
85
+ var e;
86
+ return (e = i == null ? void 0 : i.item) == null ? void 0 : e.limitAllFail;
87
+ }), Z = s(() => {
85
88
  var e;
86
89
  return ((e = i == null ? void 0 : i.item) == null ? void 0 : e.profile) || !1;
87
- }), E = s(() => y.drag), ve = s(() => {
90
+ }), E = s(() => y.drag), ge = s(() => {
88
91
  var e;
89
- return ((e = i == null ? void 0 : i.item) == null ? void 0 : e.hideCoverBtn) && v.value && l.uploadFileList.length > 0;
90
- }), C = s(() => y.disabled), H = s(() => {
91
- const e = L.value ? "图片" : "文件";
92
+ return ((e = i == null ? void 0 : i.item) == null ? void 0 : e.hideCoverBtn) && v.value && o.uploadFileList.length > 0;
93
+ }), C = s(() => y.disabled), G = s(() => {
94
+ const e = P.value ? "图片" : "文件";
92
95
  let t = `选择${e}`;
93
- return d.value ? t = "正在上传..." : v.value && !k.value ? w.value ? l.initUploadStatus ? t = "点击上传" : t = "重新上传" : l.initUploadStatus ? t = `选择${e}` : t = "重新上传" : w.value && (t = "点击上传"), t;
94
- }), ge = s(() => {
95
- let e = "不限制上传格式,";
96
- return L.value && (e = "文件须为图片格式,"), `${e}文件大小不超过${A.value}${G.value}`;
96
+ return d.value ? t = "正在上传..." : v.value && !w.value ? h.value ? o.initUploadStatus ? t = "点击上传" : t = "重新上传" : o.initUploadStatus ? t = `选择${e}` : t = "重新上传" : h.value && (t = "点击上传"), t;
97
97
  }), pe = s(() => {
98
+ let e = "不限制上传格式,";
99
+ return P.value && (e = "文件须为图片格式,"), `${e}文件大小不超过${A.value}${H.value}`;
100
+ }), Fe = s(() => {
98
101
  var e;
99
102
  return ((e = i == null ? void 0 : i.item) == null ? void 0 : e.tipContent) || "";
100
103
  }), K = s(() => {
101
104
  var e;
102
105
  return (e = i == null ? void 0 : i.item) == null ? void 0 : e.httpRequestFunc;
103
106
  });
104
- Y(
107
+ J(
105
108
  [v, K],
106
109
  ([e, t]) => {
107
- b.isCover = e, t && t instanceof Function && (b["http-request"] = Pe);
110
+ b.isCover = e, t && t instanceof Function && (b["http-request"] = Le);
108
111
  },
109
112
  {
110
113
  immediate: !0,
111
114
  deep: !0
112
115
  }
113
- ), Y(
116
+ ), J(
114
117
  () => U.value,
115
118
  (e) => {
116
- e && e.length > 0 && Fe(e);
119
+ e && e.length > 0 && ye(e);
117
120
  },
118
121
  {
119
122
  immediate: !0,
120
123
  deep: !0
121
124
  }
122
125
  );
123
- function Fe(e) {
126
+ function ye(e) {
124
127
  b.accept = "", e.forEach((t) => {
125
- const o = De[t] || "";
126
- o && (b.accept && (b.accept += ","), b.accept += o);
128
+ const l = Ie[t] || "";
129
+ l && (b.accept && (b.accept += ","), b.accept += l);
127
130
  });
128
131
  }
129
- r(Fe, "updateFileAccept");
132
+ u(ye, "updateFileAccept");
130
133
  function T(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
- const a = t.value(), { message: u } = a;
134
- a.message = e, o.value(), a.message = u;
134
+ const { formRuleFunc: t, formValidateFunc: l } = oe(i == null ? void 0 : i.item);
135
+ if (t && t.value instanceof Function && l && l.value instanceof Function) {
136
+ const a = t.value(), { message: r } = a;
137
+ a.message = e, l.value(), a.message = r;
135
138
  }
136
139
  R("uploadErrorFunc", e);
137
140
  }
138
- r(T, "validateForm");
139
- function ye(e, t) {
141
+ u(T, "validateForm");
142
+ async function be(e, t) {
140
143
  if (d.value = !1, i.onExceed)
141
144
  return i.onExceed(e, t);
142
- const o = `当前限制选择 ${y.limit} 个文件,本次选择了 ${e.length} 个文件,共选择了 ${e.length + t.length} 个文件` || me.value;
143
- S.value ? setTimeout(() => {
144
- x.warning(o);
145
- }, 200) : T(o);
145
+ const l = Number(y.limit || 0);
146
+ let a = 0;
147
+ ve.value || (a = l - o.uploadFileList.length, a > 0 && (Pe(e.slice(0, a)), h.value && X()));
148
+ const r = me.value || `当前限制选择 ${l} 个文件,本次选择了 ${e.length} 个文件,已成功上传 ${a} 个文件`;
149
+ L.value ? setTimeout(() => {
150
+ x.warning(r);
151
+ }, 200) : T(r);
146
152
  }
147
- r(ye, "onExceedAction");
148
- function be(e) {
153
+ u(be, "onExceedAction");
154
+ function he(e) {
149
155
  if (i.beforeUpload) {
150
- const o = i.beforeUpload(e);
151
- return o && v.value && !k.value && _(), o;
156
+ const l = i.beforeUpload(e);
157
+ return l && v.value && !w.value && _(), l;
152
158
  }
153
159
  const t = W(e, !0);
154
- return t && w.value && v.value && !k.value && _(), t;
160
+ return t && h.value && v.value && !w.value && _(), t;
155
161
  }
156
- r(be, "beforeUploadAction");
162
+ u(he, "beforeUploadAction");
157
163
  function W(e, t) {
158
- let o = !0;
159
- const { size: a, name: u } = e, X = U.value.length > 0 && !Z(u);
164
+ let l = !0;
165
+ const { size: a, name: r } = e, Y = U.value.length > 0 && !ee(r);
160
166
  let z = !1;
161
- switch (G.value) {
167
+ switch (H.value) {
162
168
  case "KB":
163
169
  z = a / 1024 > A.value;
164
170
  break;
@@ -169,214 +175,221 @@ const Ke = { class: "ls-drag" }, We = { class: "drag-txt ls-color-brand6" }, Xe
169
175
  z = a / 1024 / 1024 / 1024 > A.value;
170
176
  break;
171
177
  }
172
- if (X) {
173
- const g = de.value || `上传文件 ${e.name} 只能是 ${U.value.filter((Te) => Te).join(",").toLocaleLowerCase()} 格式!`;
174
- S.value && t ? setTimeout(() => {
178
+ if (Y) {
179
+ const g = de.value || `上传文件 ${e.name} 只能是 ${U.value.filter((xe) => xe).join(",").toLocaleLowerCase()} 格式!`;
180
+ L.value && t ? setTimeout(() => {
175
181
  x.error(g);
176
- }, 200) : T(g), o = !1;
182
+ }, 200) : T(g), l = !1;
177
183
  }
178
184
  if (z) {
179
- const g = fe.value || `上传文件 ${e.name} 大小不能超过 ${A.value}${G.value}!`;
180
- S.value && t ? setTimeout(() => {
185
+ const g = fe.value || `上传文件 ${e.name} 大小不能超过 ${A.value}${H.value}!`;
186
+ L.value && t ? setTimeout(() => {
181
187
  x.error(g);
182
- }, 200) : T(g), o = !1;
188
+ }, 200) : T(g), l = !1;
183
189
  }
184
- if (L.value && !Z(u, Ne)) {
190
+ if (P.value && !ee(r, Oe)) {
185
191
  const g = `上传文件 ${e.name} 不是图片格式的文件!`;
186
- S.value && t ? setTimeout(() => {
192
+ L.value && t ? setTimeout(() => {
187
193
  x.error(g);
188
- }, 200) : T(g), o = !1;
194
+ }, 200) : T(g), l = !1;
189
195
  }
190
- return o;
196
+ return l;
191
197
  }
192
- r(W, "validateUploadFile");
193
- function Z(e, t) {
194
- let o = [];
195
- if (U.value.length > 0 ? o = U.value : t && (o = t), o.length <= 0)
198
+ u(W, "validateUploadFile");
199
+ function ee(e, t) {
200
+ let l = [];
201
+ if (U.value.length > 0 ? l = U.value : t && (l = t), l.length <= 0)
196
202
  return !0;
197
- for (let a = 0; a < o.length; a++) {
198
- const u = (o[a] || "").toLowerCase();
199
- if (e.toLowerCase().endsWith(u))
203
+ for (let a = 0; a < l.length; a++) {
204
+ const r = (l[a] || "").toLowerCase();
205
+ if (e.toLowerCase().endsWith(r))
200
206
  return !0;
201
207
  }
202
208
  return !1;
203
209
  }
204
- r(Z, "fileTypeMatch");
210
+ u(ee, "fileTypeMatch");
205
211
  function _(e, t) {
206
- l.uploadFileList.splice(e || 0, t || l.uploadFileList.length - 1);
212
+ o.uploadFileList.splice(e || 0, t || o.uploadFileList.length - 1);
207
213
  }
208
- r(_, "updateCoverFileList");
209
- function he(e, t) {
210
- l.uploadFileList = t;
211
- const o = e.raw && W(e.raw, !w.value);
212
- if (o && v.value && !k.value && _(), i.onChange)
214
+ u(_, "updateCoverFileList");
215
+ function ke(e, t) {
216
+ o.uploadFileList = t;
217
+ const l = e.raw && W(e.raw, !h.value);
218
+ if (l && v.value && !w.value && _(), i.onChange)
213
219
  return i.onChange(e, t);
214
220
  const { size: a = 0 } = e;
215
221
  if (a <= 0) {
216
- ee();
217
- const u = ue.value || "禁止上传空文件,请检查后重新上传!";
218
- S.value ? x.error(u) : T(u);
222
+ te();
223
+ const r = ue.value || "禁止上传空文件,请检查后重新上传!";
224
+ L.value ? x.error(r) : T(r);
219
225
  return;
220
226
  }
221
- e.raw && (!w.value && !o ? ee() : (e.blob = URL.createObjectURL(e.raw) || "", R("onChangeFunc", e)));
227
+ e.raw && (!h.value && !l ? te() : (e.blob = URL.createObjectURL(e.raw) || "", R("onChangeFunc", e)));
222
228
  }
223
- r(he, "onChangeAction");
224
- function ee() {
229
+ u(ke, "onChangeAction");
230
+ function te() {
225
231
  let e = 0;
226
- l.uploadFileList.length > 1 && (e = l.uploadFileList.length - 1), _(e, 1), R("onChangeFunc", {});
232
+ o.uploadFileList.length > 1 && (e = o.uploadFileList.length - 1), _(e, 1), R("onChangeFunc", {});
227
233
  }
228
- r(ee, "setChangeRes");
229
- function ke(e, t, o) {
230
- d.value = !1, l.initUploadStatus = !1;
231
- const { formRuleFunc: a, formValidateFunc: u } = le(i == null ? void 0 : i.item);
232
- if (a && a.value instanceof Function && u && u.value instanceof Function && u.value(), i.onSuccess)
233
- return i.onSuccess(e, t, o);
234
+ u(te, "setChangeRes");
235
+ function we(e, t, l) {
236
+ d.value = !1, o.initUploadStatus = !1;
237
+ const { formRuleFunc: a, formValidateFunc: r } = oe(i == null ? void 0 : i.item);
238
+ if (a && a.value instanceof Function && r && r.value instanceof Function && r.value(), i.onSuccess)
239
+ return i.onSuccess(e, t, l);
234
240
  }
235
- r(ke, "onSuccessAction");
236
- function we(e, t, o) {
241
+ u(we, "onSuccessAction");
242
+ function Ce(e, t, l) {
237
243
  if (d.value = !1, i.onError)
238
- return i.onError(e, t, o);
244
+ return i.onError(e, t, l);
239
245
  }
240
- r(we, "onErrorAction");
241
- function Ce(e, t) {
242
- if (l.initUploadStatus = !t.length, l.uploadFileList = l.uploadFileList.filter((o) => o.uid === e.uid || o.name === e.name ? null : o), i.onRemove)
246
+ u(Ce, "onErrorAction");
247
+ function Se(e, t) {
248
+ if (o.initUploadStatus = !t.length, o.uploadFileList = o.uploadFileList.filter((l) => l.uid === e.uid || l.name === e.name ? null : l), i.onRemove)
243
249
  return i.onRemove(e, t);
244
250
  }
245
- r(Ce, "onRemoveAction");
246
- async function Pe(e) {
251
+ u(Se, "onRemoveAction");
252
+ async function Le(e) {
247
253
  const { file: t } = e;
248
254
  if (!t)
249
255
  return;
250
- const { size: o } = t;
251
- if (o <= 0 || !W(t, !1))
256
+ const { size: l } = t;
257
+ if (l <= 0 || !W(t, !1))
252
258
  return;
253
259
  if (i.httpRequest)
254
260
  return i.httpRequest(e);
255
261
  const a = new FormData();
256
262
  if (a.append("file", t), K.value instanceof Function) {
257
263
  d.value = !0;
258
- let u = {};
264
+ let r = {};
259
265
  try {
260
- u = await K.value(a);
261
- } catch (X) {
262
- u = X;
266
+ r = await K.value(a);
267
+ } catch (Y) {
268
+ r = Y;
263
269
  } finally {
264
- d.value = !1, R("httpResponseFunc", u);
270
+ d.value = !1, R("httpResponseFunc", r);
265
271
  }
266
272
  }
267
273
  }
268
- r(Pe, "httpRequestAction");
269
- function te() {
274
+ u(Le, "httpRequestAction");
275
+ function ie() {
270
276
  let e = !1;
271
- for (let t = 0; t < l.uploadFileList.length; t++)
272
- if (l.uploadFileList[t].status === Ie.ready) {
277
+ for (let t = 0; t < o.uploadFileList.length; t++)
278
+ if (o.uploadFileList[t].status === qe.ready) {
273
279
  e = !0;
274
280
  break;
275
281
  }
276
282
  return e;
277
283
  }
278
- r(te, "hasReadyFile");
279
- function ie() {
284
+ u(ie, "hasReadyFile");
285
+ function X() {
280
286
  var e;
281
287
  (e = f == null ? void 0 : f.value) == null || e.submit();
282
288
  }
283
- r(ie, "comfirmUpload");
284
- function Se(e) {
289
+ u(X, "comfirmUpload");
290
+ function Pe(e) {
291
+ (e || []).forEach((t) => {
292
+ var l;
293
+ (l = f == null ? void 0 : f.value) == null || l.handleStart(t);
294
+ });
295
+ }
296
+ u(Pe, "comHandleStart");
297
+ function Ue(e) {
285
298
  f == null || f.value.handleRemove(e);
286
299
  }
287
- r(Se, "removeFile");
288
- function Le() {
289
- l.uploadFileList.forEach((e) => {
300
+ u(Ue, "removeFile");
301
+ function Ae() {
302
+ o.uploadFileList.forEach((e) => {
290
303
  var t;
291
304
  if (e)
292
305
  try {
293
- (t = f == null ? void 0 : f.value) == null || t.abort(e), Se(e);
306
+ (t = f == null ? void 0 : f.value) == null || t.abort(e), Ue(e);
294
307
  } catch {
295
308
  }
296
309
  });
297
310
  }
298
- r(Le, "cancelUpload");
299
- function Ue(e, t, o) {
311
+ u(Ae, "cancelUpload");
312
+ function Ee(e, t, l) {
300
313
  if (d.value = !0, i.onProgress)
301
- return i.onProgress(e, t, o);
314
+ return i.onProgress(e, t, l);
302
315
  }
303
- r(Ue, "onProgressAction");
304
- function Ae(e) {
316
+ u(Ee, "onProgressAction");
317
+ function Te(e) {
305
318
  if (i.onPreview)
306
319
  return i.onPreview(e);
307
- if (L.value) {
320
+ if (P.value) {
308
321
  const { url: t } = e;
309
- l.sourcePreview = t, l.showPreview = !0;
322
+ o.sourcePreview = t, o.showPreview = !0;
310
323
  }
311
324
  }
312
- r(Ae, "onPreviewAction");
313
- function Ee() {
314
- l.showPreview = !1, l.sourcePreview = "";
325
+ u(Te, "onPreviewAction");
326
+ function $e() {
327
+ o.showPreview = !1, o.sourcePreview = "";
315
328
  }
316
- return r(Ee, "closePreview"), O({
329
+ return u($e, "closePreview"), O({
317
330
  uploadRef: f
318
331
  }), (e, t) => {
319
- const o = Ge, a = He;
332
+ const l = Ke, a = We;
320
333
  return c(), m("div", {
321
- class: V([n(re), n(E) ? "ls-upload-drag" : "", n(Q) ? "ls-profile" : "", n(ve) ? "hide-cover-btn" : ""])
334
+ class: N([n(re), n(E) ? "ls-upload-drag" : "", n(Z) ? "ls-profile" : "", n(ge) ? "hide-cover-btn" : ""])
322
335
  }, [
323
- J(a, _e({
336
+ Q(a, Ne({
324
337
  ref_key: "uploadRef",
325
338
  ref: f
326
339
  }, Object.assign(n(b), e.$attrs), {
327
- "on-exceed": ye,
328
- "before-upload": be,
329
- "on-change": he,
330
- "on-success": ke,
331
- "on-error": we,
332
- "on-remove": Ce,
333
- "on-progress": Ue,
334
- "on-preview": Ae
335
- }), ze({
340
+ "on-exceed": be,
341
+ "before-upload": he,
342
+ "on-change": ke,
343
+ "on-success": we,
344
+ "on-error": Ce,
345
+ "on-remove": Se,
346
+ "on-progress": Ee,
347
+ "on-preview": Te
348
+ }), Ve({
336
349
  trigger: p(() => [
337
- n(Q) ? e.item.defProfile && n(l).uploadFileList.length < 1 ? (c(), F(o, {
350
+ n(Z) ? e.item.defProfile && n(o).uploadFileList.length < 1 ? (c(), F(l, {
338
351
  key: 1,
339
352
  size: 60,
340
353
  src: e.item.defProfile,
341
354
  fit: "contain"
342
- }, null, 8, ["src"])) : I("", !0) : (c(), m(h, { key: 0 }, [
343
- n(M).trigger ? N(e.$slots, "trigger", { key: 1 }, void 0, !0) : (c(), m(h, { key: 0 }, [
344
- n(E) ? (c(), m(h, { key: 0 }, [
345
- n(d) ? (c(), F(P, {
355
+ }, null, 8, ["src"])) : D("", !0) : (c(), m(k, { key: 0 }, [
356
+ n(M).trigger ? I(e.$slots, "trigger", { key: 1 }, void 0, !0) : (c(), m(k, { key: 0 }, [
357
+ n(E) ? (c(), m(k, { key: 0 }, [
358
+ n(d) ? (c(), F(S, {
346
359
  key: 0,
347
360
  text: "",
348
361
  loading: n(d),
349
362
  disabled: n(C)
350
- }, null, 8, ["loading", "disabled"])) : (c(), F(se, {
363
+ }, null, 8, ["loading", "disabled"])) : (c(), F(ae, {
351
364
  key: 1,
352
365
  class: "upload-icon",
353
366
  name: "UploadFilled",
354
367
  size: "56",
355
368
  color: "#E7E7E7"
356
369
  })),
357
- B("div", Ke, [
358
- B("div", We, D(n(H)), 1),
359
- n(d) ? I("", !0) : (c(), m(h, { key: 0 }, [
370
+ V("div", Xe, [
371
+ V("div", Ye, B(n(G)), 1),
372
+ n(d) ? D("", !0) : (c(), m(k, { key: 0 }, [
360
373
  t[1] || (t[1] = $("   /   ")),
361
- t[2] || (t[2] = B("div", { class: "drag-txt ls-color-text2" }, "拖拽到此区域", -1))
374
+ t[2] || (t[2] = V("div", { class: "drag-txt ls-color-text2" }, "拖拽到此区域", -1))
362
375
  ], 64))
363
376
  ])
364
- ], 64)) : (c(), m(h, { key: 1 }, [
365
- n(L) ? (c(), m("div", Xe, [
366
- n(d) ? (c(), F(P, {
377
+ ], 64)) : (c(), m(k, { key: 1 }, [
378
+ n(P) ? (c(), m("div", Je, [
379
+ n(d) ? (c(), F(S, {
367
380
  key: 0,
368
381
  text: "",
369
382
  loading: n(d),
370
383
  disabled: n(C)
371
- }, null, 8, ["loading", "disabled"])) : (c(), F(se, {
384
+ }, null, 8, ["loading", "disabled"])) : (c(), F(ae, {
372
385
  key: 1,
373
386
  class: "upload-btn-plus",
374
387
  name: "Plus",
375
388
  size: 28,
376
- color: n(l).iconColor
389
+ color: n(o).iconColor
377
390
  }, null, 8, ["color"])),
378
- B("div", null, D(n(H)), 1)
379
- ])) : (c(), F(P, {
391
+ V("div", null, B(n(G)), 1)
392
+ ])) : (c(), F(S, {
380
393
  key: 1,
381
394
  plain: "",
382
395
  icon: "upload",
@@ -384,7 +397,7 @@ const Ke = { class: "ls-drag" }, We = { class: "drag-txt ls-color-brand6" }, Xe
384
397
  disabled: n(C)
385
398
  }, {
386
399
  default: p(() => [
387
- $(D(n(H)), 1)
400
+ $(B(n(G)), 1)
388
401
  ]),
389
402
  _: 1
390
403
  }, 8, ["loading", "disabled"]))
@@ -393,76 +406,76 @@ const Ke = { class: "ls-drag" }, We = { class: "drag-txt ls-color-brand6" }, Xe
393
406
  ], 64))
394
407
  ]),
395
408
  default: p(() => [
396
- n(M).default ? N(e.$slots, "default", { key: 1 }, void 0, !0) : (c(), m(h, { key: 0 }, [
397
- !n(w) && (n(ce) || n(E)) ? (c(), m("div", {
409
+ n(M).default ? I(e.$slots, "default", { key: 1 }, void 0, !0) : (c(), m(k, { key: 0 }, [
410
+ !n(h) && (n(ce) || n(E)) ? (c(), m("div", {
398
411
  key: 0,
399
- class: V(["upload-btn-handle", [n(E) ? "drag-css" : "nor-css", !n(v) || n(k) ? "multi-css" : ""]])
412
+ class: N(["upload-btn-handle", [n(E) ? "drag-css" : "nor-css", !n(v) || n(w) ? "multi-css" : ""]])
400
413
  }, [
401
- n(E) ? (c(), m(h, { key: 1 }, [
402
- !n(v) || n(k) ? (c(), F(P, {
414
+ n(E) ? (c(), m(k, { key: 1 }, [
415
+ !n(v) || n(w) ? (c(), F(S, {
403
416
  key: 0,
404
417
  type: "primary",
405
418
  loading: n(d),
406
419
  disabled: n(C),
407
- onClick: Le,
420
+ onClick: Ae,
408
421
  class: "ls-upload-btn-com ls-upload-btn-cancel"
409
422
  }, {
410
423
  default: p(() => t[4] || (t[4] = [
411
424
  $("取消上传")
412
425
  ])),
413
426
  _: 1
414
- }, 8, ["loading", "disabled"])) : I("", !0),
415
- J(P, {
416
- class: V(["start-upload ls-upload-btn-com ls-upload-btn-comfirm", { "is-ready": te() }]),
427
+ }, 8, ["loading", "disabled"])) : D("", !0),
428
+ Q(S, {
429
+ class: N(["start-upload ls-upload-btn-com ls-upload-btn-comfirm", { "is-ready": ie() }]),
417
430
  type: "primary",
418
431
  loading: n(d),
419
432
  disabled: n(C),
420
- onClick: ie
433
+ onClick: X
421
434
  }, {
422
435
  default: p(() => t[5] || (t[5] = [
423
436
  $("开始上传")
424
437
  ])),
425
438
  _: 1
426
439
  }, 8, ["class", "loading", "disabled"])
427
- ], 64)) : (c(), F(P, {
440
+ ], 64)) : (c(), F(S, {
428
441
  key: 0,
429
442
  type: "primary",
430
- class: V(["ls-upload-btn-com ls-upload-btn-comfirm", { "is-ready": te() }]),
443
+ class: N(["ls-upload-btn-com ls-upload-btn-comfirm", { "is-ready": ie() }]),
431
444
  loading: n(d),
432
445
  disabled: n(C),
433
- onClick: ie
446
+ onClick: X
434
447
  }, {
435
448
  default: p(() => t[3] || (t[3] = [
436
449
  $("开始上传 ")
437
450
  ])),
438
451
  _: 1
439
452
  }, 8, ["class", "loading", "disabled"]))
440
- ], 2)) : I("", !0)
453
+ ], 2)) : D("", !0)
441
454
  ], 64))
442
455
  ]),
443
456
  tip: p(() => [
444
- n(M).tip ? N(e.$slots, "tip", { key: 1 }, void 0, !0) : (c(), m("div", Ye, D(n(pe) || n(ge)), 1))
457
+ n(M).tip ? I(e.$slots, "tip", { key: 1 }, void 0, !0) : (c(), m("div", Qe, B(n(Fe) || n(pe)), 1))
445
458
  ]),
446
459
  _: 2
447
460
  }, [
448
461
  n(M).file ? {
449
462
  name: "file",
450
463
  fn: p(() => [
451
- N(e.$slots, "file", {}, void 0, !0)
464
+ I(e.$slots, "file", {}, void 0, !0)
452
465
  ]),
453
466
  key: "0"
454
467
  } : void 0
455
468
  ]), 1040),
456
- J(n(je), {
457
- modelValue: n(l).showPreview,
458
- "onUpdate:modelValue": t[0] || (t[0] = (u) => n(l).showPreview = u),
459
- source: n(l).sourcePreview,
460
- "on-close": Ee
469
+ Q(n(Ge), {
470
+ modelValue: n(o).showPreview,
471
+ "onUpdate:modelValue": t[0] || (t[0] = (r) => n(o).showPreview = r),
472
+ source: n(o).sourcePreview,
473
+ "on-close": $e
461
474
  }, null, 8, ["modelValue", "source"])
462
475
  ], 2);
463
476
  };
464
477
  }
465
478
  });
466
479
  export {
467
- gt as default
480
+ Ft as default
468
481
  };