@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.
Files changed (67) hide show
  1. package/es/index.js +1 -1
  2. package/es/pro-calendar/index.d.ts +2 -0
  3. package/es/pro-calendar/index.js +1 -0
  4. package/es/pro-date-range-picker/index.d.ts +176 -7
  5. package/es/pro-date-range-picker/interface.d.ts +2 -2
  6. package/es/pro-date-range-picker/pro-date-range-picker.vue.d.ts +171 -5
  7. package/es/pro-date-range-picker/pro-date-range-picker.vue.js +1 -1
  8. package/es/pro-date-range-picker/pro-date-range-picker.vue2.js +111 -113
  9. package/es/pro-dates-picker/index.d.ts +11 -8
  10. package/es/pro-dates-picker/index.js +8 -8
  11. package/es/pro-dates-picker/index.vue.d.ts +3 -3
  12. package/es/pro-dates-picker/index.vue.js +96 -97
  13. package/es/pro-find-password/index.d.ts +2 -0
  14. package/es/pro-find-password/index.js +5 -5
  15. package/es/pro-find-password/index.vue.d.ts +830 -66
  16. package/es/pro-find-password/index.vue.js +132 -134
  17. package/es/pro-find-password/reset-password.vue.d.ts +192 -1
  18. package/es/pro-find-password/reset-password.vue.js +120 -122
  19. package/es/pro-find-password/verify-user-name.vue.d.ts +384 -2
  20. package/es/pro-find-password/verify-user-name.vue.js +74 -76
  21. package/es/pro-footer-bar/index.d.ts +3 -0
  22. package/es/pro-footer-bar/index.vue.js +2 -2
  23. package/es/pro-footer-bar/index.vue2.js +24 -26
  24. package/es/pro-form-group/index.d.ts +1 -0
  25. package/es/pro-form-group/index.vue.js +1 -1
  26. package/es/pro-form-group/index.vue2.js +31 -32
  27. package/es/pro-image-upload/cropper.vue.js +2 -2
  28. package/es/pro-image-upload/cropper.vue2.js +198 -199
  29. package/es/pro-image-upload/image-upload.vue.d.ts +648 -2
  30. package/es/pro-image-upload/image-upload.vue.js +74 -75
  31. package/es/pro-image-upload/index.d.ts +327 -1
  32. package/es/pro-image-upload/index.js +1 -1
  33. package/es/pro-keep-alive-router-view/index.d.ts +1 -0
  34. package/es/pro-layout/index.d.ts +4 -3
  35. package/es/pro-layout/index.js +1 -1
  36. package/es/pro-layout/pro-layout.vue.d.ts +1 -1
  37. package/es/pro-layout/pro-layout.vue.js +222 -218
  38. package/es/pro-loader/index.d.ts +2 -0
  39. package/es/pro-login/form-mobile.vue.d.ts +384 -2
  40. package/es/pro-login/form-mobile.vue.js +97 -99
  41. package/es/pro-login/form-password.vue.d.ts +192 -1
  42. package/es/pro-login/form-password.vue.js +72 -74
  43. package/es/pro-login/index.d.ts +2 -0
  44. package/es/pro-login/index.vue.d.ts +831 -67
  45. package/es/pro-login/index.vue.js +62 -64
  46. package/es/pro-menu/index.d.ts +2 -0
  47. package/es/pro-menu/menu-item.vue.js +13 -13
  48. package/es/pro-menu/pro-menu.vue.js +28 -30
  49. package/es/pro-menu/sub-menu.vue.js +20 -19
  50. package/es/pro-page-container/index.d.ts +3 -0
  51. package/es/pro-page-container/pro-page-container.vue.js +46 -44
  52. package/es/pro-page-header/index.d.ts +3 -0
  53. package/es/pro-page-header/index.js +6 -6
  54. package/es/pro-page-header/pro-page-header.vue.js +78 -77
  55. package/es/pro-reuse-tabs/index.d.ts +5 -3
  56. package/es/pro-reuse-tabs/index.js +1 -1
  57. package/es/pro-reuse-tabs/pro-reuse-tabs.vue.d.ts +1 -1
  58. package/es/pro-reuse-tabs/pro-reuse-tabs.vue.js +33 -35
  59. package/es/pro-table/index.d.ts +6 -3
  60. package/es/pro-table/index.js +7 -7
  61. package/es/pro-table/index.vue.d.ts +2 -2
  62. package/es/pro-table/index.vue.js +68 -70
  63. package/es/pro-textarea/index.d.ts +7 -5
  64. package/es/pro-textarea/index.vue.js +2 -2
  65. package/es/pro-textarea/index.vue2.js +14 -16
  66. package/es/style.css +1 -1
  67. package/package.json +1 -1
