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