@keyblade/pro-components 1.15.0-alpha.14 → 1.15.0-alpha.16

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.
@@ -1,7 +1,7 @@
1
- import { defineComponent as U, ref as m, watch as q, onBeforeUnmount as F, createBlock as c, openBlock as I, unref as l, normalizeClass as v, withCtx as r, createVNode as t, mergeProps as n, createElementBlock as R, createTextVNode as N, toDisplayString as T, normalizeProps as E, guardReactiveProps as x } from "vue";
2
- import { regexp as D, message as L } from "../pro-login/regexp.js";
3
- import { Form as j, FormItem as p, Input as b, Button as C, InputPassword as y } from "@arco-design/web-vue";
4
- const J = /* @__PURE__ */ U({
1
+ import { defineComponent as q, useSlots as F, ref as p, watch as R, onBeforeUnmount as T, createBlock as I, openBlock as V, unref as l, normalizeClass as v, withCtx as t, createVNode as s, mergeProps as n, createElementBlock as E, createTextVNode as N, toDisplayString as x, renderSlot as D, createCommentVNode as L, normalizeProps as j, guardReactiveProps as A } from "vue";
2
+ import { regexp as G, message as H } from "../pro-login/regexp.js";
3
+ import { Form as J, FormItem as m, Input as C, Button as b, InputPassword as y } from "@arco-design/web-vue";
4
+ const Q = /* @__PURE__ */ q({
5
5
  __name: "reset-password",
6
6
  props: {
7
7
  current: {},
@@ -22,56 +22,56 @@ const J = /* @__PURE__ */ U({
22
22
  prefixClsName: {}
23
23
  },
24
24
  emits: ["submit", "send-sms-code"],
25
- setup(h, { expose: k, emit: S }) {
26
- const i = h, g = m();
27
- q(() => i.phoneNum, (a) => {
28
- g.value = a;
25
+ setup(S, { expose: k, emit: $ }) {
26
+ const i = S, h = F(), g = p();
27
+ R(() => i.phoneNum, (e) => {
28
+ g.value = e;
29
29
  }, {
30
30
  immediate: !0
31
31
  });
32
- const $ = {
32
+ const z = {
33
33
  password: [{
34
34
  required: !0,
35
35
  message: "请输入新密码"
36
36
  }, {
37
- validator: (a, e) => {
38
- D.password.test(a) || e(L.password);
37
+ validator: (e, o) => {
38
+ G.password.test(e) || o(H.password);
39
39
  }
40
40
  }],
41
41
  again: [{
42
42
  required: !0,
43
43
  message: "请再次输入新密码"
44
44
  }, {
45
- validator: (a, e) => {
46
- s.value.password !== a && e("两次输入的密码不同");
45
+ validator: (e, o) => {
46
+ r.value.password !== e && o("两次输入的密码不同");
47
47
  }
48
48
  }],
49
49
  captcha: [{
50
50
  required: !0,
51
51
  message: "请输入验证码"
52
52
  }]
53
- }, f = m(), s = m({
53
+ }, f = p(), r = p({
54
54
  password: "",
55
55
  again: "",
56
56
  captcha: ""
57
- }), d = m(), u = m(i.countdown), V = S;
58
- F(() => {
57
+ }), d = p(), u = p(i.countdown), c = $;
58
+ T(() => {
59
59
  d.value && P();
60
60
  });
61
- const z = () => {
62
- V("submit", s.value);
63
- }, w = (a) => {
64
- var e;
65
- (e = f.value) == null || e.clearValidate(a);
61
+ const B = () => {
62
+ c("submit", r.value);
63
+ }, w = (e) => {
64
+ var o;
65
+ (o = f.value) == null || o.clearValidate(e);
66
66
  }, P = () => {
67
67
  u.value = i.countdown, clearInterval(d.value), d.value = void 0;
68
- }, B = () => {
69
- var a;
70
- (a = f.value) == null || a.validateField("mobile", (e) => {
71
- if (!e && u.value >= 60) {
68
+ }, U = () => {
69
+ var e;
70
+ (e = f.value) == null || e.validateField("mobile", (o) => {
71
+ if (!o && u.value >= 60) {
72
72
  if (d.value)
73
73
  return;
74
- V("send-sms-code"), u.value--, d.value = setInterval(() => {
74
+ c("send-sms-code"), u.value--, d.value = setInterval(() => {
75
75
  u.value > 0 ? u.value-- : P();
76
76
  }, 1e3);
77
77
  }
@@ -80,96 +80,99 @@ const J = /* @__PURE__ */ U({
80
80
  return k({
81
81
  formRef: f,
82
82
  resetTime: P
83
- }), (a, e) => (I(), c(l(j), {
83
+ }), (e, o) => (V(), I(l(J), {
84
84
  ref_key: "formRef",
85
85
  ref: f,
86
- model: s.value,
87
- rules: $,
88
- class: v(`${a.prefixClsName}-reset-password`),
89
- onSubmitSuccess: z
86
+ model: r.value,
87
+ rules: z,
88
+ class: v(`${e.prefixClsName}-reset-password`),
89
+ onSubmitSuccess: B
90
90
  }, {
91
- default: r(() => [
92
- t(l(p), n({ field: "phoneNum" }, a.formItemProps), {
93
- default: r(() => [
94
- t(l(b), n(a.inputProps, {
91
+ default: t(() => [
92
+ s(l(m), n({ field: "phoneNum" }, e.formItemProps), {
93
+ default: t(() => [
94
+ s(l(C), n(e.inputProps, {
95
95
  modelValue: g.value,
96
- "onUpdate:modelValue": e[0] || (e[0] = (o) => g.value = o),
96
+ "onUpdate:modelValue": o[0] || (o[0] = (a) => g.value = a),
97
97
  "max-length": 16,
98
98
  disabled: ""
99
99
  }), null, 16, ["modelValue"])
100
100
  ]),
101
101
  _: 1
102
102
  }, 16),
103
- t(l(p), n({ field: "captcha" }, a.formItemProps), {
104
- default: r(() => [
105
- t(l(b), n(a.inputProps, {
106
- modelValue: s.value.captcha,
107
- "onUpdate:modelValue": e[1] || (e[1] = (o) => s.value.captcha = o),
103
+ s(l(m), n({ field: "captcha" }, e.formItemProps), {
104
+ extra: t(() => [
105
+ l(h).appeal ? D(e.$slots, "appeal", { key: 0 }) : L("", !0)
106
+ ]),
107
+ default: t(() => [
108
+ s(l(C), n(e.inputProps, {
109
+ modelValue: r.value.captcha,
110
+ "onUpdate:modelValue": o[1] || (o[1] = (a) => r.value.captcha = a),
108
111
  "max-length": 6,
109
112
  placeholder: "请输入短信验证码",
110
113
  autocomplete: "off",
111
- onInput: e[2] || (e[2] = (o) => w("captcha"))
114
+ onInput: o[2] || (o[2] = (a) => w("captcha"))
112
115
  }), {
113
- append: r(() => [
114
- u.value >= i.countdown ? (I(), c(l(C), {
116
+ append: t(() => [
117
+ u.value >= i.countdown ? (V(), I(l(b), {
115
118
  key: 0,
116
119
  type: "outline",
117
- class: v(`${a.prefixClsName}-mobile-send-code`),
118
- onClick: B
120
+ class: v(`${e.prefixClsName}-mobile-send-code`),
121
+ onClick: U
119
122
  }, {
120
- default: r(() => e[7] || (e[7] = [
123
+ default: t(() => o[7] || (o[7] = [
121
124
  N(" 获取短信验证码 ")
122
125
  ])),
123
126
  _: 1
124
- }, 8, ["class"])) : (I(), R("div", {
127
+ }, 8, ["class"])) : (V(), E("div", {
125
128
  key: 1,
126
- class: v(`${a.prefixClsName}-mobile-time`)
127
- }, T(u.value) + "秒后可重新发送 ", 3))
129
+ class: v(`${e.prefixClsName}-mobile-time`)
130
+ }, x(u.value) + "秒后可重新发送 ", 3))
128
131
  ]),
129
132
  _: 1
130
133
  }, 16, ["modelValue"])
131
134
  ]),
132
- _: 1
135
+ _: 3
133
136
  }, 16),
134
- t(l(p), n({ field: "password" }, a.formItemProps), {
135
- default: r(() => [
136
- t(l(y), n(a.inputProps, {
137
- modelValue: s.value.password,
138
- "onUpdate:modelValue": e[3] || (e[3] = (o) => s.value.password = o),
137
+ s(l(m), n({ field: "password" }, e.formItemProps), {
138
+ default: t(() => [
139
+ s(l(y), n(e.inputProps, {
140
+ modelValue: r.value.password,
141
+ "onUpdate:modelValue": o[3] || (o[3] = (a) => r.value.password = a),
139
142
  "max-length": 32,
140
143
  placeholder: "请输入您新的登录密码",
141
144
  autocomplete: "new-password",
142
- onInput: e[4] || (e[4] = (o) => w("password"))
145
+ onInput: o[4] || (o[4] = (a) => w("password"))
143
146
  }), null, 16, ["modelValue"])
144
147
  ]),
145
148
  _: 1
146
149
  }, 16),
147
- t(l(p), n({ field: "again" }, a.formItemProps), {
148
- default: r(() => [
149
- t(l(y), n(a.inputProps, {
150
- modelValue: s.value.again,
151
- "onUpdate:modelValue": e[5] || (e[5] = (o) => s.value.again = o),
150
+ s(l(m), n({ field: "again" }, e.formItemProps), {
151
+ default: t(() => [
152
+ s(l(y), n(e.inputProps, {
153
+ modelValue: r.value.again,
154
+ "onUpdate:modelValue": o[5] || (o[5] = (a) => r.value.again = a),
152
155
  "max-length": 32,
153
156
  placeholder: "请再次输入您新的登录密码",
154
157
  autocomplete: "new-password",
155
- onInput: e[6] || (e[6] = (o) => w("again"))
158
+ onInput: o[6] || (o[6] = (a) => w("again"))
156
159
  }), null, 16, ["modelValue"])
157
160
  ]),
158
161
  _: 1
159
162
  }, 16),
160
- t(l(p), E(x(a.formItemProps)), {
161
- default: r(() => {
162
- var o;
163
+ s(l(m), j(A(e.formItemProps)), {
164
+ default: t(() => {
165
+ var a;
163
166
  return [
164
- t(l(C), {
167
+ s(l(b), {
165
168
  type: "primary",
166
169
  long: "",
167
- loading: a.loading,
170
+ loading: e.loading,
168
171
  "html-type": "submit",
169
- size: (o = a.inputProps) == null ? void 0 : o.size,
170
- class: v(`${a.prefixClsName}-reset-password-submit`)
172
+ size: (a = e.inputProps) == null ? void 0 : a.size,
173
+ class: v(`${e.prefixClsName}-reset-password-submit`)
171
174
  }, {
172
- default: r(() => e[8] || (e[8] = [
175
+ default: t(() => o[8] || (o[8] = [
173
176
  N(" 确认 ")
174
177
  ])),
175
178
  _: 1
@@ -179,10 +182,10 @@ const J = /* @__PURE__ */ U({
179
182
  _: 1
180
183
  }, 16)
181
184
  ]),
182
- _: 1
185
+ _: 3
183
186
  }, 8, ["model", "class"]));
184
187
  }
185
188
  });
186
189
  export {
187
- J as default
190
+ Q as default
188
191
  };