@keyblade/pro-components 1.12.1-alpha.18 → 1.12.1-alpha.19

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 (39) hide show
  1. package/es/index.d.ts +0 -1
  2. package/es/index.js +20 -27
  3. package/es/pro-image-upload/constant.d.ts +0 -1
  4. package/es/pro-image-upload/image-upload.vue.d.ts +38 -125
  5. package/es/pro-image-upload/image-upload.vue.js +58 -55
  6. package/es/pro-image-upload/index.d.ts +133 -268
  7. package/es/pro-image-upload/index.js +6 -6
  8. package/es/pro-image-upload/types.d.ts +0 -1
  9. package/es/pro-keep-alive-router-view/index.d.ts +0 -1
  10. package/es/pro-keep-alive-router-view/index.js +4 -4
  11. package/es/pro-keep-alive-router-view/pro-keep-alive-router-view.vue.d.ts +0 -1
  12. package/es/pro-layout/hooks.d.ts +0 -1
  13. package/es/pro-layout/index.d.ts +0 -1
  14. package/es/pro-layout/index.js +8 -8
  15. package/es/pro-layout/pro-layout.vue.d.ts +0 -1
  16. package/es/pro-layout/pro-layout.vue3.js +1 -1
  17. package/es/pro-menu/index.d.ts +0 -1
  18. package/es/pro-menu/index.js +5 -5
  19. package/es/pro-menu/pro-menu.vue.d.ts +0 -1
  20. package/es/pro-menu/pro-menu.vue3.js +1 -1
  21. package/es/pro-page-container/index.d.ts +1 -2
  22. package/es/pro-page-container/index.js +5 -5
  23. package/es/pro-page-container/pro-page-container.vue.d.ts +1 -2
  24. package/es/pro-page-container/pro-page-container.vue3.js +1 -1
  25. package/es/pro-page-header/index.d.ts +13 -14
  26. package/es/pro-page-header/index.js +8 -8
  27. package/es/pro-page-header/pro-page-header.vue.d.ts +5 -6
  28. package/es/pro-page-header/pro-page-header.vue3.js +1 -1
  29. package/es/pro-reuse-tabs/index.d.ts +1 -2
  30. package/es/pro-reuse-tabs/index.js +5 -5
  31. package/es/pro-reuse-tabs/pro-reuse-tabs.vue.d.ts +1 -2
  32. package/es/pro-reuse-tabs/pro-reuse-tabs.vue3.js +1 -1
  33. package/es/style.css +1 -1
  34. package/package.json +1 -1
  35. package/es/pro-layout/pro-layout.vue2.js +0 -1
  36. package/es/pro-menu/pro-menu.vue2.js +0 -1
  37. package/es/pro-page-container/pro-page-container.vue2.js +0 -1
  38. package/es/pro-page-header/pro-page-header.vue2.js +0 -1
  39. package/es/pro-reuse-tabs/pro-reuse-tabs.vue2.js +0 -1
package/es/index.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import { App } from 'vue';
2
-
3
2
  declare const _default: {
4
3
  install(app: App): void;
5
4
  };
package/es/index.js CHANGED
@@ -1,33 +1,26 @@
1
- import { ProPageHeader as o } from "./pro-page-header/index.js";
2
- import { default as U } from "./pro-page-header/index.js";
1
+ import { ProPageHeader as e } from "./pro-page-header/index.js";
3
2
  import { ProKeepAliveRouterView as r } from "./pro-keep-alive-router-view/index.js";
4
- import { default as b } from "./pro-keep-alive-router-view/index.js";
5
- import { ProLayout as t } from "./pro-layout/index.js";
6
- import { default as w } from "./pro-layout/index.js";
7
- import { ProMenu as a } from "./pro-menu/index.js";
8
- import { default as A } from "./pro-menu/index.js";
9
- import { ProPageContainer as m } from "./pro-page-container/index.js";
10
- import { default as H } from "./pro-page-container/index.js";
11
- import { ProReuseTabs as f } from "./pro-reuse-tabs/index.js";
12
- import { default as L } from "./pro-reuse-tabs/index.js";
3
+ import { ProLayout as m } from "./pro-layout/index.js";
4
+ import { ProMenu as t } from "./pro-menu/index.js";
5
+ import { ProPageContainer as i } from "./pro-page-container/index.js";
6
+ import { ProReuseTabs as s } from "./pro-reuse-tabs/index.js";
13
7
  import { ProImageUpload as u } from "./pro-image-upload/index.js";
