@keyblade/pro-components 1.13.8-alpha.39 → 1.13.8-alpha.40
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/index.js +1 -1
- package/es/pro-calendar/index.d.ts +2 -0
- package/es/pro-calendar/index.js +1 -0
- package/es/pro-date-range-picker/index.d.ts +176 -7
- package/es/pro-date-range-picker/interface.d.ts +2 -2
- package/es/pro-date-range-picker/pro-date-range-picker.vue.d.ts +171 -5
- package/es/pro-date-range-picker/pro-date-range-picker.vue.js +1 -1
- package/es/pro-date-range-picker/pro-date-range-picker.vue2.js +111 -113
- package/es/pro-dates-picker/index.d.ts +11 -8
- package/es/pro-dates-picker/index.js +8 -8
- package/es/pro-dates-picker/index.vue.d.ts +3 -3
- package/es/pro-dates-picker/index.vue.js +96 -97
- package/es/pro-find-password/index.d.ts +2 -0
- package/es/pro-find-password/index.js +5 -5
- package/es/pro-find-password/index.vue.d.ts +830 -66
- package/es/pro-find-password/index.vue.js +132 -134
- package/es/pro-find-password/reset-password.vue.d.ts +192 -1
- package/es/pro-find-password/reset-password.vue.js +120 -122
- package/es/pro-find-password/verify-user-name.vue.d.ts +384 -2
- package/es/pro-find-password/verify-user-name.vue.js +74 -76
- package/es/pro-footer-bar/index.d.ts +3 -0
- package/es/pro-footer-bar/index.vue.js +2 -2
- package/es/pro-footer-bar/index.vue2.js +24 -26
- package/es/pro-form-group/index.d.ts +1 -0
- package/es/pro-form-group/index.vue.js +1 -1
- package/es/pro-form-group/index.vue2.js +31 -32
- package/es/pro-image-upload/cropper.vue.js +2 -2
- package/es/pro-image-upload/cropper.vue2.js +198 -199
- package/es/pro-image-upload/image-upload.vue.d.ts +648 -2
- package/es/pro-image-upload/image-upload.vue.js +74 -75
- package/es/pro-image-upload/index.d.ts +327 -1
- package/es/pro-image-upload/index.js +1 -1
- package/es/pro-keep-alive-router-view/index.d.ts +1 -0
- package/es/pro-layout/index.d.ts +4 -3
- package/es/pro-layout/index.js +1 -1
- package/es/pro-layout/pro-layout.vue.d.ts +1 -1
- package/es/pro-layout/pro-layout.vue.js +222 -218
- package/es/pro-loader/index.d.ts +2 -0
- package/es/pro-login/form-mobile.vue.d.ts +384 -2
- package/es/pro-login/form-mobile.vue.js +97 -99
- package/es/pro-login/form-password.vue.d.ts +192 -1
- package/es/pro-login/form-password.vue.js +72 -74
- package/es/pro-login/index.d.ts +2 -0
- package/es/pro-login/index.vue.d.ts +831 -67
- package/es/pro-login/index.vue.js +62 -64
- package/es/pro-menu/index.d.ts +2 -0
- package/es/pro-menu/menu-item.vue.js +13 -13
- package/es/pro-menu/pro-menu.vue.js +28 -30
- package/es/pro-menu/sub-menu.vue.js +20 -19
- package/es/pro-page-container/index.d.ts +3 -0
- package/es/pro-page-container/pro-page-container.vue.js +46 -44
- package/es/pro-page-header/index.d.ts +3 -0
- package/es/pro-page-header/index.js +6 -6
- package/es/pro-page-header/pro-page-header.vue.js +78 -77
- package/es/pro-reuse-tabs/index.d.ts +5 -3
- package/es/pro-reuse-tabs/index.js +1 -1
- package/es/pro-reuse-tabs/pro-reuse-tabs.vue.d.ts +1 -1
- package/es/pro-reuse-tabs/pro-reuse-tabs.vue.js +33 -35
- package/es/pro-table/index.d.ts +6 -3
- package/es/pro-table/index.js +7 -7
- package/es/pro-table/index.vue.d.ts +2 -2
- package/es/pro-table/index.vue.js +68 -70
- package/es/pro-textarea/index.d.ts +7 -5
- package/es/pro-textarea/index.vue.js +2 -2
- package/es/pro-textarea/index.vue2.js +14 -16
- package/es/style.css +1 -1
- package/package.json +1 -1
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
for (var
|
|
6
|
-
|
|
7
|
-
if (
|
|
8
|
-
for (var
|
|
9
|
-
Be.call(
|
|
10
|
-
return
|
|
1
|
+
var ye = Object.defineProperty;
|
|
2
|
+
var ee = Object.getOwnPropertySymbols;
|
|
3
|
+
var Ce = Object.prototype.hasOwnProperty, Be = Object.prototype.propertyIsEnumerable;
|
|
4
|
+
var ae = (d, s, u) => s in d ? ye(d, s, { enumerable: !0, configurable: !0, writable: !0, value: u }) : d[s] = u, Q = (d, s) => {
|
|
5
|
+
for (var u in s || (s = {}))
|
|
6
|
+
Ce.call(s, u) && ae(d, u, s[u]);
|
|
7
|
+
if (ee)
|
|
8
|
+
for (var u of ee(s))
|
|
9
|
+
Be.call(s, u) && ae(d, u, s[u]);
|
|
10
|
+
return d;
|
|
11
11
|
};
|
|
12
|
-
var b = (
|
|
12
|
+
var b = (d, s, u) => new Promise((O, i) => {
|
|
13
13
|
var e = (v) => {
|
|
14
14
|
try {
|
|
15
|
-
x(
|
|
15
|
+
x(u.next(v));
|
|
16
16
|
} catch (m) {
|
|
17
17
|
i(m);
|
|
18
18
|
}
|
|
19
19
|
}, z = (v) => {
|
|
20
20
|
try {
|
|
21
|
-
x(
|
|
21
|
+
x(u.throw(v));
|
|
22
22
|
} catch (m) {
|
|
23
23
|
i(m);
|
|
24
24
|
}
|
|
25
25
|
}, x = (v) => v.done ? O(v.value) : Promise.resolve(v.value).then(e, z);
|
|
26
|
-
x((
|
|
26
|
+
x((u = u.apply(d, s)).next());
|
|
27
27
|
});
|
|
28
|
-
import { defineComponent as we, mergeModels as
|
|
29
|
-
import { Message as
|
|
30
|
-
import { conclude as
|
|
28
|
+
import { defineComponent as we, mergeModels as le, useSlots as Ee, useModel as Me, ref as U, computed as L, watch as oe, createElementBlock as Se, openBlock as ne, createVNode as be, createBlock as Le, createCommentVNode as Oe, unref as T, normalizeClass as $e, createSlots as ke, withCtx as te, renderSlot as ie } from "vue";
|
|
29
|
+
import { Message as y, Upload as ze } from "@arco-design/web-vue";
|
|
30
|
+
import { conclude as V } from "vue-global-config";
|
|
31
31
|
import { EImageUploadInnerBeforeUploadStep as I } from "./types.js";
|
|
32
32
|
import { defaultImageUploadOptions as E } from "./constant.js";
|
|
33
33
|
import je from "./cropper.vue.js";
|
|
@@ -36,7 +36,7 @@ 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__ */ le({
|
|
40
40
|
action: {},
|
|
41
41
|
handlerResponse: {},
|
|
42
42
|
headers: {},
|
|
@@ -44,8 +44,8 @@ const Ne = /* @__PURE__ */ we({
|
|
|
44
44
|
name: { default: (re = E) == null ? void 0 : re.name },
|
|
45
45
|
tip: {},
|
|
46
46
|
accept: { default: () => {
|
|
47
|
-
var
|
|
48
|
-
return ((
|
|
47
|
+
var d;
|
|
48
|
+
return ((d = E) == null ? void 0 : d.accept) || [];
|
|
49
49
|
} },
|
|
50
50
|
multiple: { type: Boolean, default: E.multiple },
|
|
51
51
|
singleLimit: { default: E.singleLimit },
|
|
@@ -67,20 +67,20 @@ const Ne = /* @__PURE__ */ we({
|
|
|
67
67
|
modelValue: { required: !0 },
|
|
68
68
|
modelModifiers: {}
|
|
69
69
|
}),
|
|
70
|
-
emits: /* @__PURE__ */
|
|
71
|
-
setup(
|
|
72
|
-
const O = Ee(), i = Me(
|
|
73
|
-
var t,
|
|
74
|
-
const l = (
|
|
70
|
+
emits: /* @__PURE__ */ le(["cropperImgLoad"], ["update:modelValue"]),
|
|
71
|
+
setup(d, { expose: s, emit: u }) {
|
|
72
|
+
const O = Ee(), i = Me(d, "modelValue"), e = d, z = u, x = U(), v = U(), m = U(), C = U([]), n = U(), p = U(), g = U(), se = L(() => e.accept.map((a) => `.${a}`).join(",")), h = L(() => V([e.checkOptions, Qe]) || {}), M = L(() => V([e.compressorOptions, Te]) || {}), S = L(() => V([e.cropOptions, Ve]) || {}), ce = (a) => {
|
|
73
|
+
var t, c, r, f;
|
|
74
|
+
const l = (f = (r = (c = (t = x.value) == null ? void 0 : t.$el) == null ? void 0 : c.querySelector) == null ? void 0 : r.call(c, "input")) == null ? void 0 : f.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,
|
|
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) => b(null, null, function* () {
|
|
78
78
|
try {
|
|
79
79
|
$(yield pe(a));
|
|
80
80
|
} catch (j) {
|
|
81
81
|
k();
|
|
82
82
|
} finally {
|
|
83
|
-
|
|
83
|
+
W();
|
|
84
84
|
}
|
|
85
85
|
}));
|
|
86
86
|
}, fe = (a) => b(null, null, function* () {
|
|
@@ -88,14 +88,14 @@ const Ne = /* @__PURE__ */ we({
|
|
|
88
88
|
return i.value.splice(l, 1), i.value = [...i.value], !1;
|
|
89
89
|
}), ve = (a, l) => {
|
|
90
90
|
var t;
|
|
91
|
-
e != null && e.onExceed ? e == null || e.onExceed(a, l) : (
|
|
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
92
|
}, me = (a) => b(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((
|
|
98
|
+
const l = yield e.handlerResponse(a.response), t = i.value.findIndex((c) => c.uid === a.uid);
|
|
99
99
|
l.success ? i.value[t] && (i.value[t] = Q(Q({}, i.value[t]), l)) : i.value.splice(t, 1);
|
|
100
100
|
}
|
|
101
101
|
}), ge = (a) => {
|
|
@@ -104,9 +104,9 @@ const Ne = /* @__PURE__ */ we({
|
|
|
104
104
|
i.value.splice(l, 1);
|
|
105
105
|
});
|
|
106
106
|
}, pe = (a) => new Promise((l, t) => {
|
|
107
|
-
|
|
108
|
-
}),
|
|
109
|
-
n.value === void 0 ? n.value = 0 : n.value + 1 >=
|
|
107
|
+
C.value.push({ file: a, resolve: l, reject: t }), C.value.length === 1 && !n.value && W();
|
|
108
|
+
}), W = () => {
|
|
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;
|
|
112
112
|
(a = m.value) == null || a.reject();
|
|
@@ -116,14 +116,14 @@ const Ne = /* @__PURE__ */ we({
|
|
|
116
116
|
}, xe = (a) => {
|
|
117
117
|
z("cropperImgLoad", a);
|
|
118
118
|
};
|
|
119
|
-
|
|
120
|
-
var $, k, j,
|
|
121
|
-
if (n.value === void 0 ||
|
|
119
|
+
oe(n, () => b(null, null, function* () {
|
|
120
|
+
var $, k, j, F, H, P, q, D, G, J, K, X, Y, Z, N, A, R, _;
|
|
121
|
+
if (n.value === void 0 || C.value.length === 0)
|
|
122
122
|
return;
|
|
123
|
-
const a =
|
|
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: c } = a;
|
|
126
|
+
let r = l.name, f = l;
|
|
127
127
|
if (($ = h.value) != null && $.enable) {
|
|
128
128
|
p.value = {
|
|
129
129
|
loading: !0,
|
|
@@ -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 (F = h.value) != null && F.showErrorMessage && y.error((o == null ? void 0 : o.errorMessage) || "图片校验及转换失败"), c();
|
|
157
157
|
if (o != null && o.hasTransform) {
|
|
158
|
-
const w =
|
|
159
|
-
w.pop(),
|
|
158
|
+
const w = r == null ? void 0 : r.split(".");
|
|
159
|
+
w.pop(), r = `${w.join(",")}.jpg`, f = new File([o.file], r, {
|
|
160
160
|
type: o.file.type
|
|
161
161
|
});
|
|
162
162
|
} else
|
|
163
|
-
|
|
163
|
+
f = o.file;
|
|
164
164
|
}
|
|
165
|
-
if ((
|
|
166
|
-
(
|
|
165
|
+
if ((H = S.value) != null && H.enable && !((q = (P = r == null ? void 0 : r.toLocaleLowerCase) == null ? void 0 : P.call(r)) != null && q.endsWith(".gif"))) {
|
|
166
|
+
(D = e == null ? void 0 : e.onInnerBeforeUploadStart) == null || D.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
|
+
(G = S.value) != null && G.customCrop ? f = yield S.value.customCrop(f) : f = yield new Promise((o, w) => {
|
|
174
|
+
m.value = { file: f, resolve: o, reject: w };
|
|
175
|
+
}), (J = e == null ? void 0 : e.onInnerBeforeUploadEnd) == null || J.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 (K = e == null ? void 0 : e.onInnerBeforeUploadEnd) == null || K.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
|
+
), (X = S.value) != null && X.showErrorMessage && y.error("图片剪裁失败"), c();
|
|
198
198
|
} finally {
|
|
199
199
|
m.value = void 0;
|
|
200
200
|
}
|
|
201
201
|
}
|
|
202
|
-
if ((
|
|
202
|
+
if ((Y = M.value) != null && Y.enable) {
|
|
203
203
|
p.value = {
|
|
204
204
|
loading: !0,
|
|
205
205
|
text: `第${n.value + 1}张图片处理中,请稍等`
|
|
206
|
-
}, (
|
|
206
|
+
}, (Z = e == null ? void 0 : e.onInnerBeforeUploadStart) == null || Z.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(f, {
|
|
213
213
|
maxSize: M.value.maxSize,
|
|
214
214
|
size: M.value.size,
|
|
215
|
-
excludeAllowedTypes: (
|
|
215
|
+
excludeAllowedTypes: (N = M.value.excludeAllowedTypes) == null ? void 0 : N.map((w) => `${w}`)
|
|
216
216
|
});
|
|
217
|
-
if (p.value = void 0, (
|
|
217
|
+
if (p.value = void 0, (A = e == null ? void 0 : e.onInnerBeforeUploadEnd) == null || A.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 (R = M.value) != null && R.showErrorMessage && y.error((o == null ? void 0 : o.errorMessage) || "图片压缩失败"), c();
|
|
231
|
+
f = new File([o.file], r, {
|
|
232
232
|
type: o.file.type
|
|
233
233
|
});
|
|
234
234
|
}
|
|
235
|
-
p.value = void 0, (
|
|
235
|
+
p.value = void 0, (_ = e == null ? void 0 : e.onInnerBeforeUploadEnd) == null || _.call(
|
|
236
236
|
e,
|
|
237
237
|
l,
|
|
238
238
|
n.value,
|
|
@@ -240,14 +240,14 @@ const Ne = /* @__PURE__ */ we({
|
|
|
240
240
|
{
|
|
241
241
|
success: !0
|
|
242
242
|
}
|
|
243
|
-
), t(
|
|
243
|
+
), t(f);
|
|
244
244
|
}));
|
|
245
245
|
let B;
|
|
246
|
-
|
|
246
|
+
oe(
|
|
247
247
|
() => p.value,
|
|
248
248
|
() => {
|
|
249
249
|
var a;
|
|
250
|
-
p.value ? B =
|
|
250
|
+
p.value ? B = y.loading({
|
|
251
251
|
content: p.value.text,
|
|
252
252
|
id: "image-upload-id",
|
|
253
253
|
duration: 0
|
|
@@ -255,23 +255,22 @@ const Ne = /* @__PURE__ */ we({
|
|
|
255
255
|
}
|
|
256
256
|
);
|
|
257
257
|
const Ue = L(() => i.value.every((a) => a.status && ["done", "error"].includes(a.status)));
|
|
258
|
-
return
|
|
258
|
+
return s({
|
|
259
259
|
uploadInsRef: x,
|
|
260
260
|
cropperInsRef: v,
|
|
261
261
|
isUploadComplete: Ue
|
|
262
262
|
}), (a, l) => {
|
|
263
|
-
var
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
class: ke([`${He}-upload`]),
|
|
263
|
+
var t, c;
|
|
264
|
+
return ne(), Se("div", null, [
|
|
265
|
+
be(T(ze), {
|
|
266
|
+
class: $e([`${He}-upload`]),
|
|
268
267
|
ref_key: "uploadInsRef",
|
|
269
268
|
ref: x,
|
|
270
269
|
"list-type": "picture-card",
|
|
271
270
|
tip: a.tip || "上传",
|
|
272
271
|
"image-preview": "",
|
|
273
272
|
"file-list": i.value,
|
|
274
|
-
"onUpdate:fileList": l[0] || (l[0] = (
|
|
273
|
+
"onUpdate:fileList": l[0] || (l[0] = (r) => i.value = r),
|
|
275
274
|
action: a.action,
|
|
276
275
|
headers: a.headers,
|
|
277
276
|
data: a.data,
|
|
@@ -285,23 +284,23 @@ const Ne = /* @__PURE__ */ we({
|
|
|
285
284
|
onExceedLimit: ve,
|
|
286
285
|
onSuccess: me,
|
|
287
286
|
onError: ge
|
|
288
|
-
},
|
|
289
|
-
(
|
|
287
|
+
}, ke({ _: 2 }, [
|
|
288
|
+
(t = T(O)) != null && t.image ? {
|
|
290
289
|
name: "image",
|
|
291
|
-
fn:
|
|
292
|
-
ie(a.$slots, "image", { fileItem:
|
|
290
|
+
fn: te(({ fileItem: r }) => [
|
|
291
|
+
ie(a.$slots, "image", { fileItem: r })
|
|
293
292
|
]),
|
|
294
293
|
key: "0"
|
|
295
294
|
} : void 0,
|
|
296
|
-
(
|
|
295
|
+
(c = T(O)) != null && c["upload-button"] ? {
|
|
297
296
|
name: "upload-button",
|
|
298
|
-
fn:
|
|
297
|
+
fn: te(() => [
|
|
299
298
|
ie(a.$slots, "upload-button")
|
|
300
299
|
]),
|
|
301
300
|
key: "1"
|
|
302
301
|
} : void 0
|
|
303
302
|
]), 1032, ["class", "tip", "file-list", "action", "headers", "data", "name", "accept", "multiple", "limit", "disabled"]),
|
|
304
|
-
m.value && n.value !== void 0 ? (
|
|
303
|
+
m.value && n.value !== void 0 ? (ne(), Le(je, {
|
|
305
304
|
key: 0,
|
|
306
305
|
ref_key: "cropperInsRef",
|
|
307
306
|
ref: v,
|
|
@@ -311,7 +310,7 @@ const Ne = /* @__PURE__ */ we({
|
|
|
311
310
|
onCancel: he,
|
|
312
311
|
onConfirm: Ie,
|
|
313
312
|
onImgLoad: xe
|
|
314
|
-
}, null, 8, ["file", "index", "options"])) :
|
|
313
|
+
}, null, 8, ["file", "index", "options"])) : Oe("", !0)
|
|
315
314
|
]);
|
|
316
315
|
};
|
|
317
316
|
}
|