mirror of
https://github.com/zclzone/vue-naive-admin.git
synced 2026-01-22 23:50:22 +08:00
fix: 表单校验失败会关闭弹窗问题
This commit is contained in:
@@ -177,7 +177,7 @@ function handleOpen(options = {}) {
|
||||
}
|
||||
|
||||
async function onSave() {
|
||||
if (!(await validation())) return
|
||||
await validation()
|
||||
okLoading.value = true
|
||||
try {
|
||||
if (!modalForm.value.parentId) modalForm.value.parentId = null
|
||||
|
||||
@@ -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