This commit is contained in:
吕才卓 2024-04-06 15:25:22 +08:00
parent 46d05fc7aa
commit 4af1a40d96

View File

@ -55,50 +55,40 @@ const INITIAL_DATA = {
password: "", password: "",
}; };
const from = ref(); const from = ref();
const from = ref();
const formData = reactive({ const formData = reactive({
...INITIAL_DATA, ...INITIAL_DATA,
}); });
const rules = reactive({ const rules = reactive({
account: [
account: [ account: [
{ {
required: true, required: true,
message: "必须填写", message: "必须填写",
message: "必须填写",
}, },
{ {
min: 10, min: 10,
message: "输入不正确", message: "输入不正确",
message: "输入不正确",
}, },
{ {
max: 10, max: 10,
message: "输入不正确", message: "输入不正确",
message: "输入不正确",
}, },
], ],
password: [
password: [ password: [
{ {
required: true, required: true,
message: "密码必填", message: "密码必填",
message: "密码必填",
}, },
{ {
len: 8, len: 8,
message: "请输入 8 位密码", message: "请输入 8 位密码",
message: "请输入 8 位密码",
}, },
{ {
pattern: /[A-Z]+/, pattern: /[A-Z]+/,
message: "密码必须包含大写字母", message: "密码必须包含大写字母",
message: "密码必须包含大写字母",
}, },
], ],
}); });
});
const onReset = () => { const onReset = () => {
MessagePlugin.success("重置成功"); MessagePlugin.success("重置成功");
@ -116,10 +106,6 @@ const onSubmit = () => {
}); });
}; };
const Login = async () => {
await reqLogin();
};
const Login = async () => { const Login = async () => {
await reqLogin(); await reqLogin();
}; };