@keyblade/pro-components 1.12.1-alpha.18 → 1.12.1-alpha.20
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.
- package/es/_virtual/_plugin-vue_export-helper.js +9 -0
- package/es/index.d.ts +0 -1
- package/es/index.js +20 -27
- package/es/pro-image-upload/constant.d.ts +0 -1
- package/es/pro-image-upload/cropper.vue.d.ts +20 -0
- package/es/pro-image-upload/cropper.vue.js +7 -0
- package/es/pro-image-upload/cropper.vue2.js +211 -0
- package/es/pro-image-upload/image-upload.vue.d.ts +38 -125
- package/es/pro-image-upload/image-upload.vue.js +155 -132
- package/es/pro-image-upload/index.d.ts +133 -268
- package/es/pro-image-upload/index.js +6 -6
- package/es/pro-image-upload/types.d.ts +0 -1
- package/es/pro-keep-alive-router-view/index.d.ts +0 -1
- package/es/pro-keep-alive-router-view/index.js +4 -4
- package/es/pro-keep-alive-router-view/pro-keep-alive-router-view.vue.d.ts +0 -1
- package/es/pro-layout/hooks.d.ts +0 -1
- package/es/pro-layout/index.d.ts +0 -1
- package/es/pro-layout/index.js +8 -8
- package/es/pro-layout/pro-layout.vue.d.ts +0 -1
- package/es/pro-layout/pro-layout.vue3.js +1 -1
- package/es/pro-menu/index.d.ts +0 -1
- package/es/pro-menu/index.js +5 -5
- package/es/pro-menu/pro-menu.vue.d.ts +0 -1
- package/es/pro-menu/pro-menu.vue3.js +1 -1
- package/es/pro-page-container/index.d.ts +1 -2
- package/es/pro-page-container/index.js +5 -5
- package/es/pro-page-container/pro-page-container.vue.d.ts +1 -2
- package/es/pro-page-container/pro-page-container.vue3.js +1 -1
- package/es/pro-page-header/index.d.ts +13 -14
- package/es/pro-page-header/index.js +8 -8
- package/es/pro-page-header/pro-page-header.vue.d.ts +5 -6
- package/es/pro-page-header/pro-page-header.vue3.js +1 -1
- package/es/pro-reuse-tabs/index.d.ts +1 -2
- package/es/pro-reuse-tabs/index.js +5 -5
- package/es/pro-reuse-tabs/pro-reuse-tabs.vue.d.ts +1 -2
- package/es/pro-reuse-tabs/pro-reuse-tabs.vue3.js +1 -1
- package/es/style.css +1 -1
- package/package.json +1 -1
- package/es/pro-layout/pro-layout.vue2.js +0 -1
- package/es/pro-menu/pro-menu.vue2.js +0 -1
- package/es/pro-page-container/pro-page-container.vue2.js +0 -1
- package/es/pro-page-header/pro-page-header.vue2.js +0 -1
- package/es/pro-reuse-tabs/pro-reuse-tabs.vue2.js +0 -1
package/es/index.d.ts
CHANGED
package/es/index.js
CHANGED
|
@@ -1,33 +1,26 @@
|
|
|
1
|
-
import { ProPageHeader as
|
|
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 {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
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 {
|
|
15
|
-
import {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
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
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
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
|
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ImageUploadCropOptions } from '@keyblade/one-travel';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
file: File;
|
|
4
|
+
index: number;
|
|
5
|
+
options: ImageUploadCropOptions;
|
|
6
|
+
};
|
|
7
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {
|
|
8
|
+
cropperInsRef: import('vue').Ref<any, any>;
|
|
9
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
10
|
+
cancel: () => any;
|
|
11
|
+
confirm: (value: File) => any;
|
|
12
|
+
imgLoad: (value: File) => any;
|
|
13
|
+
reUpload: (index: number) => any;
|
|
14
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
15
|
+
onCancel?: (() => any) | undefined;
|
|
16
|
+
onConfirm?: ((value: File) => any) | undefined;
|
|
17
|
+
onImgLoad?: ((value: File) => any) | undefined;
|
|
18
|
+
onReUpload?: ((index: number) => any) | undefined;
|
|
19
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
20
|
+
export default _default;
|
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
import { defineComponent as D, ref as d, watch as M, resolveComponent as l, openBlock as P, createBlock as q, normalizeClass as m, withCtx as n, createVNode as e, mergeProps as G, createElementVNode as y, createTextVNode as x, nextTick as h } from "vue";
|
|
2
|
+
import "vue-cropper/dist/index.css";
|
|
3
|
+
import J from "vue-cropper/lib/vue-cropper.vue";
|
|
4
|
+
const r = "keyblade-pro-image-upload-cropper", X = /* @__PURE__ */ D({
|
|
5
|
+
__name: "cropper",
|
|
6
|
+
props: {
|
|
7
|
+
file: {},
|
|
8
|
+
index: {},
|
|
9
|
+
options: {}
|
|
10
|
+
},
|
|
11
|
+
emits: ["cancel", "confirm", "imgLoad", "reUpload"],
|
|
12
|
+
setup(H, { expose: R, emit: W }) {
|
|
13
|
+
const s = H, f = W, o = d(), w = d(), u = d(!0), _ = d(!1), g = d({
|
|
14
|
+
autoCropWidth: 100,
|
|
15
|
+
autoCropHeight: 100
|
|
16
|
+
}), z = () => {
|
|
17
|
+
o.value.changeScale(1);
|
|
18
|
+
}, I = () => {
|
|
19
|
+
o.value.changeScale(-1);
|
|
20
|
+
}, L = () => {
|
|
21
|
+
o.value.rotateRight();
|
|
22
|
+
const { w: a, h: t } = v();
|
|
23
|
+
h(() => {
|
|
24
|
+
o.value.goAutoCrop(a, t);
|
|
25
|
+
});
|
|
26
|
+
}, $ = () => {
|
|
27
|
+
o.value.rotateLeft();
|
|
28
|
+
const { w: a, h: t } = v();
|
|
29
|
+
h(() => {
|
|
30
|
+
o.value.goAutoCrop(a, t);
|
|
31
|
+
});
|
|
32
|
+
}, N = () => {
|
|
33
|
+
o.value.reload(), o.value.rotateClear(), h(() => {
|
|
34
|
+
o.value.goAutoCrop();
|
|
35
|
+
});
|
|
36
|
+
}, b = () => {
|
|
37
|
+
f("cancel");
|
|
38
|
+
}, S = () => {
|
|
39
|
+
u.value || _.value || (_.value = !0, o.value.getCropBlob((a) => {
|
|
40
|
+
_.value = !1;
|
|
41
|
+
const t = new File([a], s.file.name, { type: "image/jpeg" });
|
|
42
|
+
f("confirm", t);
|
|
43
|
+
}));
|
|
44
|
+
}, A = () => {
|
|
45
|
+
u.value = !1;
|
|
46
|
+
const { w: a, h: t } = v();
|
|
47
|
+
g.value.autoCropWidth = a, g.value.autoCropHeight = t, f("imgLoad", s.file);
|
|
48
|
+
}, v = () => {
|
|
49
|
+
const a = Math.abs(o.value.rotate) % 2 > 0, t = (a ? o.value.trueHeight : o.value.trueWidth) * o.value.scale, i = (a ? o.value.trueWidth : o.value.trueHeight) * o.value.scale;
|
|
50
|
+
return { w: t, h: i };
|
|
51
|
+
};
|
|
52
|
+
return M(
|
|
53
|
+
() => s.file,
|
|
54
|
+
() => {
|
|
55
|
+
if (s.file) {
|
|
56
|
+
u.value = !0, o.value && o.value.clearCrop();
|
|
57
|
+
const a = new FileReader();
|
|
58
|
+
a.onloadend = () => {
|
|
59
|
+
const t = a.result, i = new Image();
|
|
60
|
+
i.onload = () => {
|
|
61
|
+
const C = i.width, c = i.height;
|
|
62
|
+
w.value = {
|
|
63
|
+
data: t,
|
|
64
|
+
width: C,
|
|
65
|
+
height: c
|
|
66
|
+
};
|
|
67
|
+
}, i.src = t;
|
|
68
|
+
}, a.readAsDataURL(s.file);
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
{ immediate: !0 }
|
|
72
|
+
), R({
|
|
73
|
+
cropperInsRef: o
|
|
74
|
+
}), (a, t) => {
|
|
75
|
+
const i = l("a-spin"), C = l("icon-zoom-in"), c = l("a-button"), p = l("a-tooltip"), B = l("icon-zoom-out"), V = l("icon-rotate-right"), E = l("icon-rotate-left"), F = l("icon-sync"), T = l("a-button-group"), U = l("a-space"), j = l("a-modal");
|
|
76
|
+
return P(), q(j, {
|
|
77
|
+
"render-to-body": "",
|
|
78
|
+
class: m(`${r}-dialog`),
|
|
79
|
+
title: "编辑图片",
|
|
80
|
+
width: "675px",
|
|
81
|
+
visible: !0,
|
|
82
|
+
footer: !1,
|
|
83
|
+
"mask-closable": !1,
|
|
84
|
+
"esc-to-close": !1,
|
|
85
|
+
"unmount-on-close": "",
|
|
86
|
+
onClose: b
|
|
87
|
+
}, {
|
|
88
|
+
default: n(() => [
|
|
89
|
+
e(i, {
|
|
90
|
+
class: m(`${r}-dialog-cropper-wrapper`),
|
|
91
|
+
loading: u.value
|
|
92
|
+
}, {
|
|
93
|
+
default: n(() => {
|
|
94
|
+
var k;
|
|
95
|
+
return [
|
|
96
|
+
e(J, G({
|
|
97
|
+
ref_key: "cropperInsRef",
|
|
98
|
+
ref: o,
|
|
99
|
+
class: `${r}-dialog-cropper`,
|
|
100
|
+
img: (k = w.value) == null ? void 0 : k.data,
|
|
101
|
+
info: !1,
|
|
102
|
+
autoCrop: !0,
|
|
103
|
+
autoCropWidth: g.value.autoCropWidth,
|
|
104
|
+
autoCropHeight: g.value.autoCropHeight,
|
|
105
|
+
full: !0
|
|
106
|
+
}, a.options, { onImgLoad: A }), null, 16, ["class", "img", "autoCropWidth", "autoCropHeight"])
|
|
107
|
+
];
|
|
108
|
+
}),
|
|
109
|
+
_: 1
|
|
110
|
+
}, 8, ["class", "loading"]),
|
|
111
|
+
y("div", {
|
|
112
|
+
class: m(`${r}-dialog-operate`)
|
|
113
|
+
}, [
|
|
114
|
+
e(T, { type: "primary" }, {
|
|
115
|
+
default: n(() => [
|
|
116
|
+
e(p, { content: "放大" }, {
|
|
117
|
+
default: n(() => [
|
|
118
|
+
e(c, { onClick: z }, {
|
|
119
|
+
icon: n(() => [
|
|
120
|
+
e(C)
|
|
121
|
+
]),
|
|
122
|
+
_: 1
|
|
123
|
+
})
|
|
124
|
+
]),
|
|
125
|
+
_: 1
|
|
126
|
+
}),
|
|
127
|
+
e(p, { content: "缩小" }, {
|
|
128
|
+
default: n(() => [
|
|
129
|
+
e(c, { onClick: I }, {
|
|
130
|
+
icon: n(() => [
|
|
131
|
+
e(B)
|
|
132
|
+
]),
|
|
133
|
+
_: 1
|
|
134
|
+
})
|
|
135
|
+
]),
|
|
136
|
+
_: 1
|
|
137
|
+
}),
|
|
138
|
+
e(p, { content: "向右旋转" }, {
|
|
139
|
+
default: n(() => [
|
|
140
|
+
e(c, { onClick: L }, {
|
|
141
|
+
icon: n(() => [
|
|
142
|
+
e(V)
|
|
143
|
+
]),
|
|
144
|
+
_: 1
|
|
145
|
+
})
|
|
146
|
+
]),
|
|
147
|
+
_: 1
|
|
148
|
+
}),
|
|
149
|
+
e(p, { content: "向左旋转" }, {
|
|
150
|
+
default: n(() => [
|
|
151
|
+
e(c, { onClick: $ }, {
|
|
152
|
+
icon: n(() => [
|
|
153
|
+
e(E)
|
|
154
|
+
]),
|
|
155
|
+
_: 1
|
|
156
|
+
})
|
|
157
|
+
]),
|
|
158
|
+
_: 1
|
|
159
|
+
}),
|
|
160
|
+
e(p, { content: "重置" }, {
|
|
161
|
+
default: n(() => [
|
|
162
|
+
e(c, { onClick: N }, {
|
|
163
|
+
icon: n(() => [
|
|
164
|
+
e(F)
|
|
165
|
+
]),
|
|
166
|
+
_: 1
|
|
167
|
+
})
|
|
168
|
+
]),
|
|
169
|
+
_: 1
|
|
170
|
+
})
|
|
171
|
+
]),
|
|
172
|
+
_: 1
|
|
173
|
+
})
|
|
174
|
+
], 2),
|
|
175
|
+
y("div", {
|
|
176
|
+
class: m(`${r}-dialog-footer`)
|
|
177
|
+
}, [
|
|
178
|
+
e(U, {
|
|
179
|
+
class: m(`${r}-dialog-footer-right`)
|
|
180
|
+
}, {
|
|
181
|
+
default: n(() => [
|
|
182
|
+
e(c, { onClick: b }, {
|
|
183
|
+
default: n(() => t[0] || (t[0] = [
|
|
184
|
+
x("取消")
|
|
185
|
+
])),
|
|
186
|
+
_: 1
|
|
187
|
+
}),
|
|
188
|
+
e(c, {
|
|
189
|
+
disabled: u.value,
|
|
190
|
+
type: "primary",
|
|
191
|
+
onClick: S,
|
|
192
|
+
loading: _.value
|
|
193
|
+
}, {
|
|
194
|
+
default: n(() => t[1] || (t[1] = [
|
|
195
|
+
x("确定")
|
|
196
|
+
])),
|
|
197
|
+
_: 1
|
|
198
|
+
}, 8, ["disabled", "loading"])
|
|
199
|
+
]),
|
|
200
|
+
_: 1
|
|
201
|
+
}, 8, ["class"])
|
|
202
|
+
], 2)
|
|
203
|
+
]),
|
|
204
|
+
_: 1
|
|
205
|
+
}, 8, ["class"]);
|
|
206
|
+
};
|
|
207
|
+
}
|
|
208
|
+
});
|
|
209
|
+
export {
|
|
210
|
+
X as default
|
|
211
|
+
};
|
|
@@ -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?: (
|
|
10
|
-
[key: string]: any;
|
|
8
|
+
handlerResponse?: (response: any) => Promise<{
|
|
11
9
|
/** 是否成功 */
|
|
12
10
|
success: boolean;
|
|
13
11
|
/** 图片地址 */
|
|
14
|
-
url?: string
|
|
12
|
+
url?: string;
|
|
15
13
|
/** 错误消息(如果不传,请自行提示错误消息) */
|
|
16
|
-
errorMessage?: string
|
|
17
|
-
|
|
14
|
+
errorMessage?: string;
|
|
15
|
+
/** 其他字段 */
|
|
16
|
+
[key: string]: any;
|
|
17
|
+
}>;
|
|
18
18
|
/** 设置上传的请求头部 */
|
|
19
|
-
headers?: Record<string, any
|
|
19
|
+
headers?: Record<string, any>;
|
|
20
20
|
/** 上传时附带的额外参数 */
|
|
21
|
-
data?: Record<string, any
|
|
21
|
+
data?: Record<string, any>;
|
|
22
22
|
/** 上传的文件字段名 - 默认: file */
|
|
23
|
-
name?: string
|
|
23
|
+
name?: string;
|
|
24
24
|
/** 提示文字 */
|
|
25
|
-
tip?: string
|
|
25
|
+
tip?: string;
|
|
26
26
|
/** 接受上传的文件类型 - 默认: ['jpg', 'jpeg', 'png', 'bmp', 'heif', 'heic', 'gif', 'webp'] */
|
|
27
|
-
accept?: string[]
|
|
27
|
+
accept?: string[];
|
|
28
28
|
/** 是否支持多选文件 - 默认: true */
|
|
29
|
-
multiple?: boolean
|
|
29
|
+
multiple?: boolean;
|
|
30
30
|
/** 单次最大限制 - 默认: 10 */
|
|
31
|
-
singleLimit?: number
|
|
31
|
+
singleLimit?: number;
|
|
32
32
|
/** 最大允许上传个数 */
|
|
33
|
-
limit?: number
|
|
33
|
+
limit?: number;
|
|
34
34
|
/** 是否禁用 - 默认: false */
|
|
35
|
-
disabled?: boolean
|
|
35
|
+
disabled?: boolean;
|
|
36
36
|
/** 隐藏内置上传文件之前的loading效果 - 默认: false */
|
|
37
|
-
hideInnerBeforeUploadLoading?: boolean
|
|
37
|
+
hideInnerBeforeUploadLoading?: boolean;
|
|
38
38
|
/** 校验选项 */
|
|
39
|
-
checkOptions?: ImageUploadCheckOptions
|
|
39
|
+
checkOptions?: ImageUploadCheckOptions;
|
|
40
40
|
/** 压缩选项 */
|
|
41
|
-
compressorOptions?: ImageUploadCompressorOptions
|
|
41
|
+
compressorOptions?: ImageUploadCompressorOptions;
|
|
42
42
|
/** 剪裁选项 */
|
|
43
|
-
cropOptions?: ImageUploadCropOptions
|
|
43
|
+
cropOptions?: ImageUploadCropOptions;
|
|
44
44
|
/** 文件列表移除文件时的钩子 */
|
|
45
45
|
/** 文件上传成功时的钩子 */
|
|
46
|
-
onSuccess?: (
|
|
46
|
+
onSuccess?: (fileItem: FileItem) => void;
|
|
47
47
|
/** 文件上传失败时的钩子 */
|
|
48
|
-
onError?: (
|
|
48
|
+
onError?: (fileItem: FileItem) => void;
|
|
49
49
|
/** 文件超出个数限制时的钩子 */
|
|
50
|
-
onExceed?: (
|
|
50
|
+
onExceed?: (fileList: FileItem[], files: File[]) => void;
|
|
51
51
|
/** 上传文件之前的钩子,参数为上传的文件,若返回 false 或者返回 Promise 且被 reject,则停止上传。*/
|
|
52
|
-
onBeforeUpload?: (
|
|
52
|
+
onBeforeUpload?: (file: File) => boolean | Promise<any>;
|
|
53
53
|
/** 内置上传文件之前开始 */
|
|
54
|
-
onInnerBeforeUploadStart?: (
|
|
54
|
+
onInnerBeforeUploadStart?: (file: File, index: number, type: EImageUploadInnerBeforeUploadStep) => void;
|
|
55
55
|
/** 内置上传文件之前结束 */
|
|
56
|
-
onInnerBeforeUploadEnd?: (
|
|
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
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
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
|
-
|
|
554
|
-
}
|
|
555
|
-
|
|
556
|
-
|
|
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,
|
|
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
|
-
} & {};
|