1
0
mirror of https://github.com/zclzone/vue-naive-admin.git synced 2025-12-29 04:20:22 +08:00

fix: 表单校验失败会关闭弹窗问题

This commit is contained in:
zclzone
2023-12-14 17:01:53 +08:00
parent c8616ebbf3
commit 144845073a
4 changed files with 7 additions and 12 deletions

View File

@@ -113,7 +113,7 @@ const [pwdModalRef] = useModal()
const [pwdFormRef, pwdForm, pwdValidation] = useForm()
async function handlePwdSave() {
if (!(await pwdValidation())) return false
await pwdValidation()
await api.changePassword(pwdForm.value)
$message.success('密码修改成功')
userStore.getUserInfo()
@@ -145,7 +145,7 @@ const [profileFormRef, profileForm, profileValidation] = useForm({
email: userStore.userInfo?.email,
})
async function handleProfileSave() {
if (!(await profileValidation())) return false
await profileValidation()
await api.updateProfile(profileForm.value)
$message.success('资料修改成功')
userStore.getUserInfo()