@lingshugroup/web-plus 1.0.16 → 1.0.18

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