@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.
@@ -1,34 +1,34 @@
1
- var Ee = Object.defineProperty;
2
- var s = (F, W) => Ee(F, "name", { value: W, configurable: !0 });
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 Te, useSlots as $e, useAttrs as Me, ref as ne, reactive as le, watch as J, computed as r, resolveComponent as Re, openBlock as c, createElementBlock as p, normalizeClass as D, unref as o, createVNode as Q, mergeProps as ze, createSlots as Be, 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 Ie, popScopeId as Ve } from "vue";
8
- import { lsUploadProps as De, UPLOAD_TYPE_MAP as Ne, fileTypeMap as qe, UPLOAD_STATUS_MAP as Oe, IMG_SUFFIX_LIST as je } from "../types/index.js";
9
- import { getVariable as We } from "../../_utils/config/index.js";
10
- import { useNamespace as Ge } from "../../_hooks/useNamespace/index.js";
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 He } 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 Ke } 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 Xe = /* @__PURE__ */ s((F) => (Ie("data-v-6c006232"), F = F(), Ve(), F), "_withScopeId"), Ye = { class: "ls-drag" }, Je = { class: "drag-txt ls-color-brand6" }, Qe = /* @__PURE__ */ Xe(() => /* @__PURE__ */ j("div", { class: "drag-txt ls-color-text2" }, "拖拽到此区域", -1)), Ze = {
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
- }, et = {
21
+ }, tt = {
22
22
  key: 0,
23
23
  class: "ls-tip"
24
- }, wt = /* @__PURE__ */ Te({
24
+ }, yt = /* @__PURE__ */ $e({
25
25
  name: "LSUpload",
26
26
  inheritAttrs: !1,
27
27
  __name: "Index",
28
- props: De,
28
+ props: Ne,
29
29
  emits: ["uploadErrorFunc", "onChangeFunc", "httpResponseFunc"],
30
30
  setup(F, { expose: W, emit: re }) {
31
- const B = $e(), b = Me(), ue = Ge("upload").b(), v = ne(), d = ne(!1), P = le({
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: We("colorText1")
42
- }), i = F, I = re;
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 = r(() => {
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";
56
- }), g = r(() => {
57
- var t;
58
- const e = (t = i == null ? void 0 : i.item) == null ? void 0 : t.isCover;
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 = r(() => b.multiple), L = r(() => {
60
+ }), C = s(() => b.multiple), L = s(() => {
61
61
  const e = b["auto-upload"];
62
62
  return typeof e > "u" ? !0 : e;
63
- }), ce = r(() => {
63
+ }), ce = s(() => {
64
64
  var e;
65
- return ((e = i == null ? void 0 : i.item) == null ? void 0 : e.emptyFileMsg) || "";
66
- }), G = r(() => b["list-type"]), k = r(() => G.value === Ne.picCard), de = r(() => !G.value || G.value == "text"), A = r(() => {
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 = i == null ? void 0 : i.item) == null ? void 0 : e.limitFile) || [];
69
- }), fe = r(() => {
68
+ return ((e = t == null ? void 0 : t.item) == null ? void 0 : e.limitFile) || [];
69
+ }), fe = s(() => {
70
70
  var e;
71
- return ((e = i == null ? void 0 : i.item) == null ? void 0 : e.limitFileMsg) || "";
72
- }), E = r(() => {
71
+ return ((e = t == null ? void 0 : t.item) == null ? void 0 : e.limitFileMsg) || "";
72
+ }), E = s(() => {
73
73
  var e;
74
- return ((e = i == null ? void 0 : i.item) == null ? void 0 : e.limitSize) || 2;
75
- }), me = r(() => {
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 = i == null ? void 0 : i.item) == null ? void 0 : e.limitSizeMsg) || "";
78
- }), H = r(() => {
77
+ return ((e = t == null ? void 0 : t.item) == null ? void 0 : e.limitSizeMsg) || "";
78
+ }), H = s(() => {
79
79
  var e;
80
- return ((e = i == null ? void 0 : i.item) == null ? void 0 : e.limitUnit) || "MB";
81
- }), ve = r(() => {
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 = i == null ? void 0 : i.item) == null ? void 0 : e.limitNumMsg) || "";
84
- }), Z = r(() => {
83
+ return ((e = t == null ? void 0 : t.item) == null ? void 0 : e.limitNumMsg) || "";
84
+ }), Z = s(() => {
85
85
  var e;
86
- return ((e = i == null ? void 0 : i.item) == null ? void 0 : e.profile) || !1;
87
- }), T = r(() => b.drag), pe = r(() => {
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 = i == null ? void 0 : i.item) == null ? void 0 : e.hideCoverBtn) && g.value && l.uploadFileList.length > 0;
90
- }), _ = r(() => b.disabled), K = r(() => {
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 t = `选择${e}`;
93
- return d.value ? t = "正在上传..." : g.value && !C.value ? L.value ? l.initUploadStatus ? t = "点击上传" : t = "重新上传" : l.initUploadStatus ? t = `选择${e}` : t = "重新上传" : L.value && (t = "点击上传"), t;
94
- }), ge = r(() => {
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
- }), X = r(() => {
97
+ }), he = s(() => {
98
98
  var e;
99
- return (e = i == null ? void 0 : i.item) == null ? void 0 : e.httpRequestFunc;
100
- }), $ = r(() => {
99
+ return ((e = t == null ? void 0 : t.item) == null ? void 0 : e.tipContent) || "";
100
+ }), X = s(() => {
101
101
  var e;
102
- return (e = i == null ? void 0 : i.item) == null ? void 0 : e.textPreview;
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, t]) => {
107
- P.isCover = e, t && t instanceof Function && (P["http-request"] = Ce);
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 && he(e);
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 he(e) {
124
- P.accept = "", e.forEach((t) => {
125
- const n = qe[t] || "";
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
- s(he, "updateFileAccept");
132
+ r(we, "updateFileAccept");
130
133
  function M(e) {
131
- const { formRuleFunc: t, formValidateFunc: n } = ae(i == null ? void 0 : i.item);
132
- if (t && t.value instanceof Function && n && n.value instanceof Function) {
133
- const a = t.value(), { message: u } = 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
- s(M, "validateForm");
139
- function we(e, t) {
140
- if (d.value = !1, i.onExceed)
141
- return i.onExceed(e, t);
142
- const n = `当前限制选择 ${b.limit} 个文件,本次选择了 ${e.length} 个文件,共选择了 ${e.length + t.length} 个文件` || ve.value;
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
- s(we, "onExceedAction");
148
- function ye(e) {
149
- if (i.beforeUpload) {
150
- const n = i.beforeUpload(e);
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 t = Y(e, !0);
154
- return t && L.value && g.value && !C.value && V(), t;
156
+ const i = Y(e, !0);
157
+ return i && L.value && g.value && !C.value && V(), i;
155
158
  }
156
- s(ye, "beforeUploadAction");
157
- function Y(e, t) {
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((Ae) => Ae).join(",").toLocaleLowerCase()} 格式!`;
174
- U.value && t ? setTimeout(() => {
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 && t ? setTimeout(() => {
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, je)) {
187
+ if (k.value && !ee(u, We)) {
185
188
  const h = `上传文件 ${e.name} 不是图片格式的文件!`;
186
- U.value && t ? setTimeout(() => {
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
- s(Y, "validateUploadFile");
193
- function ee(e, t) {
195
+ r(Y, "validateUploadFile");
196
+ function ee(e, i) {
194
197
  let n = [];
195
- if (A.value.length > 0 ? n = A.value : t && (n = t), n.length <= 0)
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
- s(ee, "fileTypeMatch");
205
- function V(e, t) {
206
- l.uploadFileList.splice(e || 0, t || l.uploadFileList.length - 1);
207
+ r(ee, "fileTypeMatch");
208
+ function V(e, i) {
209
+ l.uploadFileList.splice(e || 0, i || l.uploadFileList.length - 1);
207
210
  }
208
- s(V, "updateCoverFileList");
209
- function Fe(e, t) {
210
- l.uploadFileList = t;
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(), i.onChange)
213
- return i.onChange(e, t);
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
- s(Fe, "onChangeAction");
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
- s(te, "setChangeRes");
229
- function be(e, t, n) {
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(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, n);
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
- s(be, "onSuccessAction");
236
- function Pe(e, t, n) {
237
- if (d.value = !1, i.onError)
238
- return i.onError(e, t, n);
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
- s(Pe, "onErrorAction");
241
- function ke(e, t) {
242
- if (l.initUploadStatus = !t.length, l.uploadFileList = l.uploadFileList.filter((n) => n.uid === e.uid || n.name === e.name ? null : n), i.onRemove)
243
- return i.onRemove(e, t);
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
- s(ke, "onRemoveAction");
246
- function Se(e) {
247
- if (i.onPreview)
248
- return i.onPreview(e);
249
- const { raw: t, url: n, blob: a, name: u } = e, { type: f } = t || {};
250
- t ? $.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) => {
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
- s(Se, "onPreviewAction");
257
- async function Ce(e) {
258
- const { file: t } = e;
259
- if (!t)
259
+ r(Ce, "onPreviewAction");
260
+ async function Le(e) {
261
+ const { file: i } = e;
262
+ if (!i)
260
263
  return;
261
- const { size: n } = t;
262
- if (n <= 0 || !Y(t, !1))
264
+ const { size: n } = i;
265
+ if (n <= 0 || !Y(i, !1))
263
266
  return;
264
- if (i.httpRequest)
265
- return i.httpRequest(e);
267
+ if (t.httpRequest)
268
+ return t.httpRequest(e);
266
269
  const a = new FormData();
267
- if (a.append("file", t), X.value instanceof Function) {
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
- s(Ce, "httpRequestAction");
282
+ r(Le, "httpRequestAction");
280
283
  function ie() {
281
284
  let e = !1;
282
- for (let t = 0; t < l.uploadFileList.length; t++)
283
- if (l.uploadFileList[t].status === Oe.ready) {
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
- s(ie, "hasReadyFile");
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
- s(oe, "comfirmUpload");
295
- function Le(e) {
297
+ r(oe, "comfirmUpload");
298
+ function _e(e) {
296
299
  v == null || v.value.handleRemove(e);
297
300
  }
298
- s(Le, "removeFile");
299
- function _e() {
301
+ r(_e, "removeFile");
302
+ function xe() {
300
303
  l.uploadFileList.forEach((e) => {
301
- var t;
304
+ var i;
302
305
  if (e)
303
306
  try {
304
- (t = v == null ? void 0 : v.value) == null || t.abort(e), Le(e);
307
+ (i = v == null ? void 0 : v.value) == null || i.abort(e), _e(e);
305
308
  } catch {
306
309
  }
307
310
  });
308
311
  }
309
- s(_e, "cancelUpload");
310
- function xe() {
312
+ r(xe, "cancelUpload");
313
+ function Ue() {
311
314
  d.value = !0;
312
315
  }
313
- s(xe, "onProgressAction");
314
- function Ue() {
316
+ r(Ue, "onProgressAction");
317
+ function Ae() {
315
318
  l.showPreview = !1, l.sourcePreview = "";
316
319
  }
317
- return s(Ue, "closePreview"), W({
320
+ return r(Ae, "closePreview"), W({
318
321
  uploadRef: v
319
- }), (e, t) => {
320
- const n = He, a = Ke, u = Re("LSPreview");
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, ze({
327
+ Q(a, Be({
325
328
  ref_key: "uploadRef",
326
329
  ref: v
327
330
  }, Object.assign(o(P), e.$attrs), {
328
- "on-exceed": we,
329
- "before-upload": ye,
330
- "on-change": Fe,
331
- "on-success": be,
332
- "on-error": Pe,
333
- "on-remove": ke,
334
- "on-preview": Se,
335
- "on-progress": xe
336
- }), Be({
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", Ye, [
359
- j("div", Je, N(o(K)), 1),
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
- Qe
365
+ Ze
363
366
  ], 64))
364
367
  ])
365
368
  ], 64)) : (c(), p(S, { key: 1 }, [
366
- o(k) ? (c(), p("div", Ze, [
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: _e,
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", et, N(o(ge)), 1))
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": t[0] || (t[0] = (f) => o(l).showPreview = f),
460
- "on-close": Ue,
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
- wt as default
472
+ yt as default
470
473
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lingshugroup/web-plus",
3
- "version": "1.0.19",
3
+ "version": "1.0.20",
4
4
  "description": "零数科技前端UI组件库(Vue3)",
5
5
  "type": "module",
6
6
  "main": "./lib/index/index.cjs",