@aplus-frontend/ui 0.2.3 → 0.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,52 +1,52 @@
1
- import { defineComponent as K, inject as u, ref as R, watch as Q, nextTick as W, openBlock as h, createElementBlock as g, normalizeClass as X, unref as i, createElementVNode as d, renderSlot as Y, Fragment as Z, renderList as F, withDirectives as ee, createVNode as k, createCommentVNode as $, vShow as te, toDisplayString as C } from "vue";
1
+ import { defineComponent as X, inject as c, ref as I, watch as Y, nextTick as Z, openBlock as g, createElementBlock as h, normalizeClass as F, unref as i, createElementVNode as d, renderSlot as ee, Fragment as te, renderList as ne, withDirectives as ae, createVNode as C, createCommentVNode as M, vShow as se, toDisplayString as k } from "vue";
2
2
  import "../../config-provider/index.mjs";
3
- import { getPath as ne, getName as ae, getReturnData as T } from "../utils/returnData.mjs";
4
- import { CloseOutlined as se, PlusOutlined as oe } from "@ant-design/icons-vue";
5
- import { useOss as ie, getOssInstance as D } from "../hooks/useOss.mjs";
6
- import { fileMatchesAccept as ce, getAcceptText as ue } from "../utils/accept.mjs";
7
- import { message as m, Progress as re } from "@aplus-frontend/antdv";
8
- import { omit as le } from "lodash-unified";
9
- import { useLocale as pe } from "../../config-provider/hooks/use-locale.mjs";
10
- import { useNamespace as de } from "../../config-provider/hooks/use-namespace.mjs";
11
- const me = ["accept"], fe = { class: "picture-context" }, he = { class: "picture-item-box" }, ge = ["src"], ve = { class: "picture-item-shadow" }, xe = ["onClick"], _e = {
3
+ import { getPath as oe, getName as ie, getReturnData as R } from "../utils/returnData.mjs";
4
+ import { CloseOutlined as re, PlusOutlined as ce } from "@ant-design/icons-vue";
5
+ import { useOss as ue, getOssInstance as $ } from "../hooks/useOss.mjs";
6
+ import { fileMatchesAccept as le, getAcceptText as pe } from "../utils/accept.mjs";
7
+ import { message as m, Progress as de } from "@aplus-frontend/antdv";
8
+ import { omit as me } from "lodash-unified";
9
+ import { useLocale as fe } from "../../config-provider/hooks/use-locale.mjs";
10
+ import { useNamespace as ge } from "../../config-provider/hooks/use-namespace.mjs";
11
+ const he = ["accept"], ve = { class: "picture-context" }, xe = { class: "picture-item-box" }, _e = ["src"], ye = { class: "picture-item-shadow" }, we = ["onClick"], Ce = {
12
12
  key: 0,
13
13
  class: "picture-item-uploading"
14
- }, ye = { class: "picture-title" }, we = { key: 0 }, ke = { key: 1 }, Te = /* @__PURE__ */ K({
14
+ }, ke = { class: "picture-title" }, Ue = { key: 0 }, Se = { key: 1 }, De = /* @__PURE__ */ X({
15
15
  __name: "Picture",
16
- setup(Ce, { expose: E }) {
17
- const { t: r } = pe(), { b: U } = de("ap-upload-picture"), { put: O } = ie(), B = u("theme"), L = u("dirName"), y = u("accept") || "image/*", w = u("maxSize") ?? 5, S = u("title"), l = u("maxCount") ?? 10, v = u("uploadingCount"), A = u("beforeUpload"), N = u("customRequest"), P = u("getOssAccess"), x = R(null), c = u("value"), _ = u("needName");
18
- let s = R([]);
16
+ setup(Ee, { expose: T }) {
17
+ const { t: u } = fe(), { b: U } = ge("ap-upload-picture"), { put: D } = ue(), O = c("theme"), B = c("dirName"), y = c("accept") || "image/*", w = c("maxSize") ?? 5, S = c("title"), l = c("maxCount") ?? 10, v = c("uploadingCount"), E = c("beforeUpload"), z = c("customRequest"), A = c("getOssAccess"), L = c("maxSizeErrorMsg"), q = c("maxCountErrorMsg"), V = c("acceptErrorMsg"), x = I(null), r = c("value"), _ = c("needName");
18
+ let s = I([]);
19
19
  const f = [];
20
- Q(
21
- () => c == null ? void 0 : c.value,
20
+ Y(
21
+ () => r == null ? void 0 : r.value,
22
22
  async function(e) {
23
23
  var a;
24
- !((a = s == null ? void 0 : s.value) != null && a.length) && e && b(e);
24
+ !((a = s == null ? void 0 : s.value) != null && a.length) && e && N(e);
25
25
  },
26
26
  { immediate: !0 }
27
27
  );
28
- function b(e) {
28
+ function N(e) {
29
29
  if (!e) {
30
- c.value = void 0, f.splice(0, f.length), s.value = [];
30
+ r.value = void 0, f.splice(0, f.length), s.value = [];
31
31
  return;
32
32
  }
33
- W(async () => {
33
+ Z(async () => {
34
34
  const a = [];
35
35
  for (let t of e) {
36
- const n = ne(_, t), o = ae(_, t), p = await D(P), H = await p.getSignatureUrl(n), J = {
36
+ const n = oe(_, t), o = ie(_, t), p = await $(A), Q = await p.getSignatureUrl(n), W = {
37
37
  ...typeof t == "string" ? {} : t,
38
38
  ...new File([t], o, {}),
39
39
  uid: `${(/* @__PURE__ */ new Date()).getTime()}-${Math.random()}`,
40
- thumbUrl: H,
40
+ thumbUrl: Q,
41
41
  status: "success",
42
42
  percent: 100,
43
43
  path: n
44
44
  };
45
- a.push(J), p.destroy();
45
+ a.push(W), p.destroy();
46
46
  }
47
47
  if (l && a.length > l) {
48
48
  m.warning(
49
- r("ap.apUpload.fileInitializationException", {
49
+ u("ap.apUpload.fileInitializationException", {
50
50
  maxCount: l
51
51
  })
52
52
  );
@@ -57,42 +57,44 @@ const me = ["accept"], fe = { class: "picture-context" }, he = { class: "picture
57
57
  uid: t.uid,
58
58
  path: t.path
59
59
  });
60
- }), c.value = e;
60
+ }), r.value = e;
61
61
  });
62
62
  }
63
- E({ setValue: b });
64
- function q() {
63
+ T({ setValue: N });
64
+ function j() {
65
65
  var e;
66
66
  (e = x.value) == null || e.click();
67
67
  }
68
- function M(e) {
68
+ function G(e) {
69
69
  const a = e.target;
70
- V(a == null ? void 0 : a.files);
70
+ H(a == null ? void 0 : a.files);
71
71
  }
72
- function V(e) {
72
+ function H(e) {
73
73
  if (e != null && e.length)
74
74
  for (let a = 0; a < e.length; a++)
75
- j(e[a]);
75
+ J(e[a]);
76
76
  x.value && (x.value.value = "");
77
77
  }
78
- let z;
79
- function j(e) {
78
+ let P;
79
+ function J(e) {
80
80
  if (l && l > 1 && s.value.length >= l)
81
- return clearTimeout(z), z = setTimeout(() => {
81
+ return clearTimeout(P), P = setTimeout(() => {
82
82
  m.warning(
83
- r("ap.apUpload.maxUploadPicture", { maxCount: l })
83
+ q || u("ap.apUpload.maxUploadPicture", { maxCount: l })
84
84
  );
85
85
  }), !1;
86
- if (typeof A == "function") {
87
- if (A(e) === !1)
86
+ if (typeof E == "function") {
87
+ if (E(e) === !1)
88
88
  return !1;
89
89
  } else {
90
90
  if (e.size > w * 1024 * 1024)
91
91
  return m.warning(
92
- r("ap.apUpload.maxUploadFileSize", { maxSize: w })
92
+ L || u("ap.apUpload.maxUploadFileSize", { maxSize: w })
93
+ ), !1;
94
+ if (!/image\/\w+/.test(e.type) || !le(e, y))
95
+ return m.warning(
96
+ V || u("ap.apUpload.pictureFormatNotSupported")
93
97
  ), !1;
94
- if (!/image\/\w+/.test(e.type) || !ce(e, y))
95
- return m.warning(r("ap.apUpload.pictureFormatNotSupported")), !1;
96
98
  }
97
99
  const a = new FileReader();
98
100
  a.readAsDataURL(e), a.onload = function() {
@@ -103,20 +105,20 @@ const me = ["accept"], fe = { class: "picture-context" }, he = { class: "picture
103
105
  status: "uploading",
104
106
  percent: 0
105
107
  };
106
- G(t, e);
108
+ K(t, e);
107
109
  }, a.onerror = function() {
108
- m.warning(r("ap.apUpload.imageParsingFailed"));
110
+ m.warning(u("ap.apUpload.imageParsingFailed"));
109
111
  };
110
112
  }
111
- async function G(e, a) {
112
- if (v.value++, typeof N == "function") {
113
- N({
113
+ async function K(e, a) {
114
+ if (v.value++, typeof z == "function") {
115
+ z({
114
116
  onProgress: (t) => {
115
117
  const n = s.value.find((o) => o.uid === e.uid);
116
118
  n && (n.percent = t);
117
119
  },
118
120
  onError: (t) => {
119
- m.warning(t || r("ap.apUpload.networkAnomaly"));
121
+ m.warning(t || u("ap.apUpload.networkAnomaly"));
120
122
  const n = s.value.findIndex(
121
123
  (o) => o.uid === e.uid
122
124
  );
@@ -124,9 +126,9 @@ const me = ["accept"], fe = { class: "picture-context" }, he = { class: "picture
124
126
  },
125
127
  onSuccess: (t) => {
126
128
  const n = s.value.find((o) => o.uid === e.uid);
127
- n && (n.status = "success", n.path = t), c.value = [
128
- ...c.value || [],
129
- T(_, t, a.name)
129
+ n && (n.status = "success", n.path = t), r.value = [
130
+ ...r.value || [],
131
+ R(_, t, a.name)
130
132
  ], f.push({
131
133
  uid: e.uid,
132
134
  path: t
@@ -137,23 +139,23 @@ const me = ["accept"], fe = { class: "picture-context" }, he = { class: "picture
137
139
  return;
138
140
  }
139
141
  try {
140
- const t = await D(P);
141
- e.oss = t, s.value.push(e), O({
142
+ const t = await $(A);
143
+ e.oss = t, s.value.push(e), D({
142
144
  file: a,
143
- dirName: L,
145
+ dirName: B,
144
146
  oss: t,
145
147
  successCallBack(n) {
146
148
  const o = s.value.find((p) => p.uid === e.uid);
147
- o && (o.status = "success", o.path = n), c.value = [
148
- ...c.value || [],
149
- T(_, n, a.name)
149
+ o && (o.status = "success", o.path = n), r.value = [
150
+ ...r.value || [],
151
+ R(_, n, a.name)
150
152
  ], f.push({
151
153
  uid: e.uid,
152
154
  path: n
153
155
  }), v.value--;
154
156
  },
155
157
  errorCallBack(n) {
156
- m.warning(n || r("ap.apUpload.networkAnomaly"));
158
+ m.warning(n || u("ap.apUpload.networkAnomaly"));
157
159
  const o = s.value.findIndex(
158
160
  (p) => p.uid === e.uid
159
161
  );
@@ -166,20 +168,20 @@ const me = ["accept"], fe = { class: "picture-context" }, he = { class: "picture
166
168
  });
167
169
  } catch (t) {
168
170
  m.warning(
169
- typeof (t == null ? void 0 : t.message) == "string" ? t.message : r("ap.apUpload.networkAnomaly")
171
+ typeof (t == null ? void 0 : t.message) == "string" ? t.message : u("ap.apUpload.networkAnomaly")
170
172
  );
171
173
  const n = s.value.findIndex((o) => o.uid === e.uid);
172
174
  n > -1 && s.value.splice(n, 1), v.value--;
173
175
  }
174
176
  }
175
- function I(e) {
177
+ function b(e) {
176
178
  var t;
177
- if (e.path && c) {
178
- if (Array.isArray(c.value)) {
179
+ if (e.path && r) {
180
+ if (Array.isArray(r.value)) {
179
181
  const n = f.findIndex(
180
182
  (o) => o.uid === e.uid
181
183
  );
182
- n >= 0 && (c.value = c == null ? void 0 : c.value.toSpliced(n, 1), f.splice(n, 1)), c.value.length === 0 && (c.value = void 0);
184
+ n >= 0 && (r.value = r == null ? void 0 : r.value.toSpliced(n, 1), f.splice(n, 1)), r.value.length === 0 && (r.value = void 0);
183
185
  }
184
186
  } else
185
187
  (t = e == null ? void 0 : e.oss) == null || t.pauseUpload();
@@ -188,10 +190,10 @@ const me = ["accept"], fe = { class: "picture-context" }, he = { class: "picture
188
190
  );
189
191
  return s.value.splice(a, 1), Promise.resolve(!0);
190
192
  }
191
- return (e, a) => (h(), g("div", {
192
- class: X({
193
+ return (e, a) => (g(), h("div", {
194
+ class: F({
193
195
  [i(U)()]: !0,
194
- [i(U)("admin")]: i(B) === "admin"
196
+ [i(U)("admin")]: i(O) === "admin"
195
197
  })
196
198
  }, [
197
199
  d("input", {
@@ -200,63 +202,63 @@ const me = ["accept"], fe = { class: "picture-context" }, he = { class: "picture
200
202
  ref_key: "fileRef",
201
203
  ref: x,
202
204
  accept: i(y),
203
- onChange: M
204
- }, null, 40, me),
205
- d("div", fe, [
206
- Y(e.$slots, "pictureContext", {
205
+ onChange: G
206
+ }, null, 40, he),
207
+ d("div", ve, [
208
+ ee(e.$slots, "pictureContext", {
207
209
  fileList: i(s).map((t) => {
208
210
  var n;
209
211
  return {
210
- ...i(le)(t, "oss"),
212
+ ...i(me)(t, "oss"),
211
213
  oss: {
212
214
  pauseUpload: (n = t == null ? void 0 : t.oss) == null ? void 0 : n.pauseUpload
213
215
  }
214
216
  };
215
217
  }),
216
- remove: I
218
+ remove: b
217
219
  }, () => [
218
- (h(!0), g(Z, null, F(i(s), (t) => (h(), g("div", {
220
+ (g(!0), h(te, null, ne(i(s), (t) => (g(), h("div", {
219
221
  key: t.uid,
220
222
  class: "picture-item"
221
223
  }, [
222
- d("div", he, [
224
+ d("div", xe, [
223
225
  d("img", {
224
226
  src: t.thumbUrl,
225
227
  alt: ""
226
- }, null, 8, ge),
227
- ee(d("div", ve, [
228
+ }, null, 8, _e),
229
+ ae(d("div", ye, [
228
230
  d("div", {
229
231
  class: "picture-item-close",
230
- onClick: (n) => I(t)
232
+ onClick: (n) => b(t)
231
233
  }, [
232
- k(i(se))
233
- ], 8, xe),
234
- t.status === "uploading" ? (h(), g("div", _e, [
235
- k(i(re), {
234
+ C(i(re))
235
+ ], 8, we),
236
+ t.status === "uploading" ? (g(), h("div", Ce, [
237
+ C(i(de), {
236
238
  percent: t.percent,
237
239
  strokeColor: "#ffffff",
238
240
  trailColor: "rgba(255, 255, 255, 0.3)",
239
241
  size: 4,
240
242
  showInfo: !1
241
243
  }, null, 8, ["percent"])
242
- ])) : $("", !0)
244
+ ])) : M("", !0)
243
245
  ], 512), [
244
- [te, t.status === "uploading"]
246
+ [se, t.status === "uploading"]
245
247
  ])
246
248
  ])
247
249
  ]))), 128))
248
250
  ]),
249
- i(l) === void 0 || i(s).length < i(l) ? (h(), g("div", {
251
+ i(l) === void 0 || i(s).length < i(l) ? (g(), h("div", {
250
252
  key: 0,
251
253
  class: "picture-upload",
252
- onClick: q
254
+ onClick: j
253
255
  }, [
254
- k(i(oe)),
255
- d("div", null, C(i(r)("ap.apUpload.update")), 1)
256
- ])) : $("", !0)
256
+ C(i(ce)),
257
+ d("div", null, k(i(u)("ap.apUpload.update")), 1)
258
+ ])) : M("", !0)
257
259
  ]),
258
- d("div", ye, [
259
- i(S) ? (h(), g("div", we, C(i(S)), 1)) : (h(), g("div", ke, C(`${i(r)("ap.apUpload.supportExtension")}:${i(ue)(i(y))},${i(r)(
260
+ d("div", ke, [
261
+ i(S) ? (g(), h("div", Ue, k(i(S)), 1)) : (g(), h("div", Se, k(`${i(u)("ap.apUpload.supportExtension")}:${i(pe)(i(y))},${i(u)(
260
262
  "ap.apUpload.maxUploadPictureSize",
261
263
  { maxSize: i(w) }
262
264
  )}`), 1))
@@ -265,5 +267,5 @@ const me = ["accept"], fe = { class: "picture-context" }, he = { class: "picture
265
267
  }
266
268
  });
267
269
  export {
268
- Te as default
270
+ De as default
269
271
  };
@@ -1,69 +1,69 @@
1
- import { defineComponent as te, inject as s, ref as h, watch as ae, computed as ne, openBlock as _, createElementBlock as x, normalizeClass as oe, unref as a, createElementVNode as i, toDisplayString as A, createCommentVNode as z, normalizeStyle as le, createBlock as se, withModifiers as re, createVNode as ie } from "vue";
1
+ import { defineComponent as ne, inject as s, ref as h, watch as oe, computed as le, openBlock as _, createElementBlock as x, normalizeClass as se, unref as a, createElementVNode as i, toDisplayString as z, createCommentVNode as A, normalizeStyle as re, createBlock as ie, withModifiers as ce, createVNode as ue } from "vue";
2
2
  import "../../config-provider/index.mjs";
3
- import { getName as ce, getReturnData as q } from "../utils/returnData.mjs";
4
- import { useOss as ue, useOssInit as pe } from "../hooks/useOss.mjs";
5
- import { fileMatchesAccept as ve, getAcceptText as de } from "../utils/accept.mjs";
6
- import { message as u, Progress as fe } from "@aplus-frontend/antdv";
7
- import { DeleteOutlined as me } from "@ant-design/icons-vue";
8
- import M from "../assets/single-file-icon.png.mjs";
9
- import { useLocale as ge } from "../../config-provider/hooks/use-locale.mjs";
10
- import { useNamespace as he } from "../../config-provider/hooks/use-namespace.mjs";
11
- const _e = ["accept"], ke = {
3
+ import { getName as pe, getReturnData as $ } from "../utils/returnData.mjs";
4
+ import { useOss as ve, useOssInit as de } from "../hooks/useOss.mjs";
5
+ import { fileMatchesAccept as fe, getAcceptText as me } from "../utils/accept.mjs";
6
+ import { message as u, Progress as ge } from "@aplus-frontend/antdv";
7
+ import { DeleteOutlined as he } from "@ant-design/icons-vue";
8
+ import q from "../assets/single-file-icon.png.mjs";
9
+ import { useLocale as _e } from "../../config-provider/hooks/use-locale.mjs";
10
+ import { useNamespace as ke } from "../../config-provider/hooks/use-namespace.mjs";
11
+ const ye = ["accept"], De = {
12
12
  key: 0,
13
13
  class: "state-un"
14
- }, ye = ["src"], De = { class: "state-un-title" }, Ce = { class: "state-un-subtitle" }, we = {
14
+ }, Ce = ["src"], we = { class: "state-un-title" }, Fe = { class: "state-un-subtitle" }, Ue = {
15
15
  key: 1,
16
16
  class: "state-ing"
17
- }, Fe = { class: "left" }, Ue = ["src"], Ne = { class: "center" }, Se = { class: "center-progress" }, Ie = /* @__PURE__ */ te({
17
+ }, Ee = { class: "left" }, Se = ["src"], Ne = { class: "center" }, xe = { class: "center-progress" }, $e = /* @__PURE__ */ ne({
18
18
  __name: "SingleFile",
19
- setup(Ee, { expose: j }) {
20
- const { t: r } = ge(), { b: k } = he("ap-upload-single-file"), { put: G, client: B } = ue(), y = s("theme"), W = s("dirName"), D = s("accept") || "*", C = s("maxSize") ?? 500, H = s("title") || r("ap.apUpload.clickOrDragUpload"), w = s("subTitle"), n = s("value"), F = s("needName"), p = s("uploadingCount"), b = s("beforeUpload"), O = s("customRequest"), J = s("getOssAccess"), o = h(null);
21
- ae(
19
+ setup(ze, { expose: j }) {
20
+ const { t: r } = _e(), { b: k } = ke("ap-upload-single-file"), { put: G, client: B } = ve(), y = s("theme"), W = s("dirName"), D = s("accept") || "*", C = s("maxSize") ?? 500, H = s("title") || r("ap.apUpload.clickOrDragUpload"), w = s("subTitle"), n = s("value"), F = s("needName"), p = s("uploadingCount"), b = s("beforeUpload"), M = s("customRequest"), J = s("getOssAccess"), K = s("maxSizeErrorMsg"), Q = s("acceptErrorMsg"), o = h(null);
21
+ oe(
22
22
  () => n == null ? void 0 : n.value,
23
23
  function(e) {
24
- o.value === null && e && P(e);
24
+ o.value === null && e && O(e);
25
25
  },
26
26
  { immediate: !0 }
27
27
  );
28
- function P(e) {
28
+ function O(e) {
29
29
  e ? setTimeout(() => {
30
- const t = ce(F, e);
30
+ const t = pe(F, e);
31
31
  l.value = 3, o.value = new File([e], t, {}), n.value = e;
32
32
  }) : (l.value = 1, o.value = null, n.value = void 0);
33
33
  }
34
- j({ setValue: P });
35
- const l = h(1), f = h(0), m = h(null), T = ne(() => o.value && (n == null ? void 0 : n.value));
36
- function K() {
34
+ j({ setValue: O });
35
+ const l = h(1), f = h(0), m = h(null), P = le(() => o.value && (n == null ? void 0 : n.value));
36
+ function X() {
37
37
  var e;
38
38
  l.value === 1 && ((e = m.value) == null || e.click());
39
39
  }
40
- function L(e) {
40
+ function T(e) {
41
41
  e.preventDefault(), e.stopPropagation();
42
42
  }
43
- function Q(e) {
43
+ function Y(e) {
44
44
  e.dataTransfer.dropEffect = "copy", e.preventDefault(), e.stopPropagation();
45
45
  }
46
- function X(e) {
47
- R(e);
46
+ function Z(e) {
47
+ L(e);
48
48
  }
49
- function Y(e) {
49
+ function V(e) {
50
50
  if (e.preventDefault(), e.stopPropagation(), l.value !== 1)
51
51
  return;
52
- var t = e.dataTransfer, c = [], I = 0, $ = t.files.length;
52
+ var t = e.dataTransfer, c = [], R = 0, I = t.files.length;
53
53
  function v() {
54
- I === $ - 1 && X(c), I++;
54
+ R === I - 1 && Z(c), R++;
55
55
  }
56
56
  if (t.items !== void 0)
57
57
  for (var U = 0; U < t.items.length; U++) {
58
- var N = t.items[U];
59
- if (N.kind === "file" && N.webkitGetAsEntry().isFile) {
60
- var ee = N.getAsFile();
61
- c.push(ee), v();
58
+ var E = t.items[U];
59
+ if (E.kind === "file" && E.webkitGetAsEntry().isFile) {
60
+ var ae = E.getAsFile();
61
+ c.push(ae), v();
62
62
  }
63
63
  }
64
64
  else
65
- for (let E = 0; E < $; E++) {
66
- var g = t.files[E];
65
+ for (let N = 0; N < I; N++) {
66
+ var g = t.files[N];
67
67
  if (g.type)
68
68
  c.push(g), v();
69
69
  else
@@ -87,11 +87,11 @@ const _e = ["accept"], ke = {
87
87
  }
88
88
  }
89
89
  }
90
- function Z(e) {
90
+ function ee(e) {
91
91
  const t = e.target;
92
- R(t == null ? void 0 : t.files), m.value && (m.value.value = "");
92
+ L(t == null ? void 0 : t.files), m.value && (m.value.value = "");
93
93
  }
94
- async function R(e) {
94
+ async function L(e) {
95
95
  if (e != null && e.length) {
96
96
  if (typeof b == "function") {
97
97
  if (b(e[0]) === !1)
@@ -99,19 +99,21 @@ const _e = ["accept"], ke = {
99
99
  } else {
100
100
  if (e[0].size > C * 1024 * 1024) {
101
101
  u.warning(
102
- r("ap.apUpload.maxUploadFileSize", {
102
+ K || r("ap.apUpload.maxUploadFileSize", {
103
103
  maxSize: C
104
104
  })
105
105
  );
106
106
  return;
107
107
  }
108
- if (!ve(e[0], D)) {
109
- u.warning(r("ap.apUpload.fileFormatNotSupported"));
108
+ if (!fe(e[0], D)) {
109
+ u.warning(
110
+ Q || r("ap.apUpload.fileFormatNotSupported")
111
+ );
110
112
  return;
111
113
  }
112
114
  }
113
- if (o.value = e[0], l.value = 2, f.value = 0, p.value++, typeof O == "function") {
114
- O({
115
+ if (o.value = e[0], l.value = 2, f.value = 0, p.value++, typeof M == "function") {
116
+ M({
115
117
  onProgress: (t) => {
116
118
  f.value = t;
117
119
  },
@@ -119,7 +121,7 @@ const _e = ["accept"], ke = {
119
121
  u.warning(t || r("ap.apUpload.networkAnomaly")), l.value = 1, o.value = null, p.value--;
120
122
  },
121
123
  onSuccess: (t) => {
122
- n.value = q(
124
+ n.value = $(
123
125
  F,
124
126
  t,
125
127
  o.value.name
@@ -130,12 +132,12 @@ const _e = ["accept"], ke = {
130
132
  return;
131
133
  }
132
134
  try {
133
- await pe(J), G({
135
+ await de(J), G({
134
136
  file: o.value,
135
137
  dirName: W,
136
138
  oss: B,
137
139
  successCallBack(t) {
138
- n.value = q(
140
+ n.value = $(
139
141
  F,
140
142
  t,
141
143
  o.value.name
@@ -155,22 +157,22 @@ const _e = ["accept"], ke = {
155
157
  }
156
158
  }
157
159
  }
158
- function V() {
160
+ function te() {
159
161
  o.value && !(n != null && n.value) && B.pauseUpload(), l.value = 1, o.value = null, n.value = void 0;
160
162
  }
161
163
  return (e, t) => {
162
164
  var c;
163
165
  return _(), x("div", {
164
- class: oe({
166
+ class: se({
165
167
  [a(k)()]: !0,
166
168
  [a(k)("admin")]: a(y) === "admin",
167
169
  [a(k)("un")]: l.value === 1
168
170
  }),
169
- onClick: K,
170
- onDragenter: L,
171
- onDragover: Q,
172
- onDragleave: L,
173
- onDrop: Y
171
+ onClick: X,
172
+ onDragenter: T,
173
+ onDragover: Y,
174
+ onDragleave: T,
175
+ onDrop: V
174
176
  }, [
175
177
  i("input", {
176
178
  style: { display: "none" },
@@ -178,33 +180,33 @@ const _e = ["accept"], ke = {
178
180
  ref_key: "fileRef",
179
181
  ref: m,
180
182
  accept: a(D),
181
- onChange: Z
182
- }, null, 40, _e),
183
- l.value === 1 ? (_(), x("div", ke, [
183
+ onChange: ee
184
+ }, null, 40, ye),
185
+ l.value === 1 ? (_(), x("div", De, [
184
186
  i("img", {
185
187
  class: "state-un-icon",
186
- src: a(M)
187
- }, null, 8, ye),
188
- i("div", De, A(a(H)), 1),
189
- i("div", Ce, A(typeof a(w) == "string" && a(w).length > 0 ? a(w) : `${a(r)("ap.apUpload.supportExtension")}:${a(de)(
188
+ src: a(q)
189
+ }, null, 8, Ce),
190
+ i("div", we, z(a(H)), 1),
191
+ i("div", Fe, z(typeof a(w) == "string" && a(w).length > 0 ? a(w) : `${a(r)("ap.apUpload.supportExtension")}:${a(me)(
190
192
  a(D)
191
193
  )},${a(r)("ap.apUpload.maxWarnUploadFileSize", {
192
194
  maxSize: a(C)
193
195
  })}`), 1)
194
- ])) : z("", !0),
195
- [2, 3].includes(l.value) ? (_(), x("div", we, [
196
- i("div", Fe, [
197
- i("img", { src: a(M) }, null, 8, Ue)
196
+ ])) : A("", !0),
197
+ [2, 3].includes(l.value) ? (_(), x("div", Ue, [
198
+ i("div", Ee, [
199
+ i("img", { src: a(q) }, null, 8, Se)
198
200
  ]),
199
201
  i("div", Ne, [
200
202
  i("div", {
201
203
  class: "center-title",
202
- style: le({
203
- color: T.value ? "#0070FF" : "#182948"
204
+ style: re({
205
+ color: P.value ? "#0070FF" : "#182948"
204
206
  })
205
- }, A((c = o.value) == null ? void 0 : c.name), 5),
206
- i("div", Se, [
207
- T.value ? z("", !0) : (_(), se(a(fe), {
207
+ }, z((c = o.value) == null ? void 0 : c.name), 5),
208
+ i("div", xe, [
209
+ P.value ? A("", !0) : (_(), ie(a(ge), {
208
210
  key: 0,
209
211
  percent: f.value,
210
212
  size: 4,
@@ -216,15 +218,15 @@ const _e = ["accept"], ke = {
216
218
  ]),
217
219
  i("div", {
218
220
  class: "right",
219
- onClick: re(V, ["stop"])
221
+ onClick: ce(te, ["stop"])
220
222
  }, [
221
- ie(a(me))
223
+ ue(a(he))
222
224
  ])
223
- ])) : z("", !0)
225
+ ])) : A("", !0)
224
226
  ], 34);
225
227
  };
226
228
  }
227
229
  });
228
230
  export {
229
- Ie as default
231
+ $e as default
230
232
  };
@@ -3,10 +3,13 @@ import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes,
3
3
  declare const _default: DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<ApSummaryProps>, {
4
4
  summaryTitle: string;
5
5
  hasSelect: boolean;
6
+ size: string;
6
7
  }>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<ApSummaryProps>, {
7
8
  summaryTitle: string;
8
9
  hasSelect: boolean;
10
+ size: string;
9
11
  }>>>, {
12
+ size: "middle" | "small";
10
13
  summaryTitle: string;
11
14
  hasSelect: boolean;
12
15
  }, {}>;