14
- import { default as T } from "./pro-image-upload/index.js";
15
- import { EImageUploadInnerBeforeUploadStep as c } from "./pro-image-upload/types.js";
16
- import { defaultImageUploadOptions as E } from "./pro-image-upload/constant.js";
17
- const x = {
18
- install(e) {
19
- e.use(o), e.use(r), e.use(t), e.use(a), e.use(m), e.use(f), e.use(u);
8
+ import { EImageUploadInnerBeforeUploadStep as U } from "./pro-image-upload/types.js";
9
+ import { defaultImageUploadOptions as b } from "./pro-image-upload/constant.js";
10
+ const p = {
11
+ install(o) {
12
+ o.use(e), o.use(r), o.use(m), o.use(t), o.use(i), o.use(s), o.use(u);
20
13
  }
21
14
  };
22
15
  export {
23
- c as EImageUploadInnerBeforeUploadStep,
24
- T as ProImageUpload,
25
- b as ProKeepAliveRouterView,
26
- w as ProLayout,
27
- A as ProMenu,
28
- H as ProPageContainer,
29
- U as ProPageHeader,
30
- L as ProReuseTabs,
31
- x as default,
32
- E as defaultImageUploadOptions
16
+ U as EImageUploadInnerBeforeUploadStep,
17
+ u as ProImageUpload,
18
+ r as ProKeepAliveRouterView,
19
+ m as ProLayout,
20
+ t as ProMenu,
21
+ i as ProPageContainer,
22
+ e as ProPageHeader,
23
+ s as ProReuseTabs,
24
+ p as default,
25
+ b as defaultImageUploadOptions
33
26
  };
@@ -1,3 +1,2 @@
1
1
  import { ImageUploadOptions } from './types';
2
-
3
2
  export declare const defaultImageUploadOptions: Omit<ImageUploadOptions, 'value' | 'action'>;
@@ -1,59 +1,59 @@
1
1
  import { FileItem } from '@arco-design/web-vue';
2
2
  import { EImageUploadInnerBeforeUploadStep } from './types';
3
3
  import { ImageUploadCheckOptions, ImageUploadCompressorOptions, ImageUploadCropOptions } from '@keyblade/one-travel';
4
-
5
- declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
4
+ type __VLS_Props = {
6
5
  /** 上传地址 */
7
6
  action: string;
8
7
  /** 处理响应 */
9
- handlerResponse?: ((response: any) => Promise<{
10
- [key: string]: any;
8
+ handlerResponse?: (response: any) => Promise<{
11
9
  /** 是否成功 */
12
10
  success: boolean;
13
11
  /** 图片地址 */
14
- url?: string | undefined;
12
+ url?: string;
15
13
  /** 错误消息(如果不传,请自行提示错误消息) */
16
- errorMessage?: string | undefined;
17
- }>) | undefined;
14
+ errorMessage?: string;
15
+ /** 其他字段 */
16
+ [key: string]: any;
17
+ }>;
18
18
  /** 设置上传的请求头部 */
19
- headers?: Record<string, any> | undefined;
19
+ headers?: Record<string, any>;
20
20
  /** 上传时附带的额外参数 */
21
- data?: Record<string, any> | undefined;
21
+ data?: Record<string, any>;
22
22
  /** 上传的文件字段名 - 默认: file */
23
- name?: string | undefined;
23
+ name?: string;
24
24
  /** 提示文字 */
25
- tip?: string | undefined;
25
+ tip?: string;
26
26
  /** 接受上传的文件类型 - 默认: ['jpg', 'jpeg', 'png', 'bmp', 'heif', 'heic', 'gif', 'webp'] */
27
- accept?: string[] | undefined;
27
+ accept?: string[];
28
28
  /** 是否支持多选文件 - 默认: true */
29
- multiple?: boolean | undefined;
29
+ multiple?: boolean;
30
30
  /** 单次最大限制 - 默认: 10 */
31
- singleLimit?: number | undefined;
31
+ singleLimit?: number;
32
32
  /** 最大允许上传个数 */
33
- limit?: number | undefined;
33
+ limit?: number;
34
34
  /** 是否禁用 - 默认: false */
35
- disabled?: boolean | undefined;
35
+ disabled?: boolean;
36
36
  /** 隐藏内置上传文件之前的loading效果 - 默认: false */
37
- hideInnerBeforeUploadLoading?: boolean | undefined;
37
+ hideInnerBeforeUploadLoading?: boolean;
38
38
  /** 校验选项 */
39
- checkOptions?: ImageUploadCheckOptions | undefined;
39
+ checkOptions?: ImageUploadCheckOptions;
40
40
  /** 压缩选项 */
41
- compressorOptions?: ImageUploadCompressorOptions | undefined;
41
+ compressorOptions?: ImageUploadCompressorOptions;
42
42
  /** 剪裁选项 */
43
- cropOptions?: ImageUploadCropOptions | undefined;
43
+ cropOptions?: ImageUploadCropOptions;
44
44
  /** 文件列表移除文件时的钩子 */
45
45
  /** 文件上传成功时的钩子 */
46
- onSuccess?: ((fileItem: FileItem) => void) | undefined;
46
+ onSuccess?: (fileItem: FileItem) => void;
47
47
  /** 文件上传失败时的钩子 */
48
- onError?: ((fileItem: FileItem) => void) | undefined;
48
+ onError?: (fileItem: FileItem) => void;
49
49
  /** 文件超出个数限制时的钩子 */
50
- onExceed?: ((fileList: FileItem[], files: File[]) => void) | undefined;
50
+ onExceed?: (fileList: FileItem[], files: File[]) => void;
51
51
  /** 上传文件之前的钩子,参数为上传的文件,若返回 false 或者返回 Promise 且被 reject,则停止上传。*/
52
- onBeforeUpload?: ((file: File) => boolean | Promise<any>) | undefined;
52
+ onBeforeUpload?: (file: File) => boolean | Promise<any>;
53
53
  /** 内置上传文件之前开始 */
54
- onInnerBeforeUploadStart?: ((file: File, index: number, type: EImageUploadInnerBeforeUploadStep) => void) | undefined;
54
+ onInnerBeforeUploadStart?: (file: File, index: number, type: EImageUploadInnerBeforeUploadStep) => void;
55
55
  /** 内置上传文件之前结束 */
56
- onInnerBeforeUploadEnd?: ((file: File, index: number, type: EImageUploadInnerBeforeUploadStep, result: {
56
+ onInnerBeforeUploadEnd?: (file: File, index: number, type: EImageUploadInnerBeforeUploadStep, result: {
57
57
  success: boolean;
58
58
  error?: {
59
59
  size?: boolean;
@@ -64,15 +64,12 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
64
64
  crop?: boolean;
65
65
  };
66
66
  errorMessage?: string;
67
- }) => void) | undefined;
68
- }>, {
69
- name: string | undefined;
70
- accept: () => string[];
71
- multiple: boolean | undefined;
72
- singleLimit: number | undefined;
73
- disabled: boolean | undefined;
74
- hideInnerBeforeUploadLoading: boolean | undefined;
75
- }>>, {
67
+ }) => void;
68
+ };
69
+ type __VLS_PublicProps = {
70
+ modelValue: FileItem[];
71
+ } & __VLS_Props;
72
+ declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {
76
73
  uploadInsRef: import('vue').Ref<import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{
77
74
  fileList?: unknown;
78
75
  defaultFileList?: unknown;
@@ -550,79 +547,12 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
550
547
  }> | undefined>;
551
548
  cropperInsRef: import('vue').Ref<any, any>;
552
549
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
553
- cropperImgLoad: (value: File) => void;
554
- }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
555
- /** 上传地址 */
556
- action: string;
557
- /** 处理响应 */
558
- handlerResponse?: ((response: any) => Promise<{
559
- [key: string]: any;
560
- /** 是否成功 */
561
- success: boolean;
562
- /** 图片地址 */
563
- url?: string | undefined;
564
- /** 错误消息(如果不传,请自行提示错误消息) */
565
- errorMessage?: string | undefined;
566
- }>) | undefined;
567
- /** 设置上传的请求头部 */
568
- headers?: Record<string, any> | undefined;
569
- /** 上传时附带的额外参数 */
570
- data?: Record<string, any> | undefined;
571
- /** 上传的文件字段名 - 默认: file */
572
- name?: string | undefined;
573
- /** 提示文字 */
574
- tip?: string | undefined;
575
- /** 接受上传的文件类型 - 默认: ['jpg', 'jpeg', 'png', 'bmp', 'heif', 'heic', 'gif', 'webp'] */
576
- accept?: string[] | undefined;
577
- /** 是否支持多选文件 - 默认: true */
578
- multiple?: boolean | undefined;
579
- /** 单次最大限制 - 默认: 10 */
580
- singleLimit?: number | undefined;
581
- /** 最大允许上传个数 */
582
- limit?: number | undefined;
583
- /** 是否禁用 - 默认: false */
584
- disabled?: boolean | undefined;
585
- /** 隐藏内置上传文件之前的loading效果 - 默认: false */
586
- hideInnerBeforeUploadLoading?: boolean | undefined;
587
- /** 校验选项 */
588
- checkOptions?: ImageUploadCheckOptions | undefined;
589
- /** 压缩选项 */
590
- compressorOptions?: ImageUploadCompressorOptions | undefined;
591
- /** 剪裁选项 */
592
- cropOptions?: ImageUploadCropOptions | undefined;
593
- /** 文件列表移除文件时的钩子 */
594
- /** 文件上传成功时的钩子 */
595
- onSuccess?: ((fileItem: FileItem) => void) | undefined;
596
- /** 文件上传失败时的钩子 */
597
- onError?: ((fileItem: FileItem) => void) | undefined;
598
- /** 文件超出个数限制时的钩子 */
599
- onExceed?: ((fileList: FileItem[], files: File[]) => void) | undefined;
600
- /** 上传文件之前的钩子,参数为上传的文件,若返回 false 或者返回 Promise 且被 reject,则停止上传。*/
601
- onBeforeUpload?: ((file: File) => boolean | Promise<any>) | undefined;
602
- /** 内置上传文件之前开始 */
603
- onInnerBeforeUploadStart?: ((file: File, index: number, type: EImageUploadInnerBeforeUploadStep) => void) | undefined;
604
- /** 内置上传文件之前结束 */
605
- onInnerBeforeUploadEnd?: ((file: File, index: number, type: EImageUploadInnerBeforeUploadStep, result: {
606
- success: boolean;
607
- error?: {
608
- size?: boolean;
609
- format?: boolean;
610
- transform?: boolean;
611
- pixel?: boolean;
612
- compress?: boolean;
613
- crop?: boolean;
614
- };
615
- errorMessage?: string;
616
- }) => void) | undefined;
617
- }>, {
618
- name: string | undefined;
619
- accept: () => string[];
620
- multiple: boolean | undefined;
621
- singleLimit: number | undefined;
622
- disabled: boolean | undefined;
623
- hideInnerBeforeUploadLoading: boolean | undefined;
624
- }>>> & Readonly<{
550
+ "update:modelValue": (value: FileItem[]) => any;
551
+ } & {
552
+ cropperImgLoad: (value: File) => any;
553
+ }, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
625
554
  onCropperImgLoad?: ((value: File) => any) | undefined;
555
+ "onUpdate:modelValue"?: ((value: FileItem[]) => any) | undefined;
626
556
  }>, {
627
557
  name: string;
628
558
  accept: string[];
@@ -630,22 +560,5 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
630
560
  singleLimit: number;
631
561
  disabled: boolean;
632
562
  hideInnerBeforeUploadLoading: boolean;
633
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
563
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
634
564
  export default _default;
635
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
636
- type __VLS_TypePropsToRuntimeProps<T> = {
637
- [K in keyof T]-?: {} extends Pick<T, K> ? {
638
- type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
639
- } : {
640
- type: import('vue').PropType<T[K]>;
641
- required: true;
642
- };
643
- };
644
- type __VLS_WithDefaults<P, D> = {
645
- [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
646
- default: D[K];
647
- }> : P[K];
648
- };
649
- type __VLS_Prettify<T> = {
650
- [K in keyof T]: T[K];
651
- } & {};
@@ -1,19 +1,19 @@
1
- import { defineComponent as ne, ref as v, computed as C, watch as _, resolveComponent as oe, openBlock as te, createElementBlock as ie, createVNode as ue, normalizeClass as re } from "vue";
1
+ import { defineComponent as oe, mergeModels as D, useModel as te, ref as m, computed as M, watch as G, resolveComponent as ie, openBlock as ue, createElementBlock as re, createVNode as de, normalizeClass as se } from "vue";
2
2
  import { Message as U } from "@arco-design/web-vue";
3
3
  import { conclude as b } from "vue-global-config";
4
- import { EImageUploadInnerBeforeUploadStep as m } from "./types.js";
4
+ import { EImageUploadInnerBeforeUploadStep as v } from "./types.js";
5
5
  import { defaultImageUploadOptions as x } from "./constant.js";
6
- import { defaultImageUploadCheckOptions as de, defaultImageUploadCompressorOptions as se, defaultImageUploadCropOptions as ce, oneTravelImageCheckAndTransform as fe, oneTravelImageCompressor as ve } from "@keyblade/one-travel";
7
- const me = "keyblade-pro-image-upload";
8
- var D, G, J;
9
- const Ee = /* @__PURE__ */ ne({
6
+ import { defaultImageUploadCheckOptions as ce, defaultImageUploadCompressorOptions as fe, defaultImageUploadCropOptions as ve, oneTravelImageCheckAndTransform as me, oneTravelImageCompressor as ge } from "@keyblade/one-travel";
7
+ const he = "keyblade-pro-image-upload";
8
+ var J, K, X;
9
+ const Me = /* @__PURE__ */ oe({
10
10
  __name: "image-upload",
11
- props: {
11
+ props: /* @__PURE__ */ D({
12
12
  action: {},
13
13
  handlerResponse: {},
14
14
  headers: {},
15
15
  data: {},
16
- name: { default: (D = x) == null ? void 0 : D.name },
16
+ name: { default: (J = x) == null ? void 0 : J.name },
17
17
  tip: {},
18
18
  accept: { default: () => {
19
19
  var B;
@@ -22,8 +22,8 @@ const Ee = /* @__PURE__ */ ne({
22
22
  multiple: { type: Boolean, default: x.multiple },
23
23
  singleLimit: { default: x.singleLimit },
24
24
  limit: {},
25
- disabled: { type: Boolean, default: (G = x) == null ? void 0 : G.disabled },
26
- hideInnerBeforeUploadLoading: { type: Boolean, default: (J = x) == null ? void 0 : J.hideInnerBeforeUploadLoading },
25
+ disabled: { type: Boolean, default: (K = x) == null ? void 0 : K.disabled },
26
+ hideInnerBeforeUploadLoading: { type: Boolean, default: (X = x) == null ? void 0 : X.hideInnerBeforeUploadLoading },
27
27
  checkOptions: {},
28
28
  compressorOptions: {},
29
29
  cropOptions: {},
@@ -33,31 +33,34 @@ const Ee = /* @__PURE__ */ ne({
33
33
  onBeforeUpload: {},
34
34
  onInnerBeforeUploadStart: {},
35
35
  onInnerBeforeUploadEnd: {}
36
- },
37
- emits: ["cropperImgLoad"],
38
- setup(B, { expose: K, emit: ge }) {
39
- const i = v([]), e = B, M = v(), X = v(), O = v(), g = v(
36
+ }, {
37
+ modelValue: { required: !0 },
38
+ modelModifiers: {}
39
+ }),
40
+ emits: /* @__PURE__ */ D(["cropperImgLoad"], ["update:modelValue"]),
41
+ setup(B, { expose: Y, emit: Ie }) {
42
+ const i = te(B, "modelValue"), e = B, C = m(), Z = m(), O = m(), g = m(
40
43
  []
41
- ), o = v(), c = v(), d = v(), Y = C(() => e.accept.map((a) => `.${a}`).join(",")), f = C(() => b([e.checkOptions, de]) || {}), p = C(() => b([e.compressorOptions, se]) || {}), y = C(() => b([e.cropOptions, ce]) || {}), Z = (a) => {
44
+ ), o = m(), c = m(), d = m(), _ = M(() => e.accept.map((a) => `.${a}`).join(",")), f = M(() => b([e.checkOptions, ce]) || {}), p = M(() => b([e.compressorOptions, fe]) || {}), y = M(() => b([e.cropOptions, ve]) || {}), A = (a) => {
42
45
  var t, u, s, r;
43
- const n = (r = (s = (u = (t = M.value) == null ? void 0 : t.$el) == null ? void 0 : u.querySelector) == null ? void 0 : s.call(u, "input")) == null ? void 0 : r.files;
46
+ const n = (r = (s = (u = (t = C.value) == null ? void 0 : t.$el) == null ? void 0 : u.querySelector) == null ? void 0 : s.call(u, "input")) == null ? void 0 : r.files;
44
47
  return n && n.length > 0 && (d.value = {
45
48
  selectCount: n.length
46
49
  }), e != null && e.onBeforeUpload ? e == null ? void 0 : e.onBeforeUpload(a) : d.value && (e != null && e.singleLimit) && d.value.selectCount > (e == null ? void 0 : e.singleLimit) ? (d.value.handleIndex === void 0 ? (d.value.handleIndex = 0, U.error(`单次最多可选择${e == null ? void 0 : e.singleLimit}张图片`)) : d.value.handleIndex += 1, d.value.handleIndex === d.value.selectCount - 1 && (d.value = void 0), !1) : new Promise(async (E, w) => {
47
50
  try {
48
- E(await le(a));
51
+ E(await ne(a));
49
52
  } catch {
50
53
  w();
51
54
  } finally {
52
55
  L();
53
56
  }
54
57
  });
55
- }, A = async (a) => {
58
+ }, R = async (a) => {
56
59
  const n = i.value.findIndex((t) => t.uid === a.uid);
57
60
  return i.value.splice(n, 1), i.value = [...i.value], !1;
58
- }, R = (a, n) => {
61
+ }, ee = (a, n) => {
59
62
  e != null && e.onExceed ? e == null || e.onExceed(a, n) : (U.error(`单次最多可选择${(e == null ? void 0 : e.limit) || 1}张图片`), i.value = a);
60
- }, ee = async (a) => {
63
+ }, ae = async (a) => {
61
64
  if (e != null && e.onSuccess)
62
65
  e == null || e.onSuccess(a);
63
66
  else {
@@ -69,18 +72,18 @@ const Ee = /* @__PURE__ */ ne({
69
72
  ...n
70
73
  } : i.value.splice(t, 1);
71
74
  }
72
- }, ae = (a) => {
75
+ }, le = (a) => {
73
76
  e != null && e.onError ? e == null || e.onError(a) : setTimeout(() => {
74
77
  const n = i.value.findIndex((t) => t.uid === a.uid);
75
78
  i.value.splice(n, 1);
76
79
  });
77
- }, le = (a) => new Promise((n, t) => {
80
+ }, ne = (a) => new Promise((n, t) => {
78
81
  g.value.push({ file: a, resolve: n, reject: t }), g.value.length === 1 && !o.value && L();
79
82
  }), L = () => {
80
83
  o.value === void 0 ? o.value = 0 : o.value + 1 >= g.value.length ? (o.value = void 0, g.value = []) : o.value += 1;
81
84
  };
82
- _(o, async () => {
83
- var E, w, S, $, F, z, j, k, Q, H, W, P, T, N, q, V;
85
+ G(o, async () => {
86
+ var E, w, S, $, F, z, j, k, Q, H, V, W, P, T, q, N;
84
87
  if (o.value === void 0 || g.value.length === 0)
85
88
  return;
86
89
  const a = g.value[o.value], { file: n, resolve: t, reject: u } = a;
@@ -93,9 +96,9 @@ const Ee = /* @__PURE__ */ ne({
93
96
  e,
94
97
  n,
95
98
  o.value,
96
- m.check
99
+ v.check
97
100
  );
98
- const l = await fe(n, n.name, {
101
+ const l = await me(n, n.name, {
99
102
  imageMaxSize: f.value.maxSize,
100
103
  imageAllowedType: f.value.allowedType,
101
104
  imageMinWidth: f.value.minWidth,
@@ -107,7 +110,7 @@ const Ee = /* @__PURE__ */ ne({
107
110
  e,
108
111
  n,
109
112
  o.value,
110
- m.check,
113
+ v.check,
111
114
  {
112
115
  success: l.success,
113
116
  error: l == null ? void 0 : l.error,
@@ -128,7 +131,7 @@ const Ee = /* @__PURE__ */ ne({
128
131
  e,
129
132
  n,
130
133
  o.value,
131
- m.crop
134
+ v.crop
132
135
  );
133
136
  try {
134
137
  (j = y.value) != null && j.customCrop ? r = await y.value.customCrop(r) : r = await new Promise((l, I) => {
@@ -137,7 +140,7 @@ const Ee = /* @__PURE__ */ ne({
137
140
  e,
138
141
  n,
139
142
  o.value,
140
- m.crop,
143
+ v.crop,
141
144
  {
142
145
  success: !1
143
146
  }
@@ -147,7 +150,7 @@ const Ee = /* @__PURE__ */ ne({
147
150
  e,
148
151
  n,
149
152
  o.value,
150
- m.crop,
153
+ v.crop,
151
154
  {
152
155
  success: !1,
153
156
  error: {
@@ -160,26 +163,26 @@ const Ee = /* @__PURE__ */ ne({
160
163
  O.value = void 0;
161
164
  }
162
165
  }
163
- if ((W = p.value) != null && W.enable) {
166
+ if ((V = p.value) != null && V.enable) {
164
167
  c.value = {
165
168
  loading: !0,
166
169
  text: `第${o.value + 1}张图片处理中,请稍等`
167
- }, (P = e == null ? void 0 : e.onInnerBeforeUploadStart) == null || P.call(
170
+ }, (W = e == null ? void 0 : e.onInnerBeforeUploadStart) == null || W.call(
168
171
  e,
169
172
  n,
170
173
  o.value,
171
- m.compress
174
+ v.compress
172
175
  );
173
- const l = await ve(r, {
176
+ const l = await ge(r, {
174
177
  maxSize: p.value.maxSize,
175
178
  size: p.value.size,
176
- excludeAllowedTypes: (T = p.value.excludeAllowedTypes) == null ? void 0 : T.map((I) => `image/${I}`)
179
+ excludeAllowedTypes: (P = p.value.excludeAllowedTypes) == null ? void 0 : P.map((I) => `image/${I}`)
177
180
  });
178
- if (c.value = void 0, (N = e == null ? void 0 : e.onInnerBeforeUploadEnd) == null || N.call(
181
+ if (c.value = void 0, (T = e == null ? void 0 : e.onInnerBeforeUploadEnd) == null || T.call(
179
182
  e,
180
183
  n,
181
184
  o.value,
182
- m.compress,
185
+ v.compress,
183
186
  {
184
187
  success: l.success,
185
188
  error: {
@@ -193,18 +196,18 @@ const Ee = /* @__PURE__ */ ne({
193
196
  type: l.file.type
194
197
  });
195
198
  }
196
- c.value = void 0, (V = e == null ? void 0 : e.onInnerBeforeUploadEnd) == null || V.call(
199
+ c.value = void 0, (N = e == null ? void 0 : e.onInnerBeforeUploadEnd) == null || N.call(
197
200
  e,
198
201
  n,
199
202
  o.value,
200
- m.all,
203
+ v.all,
201
204
  {
202
205
  success: !0
203
206
  }
204
207
  ), t(r);
205
208
  });
206
209
  let h;
207
- return _(
210
+ return G(
208
211
  () => c.value,
209
212
  () => {
210
213
  var a;
@@ -214,16 +217,16 @@ const Ee = /* @__PURE__ */ ne({
214
217
  duration: 0
215
218
  }) : (a = h == null ? void 0 : h.close) == null || a.call(h);
216
219
  }
217
- ), K({
218
- uploadInsRef: M,
219
- cropperInsRef: X
220
+ ), Y({
221
+ uploadInsRef: C,
222
+ cropperInsRef: Z
220
223
  }), (a, n) => {
221
- const t = oe("a-upload");
222
- return te(), ie("div", null, [
223
- ue(t, {
224
- class: re([`${me}-upload`]),
224
+ const t = ie("a-upload");
225
+ return ue(), re("div", null, [
226
+ de(t, {
227
+ class: se([`${he}-upload`]),
225
228
  ref_key: "uploadInsRef",
226
- ref: M,
229
+ ref: C,
227
230
  "list-type": "picture-card",
228
231
  tip: a.tip || "上传",
229
232
  "image-preview": "",
@@ -233,20 +236,20 @@ const Ee = /* @__PURE__ */ ne({
233
236
  headers: a.headers,
234
237
  data: a.data,
235
238
  name: a.name,
236
- accept: Y.value,
239
+ accept: _.value,
237
240
  multiple: a.multiple,
238
241
  limit: a.limit,
239
242
  disabled: a.disabled,
240
- "on-before-upload": Z,
241
- "on-before-remove": A,
242
- onExceedLimit: R,
243
- onSuccess: ee,
244
- onError: ae
243
+ "on-before-upload": A,
244
+ "on-before-remove": R,
245
+ onExceedLimit: ee,
246
+ onSuccess: ae,
247
+ onError: le
245
248
  }, null, 8, ["class", "tip", "file-list", "action", "headers", "data", "name", "accept", "multiple", "limit", "disabled"])
246
249
  ]);
247
250
  };
248
251
  }
249
252
  });
250
253
  export {
251
- Ee as default
254
+ Me as default
252
255
  };