@keyblade/pro-components 1.13.8-alpha.43 → 1.13.8-alpha.45
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/global-props.d.ts
CHANGED
|
@@ -20,4 +20,9 @@ export interface GlobalProps {
|
|
|
20
20
|
/** 页头 */
|
|
21
21
|
pageHeader?: PageHeaderProps;
|
|
22
22
|
}
|
|
23
|
-
export declare
|
|
23
|
+
export declare const globalProps: GlobalProps;
|
|
24
|
+
/**
|
|
25
|
+
* 设置全局属性
|
|
26
|
+
* @param _globalProps
|
|
27
|
+
*/
|
|
28
|
+
export declare function setGlobalProps(_globalProps: GlobalProps): void;
|
package/es/global-props.js
CHANGED
package/es/index.js
CHANGED
|
@@ -1,54 +1,56 @@
|
|
|
1
1
|
import { ProLogin as e } from "./pro-login/index.js";
|
|
2
2
|
import { ProFindPassword as m } from "./pro-find-password/index.js";
|
|
3
3
|
import { ProPageHeader as t } from "./pro-page-header/index.js";
|
|
4
|
-
import { ProKeepAliveRouterView as
|
|
5
|
-
import { ProLayout as
|
|
4
|
+
import { ProKeepAliveRouterView as s } from "./pro-keep-alive-router-view/index.js";
|
|
5
|
+
import { ProLayout as i } from "./pro-layout/index.js";
|
|
6
6
|
import { ProMenu as f } from "./pro-menu/index.js";
|
|
7
7
|
import { ProPageContainer as P } from "./pro-page-container/index.js";
|
|
8
8
|
import { ProReuseTabs as u } from "./pro-reuse-tabs/index.js";
|
|
9
|
-
import { ProImageUpload as
|
|
10
|
-
import { ProDatesPicker as
|
|
11
|
-
import { ProDateRangePicker as
|
|
12
|
-
import { ProTable as
|
|
9
|
+
import { ProImageUpload as a } from "./pro-image-upload/index.js";
|
|
10
|
+
import { ProDatesPicker as n } from "./pro-dates-picker/index.js";
|
|
11
|
+
import { ProDateRangePicker as l } from "./pro-date-range-picker/index.js";
|
|
12
|
+
import { ProTable as d } from "./pro-table/index.js";
|
|
13
13
|
import { ProTextarea as g } from "./pro-textarea/index.js";
|
|
14
14
|
import { ProFooterBar as x } from "./pro-footer-bar/index.js";
|
|
15
|
-
import { ProFormGroup as
|
|
16
|
-
import { ProCalendar as
|
|
17
|
-
import { ProLoader as
|
|
15
|
+
import { ProFormGroup as p } from "./pro-form-group/index.js";
|
|
16
|
+
import { ProCalendar as b } from "./pro-calendar/index.js";
|
|
17
|
+
import { ProLoader as c } from "./pro-loader/index.js";
|
|
18
18
|
import { globalProps as F } from "./global-props.js";
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
|
|
19
|
+
import { setGlobalProps as M } from "./global-props.js";
|
|
20
|
+
import { splitStringWithCommaAndSpace as W } from "./utils.js";
|
|
21
|
+
import { EImageUploadInnerBeforeUploadStep as z } from "./pro-image-upload/types.js";
|
|
22
|
+
import { defaultImageUploadOptions as N } from "./pro-image-upload/constant.js";
|
|
23
|
+
import { EProLoginType as X } from "./pro-login/enum.js";
|
|
24
|
+
import { EFindPasswordSteps as Z } from "./pro-find-password/enum.js";
|
|
25
|
+
const v = {
|
|
25
26
|
install(o, r) {
|
|
26
|
-
Object.assign(F, r || {}), o.use(e), o.use(m), o.use(t), o.use(
|
|
27
|
+
Object.assign(F, r || {}), o.use(e), o.use(m), o.use(t), o.use(s), o.use(i), o.use(x), o.use(f), o.use(P), o.use(u), o.use(a), o.use(n), o.use(l), o.use(g), o.use(d), o.use(p), o.use(b), o.use(c);
|
|
27
28
|
}
|
|
28
29
|
};
|
|
29
30
|
export {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
31
|
+
Z as EFindPasswordSteps,
|
|
32
|
+
z as EImageUploadInnerBeforeUploadStep,
|
|
33
|
+
X as EProLoginType,
|
|
34
|
+
b as ProCalendar,
|
|
35
|
+
l as ProDateRangePicker,
|
|
36
|
+
n as ProDatesPicker,
|
|
36
37
|
m as ProFindPassword,
|
|
37
38
|
x as ProFooterBar,
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
39
|
+
p as ProFormGroup,
|
|
40
|
+
a as ProImageUpload,
|
|
41
|
+
s as ProKeepAliveRouterView,
|
|
42
|
+
i as ProLayout,
|
|
43
|
+
c as ProLoader,
|
|
43
44
|
e as ProLogin,
|
|
44
45
|
f as ProMenu,
|
|
45
46
|
P as ProPageContainer,
|
|
46
47
|
t as ProPageHeader,
|
|
47
48
|
u as ProReuseTabs,
|
|
48
|
-
|
|
49
|
+
d as ProTable,
|
|
49
50
|
g as ProTextarea,
|
|
50
|
-
|
|
51
|
-
|
|
51
|
+
v as default,
|
|
52
|
+
N as defaultImageUploadOptions,
|
|
52
53
|
F as globalProps,
|
|
53
|
-
M as
|
|
54
|
+
M as setGlobalProps,
|
|
55
|
+
W as splitStringWithCommaAndSpace
|
|
54
56
|
};
|
|
@@ -1,58 +1,58 @@
|
|
|
1
1
|
var ye = Object.defineProperty;
|
|
2
|
-
var
|
|
2
|
+
var le = Object.getOwnPropertySymbols;
|
|
3
3
|
var Ce = Object.prototype.hasOwnProperty, Be = Object.prototype.propertyIsEnumerable;
|
|
4
|
-
var
|
|
5
|
-
for (var
|
|
6
|
-
Ce.call(
|
|
7
|
-
if (
|
|
8
|
-
for (var
|
|
9
|
-
Be.call(
|
|
10
|
-
return
|
|
4
|
+
var oe = (s, c, r) => c in s ? ye(s, c, { enumerable: !0, configurable: !0, writable: !0, value: r }) : s[c] = r, T = (s, c) => {
|
|
5
|
+
for (var r in c || (c = {}))
|
|
6
|
+
Ce.call(c, r) && oe(s, r, c[r]);
|
|
7
|
+
if (le)
|
|
8
|
+
for (var r of le(c))
|
|
9
|
+
Be.call(c, r) && oe(s, r, c[r]);
|
|
10
|
+
return s;
|
|
11
11
|
};
|
|
12
|
-
var
|
|
12
|
+
var L = (s, c, r) => new Promise((E, i) => {
|
|
13
13
|
var e = (v) => {
|
|
14
14
|
try {
|
|
15
|
-
x(
|
|
15
|
+
x(r.next(v));
|
|
16
16
|
} catch (m) {
|
|
17
17
|
i(m);
|
|
18
18
|
}
|
|
19
|
-
},
|
|
19
|
+
}, j = (v) => {
|
|
20
20
|
try {
|
|
21
|
-
x(
|
|
21
|
+
x(r.throw(v));
|
|
22
22
|
} catch (m) {
|
|
23
23
|
i(m);
|
|
24
24
|
}
|
|
25
|
-
}, x = (v) => v.done ?
|
|
26
|
-
x((
|
|
25
|
+
}, x = (v) => v.done ? E(v.value) : Promise.resolve(v.value).then(e, j);
|
|
26
|
+
x((r = r.apply(s, c)).next());
|
|
27
27
|
});
|
|
28
|
-
import { defineComponent as we, mergeModels as
|
|
28
|
+
import { defineComponent as we, mergeModels as ne, useSlots as be, useModel as Ee, ref as U, computed as O, watch as te, createElementBlock as Me, openBlock as ie, createVNode as Se, createBlock as Le, createCommentVNode as Oe, unref as z, normalizeClass as $e, createSlots as ke, withCtx as V, renderSlot as W } from "vue";
|
|
29
29
|
import { Message as y, Upload as ze } from "@arco-design/web-vue";
|
|
30
|
-
import { conclude as
|
|
30
|
+
import { conclude as F } from "vue-global-config";
|
|
31
31
|
import { EImageUploadInnerBeforeUploadStep as I } from "./types.js";
|
|
32
|
-
import { defaultImageUploadOptions as
|
|
32
|
+
import { defaultImageUploadOptions as b } from "./constant.js";
|
|
33
33
|
import je from "./cropper.vue.js";
|
|
34
34
|
import { defaultImageUploadCheckOptions as Qe, defaultImageUploadCompressorOptions as Te, defaultImageUploadCropOptions as Ve, oneTravelImageCheckAndTransform as We, oneTravelImageCompressor as Fe } from "@keyblade/one-travel";
|
|
35
35
|
const He = "keyblade-pro-image-upload";
|
|
36
36
|
var re, ue, de;
|
|
37
37
|
const Ne = /* @__PURE__ */ we({
|
|
38
38
|
__name: "image-upload",
|
|
39
|
-
props: /* @__PURE__ */
|
|
39
|
+
props: /* @__PURE__ */ ne({
|
|
40
40
|
action: {},
|
|
41
41
|
handlerResponse: {},
|
|
42
42
|
headers: {},
|
|
43
43
|
data: {},
|
|
44
|
-
name: { default: (re =
|
|
44
|
+
name: { default: (re = b) == null ? void 0 : re.name },
|
|
45
45
|
tip: {},
|
|
46
46
|
accept: { default: () => {
|
|
47
|
-
var
|
|
48
|
-
return ((
|
|
47
|
+
var s;
|
|
48
|
+
return ((s = b) == null ? void 0 : s.accept) || [];
|
|
49
49
|
} },
|
|
50
|
-
multiple: { type: Boolean, default:
|
|
51
|
-
singleLimit: { default:
|
|
50
|
+
multiple: { type: Boolean, default: b.multiple },
|
|
51
|
+
singleLimit: { default: b.singleLimit },
|
|
52
52
|
limit: {},
|
|
53
53
|
exceedTip: {},
|
|
54
|
-
disabled: { type: Boolean, default: (ue =
|
|
55
|
-
hideInnerBeforeUploadLoading: { type: Boolean, default: (de =
|
|
54
|
+
disabled: { type: Boolean, default: (ue = b) == null ? void 0 : ue.disabled },
|
|
55
|
+
hideInnerBeforeUploadLoading: { type: Boolean, default: (de = b) == null ? void 0 : de.hideInnerBeforeUploadLoading },
|
|
56
56
|
checkOptions: {},
|
|
57
57
|
compressorOptions: {},
|
|
58
58
|
cropOptions: {},
|
|
@@ -67,36 +67,36 @@ const Ne = /* @__PURE__ */ we({
|
|
|
67
67
|
modelValue: { required: !0 },
|
|
68
68
|
modelModifiers: {}
|
|
69
69
|
}),
|
|
70
|
-
emits: /* @__PURE__ */
|
|
71
|
-
setup(
|
|
72
|
-
const
|
|
73
|
-
var t,
|
|
74
|
-
const l = (
|
|
70
|
+
emits: /* @__PURE__ */ ne(["cropperImgLoad"], ["update:modelValue"]),
|
|
71
|
+
setup(s, { expose: c, emit: r }) {
|
|
72
|
+
const E = be(), i = Ee(s, "modelValue"), e = s, j = r, x = U(), v = U(), m = U(), C = U([]), n = U(), p = U(), g = U(), se = O(() => e.accept.map((a) => `.${a}`).join(",")), h = O(() => F([e.checkOptions, Qe]) || {}), M = O(() => F([e.compressorOptions, Te]) || {}), S = O(() => F([e.cropOptions, Ve]) || {}), ce = (a) => {
|
|
73
|
+
var t, f, u, d;
|
|
74
|
+
const l = (d = (u = (f = (t = x.value) == null ? void 0 : t.$el) == null ? void 0 : f.querySelector) == null ? void 0 : u.call(f, "input")) == null ? void 0 : d.files;
|
|
75
75
|
return l && l.length > 0 && (g.value = {
|
|
76
76
|
selectCount: l.length
|
|
77
|
-
}), e != null && e.onBeforeUpload ? e == null ? void 0 : e.onBeforeUpload(a) : g.value && (e != null && e.singleLimit) && g.value.selectCount > (e == null ? void 0 : e.singleLimit) ? (g.value.handleIndex === void 0 ? (g.value.handleIndex = 0, y.clear(), y.error(`单次最多可选择${e == null ? void 0 : e.singleLimit}张图片`)) : g.value.handleIndex += 1, g.value.handleIndex === g.value.selectCount - 1 && (g.value = void 0), !1) : new Promise(($, k) =>
|
|
77
|
+
}), e != null && e.onBeforeUpload ? e == null ? void 0 : e.onBeforeUpload(a) : g.value && (e != null && e.singleLimit) && g.value.selectCount > (e == null ? void 0 : e.singleLimit) ? (g.value.handleIndex === void 0 ? (g.value.handleIndex = 0, y.clear(), y.error(`单次最多可选择${e == null ? void 0 : e.singleLimit}张图片`)) : g.value.handleIndex += 1, g.value.handleIndex === g.value.selectCount - 1 && (g.value = void 0), !1) : new Promise(($, k) => L(null, null, function* () {
|
|
78
78
|
try {
|
|
79
79
|
$(yield pe(a));
|
|
80
|
-
} catch (
|
|
80
|
+
} catch (Q) {
|
|
81
81
|
k();
|
|
82
82
|
} finally {
|
|
83
|
-
|
|
83
|
+
H();
|
|
84
84
|
}
|
|
85
85
|
}));
|
|
86
|
-
}, fe = (a) =>
|
|
86
|
+
}, fe = (a) => L(null, null, function* () {
|
|
87
87
|
const l = i.value.findIndex((t) => t.uid === a.uid);
|
|
88
88
|
return i.value.splice(l, 1), i.value = [...i.value], !1;
|
|
89
89
|
}), ve = (a, l) => {
|
|
90
90
|
var t;
|
|
91
91
|
e != null && e.onExceed ? e == null || e.onExceed(a, l) : (y.error((t = e.exceedTip) != null ? t : `超过数量上限,最多上传${(e == null ? void 0 : e.limit) || 1}张`), i.value = a);
|
|
92
|
-
}, me = (a) =>
|
|
92
|
+
}, me = (a) => L(null, null, function* () {
|
|
93
93
|
if (e != null && e.onSuccess)
|
|
94
94
|
e == null || e.onSuccess(a);
|
|
95
95
|
else {
|
|
96
96
|
if (!(e != null && e.handlerResponse))
|
|
97
97
|
return;
|
|
98
|
-
const l = yield e.handlerResponse(a.response), t = i.value.findIndex((
|
|
99
|
-
l.success ? i.value[t] && (i.value[t] =
|
|
98
|
+
const l = yield e.handlerResponse(a.response), t = i.value.findIndex((f) => f.uid === a.uid);
|
|
99
|
+
l.success ? i.value[t] && (i.value[t] = T(T({}, i.value[t]), l)) : i.value.splice(t, 1);
|
|
100
100
|
}
|
|
101
101
|
}), ge = (a) => {
|
|
102
102
|
e != null && e.onError ? e == null || e.onError(a) : setTimeout(() => {
|
|
@@ -104,8 +104,8 @@ const Ne = /* @__PURE__ */ we({
|
|
|
104
104
|
i.value.splice(l, 1);
|
|
105
105
|
});
|
|
106
106
|
}, pe = (a) => new Promise((l, t) => {
|
|
107
|
-
C.value.push({ file: a, resolve: l, reject: t }), C.value.length === 1 && !n.value &&
|
|
108
|
-
}),
|
|
107
|
+
C.value.push({ file: a, resolve: l, reject: t }), C.value.length === 1 && !n.value && H();
|
|
108
|
+
}), H = () => {
|
|
109
109
|
n.value === void 0 ? n.value = 0 : n.value + 1 >= C.value.length ? (n.value = void 0, C.value = []) : n.value += 1;
|
|
110
110
|
}, he = () => {
|
|
111
111
|
var a;
|
|
@@ -114,16 +114,16 @@ const Ne = /* @__PURE__ */ we({
|
|
|
114
114
|
var l;
|
|
115
115
|
(l = m.value) == null || l.resolve(a);
|
|
116
116
|
}, xe = (a) => {
|
|
117
|
-
|
|
117
|
+
j("cropperImgLoad", a);
|
|
118
118
|
};
|
|
119
|
-
|
|
120
|
-
var $, k,
|
|
119
|
+
te(n, () => L(null, null, function* () {
|
|
120
|
+
var $, k, Q, P, q, D, G, J, K, X, Y, Z, N, A, R, _, ee, ae;
|
|
121
121
|
if (n.value === void 0 || C.value.length === 0)
|
|
122
122
|
return;
|
|
123
123
|
const a = C.value[n.value];
|
|
124
124
|
if (!a) return;
|
|
125
|
-
const { file: l, resolve: t, reject:
|
|
126
|
-
let
|
|
125
|
+
const { file: l, resolve: t, reject: f } = a;
|
|
126
|
+
let u = l.name, d = l;
|
|
127
127
|
if (($ = h.value) != null && $.enable) {
|
|
128
128
|
p.value = {
|
|
129
129
|
loading: !0,
|
|
@@ -142,7 +142,7 @@ const Ne = /* @__PURE__ */ we({
|
|
|
142
142
|
imageMaxWidth: h.value.maxWidth,
|
|
143
143
|
imageMaxHeight: h.value.maxHeight
|
|
144
144
|
});
|
|
145
|
-
if (p.value = void 0, (
|
|
145
|
+
if (p.value = void 0, (Q = e == null ? void 0 : e.onInnerBeforeUploadEnd) == null || Q.call(
|
|
146
146
|
e,
|
|
147
147
|
l,
|
|
148
148
|
n.value,
|
|
@@ -153,26 +153,26 @@ const Ne = /* @__PURE__ */ we({
|
|
|
153
153
|
errorMessage: o == null ? void 0 : o.errorMessage
|
|
154
154
|
}
|
|
155
155
|
), !o.success)
|
|
156
|
-
return (
|
|
156
|
+
return (P = h.value) != null && P.showErrorMessage && y.error((o == null ? void 0 : o.errorMessage) || "图片校验及转换失败"), f();
|
|
157
157
|
if (o != null && o.hasTransform) {
|
|
158
|
-
const w =
|
|
159
|
-
w.pop(),
|
|
158
|
+
const w = u == null ? void 0 : u.split(".");
|
|
159
|
+
w.pop(), u = `${w.join(",")}.jpg`, d = new File([o.file], u, {
|
|
160
160
|
type: o.file.type
|
|
161
161
|
});
|
|
162
162
|
} else
|
|
163
|
-
|
|
163
|
+
d = o.file;
|
|
164
164
|
}
|
|
165
|
-
if ((
|
|
166
|
-
(
|
|
165
|
+
if ((q = S.value) != null && q.enable && !((G = (D = u == null ? void 0 : u.toLocaleLowerCase) == null ? void 0 : D.call(u)) != null && G.endsWith(".gif"))) {
|
|
166
|
+
(J = e == null ? void 0 : e.onInnerBeforeUploadStart) == null || J.call(
|
|
167
167
|
e,
|
|
168
168
|
l,
|
|
169
169
|
n.value,
|
|
170
170
|
I.crop
|
|
171
171
|
);
|
|
172
172
|
try {
|
|
173
|
-
(
|
|
174
|
-
m.value = { file:
|
|
175
|
-
}), (
|
|
173
|
+
(K = S.value) != null && K.customCrop ? d = yield S.value.customCrop(d) : d = yield new Promise((o, w) => {
|
|
174
|
+
m.value = { file: d, resolve: o, reject: w };
|
|
175
|
+
}), (X = e == null ? void 0 : e.onInnerBeforeUploadEnd) == null || X.call(
|
|
176
176
|
e,
|
|
177
177
|
l,
|
|
178
178
|
n.value,
|
|
@@ -182,7 +182,7 @@ const Ne = /* @__PURE__ */ we({
|
|
|
182
182
|
}
|
|
183
183
|
);
|
|
184
184
|
} catch (o) {
|
|
185
|
-
return (
|
|
185
|
+
return (Y = e == null ? void 0 : e.onInnerBeforeUploadEnd) == null || Y.call(
|
|
186
186
|
e,
|
|
187
187
|
l,
|
|
188
188
|
n.value,
|
|
@@ -194,27 +194,27 @@ const Ne = /* @__PURE__ */ we({
|
|
|
194
194
|
},
|
|
195
195
|
errorMessage: "图片剪裁失败"
|
|
196
196
|
}
|
|
197
|
-
), (
|
|
197
|
+
), (Z = S.value) != null && Z.showErrorMessage && y.error("图片剪裁失败"), f();
|
|
198
198
|
} finally {
|
|
199
199
|
m.value = void 0;
|
|
200
200
|
}
|
|
201
201
|
}
|
|
202
|
-
if ((
|
|
202
|
+
if ((N = M.value) != null && N.enable) {
|
|
203
203
|
p.value = {
|
|
204
204
|
loading: !0,
|
|
205
205
|
text: `第${n.value + 1}张图片处理中,请稍等`
|
|
206
|
-
}, (
|
|
206
|
+
}, (A = e == null ? void 0 : e.onInnerBeforeUploadStart) == null || A.call(
|
|
207
207
|
e,
|
|
208
208
|
l,
|
|
209
209
|
n.value,
|
|
210
210
|
I.compress
|
|
211
211
|
);
|
|
212
|
-
const o = yield Fe(
|
|
212
|
+
const o = yield Fe(d, {
|
|
213
213
|
maxSize: M.value.maxSize,
|
|
214
214
|
size: M.value.size,
|
|
215
|
-
excludeAllowedTypes: (
|
|
215
|
+
excludeAllowedTypes: (R = M.value.excludeAllowedTypes) == null ? void 0 : R.map((w) => `${w}`)
|
|
216
216
|
});
|
|
217
|
-
if (p.value = void 0, (
|
|
217
|
+
if (p.value = void 0, (_ = e == null ? void 0 : e.onInnerBeforeUploadEnd) == null || _.call(
|
|
218
218
|
e,
|
|
219
219
|
l,
|
|
220
220
|
n.value,
|
|
@@ -227,12 +227,12 @@ const Ne = /* @__PURE__ */ we({
|
|
|
227
227
|
errorMessage: o == null ? void 0 : o.errorMessage
|
|
228
228
|
}
|
|
229
229
|
), !o.success)
|
|
230
|
-
return (
|
|
231
|
-
|
|
230
|
+
return (ee = M.value) != null && ee.showErrorMessage && y.error((o == null ? void 0 : o.errorMessage) || "图片压缩失败"), f();
|
|
231
|
+
d = new File([o.file], u, {
|
|
232
232
|
type: o.file.type
|
|
233
233
|
});
|
|
234
234
|
}
|
|
235
|
-
p.value = void 0, (
|
|
235
|
+
p.value = void 0, (ae = e == null ? void 0 : e.onInnerBeforeUploadEnd) == null || ae.call(
|
|
236
236
|
e,
|
|
237
237
|
l,
|
|
238
238
|
n.value,
|
|
@@ -240,10 +240,10 @@ const Ne = /* @__PURE__ */ we({
|
|
|
240
240
|
{
|
|
241
241
|
success: !0
|
|
242
242
|
}
|
|
243
|
-
), t(
|
|
243
|
+
), t(d);
|
|
244
244
|
}));
|
|
245
245
|
let B;
|
|
246
|
-
|
|
246
|
+
te(
|
|
247
247
|
() => p.value,
|
|
248
248
|
() => {
|
|
249
249
|
var a;
|
|
@@ -254,15 +254,15 @@ const Ne = /* @__PURE__ */ we({
|
|
|
254
254
|
}) : (a = B == null ? void 0 : B.close) == null || a.call(B);
|
|
255
255
|
}
|
|
256
256
|
);
|
|
257
|
-
const Ue =
|
|
258
|
-
return
|
|
257
|
+
const Ue = O(() => i.value.every((a) => a.status && ["done", "error"].includes(a.status)));
|
|
258
|
+
return c({
|
|
259
259
|
uploadInsRef: x,
|
|
260
260
|
cropperInsRef: v,
|
|
261
261
|
isUploadComplete: Ue
|
|
262
262
|
}), (a, l) => {
|
|
263
|
-
var t,
|
|
264
|
-
return
|
|
265
|
-
|
|
263
|
+
var t, f, u;
|
|
264
|
+
return ie(), Me("div", null, [
|
|
265
|
+
Se(z(ze), {
|
|
266
266
|
class: $e([`${He}-upload`]),
|
|
267
267
|
ref_key: "uploadInsRef",
|
|
268
268
|
ref: x,
|
|
@@ -270,7 +270,7 @@ const Ne = /* @__PURE__ */ we({
|
|
|
270
270
|
tip: a.tip || "上传",
|
|
271
271
|
"image-preview": "",
|
|
272
272
|
"file-list": i.value,
|
|
273
|
-
"onUpdate:fileList": l[0] || (l[0] = (
|
|
273
|
+
"onUpdate:fileList": l[0] || (l[0] = (d) => i.value = d),
|
|
274
274
|
action: a.action,
|
|
275
275
|
headers: a.headers,
|
|
276
276
|
data: a.data,
|
|
@@ -285,22 +285,29 @@ const Ne = /* @__PURE__ */ we({
|
|
|
285
285
|
onSuccess: me,
|
|
286
286
|
onError: ge
|
|
287
287
|
}, ke({ _: 2 }, [
|
|
288
|
-
(t =
|
|
288
|
+
(t = z(E)) != null && t.image ? {
|
|
289
289
|
name: "image",
|
|
290
|
-
fn:
|
|
291
|
-
|
|
290
|
+
fn: V(({ fileItem: d }) => [
|
|
291
|
+
W(a.$slots, "image", { fileItem: d })
|
|
292
292
|
]),
|
|
293
293
|
key: "0"
|
|
294
294
|
} : void 0,
|
|
295
|
-
(
|
|
295
|
+
(f = z(E)) != null && f["upload-button"] ? {
|
|
296
296
|
name: "upload-button",
|
|
297
|
-
fn:
|
|
298
|
-
|
|
297
|
+
fn: V(() => [
|
|
298
|
+
W(a.$slots, "upload-button")
|
|
299
299
|
]),
|
|
300
300
|
key: "1"
|
|
301
|
+
} : void 0,
|
|
302
|
+
(u = z(E)) != null && u["extra-button"] ? {
|
|
303
|
+
name: "extra-button",
|
|
304
|
+
fn: V(() => [
|
|
305
|
+
W(a.$slots, "extra-button")
|
|
306
|
+
]),
|
|
307
|
+
key: "2"
|
|
301
308
|
} : void 0
|
|
302
309
|
]), 1032, ["class", "tip", "file-list", "action", "headers", "data", "name", "accept", "multiple", "limit", "disabled"]),
|
|
303
|
-
m.value && n.value !== void 0 ? (
|
|
310
|
+
m.value && n.value !== void 0 ? (ie(), Le(je, {
|
|
304
311
|
key: 0,
|
|
305
312
|
ref_key: "cropperInsRef",
|
|
306
313
|
ref: v,
|
package/package.json
CHANGED