@@ -1,33 +1,33 @@
1
- var Ce = Object.defineProperty;
2
- var _ = Object.getOwnPropertySymbols;
3
- var ye = Object.prototype.hasOwnProperty, Be = Object.prototype.propertyIsEnumerable;
4
- var ee = (s, c, r) => c in s ? Ce(s, c, { enumerable: !0, configurable: !0, writable: !0, value: r }) : s[c] = r, Q = (s, c) => {
5
- for (var r in c || (c = {}))
6
- ye.call(c, r) && ee(s, r, c[r]);
7
- if (_)
8
- for (var r of _(c))
9
- Be.call(c, r) && ee(s, r, c[r]);
10
- return s;
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 = (s, c, r) => new Promise((O, i) => {
12
+ var b = (d, s, u) => new Promise((O, i) => {
13
13
  var e = (v) => {
14
14
  try {
15
- x(r.next(v));
15
+ x(u.next(v));
16
16
  } catch (m) {
17
17
  i(m);
18
18
  }
19
19
  }, z = (v) => {
20
20
  try {
21
- x(r.throw(v));
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((r = r.apply(s, c)).next());
26
+ x((u = u.apply(d, s)).next());
27
27
  });
28
- import { defineComponent as we, mergeModels as ae, useSlots as Ee, useModel as Me, ref as U, computed as L, watch as le, resolveComponent as Se, createElementBlock as be, openBlock as oe, createVNode as Le, createBlock as Oe, createCommentVNode as $e, normalizeClass as ke, createSlots as ze, withCtx as ne, unref as te, renderSlot as ie } from "vue";
29
- import { Message as C } from "@arco-design/web-vue";
30
- import { conclude as T } from "vue-global-config";
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__ */ ae({
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 s;
48
- return ((s = E) == null ? void 0 : s.accept) || [];
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__ */ ae(["cropperImgLoad"], ["update:modelValue"]),
71
- setup(s, { expose: c, emit: r }) {
72
- const O = Ee(), i = Me(s, "modelValue"), e = s, z = r, x = U(), v = U(), m = U(), y = U([]), n = U(), p = U(), g = U(), se = L(() => e.accept.map((a) => `.${a}`).join(",")), h = L(() => T([e.checkOptions, Qe]) || {}), M = L(() => T([e.compressorOptions, Te]) || {}), S = L(() => T([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;
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, C.clear(), C.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* () {
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
- V();
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) : (C.error((t = e.exceedTip) != null ? t : `超过数量上限,最多上传${(e == null ? void 0 : e.limit) || 1}张`), i.value = a);
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((f) => f.uid === a.uid);
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
- y.value.push({ file: a, resolve: l, reject: t }), y.value.length === 1 && !n.value && V();
108
- }), V = () => {
109
- n.value === void 0 ? n.value = 0 : n.value + 1 >= y.value.length ? (n.value = void 0, y.value = []) : 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
- le(n, () => b(null, null, function* () {
120
- var $, k, j, W, F, H, P, q, D, G, J, K, X, Y, Z, N, A, R;
121
- if (n.value === void 0 || y.value.length === 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 = y.value[n.value];
123
+ const a = C.value[n.value];
124
124
  if (!a) return;
125
- const { file: l, resolve: t, reject: f } = a;
126
- let u = l.name, d = l;
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 (W = h.value) != null && W.showErrorMessage && C.error((o == null ? void 0 : o.errorMessage) || "图片校验及转换失败"), f();
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 = u == null ? void 0 : u.split(".");
159
- w.pop(), u = `${w.join(",")}.jpg`, d = new File([o.file], u, {
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
- d = o.file;
163
+ f = o.file;
164
164
  }
165
- if ((F = S.value) != null && F.enable && !((P = (H = u == null ? void 0 : u.toLocaleLowerCase) == null ? void 0 : H.call(u)) != null && P.endsWith(".gif"))) {
166
- (q = e == null ? void 0 : e.onInnerBeforeUploadStart) == null || q.call(
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
- (D = S.value) != null && D.customCrop ? d = yield S.value.customCrop(d) : d = yield new Promise((o, w) => {
174
- m.value = { file: d, resolve: o, reject: w };
175
- }), (G = e == null ? void 0 : e.onInnerBeforeUploadEnd) == null || G.call(
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 (J = e == null ? void 0 : e.onInnerBeforeUploadEnd) == null || J.call(
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
- ), (K = S.value) != null && K.showErrorMessage && C.error("图片剪裁失败"), f();
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 ((X = M.value) != null && X.enable) {
202
+ if ((Y = M.value) != null && Y.enable) {
203
203
  p.value = {
204
204
  loading: !0,
205
205
  text: `第${n.value + 1}张图片处理中,请稍等`
206
- }, (Y = e == null ? void 0 : e.onInnerBeforeUploadStart) == null || Y.call(
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(d, {
212
+ const o = yield Fe(f, {
213
213
  maxSize: M.value.maxSize,
214
214
  size: M.value.size,
215
- excludeAllowedTypes: (Z = M.value.excludeAllowedTypes) == null ? void 0 : Z.map((w) => `${w}`)
215
+ excludeAllowedTypes: (N = M.value.excludeAllowedTypes) == null ? void 0 : N.map((w) => `${w}`)
216
216
  });
217
- if (p.value = void 0, (N = e == null ? void 0 : e.onInnerBeforeUploadEnd) == null || N.call(
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 (A = M.value) != null && A.showErrorMessage && C.error((o == null ? void 0 : o.errorMessage) || "图片压缩失败"), f();
231
- d = new File([o.file], u, {
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, (R = e == null ? void 0 : e.onInnerBeforeUploadEnd) == null || R.call(
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(d);
243
+ ), t(f);
244
244
  }));
245
245
  let B;
246
- le(
246
+ oe(
247
247
  () => p.value,
248
248
  () => {
249
249
  var a;
250
- p.value ? B = C.loading({
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 c({
258
+ return s({
259
259
  uploadInsRef: x,
260
260
  cropperInsRef: v,
261
261
  isUploadComplete: Ue
262
262
  }), (a, l) => {
263
- var f, u;
264
- const t = Se("a-upload");
265
- return oe(), be("div", null, [
266
- Le(t, {
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] = (d) => i.value = d),
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
- }, ze({ _: 2 }, [
289
- (f = te(O)) != null && f.image ? {
287
+ }, ke({ _: 2 }, [
288
+ (t = T(O)) != null && t.image ? {
290
289
  name: "image",
291
- fn: ne(({ fileItem: d }) => [
292
- ie(a.$slots, "image", { fileItem: d })
290
+ fn: te(({ fileItem: r }) => [
291
+ ie(a.$slots, "image", { fileItem: r })
293
292
  ]),
294
293
  key: "0"
295
294
  } : void 0,
296
- (u = te(O)) != null && u["upload-button"] ? {
295
+ (c = T(O)) != null && c["upload-button"] ? {
297
296
  name: "upload-button",
298
- fn: ne(() => [
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 ? (oe(), Oe(je, {
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"])) : $e("", !0)
313
+ }, null, 8, ["file", "index", "options"])) : Oe("", !0)
315
314
  ]);
316
315
  };
317
316
  }