@lingshugroup/web-plus 1.0.12 → 1.0.14

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