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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user