From 4c15e6675aa22dcff9c2c749a10c256ed8e22563 Mon Sep 17 00:00:00 2001 From: AhJindeg Date: Wed, 10 Apr 2024 18:09:43 +0800 Subject: [PATCH 1/3] =?UTF-8?q?fix(UserImportForm):=20=F0=9F=90=9E=20add?= =?UTF-8?q?=20nextTick=20to=20resetForm?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/system/user/UserImportForm.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/views/system/user/UserImportForm.vue b/src/views/system/user/UserImportForm.vue index 9b82d51f..c8599680 100644 --- a/src/views/system/user/UserImportForm.vue +++ b/src/views/system/user/UserImportForm.vue @@ -115,9 +115,10 @@ const submitFormError = (): void => { } /** 重置表单 */ -const resetForm = () => { +const resetForm = async (): Promise => { // 重置上传状态和文件 formLoading.value = false + await nextTick() uploadRef.value?.clearFiles() } From 786468f437b85097d74b50a1b27e2373fb9151ed Mon Sep 17 00:00:00 2001 From: AhJindeg Date: Thu, 11 Apr 2024 11:00:24 +0800 Subject: [PATCH 2/3] =?UTF-8?q?fix(UserImportForm):=20=F0=9F=90=9E=20add?= =?UTF-8?q?=20init=20updateSupport=20to=20open?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/system/user/UserImportForm.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/src/views/system/user/UserImportForm.vue b/src/views/system/user/UserImportForm.vue index c8599680..2dda5cec 100644 --- a/src/views/system/user/UserImportForm.vue +++ b/src/views/system/user/UserImportForm.vue @@ -61,6 +61,7 @@ const updateSupport = ref(0) // 是否更新已经存在的用户数据 /** 打开弹窗 */ const open = () => { dialogVisible.value = true + updateSupport.value = 0 fileList.value = [] resetForm() } From 4793897511f58cdba5e4e8059b73401f74a17027 Mon Sep 17 00:00:00 2001 From: AhJindeg Date: Thu, 11 Apr 2024 11:03:06 +0800 Subject: [PATCH 3/3] =?UTF-8?q?fix(UserImportForm):=20=F0=9F=90=9E=20add?= =?UTF-8?q?=20update=20formLoading=20and=20dialogVisible=20to=20submitForm?= =?UTF-8?q?Success?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/system/user/UserImportForm.vue | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/views/system/user/UserImportForm.vue b/src/views/system/user/UserImportForm.vue index 2dda5cec..8447b286 100644 --- a/src/views/system/user/UserImportForm.vue +++ b/src/views/system/user/UserImportForm.vue @@ -105,6 +105,8 @@ const submitFormSuccess = (response: any) => { text += '< ' + username + ': ' + data.failureUsernames[username] + ' >' } message.alert(text) + formLoading.value = false + dialogVisible.value = false // 发送操作成功的事件 emits('success') }