@keyblade/pro-components 1.13.1 → 1.13.3
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/pro-date-range-picker/index.d.ts +9 -9
- package/es/pro-date-range-picker/pro-date-range-picker.vue.d.ts +4 -4
- package/es/pro-date-range-picker/pro-date-range-picker.vue.js +2 -2
- package/es/pro-image-upload/image-upload.vue.d.ts +4 -1
- package/es/pro-image-upload/image-upload.vue.js +35 -33
- package/es/pro-image-upload/index.d.ts +9 -3
- package/es/pro-image-upload/types.d.ts +19 -1
- package/es/style.css +1 -1
- package/package.json +1 -1
|
@@ -8,19 +8,19 @@ declare const ProDateRangePicker: {
|
|
|
8
8
|
endPlaceholder?: string;
|
|
9
9
|
separator?: string;
|
|
10
10
|
hideLabel?: boolean;
|
|
11
|
-
formItemProps?:
|
|
12
|
-
datePickerProps?:
|
|
11
|
+
formItemProps?: import('@arco-design/web-vue').FormItemInstance;
|
|
12
|
+
datePickerProps?: import('@arco-design/web-vue').DatePickerInstance;
|
|
13
13
|
}> & Readonly<{
|
|
14
14
|
"onUpdate:modelValue"?: ((value: import('./type').IModelValue) => any) | undefined;
|
|
15
15
|
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
16
16
|
"update:modelValue": (value: import('./type').IModelValue) => any;
|
|
17
17
|
}, import('vue').PublicProps, {
|
|
18
|
+
hideLabel: boolean;
|
|
18
19
|
startField: string;
|
|
19
20
|
endField: string;
|
|
20
21
|
startPlaceholder: string;
|
|
21
22
|
endPlaceholder: string;
|
|
22
23
|
separator: string;
|
|
23
|
-
hideLabel: boolean;
|
|
24
24
|
}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
|
|
25
25
|
startDatePickerRef: unknown;
|
|
26
26
|
endDatePickerRef: unknown;
|
|
@@ -39,17 +39,17 @@ declare const ProDateRangePicker: {
|
|
|
39
39
|
endPlaceholder?: string;
|
|
40
40
|
separator?: string;
|
|
41
41
|
hideLabel?: boolean;
|
|
42
|
-
formItemProps?:
|
|
43
|
-
datePickerProps?:
|
|
42
|
+
formItemProps?: import('@arco-design/web-vue').FormItemInstance;
|
|
43
|
+
datePickerProps?: import('@arco-design/web-vue').DatePickerInstance;
|
|
44
44
|
}> & Readonly<{
|
|
45
45
|
"onUpdate:modelValue"?: ((value: import('./type').IModelValue) => any) | undefined;
|
|
46
46
|
}>, {}, {}, {}, {}, {
|
|
47
|
+
hideLabel: boolean;
|
|
47
48
|
startField: string;
|
|
48
49
|
endField: string;
|
|
49
50
|
startPlaceholder: string;
|
|
50
51
|
endPlaceholder: string;
|
|
51
52
|
separator: string;
|
|
52
|
-
hideLabel: boolean;
|
|
53
53
|
}>;
|
|
54
54
|
__isFragment?: never;
|
|
55
55
|
__isTeleport?: never;
|
|
@@ -62,19 +62,19 @@ declare const ProDateRangePicker: {
|
|
|
62
62
|
endPlaceholder?: string;
|
|
63
63
|
separator?: string;
|
|
64
64
|
hideLabel?: boolean;
|
|
65
|
-
formItemProps?:
|
|
66
|
-
datePickerProps?:
|
|
65
|
+
formItemProps?: import('@arco-design/web-vue').FormItemInstance;
|
|
66
|
+
datePickerProps?: import('@arco-design/web-vue').DatePickerInstance;
|
|
67
67
|
}> & Readonly<{
|
|
68
68
|
"onUpdate:modelValue"?: ((value: import('./type').IModelValue) => any) | undefined;
|
|
69
69
|
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
70
70
|
"update:modelValue": (value: import('./type').IModelValue) => any;
|
|
71
71
|
}, string, {
|
|
72
|
+
hideLabel: boolean;
|
|
72
73
|
startField: string;
|
|
73
74
|
endField: string;
|
|
74
75
|
startPlaceholder: string;
|
|
75
76
|
endPlaceholder: string;
|
|
76
77
|
separator: string;
|
|
77
|
-
hideLabel: boolean;
|
|
78
78
|
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & {
|
|
79
79
|
install: (app: App) => void;
|
|
80
80
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IModelValue } from './type.ts';
|
|
2
|
-
import {
|
|
2
|
+
import { DatePickerInstance, FormItemInstance } from '@arco-design/web-vue';
|
|
3
3
|
type __VLS_Props = {
|
|
4
4
|
modelValue: IModelValue;
|
|
5
5
|
startField?: string;
|
|
@@ -8,20 +8,20 @@ type __VLS_Props = {
|
|
|
8
8
|
endPlaceholder?: string;
|
|
9
9
|
separator?: string;
|
|
10
10
|
hideLabel?: boolean;
|
|
11
|
-
formItemProps?:
|
|
12
|
-
datePickerProps?:
|
|
11
|
+
formItemProps?: FormItemInstance;
|
|
12
|
+
datePickerProps?: DatePickerInstance;
|
|
13
13
|
};
|
|
14
14
|
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
15
15
|
"update:modelValue": (value: IModelValue) => any;
|
|
16
16
|
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
17
17
|
"onUpdate:modelValue"?: ((value: IModelValue) => any) | undefined;
|
|
18
18
|
}>, {
|
|
19
|
+
hideLabel: boolean;
|
|
19
20
|
startField: string;
|
|
20
21
|
endField: string;
|
|
21
22
|
startPlaceholder: string;
|
|
22
23
|
endPlaceholder: string;
|
|
23
24
|
separator: string;
|
|
24
|
-
hideLabel: boolean;
|
|
25
25
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
26
26
|
startDatePickerRef: unknown;
|
|
27
27
|
endDatePickerRef: unknown;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./pro-date-range-picker.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
const _ = /* @__PURE__ */
|
|
3
|
+
import r from "../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const _ = /* @__PURE__ */ r(o, [["__scopeId", "data-v-0382c1f4"]]);
|
|
5
5
|
export {
|
|
6
6
|
_ as default
|
|
7
7
|
};
|
|
@@ -31,6 +31,8 @@ type __VLS_Props = {
|
|
|
31
31
|
singleLimit?: number;
|
|
32
32
|
/** 最大允许上传个数 */
|
|
33
33
|
limit?: number;
|
|
34
|
+
/** 文件超出个数限制时的提示文字 */
|
|
35
|
+
exceedTip?: string;
|
|
34
36
|
/** 是否禁用 - 默认: false */
|
|
35
37
|
disabled?: boolean;
|
|
36
38
|
/** 隐藏内置上传文件之前的loading效果 - 默认: false */
|
|
@@ -597,6 +599,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps,
|
|
|
597
599
|
listType: import('@arco-design/web-vue/es/upload/interfaces').ListType;
|
|
598
600
|
}> | undefined>;
|
|
599
601
|
cropperInsRef: import('vue').Ref<any, any>;
|
|
602
|
+
isUploadComplete: import('vue').ComputedRef<boolean>;
|
|
600
603
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
601
604
|
"update:modelValue": (value: FileItem[]) => any;
|
|
602
605
|
} & {
|
|
@@ -607,9 +610,9 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps,
|
|
|
607
610
|
}>, {
|
|
608
611
|
name: string;
|
|
609
612
|
accept: string[];
|
|
613
|
+
disabled: boolean;
|
|
610
614
|
multiple: boolean;
|
|
611
615
|
singleLimit: number;
|
|
612
|
-
disabled: boolean;
|
|
613
616
|
hideInnerBeforeUploadLoading: boolean;
|
|
614
617
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
615
618
|
uploadInsRef: unknown;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as ge, mergeModels as J, useSlots as pe, useModel as he, ref as m, computed as w, watch as K, resolveComponent as Ie, createElementBlock as xe, openBlock as X, createVNode as Ue, createBlock as ye, createCommentVNode as Ce, normalizeClass as Be, createSlots as we, withCtx as Y, unref as Z, renderSlot as A } 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
|
|
7
|
-
import { defaultImageUploadCheckOptions as
|
|
8
|
-
const
|
|
6
|
+
import Ee from "./cropper.vue.js";
|
|
7
|
+
import { defaultImageUploadCheckOptions as Me, defaultImageUploadCompressorOptions as Se, defaultImageUploadCropOptions as be, oneTravelImageCheckAndTransform as Le, oneTravelImageCompressor as Oe } from "@keyblade/one-travel";
|
|
8
|
+
const $e = "keyblade-pro-image-upload";
|
|
9
9
|
var R, _, ee;
|
|
10
|
-
const He = /* @__PURE__ */
|
|
10
|
+
const He = /* @__PURE__ */ ge({
|
|
11
11
|
__name: "image-upload",
|
|
12
12
|
props: /* @__PURE__ */ J({
|
|
13
13
|
action: {},
|
|
@@ -23,6 +23,7 @@ const He = /* @__PURE__ */ me({
|
|
|
23
23
|
multiple: { type: Boolean, default: U.multiple },
|
|
24
24
|
singleLimit: { default: U.singleLimit },
|
|
25
25
|
limit: {},
|
|
26
|
+
exceedTip: {},
|
|
26
27
|
disabled: { type: Boolean, default: (_ = U) == null ? void 0 : _.disabled },
|
|
27
28
|
hideInnerBeforeUploadLoading: { type: Boolean, default: (ee = U) == null ? void 0 : ee.hideInnerBeforeUploadLoading },
|
|
28
29
|
checkOptions: {},
|
|
@@ -40,18 +41,16 @@ const He = /* @__PURE__ */ me({
|
|
|
40
41
|
}),
|
|
41
42
|
emits: /* @__PURE__ */ J(["cropperImgLoad"], ["update:modelValue"]),
|
|
42
43
|
setup(y, { expose: ae, emit: le }) {
|
|
43
|
-
const O =
|
|
44
|
-
[]
|
|
45
|
-
), 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) => {
|
|
44
|
+
const O = pe(), r = he(y, "modelValue"), e = y, oe = le, S = m(), $ = m(), p = m(), h = m([]), n = m(), c = m(), s = m(), ne = w(() => e.accept.map((a) => `.${a}`).join(",")), f = w(() => L([e.checkOptions, Me]) || {}), C = w(() => L([e.compressorOptions, Se]) || {}), B = w(() => L([e.cropOptions, be]) || {}), te = (a) => {
|
|
46
45
|
var t, u, d, i;
|
|
47
46
|
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;
|
|
48
47
|
return l && l.length > 0 && (s.value = {
|
|
49
48
|
selectCount: l.length
|
|
50
|
-
}), 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 (
|
|
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) => {
|
|
51
50
|
try {
|
|
52
|
-
|
|
51
|
+
E(await se(a));
|
|
53
52
|
} catch {
|
|
54
|
-
|
|
53
|
+
M();
|
|
55
54
|
} finally {
|
|
56
55
|
k();
|
|
57
56
|
}
|
|
@@ -60,7 +59,7 @@ const He = /* @__PURE__ */ me({
|
|
|
60
59
|
const l = r.value.findIndex((t) => t.uid === a.uid);
|
|
61
60
|
return r.value.splice(l, 1), r.value = [...r.value], !1;
|
|
62
61
|
}, re = (a, l) => {
|
|
63
|
-
e != null && e.onExceed ? e == null || e.onExceed(a, l) : (g.error(
|
|
62
|
+
e != null && e.onExceed ? e == null || e.onExceed(a, l) : (g.error(e.exceedTip ?? `超过数量上限,最多上传${(e == null ? void 0 : e.limit) || 1}张`), r.value = a);
|
|
64
63
|
}, ue = async (a) => {
|
|
65
64
|
if (e != null && e.onSuccess)
|
|
66
65
|
e == null || e.onSuccess(a);
|
|
@@ -92,22 +91,22 @@ const He = /* @__PURE__ */ me({
|
|
|
92
91
|
oe("cropperImgLoad", a);
|
|
93
92
|
};
|
|
94
93
|
K(n, async () => {
|
|
95
|
-
var
|
|
94
|
+
var E, M, b, F, z, j, Q, T, V, W, H, N, P, q, D, G;
|
|
96
95
|
if (n.value === void 0 || h.value.length === 0)
|
|
97
96
|
return;
|
|
98
97
|
const a = h.value[n.value], { file: l, resolve: t, reject: u } = a;
|
|
99
98
|
let d = l.name, i = l;
|
|
100
|
-
if ((
|
|
99
|
+
if ((E = f.value) != null && E.enable) {
|
|
101
100
|
c.value = {
|
|
102
101
|
loading: !0,
|
|
103
102
|
text: `第${n.value + 1}张图片检测中,请稍等`
|
|
104
|
-
}, (
|
|
103
|
+
}, (M = e == null ? void 0 : e.onInnerBeforeUploadStart) == null || M.call(
|
|
105
104
|
e,
|
|
106
105
|
l,
|
|
107
106
|
n.value,
|
|
108
107
|
v.check
|
|
109
108
|
);
|
|
110
|
-
const o = await
|
|
109
|
+
const o = await Le(l, l.name, {
|
|
111
110
|
imageMaxSize: f.value.maxSize,
|
|
112
111
|
imageAllowedType: f.value.allowedType,
|
|
113
112
|
imageMinWidth: f.value.minWidth,
|
|
@@ -145,7 +144,7 @@ const He = /* @__PURE__ */ me({
|
|
|
145
144
|
try {
|
|
146
145
|
(Q = B.value) != null && Q.customCrop ? i = await B.value.customCrop(i) : i = await new Promise((o, x) => {
|
|
147
146
|
p.value = { file: i, resolve: o, reject: x };
|
|
148
|
-
}), (
|
|
147
|
+
}), (T = e == null ? void 0 : e.onInnerBeforeUploadEnd) == null || T.call(
|
|
149
148
|
e,
|
|
150
149
|
l,
|
|
151
150
|
n.value,
|
|
@@ -155,7 +154,7 @@ const He = /* @__PURE__ */ me({
|
|
|
155
154
|
}
|
|
156
155
|
);
|
|
157
156
|
} catch {
|
|
158
|
-
return (
|
|
157
|
+
return (V = e == null ? void 0 : e.onInnerBeforeUploadEnd) == null || V.call(
|
|
159
158
|
e,
|
|
160
159
|
l,
|
|
161
160
|
n.value,
|
|
@@ -167,25 +166,25 @@ const He = /* @__PURE__ */ me({
|
|
|
167
166
|
},
|
|
168
167
|
errorMessage: "图片剪裁失败"
|
|
169
168
|
}
|
|
170
|
-
), (
|
|
169
|
+
), (W = B.value) != null && W.showErrorMessage && g.error("图片剪裁失败"), u();
|
|
171
170
|
} finally {
|
|
172
171
|
p.value = void 0;
|
|
173
172
|
}
|
|
174
173
|
}
|
|
175
|
-
if ((
|
|
174
|
+
if ((H = C.value) != null && H.enable) {
|
|
176
175
|
c.value = {
|
|
177
176
|
loading: !0,
|
|
178
177
|
text: `第${n.value + 1}张图片处理中,请稍等`
|
|
179
|
-
}, (
|
|
178
|
+
}, (N = e == null ? void 0 : e.onInnerBeforeUploadStart) == null || N.call(
|
|
180
179
|
e,
|
|
181
180
|
l,
|
|
182
181
|
n.value,
|
|
183
182
|
v.compress
|
|
184
183
|
);
|
|
185
|
-
const o = await
|
|
184
|
+
const o = await Oe(i, {
|
|
186
185
|
maxSize: C.value.maxSize,
|
|
187
186
|
size: C.value.size,
|
|
188
|
-
excludeAllowedTypes: (
|
|
187
|
+
excludeAllowedTypes: (P = C.value.excludeAllowedTypes) == null ? void 0 : P.map((x) => `image/${x}`)
|
|
189
188
|
});
|
|
190
189
|
if (c.value = void 0, (q = e == null ? void 0 : e.onInnerBeforeUploadEnd) == null || q.call(
|
|
191
190
|
e,
|
|
@@ -216,7 +215,7 @@ const He = /* @__PURE__ */ me({
|
|
|
216
215
|
), t(i);
|
|
217
216
|
});
|
|
218
217
|
let I;
|
|
219
|
-
|
|
218
|
+
K(
|
|
220
219
|
() => c.value,
|
|
221
220
|
() => {
|
|
222
221
|
var a;
|
|
@@ -226,15 +225,18 @@ const He = /* @__PURE__ */ me({
|
|
|
226
225
|
duration: 0
|
|
227
226
|
}) : (a = I == null ? void 0 : I.close) == null || a.call(I);
|
|
228
227
|
}
|
|
229
|
-
)
|
|
228
|
+
);
|
|
229
|
+
const me = w(() => r.value.every((a) => a.status && ["done", "error"].includes(a.status)));
|
|
230
|
+
return ae({
|
|
230
231
|
uploadInsRef: S,
|
|
231
|
-
cropperInsRef:
|
|
232
|
+
cropperInsRef: $,
|
|
233
|
+
isUploadComplete: me
|
|
232
234
|
}), (a, l) => {
|
|
233
235
|
var u, d;
|
|
234
|
-
const t =
|
|
235
|
-
return X(),
|
|
236
|
-
|
|
237
|
-
class:
|
|
236
|
+
const t = Ie("a-upload");
|
|
237
|
+
return X(), xe("div", null, [
|
|
238
|
+
Ue(t, {
|
|
239
|
+
class: Be([`${$e}-upload`]),
|
|
238
240
|
ref_key: "uploadInsRef",
|
|
239
241
|
ref: S,
|
|
240
242
|
"list-type": "picture-card",
|
|
@@ -255,7 +257,7 @@ const He = /* @__PURE__ */ me({
|
|
|
255
257
|
onExceedLimit: re,
|
|
256
258
|
onSuccess: ue,
|
|
257
259
|
onError: de
|
|
258
|
-
},
|
|
260
|
+
}, we({ _: 2 }, [
|
|
259
261
|
(u = Z(O)) != null && u.image ? {
|
|
260
262
|
name: "image",
|
|
261
263
|
fn: Y(({ fileItem: i }) => [
|
|
@@ -271,7 +273,7 @@ const He = /* @__PURE__ */ me({
|
|
|
271
273
|
key: "1"
|
|
272
274
|
} : void 0
|
|
273
275
|
]), 1032, ["class", "tip", "file-list", "action", "headers", "data", "name", "accept", "multiple", "limit", "disabled"]),
|
|
274
|
-
p.value && n.value !== void 0 ? (X(),
|
|
276
|
+
p.value && n.value !== void 0 ? (X(), ye(Ee, {
|
|
275
277
|
key: 0,
|
|
276
278
|
ref_key: "cropperInsRef",
|
|
277
279
|
ref: $,
|
|
@@ -281,7 +283,7 @@ const He = /* @__PURE__ */ me({
|
|
|
281
283
|
onCancel: ce,
|
|
282
284
|
onConfirm: fe,
|
|
283
285
|
onImgLoad: ve
|
|
284
|
-
}, null, 8, ["file", "index", "options"])) :
|
|
286
|
+
}, null, 8, ["file", "index", "options"])) : Ce("", !0)
|
|
285
287
|
]);
|
|
286
288
|
};
|
|
287
289
|
}
|
|
@@ -18,6 +18,7 @@ declare const ProImageUpload: {
|
|
|
18
18
|
multiple?: boolean;
|
|
19
19
|
singleLimit?: number;
|
|
20
20
|
limit?: number;
|
|
21
|
+
exceedTip?: string;
|
|
21
22
|
disabled?: boolean;
|
|
22
23
|
hideInnerBeforeUploadLoading?: boolean;
|
|
23
24
|
checkOptions?: import('@keyblade/one-travel').ImageUploadCheckOptions;
|
|
@@ -520,6 +521,7 @@ declare const ProImageUpload: {
|
|
|
520
521
|
listType: import('@arco-design/web-vue/es/upload/interfaces').ListType;
|
|
521
522
|
}> | undefined>;
|
|
522
523
|
cropperInsRef: import('vue').Ref<any, any>;
|
|
524
|
+
isUploadComplete: import('vue').ComputedRef<boolean>;
|
|
523
525
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
524
526
|
"update:modelValue": (value: import('@arco-design/web-vue').FileItem[]) => any;
|
|
525
527
|
} & {
|
|
@@ -527,9 +529,9 @@ declare const ProImageUpload: {
|
|
|
527
529
|
}, import('vue').PublicProps, {
|
|
528
530
|
name: string;
|
|
529
531
|
accept: string[];
|
|
532
|
+
disabled: boolean;
|
|
530
533
|
multiple: boolean;
|
|
531
534
|
singleLimit: number;
|
|
532
|
-
disabled: boolean;
|
|
533
535
|
hideInnerBeforeUploadLoading: boolean;
|
|
534
536
|
}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
|
|
535
537
|
uploadInsRef: unknown;
|
|
@@ -595,6 +597,7 @@ declare const ProImageUpload: {
|
|
|
595
597
|
multiple?: boolean;
|
|
596
598
|
singleLimit?: number;
|
|
597
599
|
limit?: number;
|
|
600
|
+
exceedTip?: string;
|
|
598
601
|
disabled?: boolean;
|
|
599
602
|
hideInnerBeforeUploadLoading?: boolean;
|
|
600
603
|
checkOptions?: import('@keyblade/one-travel').ImageUploadCheckOptions;
|
|
@@ -1097,12 +1100,13 @@ declare const ProImageUpload: {
|
|
|
1097
1100
|
listType: import('@arco-design/web-vue/es/upload/interfaces').ListType;
|
|
1098
1101
|
}> | undefined>;
|
|
1099
1102
|
cropperInsRef: import('vue').Ref<any, any>;
|
|
1103
|
+
isUploadComplete: import('vue').ComputedRef<boolean>;
|
|
1100
1104
|
}, {}, {}, {}, {
|
|
1101
1105
|
name: string;
|
|
1102
1106
|
accept: string[];
|
|
1107
|
+
disabled: boolean;
|
|
1103
1108
|
multiple: boolean;
|
|
1104
1109
|
singleLimit: number;
|
|
1105
|
-
disabled: boolean;
|
|
1106
1110
|
hideInnerBeforeUploadLoading: boolean;
|
|
1107
1111
|
}>;
|
|
1108
1112
|
__isFragment?: never;
|
|
@@ -1126,6 +1130,7 @@ declare const ProImageUpload: {
|
|
|
1126
1130
|
multiple?: boolean;
|
|
1127
1131
|
singleLimit?: number;
|
|
1128
1132
|
limit?: number;
|
|
1133
|
+
exceedTip?: string;
|
|
1129
1134
|
disabled?: boolean;
|
|
1130
1135
|
hideInnerBeforeUploadLoading?: boolean;
|
|
1131
1136
|
checkOptions?: import('@keyblade/one-travel').ImageUploadCheckOptions;
|
|
@@ -1628,6 +1633,7 @@ declare const ProImageUpload: {
|
|
|
1628
1633
|
listType: import('@arco-design/web-vue/es/upload/interfaces').ListType;
|
|
1629
1634
|
}> | undefined>;
|
|
1630
1635
|
cropperInsRef: import('vue').Ref<any, any>;
|
|
1636
|
+
isUploadComplete: import('vue').ComputedRef<boolean>;
|
|
1631
1637
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
1632
1638
|
"update:modelValue": (value: import('@arco-design/web-vue').FileItem[]) => any;
|
|
1633
1639
|
} & {
|
|
@@ -1635,9 +1641,9 @@ declare const ProImageUpload: {
|
|
|
1635
1641
|
}, string, {
|
|
1636
1642
|
name: string;
|
|
1637
1643
|
accept: string[];
|
|
1644
|
+
disabled: boolean;
|
|
1638
1645
|
multiple: boolean;
|
|
1639
1646
|
singleLimit: number;
|
|
1640
|
-
disabled: boolean;
|
|
1641
1647
|
hideInnerBeforeUploadLoading: boolean;
|
|
1642
1648
|
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
|
1643
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,
|
|
@@ -36,6 +36,8 @@ export interface ImageUploadOptions {
|
|
|
36
36
|
singleLimit?: number;
|
|
37
37
|
/** 最大允许上传个数 */
|
|
38
38
|
limit?: number;
|
|
39
|
+
/** 文件超出个数限制时的提示文字 */
|
|
40
|
+
exceedTip?: string;
|
|
39
41
|
/** 是否禁用 - 默认: false */
|
|
40
42
|
disabled?: boolean;
|
|
41
43
|
/** 隐藏内置上传文件之前的loading效果 - 默认: false */
|
|
@@ -73,3 +75,19 @@ export interface ImageUploadOptions {
|
|
|
73
75
|
errorMessage?: string;
|
|
74
76
|
}) => void;
|
|
75
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/es/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.keyblade-pro-page-header{background:var(--color-bg-2);padding:16px 32px}.keyblade-pro-page-header .keyblade-pro-page-header-section-breadcrumb .arco-breadcrumb-item:first-child{padding-left:0}.keyblade-pro-page-header .keyblade-pro-page-header-title.arco-typography{padding-top:4px;margin-top:0}.keyblade-pro-layout{width:100%;height:100%}.keyblade-pro-layout .keyblade-pro-layout-header{position:fixed;top:0;left:0;width:100%;height:var(--4a477a1a);z-index:100;display:flex;align-items:center;justify-content:space-between;padding:0 20px;background-color:var(--color-bg-2);border-bottom:1px solid var(--color-border);transition:all .2s cubic-bezier(.34,.69,.1,1)}.keyblade-pro-layout .keyblade-pro-layout-header-left{cursor:pointer;display:flex;align-items:center}.keyblade-pro-layout .keyblade-pro-layout-header-left-logo-img{width:28px;height:28px}.keyblade-pro-layout .keyblade-pro-layout-header-left-logo-title.arco-typography{margin:0;font-size:18px}.keyblade-pro-layout .keyblade-pro-layout-header-center{flex:1}.keyblade-pro-layout .keyblade-pro-layout-sider{padding-top:var(--4a477a1a);position:fixed;top:0;left:0;z-index:99;height:100%;transition:all .2s cubic-bezier(.34,.69,.1,1)}.keyblade-pro-layout .keyblade-pro-layout-sider-content{position:relative;height:100%;overflow:auto}.keyblade-pro-layout .keyblade-pro-layout-sider-collapse-btn.arco-btn{position:absolute;right:12px;bottom:12px}.keyblade-pro-layout .keyblade-pro-layout-body{padding-top:var(--4a477a1a);padding-left:var(--3599ef93);min-height:100vh;overflow-y:hidden;background-color:var(--color-fill-2);transition:padding .2s cubic-bezier(.34,.69,.1,1)}.keyblade-pro-layout .keyblade-pro-layout-body-hide-sider{padding-left:0}.keyblade-pro-layout .keyblade-pro-layout-body-affix .arco-affix{z-index:98}.keyblade-pro-layout .keyblade-pro-layout-body-footer{display:flex;align-items:center;justify-content:center;height:40px;color:var(--color-text-2);text-align:center}.keyblade-pro-layout .keyblade-pro-layout-body-collapsed{padding-left:var(--5b478c92)}.keyblade-pro-layout-side .keyblade-pro-layout-header{z-index:98;left:var(--3599ef93);width:calc(100% - var(--3599ef93))}.keyblade-pro-layout-side .keyblade-pro-layout-header-collapsed{left:var(--5b478c92);width:calc(100% - var(--5b478c92))}.keyblade-pro-layout-side .keyblade-pro-layout-sider{padding-top:0}.keyblade-pro-layout-side .keyblade-pro-layout-sider-content-logo{position:relative;display:flex;align-items:center;padding:16px;cursor:pointer;transition:padding .3s cubic-bezier(.645,.045,.355,1)}.keyblade-pro-layout-side .keyblade-pro-layout-sider-content-logo-img{width:28px;height:28px}.keyblade-pro-layout-side .keyblade-pro-layout-sider-content-logo-title.arco-typography{margin:0;font-size:18px}.keyblade-pro-layout-side .keyblade-pro-layout-sider-collapsed .keyblade-pro-layout-sider-content-logo{padding:16px 10px}.keyblade-pro-menu .keyblade-pro-menu-item-img{width:14px;height:auto}.keyblade-pro-reuse-tabs{position:relative;background-color:var(--color-bg-2);padding:4px 20px}.keyblade-pro-page-container .keyblade-pro-page-container-content{padding:20px}.keyblade-pro-image-upload-cropper-dialog-cropper-wrapper[data-v-1bddf267]{width:100%;height:400px}.keyblade-pro-image-upload-cropper-dialog-operate[data-v-1bddf267]{margin-top:24px;display:flex;align-items:center;justify-content:center}.keyblade-pro-image-upload-cropper-dialog-footer[data-v-1bddf267]{margin-top:24px;display:flex;align-items:center;justify-content:flex-end}.keyblade-pro-image-upload-cropper-dialog-footer-left[data-v-1bddf267]{display:flex;align-items:center;justify-content:flex-start;margin-right:12px}.keyblade-pro-image-upload-cropper-dialog-footer-right[data-v-1bddf267]{flex:1;display:flex;align-items:center;justify-content:flex-end}.keyblade-pro-date-range-picker[data-v-
|
|
1
|
+
.keyblade-pro-page-header{background:var(--color-bg-2);padding:16px 32px}.keyblade-pro-page-header .keyblade-pro-page-header-section-breadcrumb .arco-breadcrumb-item:first-child{padding-left:0}.keyblade-pro-page-header .keyblade-pro-page-header-title.arco-typography{padding-top:4px;margin-top:0}.keyblade-pro-layout{width:100%;height:100%}.keyblade-pro-layout .keyblade-pro-layout-header{position:fixed;top:0;left:0;width:100%;height:var(--4a477a1a);z-index:100;display:flex;align-items:center;justify-content:space-between;padding:0 20px;background-color:var(--color-bg-2);border-bottom:1px solid var(--color-border);transition:all .2s cubic-bezier(.34,.69,.1,1)}.keyblade-pro-layout .keyblade-pro-layout-header-left{cursor:pointer;display:flex;align-items:center}.keyblade-pro-layout .keyblade-pro-layout-header-left-logo-img{width:28px;height:28px}.keyblade-pro-layout .keyblade-pro-layout-header-left-logo-title.arco-typography{margin:0;font-size:18px}.keyblade-pro-layout .keyblade-pro-layout-header-center{flex:1}.keyblade-pro-layout .keyblade-pro-layout-sider{padding-top:var(--4a477a1a);position:fixed;top:0;left:0;z-index:99;height:100%;transition:all .2s cubic-bezier(.34,.69,.1,1)}.keyblade-pro-layout .keyblade-pro-layout-sider-content{position:relative;height:100%;overflow:auto}.keyblade-pro-layout .keyblade-pro-layout-sider-collapse-btn.arco-btn{position:absolute;right:12px;bottom:12px}.keyblade-pro-layout .keyblade-pro-layout-body{padding-top:var(--4a477a1a);padding-left:var(--3599ef93);min-height:100vh;overflow-y:hidden;background-color:var(--color-fill-2);transition:padding .2s cubic-bezier(.34,.69,.1,1)}.keyblade-pro-layout .keyblade-pro-layout-body-hide-sider{padding-left:0}.keyblade-pro-layout .keyblade-pro-layout-body-affix .arco-affix{z-index:98}.keyblade-pro-layout .keyblade-pro-layout-body-footer{display:flex;align-items:center;justify-content:center;height:40px;color:var(--color-text-2);text-align:center}.keyblade-pro-layout .keyblade-pro-layout-body-collapsed{padding-left:var(--5b478c92)}.keyblade-pro-layout-side .keyblade-pro-layout-header{z-index:98;left:var(--3599ef93);width:calc(100% - var(--3599ef93))}.keyblade-pro-layout-side .keyblade-pro-layout-header-collapsed{left:var(--5b478c92);width:calc(100% - var(--5b478c92))}.keyblade-pro-layout-side .keyblade-pro-layout-sider{padding-top:0}.keyblade-pro-layout-side .keyblade-pro-layout-sider-content-logo{position:relative;display:flex;align-items:center;padding:16px;cursor:pointer;transition:padding .3s cubic-bezier(.645,.045,.355,1)}.keyblade-pro-layout-side .keyblade-pro-layout-sider-content-logo-img{width:28px;height:28px}.keyblade-pro-layout-side .keyblade-pro-layout-sider-content-logo-title.arco-typography{margin:0;font-size:18px}.keyblade-pro-layout-side .keyblade-pro-layout-sider-collapsed .keyblade-pro-layout-sider-content-logo{padding:16px 10px}.keyblade-pro-menu .keyblade-pro-menu-item-img{width:14px;height:auto}.keyblade-pro-reuse-tabs{position:relative;background-color:var(--color-bg-2);padding:4px 20px}.keyblade-pro-page-container .keyblade-pro-page-container-content{padding:20px}.keyblade-pro-image-upload-cropper-dialog-cropper-wrapper[data-v-1bddf267]{width:100%;height:400px}.keyblade-pro-image-upload-cropper-dialog-operate[data-v-1bddf267]{margin-top:24px;display:flex;align-items:center;justify-content:center}.keyblade-pro-image-upload-cropper-dialog-footer[data-v-1bddf267]{margin-top:24px;display:flex;align-items:center;justify-content:flex-end}.keyblade-pro-image-upload-cropper-dialog-footer-left[data-v-1bddf267]{display:flex;align-items:center;justify-content:flex-start;margin-right:12px}.keyblade-pro-image-upload-cropper-dialog-footer-right[data-v-1bddf267]{flex:1;display:flex;align-items:center;justify-content:flex-end}.keyblade-pro-date-range-picker[data-v-0382c1f4]{display:flex;align-items:center}
|