|
@@ -44,11 +44,11 @@ const formRules: FormRules = {
|
|
renewPassword: [password, { validator: equalToPswd, trigger: "input" }],
|
|
renewPassword: [password, { validator: equalToPswd, trigger: "input" }],
|
|
};
|
|
};
|
|
const inputChange = async () => {
|
|
const inputChange = async () => {
|
|
- await modelFormRef?.validate();
|
|
|
|
|
|
+ await modelFormRef?.validate().catch(() => 0);
|
|
};
|
|
};
|
|
|
|
|
|
const toSubmit = async () => {
|
|
const toSubmit = async () => {
|
|
- await modelFormRef?.validate();
|
|
|
|
|
|
+ if (await modelFormRef?.validate().catch(() => true)) return;
|
|
|
|
|
|
await changePwdApi(formModel.password, formModel.newPassword);
|
|
await changePwdApi(formModel.password, formModel.newPassword);
|
|
message.success("修改成功!");
|
|
message.success("修改成功!");
|