Skip to content

Commit 43ed023

Browse files
author
eoao
committed
feat: improve add user dialog
1 parent 4ea9527 commit 43ed023

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

mail-vue/src/views/user/index.vue

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@
153153
</el-button>
154154
</div>
155155
</el-dialog>
156-
<el-dialog v-model="showAdd" :title="$t('addUser')">
156+
<el-dialog v-model="showAdd" :title="$t('addUser')" @closed="resetAddForm">
157157
<div class="container">
158158
<el-input v-model="addForm.email" type="text" :placeholder="$t('emailAccount')" autocomplete="off">
159159
<template #append>
@@ -743,13 +743,12 @@ function submit() {
743743
form.email = form.email + form.suffix
744744
userAdd(form).then(() => {
745745
addLoading.value = false
746-
showAdd.value = false
746+
addForm.email = ''
747747
ElMessage({
748748
message: t('addSuccessMsg'),
749749
type: "success",
750750
plain: true
751751
})
752-
resetAddForm()
753752
getUserList(false)
754753
}).finally(res => {
755754
addLoading.value = false

0 commit comments

Comments
 (0)