@keyblade/pro-components 1.13.2 → 1.13.4

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.
@@ -599,6 +599,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps,
599
599
  listType: import('@arco-design/web-vue/es/upload/interfaces').ListType;
600
600
  }> | undefined>;
601
601
  cropperInsRef: import('vue').Ref<any, any>;
602
+ isUploadComplete: import('vue').ComputedRef<boolean>;
602
603
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
603
604
  "update:modelValue": (value: FileItem[]) => any;
604
605
  } & {
@@ -609,9 +610,9 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps,
609
610
  }>, {
610
611
  name: string;
611
612
  accept: string[];
613
+ disabled: boolean;
612
614
  multiple: boolean;
613
615
  singleLimit: number;
614
- disabled: boolean;
615
616
  hideInnerBeforeUploadLoading: boolean;
616
617
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
617
618
  uploadInsRef: unknown;
@@ -1,31 +1,31 @@
1
- import { defineComponent as me, mergeModels as J, useSlots as ge, useModel as pe, ref as m, computed as M, watch as K, resolveComponent as he, createElementBlock as Ie, openBlock as X, createVNode as xe, createBlock as Ue, createCommentVNode as ye, normalizeClass as Ce, createSlots as Be, withCtx as Y, unref as Z, renderSlot as A } from "vue";
1
+ import { defineComponent as he, mergeModels as Y, useSlots as Ie, useModel as xe, ref as m, computed as w, watch as Z, resolveComponent as Ue, createElementBlock as Ce, openBlock as N, createVNode as ye, createBlock as Be, createCommentVNode as we, normalizeClass as Ee, createSlots as Me, withCtx as A, unref as R, renderSlot as _ } from "vue";
2
2
  import { Message as g } from "@arco-design/web-vue";
3
3
  import { conclude as L } from "vue-global-config";
4
4
  import { EImageUploadInnerBeforeUploadStep as v } from "./types.js";
5
5
  import { defaultImageUploadOptions as U } from "./constant.js";
6
- import we from "./cropper.vue.js";
7
- import { defaultImageUploadCheckOptions as Ee, defaultImageUploadCompressorOptions as Me, defaultImageUploadCropOptions as Se, oneTravelImageCheckAndTransform as be, oneTravelImageCompressor as Le } from "@keyblade/one-travel";
8
- const Oe = "keyblade-pro-image-upload";
9
- var R, _, ee;
10
- const We = /* @__PURE__ */ me({
6
+ import Se from "./cropper.vue.js";
7
+ import { defaultImageUploadCheckOptions as be, defaultImageUploadCompressorOptions as Le, defaultImageUploadCropOptions as Oe, oneTravelImageCheckAndTransform as $e, oneTravelImageCompressor as ke } from "@keyblade/one-travel";
8
+ const ze = "keyblade-pro-image-upload";
9
+ var ee, ae, le;
10
+ const qe = /* @__PURE__ */ he({
11
11
  __name: "image-upload",
12
- props: /* @__PURE__ */ J({
12
+ props: /* @__PURE__ */ Y({
13
13
  action: {},
14
14
  handlerResponse: {},
15
15
  headers: {},
16
16
  data: {},
17
- name: { default: (R = U) == null ? void 0 : R.name },
17
+ name: { default: (ee = U) == null ? void 0 : ee.name },
18
18
  tip: {},
19
19
  accept: { default: () => {
20
- var y;
21
- return ((y = U) == null ? void 0 : y.accept) || [];
20
+ var C;
21
+ return ((C = U) == null ? void 0 : C.accept) || [];
22
22
  } },
23
23
  multiple: { type: Boolean, default: U.multiple },
24
24
  singleLimit: { default: U.singleLimit },
25
25
  limit: {},
26
26
  exceedTip: {},
27
- disabled: { type: Boolean, default: (_ = U) == null ? void 0 : _.disabled },
28
- hideInnerBeforeUploadLoading: { type: Boolean, default: (ee = U) == null ? void 0 : ee.hideInnerBeforeUploadLoading },
27
+ disabled: { type: Boolean, default: (ae = U) == null ? void 0 : ae.disabled },
28
+ hideInnerBeforeUploadLoading: { type: Boolean, default: (le = U) == null ? void 0 : le.hideInnerBeforeUploadLoading },
29
29
  checkOptions: {},
30
30
  compressorOptions: {},
31
31
  cropOptions: {},
@@ -39,76 +39,74 @@ const We = /* @__PURE__ */ me({
39
39
  modelValue: { required: !0 },
40
40
  modelModifiers: {}
41
41
  }),
42
- emits: /* @__PURE__ */ J(["cropperImgLoad"], ["update:modelValue"]),
43
- setup(y, { expose: ae, emit: le }) {
44
- const O = ge(), r = pe(y, "modelValue"), e = y, oe = le, S = m(), $ = m(), p = m(), h = m(
45
- []
46
- ), n = m(), c = m(), s = m(), ne = M(() => e.accept.map((a) => `.${a}`).join(",")), f = M(() => L([e.checkOptions, Ee]) || {}), C = M(() => L([e.compressorOptions, Me]) || {}), B = M(() => L([e.cropOptions, Se]) || {}), te = (a) => {
47
- var t, u, d, i;
48
- const l = (i = (d = (u = (t = S.value) == null ? void 0 : t.$el) == null ? void 0 : u.querySelector) == null ? void 0 : d.call(u, "input")) == null ? void 0 : i.files;
42
+ emits: /* @__PURE__ */ Y(["cropperImgLoad"], ["update:modelValue"]),
43
+ setup(C, { expose: oe, emit: ne }) {
44
+ const O = Ie(), u = xe(C, "modelValue"), e = C, te = ne, S = m(), $ = m(), p = m(), h = m([]), n = m(), c = m(), s = m(), ie = w(() => e.accept.map((a) => `.${a}`).join(",")), f = w(() => L([e.checkOptions, be]) || {}), y = w(() => L([e.compressorOptions, Le]) || {}), B = w(() => L([e.cropOptions, Oe]) || {}), re = (a) => {
45
+ var i, d, t, r;
46
+ const l = (r = (t = (d = (i = S.value) == null ? void 0 : i.$el) == null ? void 0 : d.querySelector) == null ? void 0 : t.call(d, "input")) == null ? void 0 : r.files;
49
47
  return l && l.length > 0 && (s.value = {
50
48
  selectCount: l.length
51
- }), e != null && e.onBeforeUpload ? e == null ? void 0 : e.onBeforeUpload(a) : s.value && (e != null && e.singleLimit) && s.value.selectCount > (e == null ? void 0 : e.singleLimit) ? (s.value.handleIndex === void 0 ? (s.value.handleIndex = 0, g.clear(), g.error(`单次最多可选择${e == null ? void 0 : e.singleLimit}张图片`)) : s.value.handleIndex += 1, s.value.handleIndex === s.value.selectCount - 1 && (s.value = void 0), !1) : new Promise(async (w, E) => {
49
+ }), e != null && e.onBeforeUpload ? e == null ? void 0 : e.onBeforeUpload(a) : s.value && (e != null && e.singleLimit) && s.value.selectCount > (e == null ? void 0 : e.singleLimit) ? (s.value.handleIndex === void 0 ? (s.value.handleIndex = 0, g.clear(), g.error(`单次最多可选择${e == null ? void 0 : e.singleLimit}张图片`)) : s.value.handleIndex += 1, s.value.handleIndex === s.value.selectCount - 1 && (s.value = void 0), !1) : new Promise(async (E, M) => {
52
50
  try {
53
- w(await se(a));
51
+ E(await fe(a));
54
52
  } catch {
55
- E();
53
+ M();
56
54
  } finally {
57
55
  k();
58
56
  }
59
57
  });
60
- }, ie = async (a) => {
61
- const l = r.value.findIndex((t) => t.uid === a.uid);
62
- return r.value.splice(l, 1), r.value = [...r.value], !1;
63
- }, re = (a, l) => {
64
- e != null && e.onExceed ? e == null || e.onExceed(a, l) : (g.error(e.exceedTip ?? `超过数量上限,最多上传${(e == null ? void 0 : e.limit) || 1}张`), r.value = a);
65
58
  }, ue = async (a) => {
59
+ const l = u.value.findIndex((i) => i.uid === a.uid);
60
+ return u.value.splice(l, 1), u.value = [...u.value], !1;
61
+ }, de = (a, l) => {
62
+ e != null && e.onExceed ? e == null || e.onExceed(a, l) : (g.error(e.exceedTip ?? `超过数量上限,最多上传${(e == null ? void 0 : e.limit) || 1}张`), u.value = a);
63
+ }, se = async (a) => {
66
64
  if (e != null && e.onSuccess)
67
65
  e == null || e.onSuccess(a);
68
66
  else {
69
67
  if (!(e != null && e.handlerResponse))
70
68
  return;
71
- const l = await e.handlerResponse(a.response), t = r.value.findIndex((u) => u.uid === a.uid);
72
- l.success ? r.value[t] = {
73
- ...r.value[t],
69
+ const l = await e.handlerResponse(a.response), i = u.value.findIndex((d) => d.uid === a.uid);
70
+ l.success ? u.value[i] = {
71
+ ...u.value[i],
74
72
  ...l
75
- } : r.value.splice(t, 1);
73
+ } : u.value.splice(i, 1);
76
74
  }
77
- }, de = (a) => {
75
+ }, ce = (a) => {
78
76
  e != null && e.onError ? e == null || e.onError(a) : setTimeout(() => {
79
- const l = r.value.findIndex((t) => t.uid === a.uid);
80
- r.value.splice(l, 1);
77
+ const l = u.value.findIndex((i) => i.uid === a.uid);
78
+ u.value.splice(l, 1);
81
79
  });
82
- }, se = (a) => new Promise((l, t) => {
83
- h.value.push({ file: a, resolve: l, reject: t }), h.value.length === 1 && !n.value && k();
80
+ }, fe = (a) => new Promise((l, i) => {
81
+ h.value.push({ file: a, resolve: l, reject: i }), h.value.length === 1 && !n.value && k();
84
82
  }), k = () => {
85
83
  n.value === void 0 ? n.value = 0 : n.value + 1 >= h.value.length ? (n.value = void 0, h.value = []) : n.value += 1;
86
- }, ce = () => {
84
+ }, ve = () => {
87
85
  var a;
88
86
  (a = p.value) == null || a.reject();
89
- }, fe = (a) => {
87
+ }, me = (a) => {
90
88
  var l;
91
89
  (l = p.value) == null || l.resolve(a);
92
- }, ve = (a) => {
93
- oe("cropperImgLoad", a);
90
+ }, ge = (a) => {
91
+ te("cropperImgLoad", a);
94
92
  };
95
- K(n, async () => {
96
- var w, E, b, F, z, j, Q, T, V, W, H, N, P, q, D, G;
93
+ Z(n, async () => {
94
+ var E, M, b, z, j, Q, T, V, W, F, H, P, q, D, G, J, K, X;
97
95
  if (n.value === void 0 || h.value.length === 0)
98
96
  return;
99
- const a = h.value[n.value], { file: l, resolve: t, reject: u } = a;
100
- let d = l.name, i = l;
101
- if ((w = f.value) != null && w.enable) {
97
+ const a = h.value[n.value], { file: l, resolve: i, reject: d } = a;
98
+ let t = l.name, r = l;
99
+ if ((E = f.value) != null && E.enable) {
102
100
  c.value = {
103
101
  loading: !0,
104
102
  text: `第${n.value + 1}张图片检测中,请稍等`
105
- }, (E = e == null ? void 0 : e.onInnerBeforeUploadStart) == null || E.call(
103
+ }, (M = e == null ? void 0 : e.onInnerBeforeUploadStart) == null || M.call(
106
104
  e,
107
105
  l,
108
106
  n.value,
109
107
  v.check
110
108
  );
111
- const o = await be(l, l.name, {
109
+ const o = await $e(l, l.name, {
112
110
  imageMaxSize: f.value.maxSize,
113
111
  imageAllowedType: f.value.allowedType,
114
112
  imageMinWidth: f.value.minWidth,
@@ -127,26 +125,26 @@ const We = /* @__PURE__ */ me({
127
125
  errorMessage: o == null ? void 0 : o.errorMessage
128
126
  }
129
127
  ), !o.success)
130
- return (F = f.value) != null && F.showErrorMessage && g.error((o == null ? void 0 : o.errorMessage) || "图片校验及转换失败"), u();
128
+ return (z = f.value) != null && z.showErrorMessage && g.error((o == null ? void 0 : o.errorMessage) || "图片校验及转换失败"), d();
131
129
  if (o != null && o.hasTransform) {
132
- const x = d == null ? void 0 : d.split(".");
133
- x.pop(), d = `${x.join(",")}.jpg`, i = new File([o.file], d, {
130
+ const x = t == null ? void 0 : t.split(".");
131
+ x.pop(), t = `${x.join(",")}.jpg`, r = new File([o.file], t, {
134
132
  type: o.file.type
135
133
  });
136
134
  } else
137
- i = o.file;
135
+ r = o.file;
138
136
  }
139
- if ((z = B.value) != null && z.enable && !d.endsWith(".gif")) {
140
- (j = e == null ? void 0 : e.onInnerBeforeUploadStart) == null || j.call(
137
+ if ((j = B.value) != null && j.enable && !((T = (Q = t == null ? void 0 : t.toLocaleLowerCase) == null ? void 0 : Q.call(t)) != null && T.endsWith(".gif"))) {
138
+ (V = e == null ? void 0 : e.onInnerBeforeUploadStart) == null || V.call(
141
139
  e,
142
140
  l,
143
141
  n.value,
144
142
  v.crop
145
143
  );
146
144
  try {
147
- (Q = B.value) != null && Q.customCrop ? i = await B.value.customCrop(i) : i = await new Promise((o, x) => {
148
- p.value = { file: i, resolve: o, reject: x };
149
- }), (T = e == null ? void 0 : e.onInnerBeforeUploadEnd) == null || T.call(
145
+ (W = B.value) != null && W.customCrop ? r = await B.value.customCrop(r) : r = await new Promise((o, x) => {
146
+ p.value = { file: r, resolve: o, reject: x };
147
+ }), (F = e == null ? void 0 : e.onInnerBeforeUploadEnd) == null || F.call(
150
148
  e,
151
149
  l,
152
150
  n.value,
@@ -156,7 +154,7 @@ const We = /* @__PURE__ */ me({
156
154
  }
157
155
  );
158
156
  } catch {
159
- return (V = e == null ? void 0 : e.onInnerBeforeUploadEnd) == null || V.call(
157
+ return (H = e == null ? void 0 : e.onInnerBeforeUploadEnd) == null || H.call(
160
158
  e,
161
159
  l,
162
160
  n.value,
@@ -168,27 +166,27 @@ const We = /* @__PURE__ */ me({
168
166
  },
169
167
  errorMessage: "图片剪裁失败"
170
168
  }
171
- ), (W = B.value) != null && W.showErrorMessage && g.error("图片剪裁失败"), u();
169
+ ), (P = B.value) != null && P.showErrorMessage && g.error("图片剪裁失败"), d();
172
170
  } finally {
173
171
  p.value = void 0;
174
172
  }
175
173
  }
176
- if ((H = C.value) != null && H.enable) {
174
+ if ((q = y.value) != null && q.enable) {
177
175
  c.value = {
178
176
  loading: !0,
179
177
  text: `第${n.value + 1}张图片处理中,请稍等`
180
- }, (N = e == null ? void 0 : e.onInnerBeforeUploadStart) == null || N.call(
178
+ }, (D = e == null ? void 0 : e.onInnerBeforeUploadStart) == null || D.call(
181
179
  e,
182
180
  l,
183
181
  n.value,
184
182
  v.compress
185
183
  );
186
- const o = await Le(i, {
187
- maxSize: C.value.maxSize,
188
- size: C.value.size,
189
- excludeAllowedTypes: (P = C.value.excludeAllowedTypes) == null ? void 0 : P.map((x) => `image/${x}`)
184
+ const o = await ke(r, {
185
+ maxSize: y.value.maxSize,
186
+ size: y.value.size,
187
+ excludeAllowedTypes: (G = y.value.excludeAllowedTypes) == null ? void 0 : G.map((x) => `image/${x}`)
190
188
  });
191
- if (c.value = void 0, (q = e == null ? void 0 : e.onInnerBeforeUploadEnd) == null || q.call(
189
+ if (c.value = void 0, (J = e == null ? void 0 : e.onInnerBeforeUploadEnd) == null || J.call(
192
190
  e,
193
191
  l,
194
192
  n.value,
@@ -201,12 +199,12 @@ const We = /* @__PURE__ */ me({
201
199
  errorMessage: o == null ? void 0 : o.errorMessage
202
200
  }
203
201
  ), !o.success)
204
- return (D = C.value) != null && D.showErrorMessage && g.error((o == null ? void 0 : o.errorMessage) || "图片压缩失败"), u();
205
- i = new File([o.file], d, {
202
+ return (K = y.value) != null && K.showErrorMessage && g.error((o == null ? void 0 : o.errorMessage) || "图片压缩失败"), d();
203
+ r = new File([o.file], t, {
206
204
  type: o.file.type
207
205
  });
208
206
  }
209
- c.value = void 0, (G = e == null ? void 0 : e.onInnerBeforeUploadEnd) == null || G.call(
207
+ c.value = void 0, (X = e == null ? void 0 : e.onInnerBeforeUploadEnd) == null || X.call(
210
208
  e,
211
209
  l,
212
210
  n.value,
@@ -214,10 +212,10 @@ const We = /* @__PURE__ */ me({
214
212
  {
215
213
  success: !0
216
214
  }
217
- ), t(i);
215
+ ), i(r);
218
216
  });
219
217
  let I;
220
- return K(
218
+ Z(
221
219
  () => c.value,
222
220
  () => {
223
221
  var a;
@@ -227,66 +225,69 @@ const We = /* @__PURE__ */ me({
227
225
  duration: 0
228
226
  }) : (a = I == null ? void 0 : I.close) == null || a.call(I);
229
227
  }
230
- ), ae({
228
+ );
229
+ const pe = w(() => u.value.every((a) => a.status && ["done", "error"].includes(a.status)));
230
+ return oe({
231
231
  uploadInsRef: S,
232
- cropperInsRef: $
232
+ cropperInsRef: $,
233
+ isUploadComplete: pe
233
234
  }), (a, l) => {
234
- var u, d;
235
- const t = he("a-upload");
236
- return X(), Ie("div", null, [
237
- xe(t, {
238
- class: Ce([`${Oe}-upload`]),
235
+ var d, t;
236
+ const i = Ue("a-upload");
237
+ return N(), Ce("div", null, [
238
+ ye(i, {
239
+ class: Ee([`${ze}-upload`]),
239
240
  ref_key: "uploadInsRef",
240
241
  ref: S,
241
242
  "list-type": "picture-card",
242
243
  tip: a.tip || "上传",
243
244
  "image-preview": "",
244
- "file-list": r.value,
245
- "onUpdate:fileList": l[0] || (l[0] = (i) => r.value = i),
245
+ "file-list": u.value,
246
+ "onUpdate:fileList": l[0] || (l[0] = (r) => u.value = r),
246
247
  action: a.action,
247
248
  headers: a.headers,
248
249
  data: a.data,
249
250
  name: a.name,
250
- accept: ne.value,
251
+ accept: ie.value,
251
252
  multiple: a.multiple,
252
253
  limit: a.limit,
253
254
  disabled: a.disabled,
254
- "on-before-upload": te,
255
- "on-before-remove": ie,
256
- onExceedLimit: re,
257
- onSuccess: ue,
258
- onError: de
259
- }, Be({ _: 2 }, [
260
- (u = Z(O)) != null && u.image ? {
255
+ "on-before-upload": re,
256
+ "on-before-remove": ue,
257
+ onExceedLimit: de,
258
+ onSuccess: se,
259
+ onError: ce
260
+ }, Me({ _: 2 }, [
261
+ (d = R(O)) != null && d.image ? {
261
262
  name: "image",
262
- fn: Y(({ fileItem: i }) => [
263
- A(a.$slots, "image", { fileItem: i })
263
+ fn: A(({ fileItem: r }) => [
264
+ _(a.$slots, "image", { fileItem: r })
264
265
  ]),
265
266
  key: "0"
266
267
  } : void 0,
267
- (d = Z(O)) != null && d["upload-button"] ? {
268
+ (t = R(O)) != null && t["upload-button"] ? {
268
269
  name: "upload-button",
269
- fn: Y(() => [
270
- A(a.$slots, "upload-button")
270
+ fn: A(() => [
271
+ _(a.$slots, "upload-button")
271
272
  ]),
272
273
  key: "1"
273
274
  } : void 0
274
275
  ]), 1032, ["class", "tip", "file-list", "action", "headers", "data", "name", "accept", "multiple", "limit", "disabled"]),
275
- p.value && n.value !== void 0 ? (X(), Ue(we, {
276
+ p.value && n.value !== void 0 ? (N(), Be(Se, {
276
277
  key: 0,
277
278
  ref_key: "cropperInsRef",
278
279
  ref: $,
279
280
  file: p.value.file,
280
281
  index: n.value,
281
282
  options: B.value,
282
- onCancel: ce,
283
- onConfirm: fe,
284
- onImgLoad: ve
285
- }, null, 8, ["file", "index", "options"])) : ye("", !0)
283
+ onCancel: ve,
284
+ onConfirm: me,
285
+ onImgLoad: ge
286
+ }, null, 8, ["file", "index", "options"])) : we("", !0)
286
287
  ]);
287
288
  };
288
289
  }
289
290
  });
290
291
  export {
291
- We as default
292
+ qe as default
292
293
  };
@@ -521,6 +521,7 @@ declare const ProImageUpload: {
521
521
  listType: import('@arco-design/web-vue/es/upload/interfaces').ListType;
522
522
  }> | undefined>;
523
523
  cropperInsRef: import('vue').Ref<any, any>;
524
+ isUploadComplete: import('vue').ComputedRef<boolean>;
524
525
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
525
526
  "update:modelValue": (value: import('@arco-design/web-vue').FileItem[]) => any;
526
527
  } & {
@@ -528,9 +529,9 @@ declare const ProImageUpload: {
528
529
  }, import('vue').PublicProps, {
529
530
  name: string;
530
531
  accept: string[];
532
+ disabled: boolean;
531
533
  multiple: boolean;
532
534
  singleLimit: number;
533
- disabled: boolean;
534
535
  hideInnerBeforeUploadLoading: boolean;
535
536
  }, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
536
537
  uploadInsRef: unknown;
@@ -1099,12 +1100,13 @@ declare const ProImageUpload: {
1099
1100
  listType: import('@arco-design/web-vue/es/upload/interfaces').ListType;
1100
1101
  }> | undefined>;
1101
1102
  cropperInsRef: import('vue').Ref<any, any>;
1103
+ isUploadComplete: import('vue').ComputedRef<boolean>;
1102
1104
  }, {}, {}, {}, {
1103
1105
  name: string;
1104
1106
  accept: string[];
1107
+ disabled: boolean;
1105
1108
  multiple: boolean;
1106
1109
  singleLimit: number;
1107
- disabled: boolean;
1108
1110
  hideInnerBeforeUploadLoading: boolean;
1109
1111
  }>;
1110
1112
  __isFragment?: never;
@@ -1631,6 +1633,7 @@ declare const ProImageUpload: {
1631
1633
  listType: import('@arco-design/web-vue/es/upload/interfaces').ListType;
1632
1634
  }> | undefined>;
1633
1635
  cropperInsRef: import('vue').Ref<any, any>;
1636
+ isUploadComplete: import('vue').ComputedRef<boolean>;
1634
1637
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
1635
1638
  "update:modelValue": (value: import('@arco-design/web-vue').FileItem[]) => any;
1636
1639
  } & {
@@ -1638,9 +1641,9 @@ declare const ProImageUpload: {
1638
1641
  }, string, {
1639
1642
  name: string;
1640
1643
  accept: string[];
1644
+ disabled: boolean;
1641
1645
  multiple: boolean;
1642
1646
  singleLimit: number;
1643
- disabled: boolean;
1644
1647
  hideInnerBeforeUploadLoading: boolean;
1645
1648
  }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
1646
1649
  $slots: {
@@ -1,4 +1,4 @@
1
- import { FileItem } from '@arco-design/web-vue';
1
+ import { FileItem, UploadInstance } from '@arco-design/web-vue';
2
2
  import { ImageUploadCheckOptions, ImageUploadCompressorOptions, ImageUploadCropOptions } from '@keyblade/one-travel';
3
3
  export declare enum EImageUploadInnerBeforeUploadStep {
4
4
  check = 1,
@@ -75,3 +75,19 @@ export interface ImageUploadOptions {
75
75
  errorMessage?: string;
76
76
  }) => void;
77
77
  }
78
+ export interface ImageUploadBeforeUploadQueue {
79
+ file: File;
80
+ resolve: (file: File) => void;
81
+ reject: () => void;
82
+ }
83
+ /**
84
+ * 导出实例对象
85
+ */
86
+ export interface ImageUploadRef {
87
+ /** 原始上传组件实例对象 */
88
+ uploadInsRef: UploadInstance;
89
+ /** 剪裁组件对象 */
90
+ cropperInsRef: any;
91
+ /** 是否上传完成 */
92
+ isUploadComplete: boolean;
93
+ }
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@keyblade/pro-components",
3
3
  "description": "KeyBlade Pro Components",
4
4
  "author": "yangshuai <704807396@qq.com>",
5
- "version": "1.13.2",
5
+ "version": "1.13.4",
6
6
  "private": false,
7
7
  "type": "module",
8
8
  "main": "es/index.js",
@@ -26,7 +26,7 @@
26
26
  "vue-cropper": "^1.1.4",
27
27
  "vue-global-config": "^0.6.3",
28
28
  "dayjs": "^1.11.18",
29
- "@keyblade/one-travel": "^3.0.1"
29
+ "@keyblade/one-travel": "^3.0.2"
30
30
  },
31
31
  "peerDependencies": {
32
32
  "vue": "^3.4.27"