@keyblade/pro-components 1.15.0-alpha.10 → 1.15.0-alpha.12
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.
|
@@ -18,9 +18,10 @@ declare function __VLS_template(): {
|
|
|
18
18
|
readonly formItemProps?: Partial<import('@arco-design/web-vue').FormItemInstance> | undefined;
|
|
19
19
|
readonly countdown?: number | undefined;
|
|
20
20
|
readonly onSendSmsCode?: ((value: string) => void) | undefined;
|
|
21
|
+
readonly loading?: boolean | undefined;
|
|
21
22
|
readonly current?: (EFindPasswordSteps | number) | undefined;
|
|
22
23
|
readonly phoneNum?: string | undefined;
|
|
23
|
-
readonly onNext?: ((current: number) => void) | undefined;
|
|
24
|
+
readonly onNext?: ((current: number, value: VerifyUserNameFormField | ResetPasswordFormField) => void) | undefined;
|
|
24
25
|
readonly onEntry?: (() => void) | undefined;
|
|
25
26
|
readonly 'update:current'?: ((value: number) => void) | undefined;
|
|
26
27
|
readonly prefixClsName: string;
|
|
@@ -2441,9 +2442,10 @@ declare const __VLS_component: import('vue').DefineComponent<IFindPassword, {
|
|
|
2441
2442
|
readonly formItemProps?: Partial<import('@arco-design/web-vue').FormItemInstance> | undefined;
|
|
2442
2443
|
readonly countdown?: number | undefined;
|
|
2443
2444
|
readonly onSendSmsCode?: ((value: string) => void) | undefined;
|
|
2445
|
+
readonly loading?: boolean | undefined;
|
|
2444
2446
|
readonly current?: (EFindPasswordSteps | number) | undefined;
|
|
2445
2447
|
readonly phoneNum?: string | undefined;
|
|
2446
|
-
readonly onNext?: ((current: number) => void) | undefined;
|
|
2448
|
+
readonly onNext?: ((current: number, value: VerifyUserNameFormField | ResetPasswordFormField) => void) | undefined;
|
|
2447
2449
|
readonly onEntry?: (() => void) | undefined;
|
|
2448
2450
|
readonly 'update:current'?: ((value: number) => void) | undefined;
|
|
2449
2451
|
readonly prefixClsName: string;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { defineComponent as L, useSlots as U, ref as p, computed as z, onBeforeUnmount as h, watch as j, createBlock as
|
|
1
|
+
import { defineComponent as L, useSlots as U, ref as p, computed as z, onBeforeUnmount as h, watch as j, createBlock as P, openBlock as a, unref as r, mergeProps as S, withCtx as o, renderSlot as d, createVNode as s, createCommentVNode as k, createElementBlock as B, createTextVNode as c, createSlots as q, normalizeClass as v, normalizeProps as T, guardReactiveProps as E, createElementVNode as x, toDisplayString as A } from "vue";
|
|
2
2
|
import { Card as G, Space as H, Steps as J, Step as $, Form as K, FormItem as V, Button as M } from "@arco-design/web-vue";
|
|
3
3
|
import { EFindPasswordSteps as b } from "./enum.js";
|
|
4
4
|
import O from "./verify-user-name.vue.js";
|
|
5
5
|
/* empty css */
|
|
6
6
|
import Q from "./reset-password.vue.js";
|
|
7
|
-
const W = { key: 1 },
|
|
7
|
+
const W = { key: 1 }, l = "keyblade-find-password", oe = /* @__PURE__ */ L({
|
|
8
8
|
__name: "index",
|
|
9
9
|
props: {
|
|
10
10
|
current: { default: 1 },
|
|
@@ -20,6 +20,7 @@ const W = { key: 1 }, u = "keyblade-find-password", oe = /* @__PURE__ */ L({
|
|
|
20
20
|
hideLabel: !0,
|
|
21
21
|
validateTrigger: []
|
|
22
22
|
}) },
|
|
23
|
+
loading: { type: Boolean },
|
|
23
24
|
onNext: {},
|
|
24
25
|
onSendSmsCode: {},
|
|
25
26
|
onEntry: {},
|
|
@@ -27,25 +28,26 @@ const W = { key: 1 }, u = "keyblade-find-password", oe = /* @__PURE__ */ L({
|
|
|
27
28
|
},
|
|
28
29
|
emits: ["send-sms-code", "update:current", "next", "entry"],
|
|
29
30
|
setup(F, { expose: _, emit: D }) {
|
|
30
|
-
const n = F,
|
|
31
|
+
const n = F, u = D, N = U(), y = p(), R = p(), w = z(() => ({
|
|
31
32
|
inputProps: n.inputProps,
|
|
32
33
|
formItemProps: n.formItemProps,
|
|
33
|
-
|
|
34
|
+
loading: n.loading,
|
|
35
|
+
prefixClsName: l
|
|
34
36
|
})), i = z({
|
|
35
37
|
get: () => n.current,
|
|
36
|
-
set: (e) =>
|
|
38
|
+
set: (e) => u("update:current", e)
|
|
37
39
|
}), m = p(), f = p(4);
|
|
38
40
|
h(() => {
|
|
39
41
|
m.value && I();
|
|
40
42
|
});
|
|
41
43
|
const C = (e) => {
|
|
42
|
-
n.current >= 3 ||
|
|
44
|
+
n.current >= 3 || u("next", n.current + 1, e);
|
|
43
45
|
}, I = () => {
|
|
44
46
|
f.value = 4, clearInterval(m.value), m.value = void 0;
|
|
45
47
|
};
|
|
46
48
|
return j(() => n.current, (e) => {
|
|
47
49
|
e >= 3 && (m.value = setInterval(() => {
|
|
48
|
-
f.value > 0 ? f.value-- : (I(),
|
|
50
|
+
f.value > 0 ? f.value-- : (I(), u("entry"));
|
|
49
51
|
}, 1e3));
|
|
50
52
|
}), _({
|
|
51
53
|
get resetTime() {
|
|
@@ -61,7 +63,7 @@ const W = { key: 1 }, u = "keyblade-find-password", oe = /* @__PURE__ */ L({
|
|
|
61
63
|
var e;
|
|
62
64
|
return (e = R.value) == null ? void 0 : e.formRef;
|
|
63
65
|
}
|
|
64
|
-
}), (e, t) => (a(),
|
|
66
|
+
}), (e, t) => (a(), P(r(G), S({ class: l }, e.cardProps), {
|
|
65
67
|
default: o(() => [
|
|
66
68
|
d(e.$slots, "header"),
|
|
67
69
|
s(r(H), {
|
|
@@ -97,7 +99,7 @@ const W = { key: 1 }, u = "keyblade-find-password", oe = /* @__PURE__ */ L({
|
|
|
97
99
|
_: 1
|
|
98
100
|
}, 8, ["current"]),
|
|
99
101
|
d(e.$slots, "content"),
|
|
100
|
-
i.value === r(b).verify ? (a(),
|
|
102
|
+
i.value === r(b).verify ? (a(), P(O, S({ key: 0 }, w.value, {
|
|
101
103
|
ref_key: "verifyRef",
|
|
102
104
|
ref: R,
|
|
103
105
|
onSubmit: C
|
|
@@ -110,43 +112,43 @@ const W = { key: 1 }, u = "keyblade-find-password", oe = /* @__PURE__ */ L({
|
|
|
110
112
|
key: "0"
|
|
111
113
|
} : void 0
|
|
112
114
|
]), 1040)) : k("", !0),
|
|
113
|
-
i.value === r(b).reset ? (a(),
|
|
115
|
+
i.value === r(b).reset ? (a(), P(Q, S({ key: 1 }, w.value, {
|
|
114
116
|
ref_key: "resetRef",
|
|
115
117
|
ref: y,
|
|
116
118
|
countdown: e.countdown,
|
|
117
119
|
"phone-num": e.phoneNum,
|
|
118
|
-
onSendSmsCode: t[0] || (t[0] = () =>
|
|
120
|
+
onSendSmsCode: t[0] || (t[0] = () => u("send-sms-code")),
|
|
119
121
|
onSubmit: C
|
|
120
122
|
}), null, 16, ["countdown", "phone-num"])) : k("", !0),
|
|
121
123
|
i.value === r(b).succeed ? (a(), B("div", {
|
|
122
124
|
key: 2,
|
|
123
|
-
class: v(`${
|
|
125
|
+
class: v(`${l}-succeed`)
|
|
124
126
|
}, [
|
|
125
127
|
r(N).succeed ? d(e.$slots, "succeed", { key: 0 }) : (a(), B("div", W, [
|
|
126
128
|
s(r(K), {
|
|
127
129
|
model: {},
|
|
128
|
-
class: v(`${
|
|
129
|
-
onSubmit: t[1] || (t[1] = (
|
|
130
|
+
class: v(`${l}-succeed`),
|
|
131
|
+
onSubmit: t[1] || (t[1] = (g) => u("entry"))
|
|
130
132
|
}, {
|
|
131
133
|
default: o(() => [
|
|
132
134
|
s(r(V), T(E(e.formItemProps)), {
|
|
133
135
|
default: o(() => [
|
|
134
136
|
x("div", {
|
|
135
|
-
class: v(`${
|
|
137
|
+
class: v(`${l}-succeed-message`)
|
|
136
138
|
}, " 重置密码成功," + A(f.value) + "秒后自动返回 ", 3)
|
|
137
139
|
]),
|
|
138
140
|
_: 1
|
|
139
141
|
}, 16),
|
|
140
142
|
s(r(V), T(E(e.formItemProps)), {
|
|
141
143
|
default: o(() => {
|
|
142
|
-
var
|
|
144
|
+
var g;
|
|
143
145
|
return [
|
|
144
146
|
s(r(M), {
|
|
145
147
|
type: "primary",
|
|
146
148
|
long: "",
|
|
147
149
|
"html-type": "submit",
|
|
148
|
-
size: (
|
|
149
|
-
class: v(`${
|
|
150
|
+
size: (g = e.inputProps) == null ? void 0 : g.size,
|
|
151
|
+
class: v(`${l}-succeed-submit`)
|
|
150
152
|
}, {
|
|
151
153
|
default: o(() => t[5] || (t[5] = [
|
|
152
154
|
c(" 确认 ")
|
|
@@ -15,8 +15,10 @@ export type IFindPassword = {
|
|
|
15
15
|
countdown?: number;
|
|
16
16
|
/** 表单项属性 */
|
|
17
17
|
formItemProps?: Partial<FormItemInstance>;
|
|
18
|
+
/** 加载状态 */
|
|
19
|
+
loading?: boolean;
|
|
18
20
|
/** 下一步 */
|
|
19
|
-
onNext?: (current: number) => void;
|
|
21
|
+
onNext?: (current: number, value: VerifyUserNameFormField | ResetPasswordFormField) => void;
|
|
20
22
|
/** 获取短信验证码 */
|
|
21
23
|
onSendSmsCode?: (value: string) => void;
|
|
22
24
|
/** 修改成功,返回 */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { regexp as
|
|
3
|
-
import { Form as
|
|
4
|
-
const
|
|
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({
|
|
5
5
|
__name: "reset-password",
|
|
6
6
|
props: {
|
|
7
7
|
current: {},
|
|
@@ -14,6 +14,7 @@ const G = /* @__PURE__ */ B({
|
|
|
14
14
|
hideLabel: !0,
|
|
15
15
|
validateTrigger: []
|
|
16
16
|
}) },
|
|
17
|
+
loading: { type: Boolean },
|
|
17
18
|
onNext: {},
|
|
18
19
|
onSendSmsCode: {},
|
|
19
20
|
onEntry: {},
|
|
@@ -21,14 +22,20 @@ const G = /* @__PURE__ */ B({
|
|
|
21
22
|
prefixClsName: {}
|
|
22
23
|
},
|
|
23
24
|
emits: ["submit", "send-sms-code"],
|
|
24
|
-
setup(
|
|
25
|
-
const
|
|
25
|
+
setup(h, { expose: k, emit: S }) {
|
|
26
|
+
const i = h, g = m();
|
|
27
|
+
q(() => i.phoneNum, (a) => {
|
|
28
|
+
g.value = a;
|
|
29
|
+
}, {
|
|
30
|
+
immediate: !0
|
|
31
|
+
});
|
|
32
|
+
const $ = {
|
|
26
33
|
password: [{
|
|
27
34
|
required: !0,
|
|
28
35
|
message: "请输入新密码"
|
|
29
36
|
}, {
|
|
30
37
|
validator: (a, e) => {
|
|
31
|
-
|
|
38
|
+
D.password.test(a) || e(L.password);
|
|
32
39
|
}
|
|
33
40
|
}],
|
|
34
41
|
again: [{
|
|
@@ -36,135 +43,137 @@ const G = /* @__PURE__ */ B({
|
|
|
36
43
|
message: "请再次输入新密码"
|
|
37
44
|
}, {
|
|
38
45
|
validator: (a, e) => {
|
|
39
|
-
|
|
46
|
+
s.value.password !== a && e("两次输入的密码不同");
|
|
40
47
|
}
|
|
41
48
|
}],
|
|
42
49
|
captcha: [{
|
|
43
50
|
required: !0,
|
|
44
51
|
message: "请输入验证码"
|
|
45
52
|
}]
|
|
46
|
-
},
|
|
53
|
+
}, f = m(), s = m({
|
|
47
54
|
password: "",
|
|
48
55
|
again: "",
|
|
49
56
|
captcha: ""
|
|
50
|
-
}), d =
|
|
51
|
-
|
|
52
|
-
d.value &&
|
|
57
|
+
}), d = m(), u = m(i.countdown), V = S;
|
|
58
|
+
F(() => {
|
|
59
|
+
d.value && P();
|
|
53
60
|
});
|
|
54
|
-
const
|
|
55
|
-
|
|
56
|
-
},
|
|
61
|
+
const z = () => {
|
|
62
|
+
V("submit", s.value);
|
|
63
|
+
}, w = (a) => {
|
|
57
64
|
var e;
|
|
58
|
-
(e =
|
|
59
|
-
},
|
|
60
|
-
|
|
61
|
-
},
|
|
65
|
+
(e = f.value) == null || e.clearValidate(a);
|
|
66
|
+
}, P = () => {
|
|
67
|
+
u.value = i.countdown, clearInterval(d.value), d.value = void 0;
|
|
68
|
+
}, B = () => {
|
|
62
69
|
var a;
|
|
63
|
-
(a =
|
|
64
|
-
if (!e &&
|
|
70
|
+
(a = f.value) == null || a.validateField("mobile", (e) => {
|
|
71
|
+
if (!e && u.value >= 60) {
|
|
65
72
|
if (d.value)
|
|
66
73
|
return;
|
|
67
|
-
|
|
68
|
-
|
|
74
|
+
V("send-sms-code"), u.value--, d.value = setInterval(() => {
|
|
75
|
+
u.value > 0 ? u.value-- : P();
|
|
69
76
|
}, 1e3);
|
|
70
77
|
}
|
|
71
78
|
});
|
|
72
79
|
};
|
|
73
|
-
return
|
|
74
|
-
formRef:
|
|
75
|
-
resetTime:
|
|
76
|
-
}), (a, e) => (
|
|
80
|
+
return k({
|
|
81
|
+
formRef: f,
|
|
82
|
+
resetTime: P
|
|
83
|
+
}), (a, e) => (I(), c(l(j), {
|
|
77
84
|
ref_key: "formRef",
|
|
78
|
-
ref:
|
|
79
|
-
model:
|
|
80
|
-
rules:
|
|
81
|
-
class:
|
|
82
|
-
onSubmitSuccess:
|
|
85
|
+
ref: f,
|
|
86
|
+
model: s.value,
|
|
87
|
+
rules: $,
|
|
88
|
+
class: v(`${a.prefixClsName}-reset-password`),
|
|
89
|
+
onSubmitSuccess: z
|
|
83
90
|
}, {
|
|
84
91
|
default: r(() => [
|
|
85
|
-
|
|
92
|
+
t(l(p), n({ field: "phoneNum" }, a.formItemProps), {
|
|
86
93
|
default: r(() => [
|
|
87
|
-
|
|
88
|
-
|
|
94
|
+
t(l(b), n(a.inputProps, {
|
|
95
|
+
modelValue: g.value,
|
|
96
|
+
"onUpdate:modelValue": e[0] || (e[0] = (o) => g.value = o),
|
|
89
97
|
"max-length": 16,
|
|
90
98
|
disabled: ""
|
|
91
|
-
}), null, 16, ["
|
|
99
|
+
}), null, 16, ["modelValue"])
|
|
92
100
|
]),
|
|
93
101
|
_: 1
|
|
94
102
|
}, 16),
|
|
95
|
-
|
|
103
|
+
t(l(p), n({ field: "captcha" }, a.formItemProps), {
|
|
96
104
|
default: r(() => [
|
|
97
|
-
|
|
98
|
-
modelValue:
|
|
99
|
-
"onUpdate:modelValue": e[
|
|
105
|
+
t(l(b), n(a.inputProps, {
|
|
106
|
+
modelValue: s.value.captcha,
|
|
107
|
+
"onUpdate:modelValue": e[1] || (e[1] = (o) => s.value.captcha = o),
|
|
100
108
|
"max-length": 6,
|
|
101
109
|
placeholder: "请输入短信验证码",
|
|
102
110
|
autocomplete: "off",
|
|
103
|
-
onInput: e[
|
|
111
|
+
onInput: e[2] || (e[2] = (o) => w("captcha"))
|
|
104
112
|
}), {
|
|
105
113
|
append: r(() => [
|
|
106
|
-
|
|
114
|
+
u.value >= i.countdown ? (I(), c(l(C), {
|
|
107
115
|
key: 0,
|
|
108
116
|
type: "outline",
|
|
109
|
-
class:
|
|
110
|
-
onClick:
|
|
117
|
+
class: v(`${a.prefixClsName}-mobile-send-code`),
|
|
118
|
+
onClick: B
|
|
111
119
|
}, {
|
|
112
|
-
default: r(() => e[
|
|
113
|
-
|
|
120
|
+
default: r(() => e[7] || (e[7] = [
|
|
121
|
+
N(" 获取短信验证码 ")
|
|
114
122
|
])),
|
|
115
123
|
_: 1
|
|
116
|
-
}, 8, ["class"])) : (
|
|
124
|
+
}, 8, ["class"])) : (I(), R("div", {
|
|
117
125
|
key: 1,
|
|
118
|
-
class:
|
|
119
|
-
},
|
|
126
|
+
class: v(`${a.prefixClsName}-mobile-time`)
|
|
127
|
+
}, T(u.value) + "秒后可重新发送 ", 3))
|
|
120
128
|
]),
|
|
121
129
|
_: 1
|
|
122
130
|
}, 16, ["modelValue"])
|
|
123
131
|
]),
|
|
124
132
|
_: 1
|
|
125
133
|
}, 16),
|
|
126
|
-
|
|
134
|
+
t(l(p), n({ field: "password" }, a.formItemProps), {
|
|
127
135
|
default: r(() => [
|
|
128
|
-
|
|
129
|
-
modelValue:
|
|
130
|
-
"onUpdate:modelValue": e[
|
|
136
|
+
t(l(y), n(a.inputProps, {
|
|
137
|
+
modelValue: s.value.password,
|
|
138
|
+
"onUpdate:modelValue": e[3] || (e[3] = (o) => s.value.password = o),
|
|
131
139
|
"max-length": 32,
|
|
132
140
|
placeholder: "请输入您新的登录密码",
|
|
133
141
|
autocomplete: "new-password",
|
|
134
|
-
onInput: e[
|
|
142
|
+
onInput: e[4] || (e[4] = (o) => w("password"))
|
|
135
143
|
}), null, 16, ["modelValue"])
|
|
136
144
|
]),
|
|
137
145
|
_: 1
|
|
138
146
|
}, 16),
|
|
139
|
-
|
|
147
|
+
t(l(p), n({ field: "again" }, a.formItemProps), {
|
|
140
148
|
default: r(() => [
|
|
141
|
-
|
|
142
|
-
modelValue:
|
|
143
|
-
"onUpdate:modelValue": e[
|
|
149
|
+
t(l(y), n(a.inputProps, {
|
|
150
|
+
modelValue: s.value.again,
|
|
151
|
+
"onUpdate:modelValue": e[5] || (e[5] = (o) => s.value.again = o),
|
|
144
152
|
"max-length": 32,
|
|
145
153
|
placeholder: "请再次输入您新的登录密码",
|
|
146
154
|
autocomplete: "new-password",
|
|
147
|
-
onInput: e[
|
|
155
|
+
onInput: e[6] || (e[6] = (o) => w("again"))
|
|
148
156
|
}), null, 16, ["modelValue"])
|
|
149
157
|
]),
|
|
150
158
|
_: 1
|
|
151
159
|
}, 16),
|
|
152
|
-
|
|
160
|
+
t(l(p), E(x(a.formItemProps)), {
|
|
153
161
|
default: r(() => {
|
|
154
|
-
var
|
|
162
|
+
var o;
|
|
155
163
|
return [
|
|
156
|
-
|
|
164
|
+
t(l(C), {
|
|
157
165
|
type: "primary",
|
|
158
166
|
long: "",
|
|
167
|
+
loading: a.loading,
|
|
159
168
|
"html-type": "submit",
|
|
160
|
-
size: (
|
|
161
|
-
class:
|
|
169
|
+
size: (o = a.inputProps) == null ? void 0 : o.size,
|
|
170
|
+
class: v(`${a.prefixClsName}-reset-password-submit`)
|
|
162
171
|
}, {
|
|
163
|
-
default: r(() => e[
|
|
164
|
-
|
|
172
|
+
default: r(() => e[8] || (e[8] = [
|
|
173
|
+
N(" 确认 ")
|
|
165
174
|
])),
|
|
166
175
|
_: 1
|
|
167
|
-
}, 8, ["size", "class"])
|
|
176
|
+
}, 8, ["loading", "size", "class"])
|
|
168
177
|
];
|
|
169
178
|
}),
|
|
170
179
|
_: 1
|
|
@@ -175,5 +184,5 @@ const G = /* @__PURE__ */ B({
|
|
|
175
184
|
}
|
|
176
185
|
});
|
|
177
186
|
export {
|
|
178
|
-
|
|
187
|
+
J as default
|
|
179
188
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as b, useSlots as N, ref as d, createBlock as h, openBlock as C, unref as
|
|
2
|
-
import { testUserName as
|
|
3
|
-
import { Form as
|
|
1
|
+
import { defineComponent as b, useSlots as N, ref as d, createBlock as h, openBlock as C, unref as t, normalizeClass as i, withCtx as s, createVNode as l, mergeProps as n, renderSlot as S, createCommentVNode as z, normalizeProps as k, guardReactiveProps as $, createTextVNode as B } from "vue";
|
|
2
|
+
import { testUserName as w } from "../pro-login/regexp.js";
|
|
3
|
+
import { Form as R, FormItem as u, Input as f, Button as U } from "@arco-design/web-vue";
|
|
4
4
|
const c = "keyblade-find-password", E = /* @__PURE__ */ b({
|
|
5
5
|
__name: "verify-user-name",
|
|
6
6
|
props: {
|
|
@@ -14,6 +14,7 @@ const c = "keyblade-find-password", E = /* @__PURE__ */ b({
|
|
|
14
14
|
hideLabel: !0,
|
|
15
15
|
validateTrigger: []
|
|
16
16
|
}) },
|
|
17
|
+
loading: { type: Boolean },
|
|
17
18
|
onNext: {},
|
|
18
19
|
onSendSmsCode: {},
|
|
19
20
|
onEntry: {},
|
|
@@ -21,8 +22,8 @@ const c = "keyblade-find-password", E = /* @__PURE__ */ b({
|
|
|
21
22
|
prefixClsName: {}
|
|
22
23
|
},
|
|
23
24
|
emits: ["submit"],
|
|
24
|
-
setup(
|
|
25
|
-
const
|
|
25
|
+
setup(q, { expose: v, emit: g }) {
|
|
26
|
+
const y = g, P = N(), m = d(), a = d({
|
|
26
27
|
username: "",
|
|
27
28
|
captcha: ""
|
|
28
29
|
}), V = {
|
|
@@ -30,74 +31,75 @@ const c = "keyblade-find-password", E = /* @__PURE__ */ b({
|
|
|
30
31
|
required: !0,
|
|
31
32
|
message: "请输入用户名或手机号"
|
|
32
33
|
}, {
|
|
33
|
-
validator:
|
|
34
|
+
validator: w
|
|
34
35
|
}],
|
|
35
36
|
captcha: [{
|
|
36
37
|
required: !0,
|
|
37
38
|
message: "请输入验证码"
|
|
38
39
|
}]
|
|
39
|
-
}, p = (
|
|
40
|
+
}, p = (o) => {
|
|
40
41
|
var e;
|
|
41
|
-
(e =
|
|
42
|
+
(e = m.value) == null || e.clearValidate(o);
|
|
42
43
|
}, I = () => {
|
|
43
|
-
|
|
44
|
+
y("submit", a.value);
|
|
44
45
|
};
|
|
45
46
|
return v({
|
|
46
|
-
formRef:
|
|
47
|
-
}), (
|
|
47
|
+
formRef: m
|
|
48
|
+
}), (o, e) => (C(), h(t(R), {
|
|
48
49
|
ref_key: "formRef",
|
|
49
|
-
ref:
|
|
50
|
+
ref: m,
|
|
50
51
|
model: a.value,
|
|
51
52
|
rules: V,
|
|
52
53
|
class: i(`${c}-verify-user-name`),
|
|
53
54
|
onSubmitSuccess: I
|
|
54
55
|
}, {
|
|
55
56
|
default: s(() => [
|
|
56
|
-
l(
|
|
57
|
+
l(t(u), n({ field: "username" }, o.formItemProps), {
|
|
57
58
|
default: s(() => [
|
|
58
|
-
l(
|
|
59
|
+
l(t(f), n(o.inputProps, {
|
|
59
60
|
modelValue: a.value.username,
|
|
60
|
-
"onUpdate:modelValue": e[0] || (e[0] = (
|
|
61
|
+
"onUpdate:modelValue": e[0] || (e[0] = (r) => a.value.username = r),
|
|
61
62
|
"max-length": 16,
|
|
62
63
|
placeholder: "请输入用户名/手机号",
|
|
63
|
-
onInput: e[1] || (e[1] = (
|
|
64
|
+
onInput: e[1] || (e[1] = (r) => p("username"))
|
|
64
65
|
}), null, 16, ["modelValue"])
|
|
65
66
|
]),
|
|
66
67
|
_: 1
|
|
67
68
|
}, 16),
|
|
68
|
-
l(
|
|
69
|
+
l(t(u), n({ field: "captcha" }, o.formItemProps), {
|
|
69
70
|
default: s(() => [
|
|
70
|
-
l(
|
|
71
|
+
l(t(f), n(o.inputProps, {
|
|
71
72
|
modelValue: a.value.captcha,
|
|
72
|
-
"onUpdate:modelValue": e[2] || (e[2] = (
|
|
73
|
+
"onUpdate:modelValue": e[2] || (e[2] = (r) => a.value.captcha = r),
|
|
73
74
|
"max-length": 4,
|
|
74
75
|
placeholder: "请输入短信验证码",
|
|
75
|
-
onInput: e[3] || (e[3] = (
|
|
76
|
+
onInput: e[3] || (e[3] = (r) => p("captcha"))
|
|
76
77
|
}), {
|
|
77
78
|
append: s(() => [
|
|
78
|
-
|
|
79
|
+
t(P)["verify-code"] ? S(o.$slots, "verify-code", { key: 0 }) : z("", !0)
|
|
79
80
|
]),
|
|
80
81
|
_: 3
|
|
81
82
|
}, 16, ["modelValue"])
|
|
82
83
|
]),
|
|
83
84
|
_: 3
|
|
84
85
|
}, 16),
|
|
85
|
-
l(
|
|
86
|
+
l(t(u), k($(o.formItemProps)), {
|
|
86
87
|
default: s(() => {
|
|
87
|
-
var
|
|
88
|
+
var r;
|
|
88
89
|
return [
|
|
89
|
-
l(
|
|
90
|
+
l(t(U), {
|
|
90
91
|
type: "primary",
|
|
91
92
|
long: "",
|
|
93
|
+
loading: o.loading,
|
|
92
94
|
"html-type": "submit",
|
|
93
|
-
size: (
|
|
95
|
+
size: (r = o.inputProps) == null ? void 0 : r.size,
|
|
94
96
|
class: i(`${c}-verify-submit`)
|
|
95
97
|
}, {
|
|
96
98
|
default: s(() => e[4] || (e[4] = [
|
|
97
|
-
|
|
99
|
+
B(" 下一步 ")
|
|
98
100
|
])),
|
|
99
101
|
_: 1
|
|
100
|
-
}, 8, ["size", "class"])
|
|
102
|
+
}, 8, ["loading", "size", "class"])
|
|
101
103
|
];
|
|
102
104
|
}),
|
|
103
105
|
_: 1
|
package/package.json
CHANGED