!421 fix(UserImportForm): fix a bunch of bugs

Merge pull request !421 from AhJindeg/hotfix-UserImportForm
This commit is contained in:
芋道源码 2024-04-14 10:18:31 +00:00 committed by Gitee
commit aba61120e4
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -61,6 +61,7 @@ const updateSupport = ref(0) // 是否更新已经存在的用户数据
/** 打开弹窗 */ /** 打开弹窗 */
const open = () => { const open = () => {
dialogVisible.value = true dialogVisible.value = true
updateSupport.value = 0
fileList.value = [] fileList.value = []
resetForm() resetForm()
} }
@ -104,6 +105,8 @@ const submitFormSuccess = (response: any) => {
text += '< ' + username + ': ' + data.failureUsernames[username] + ' >' text += '< ' + username + ': ' + data.failureUsernames[username] + ' >'
} }
message.alert(text) message.alert(text)
formLoading.value = false
dialogVisible.value = false
// //
emits('success') emits('success')
} }
@ -115,9 +118,10 @@ const submitFormError = (): void => {
} }
/** 重置表单 */ /** 重置表单 */
const resetForm = () => { const resetForm = async (): Promise<void> => {
// //
formLoading.value = false formLoading.value = false
await nextTick()
uploadRef.value?.clearFiles() uploadRef.value?.clearFiles()
} }