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