From 2433952c193ab371ce1158e02e3f7ce27a80b479 Mon Sep 17 00:00:00 2001 From: JINGYJ <1458671527@qq.com> Date: Fri, 5 Jul 2024 10:28:01 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E9=83=A8=E9=97=A8bug=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../compontents/accountDrawer.vue | 26 +++++++++++++++---- .../compontents/deptDrawer.vue | 8 +++++- 2 files changed, 28 insertions(+), 6 deletions(-) diff --git a/src/views/systemManagement/accountManagement/compontents/accountDrawer.vue b/src/views/systemManagement/accountManagement/compontents/accountDrawer.vue index c965eaa..a87f8cf 100644 --- a/src/views/systemManagement/accountManagement/compontents/accountDrawer.vue +++ b/src/views/systemManagement/accountManagement/compontents/accountDrawer.vue @@ -56,7 +56,7 @@ watch( console.log(newValue, "newValue"); } ); -const ruleFormRef = ref(); +const ruleAccountFormRef = ref(); const accountForm = reactive({ id: "", headPicId: "", @@ -154,9 +154,23 @@ const submitForm = async (formEl: FormInstance | undefined) => { }; const resetForm = (formEl: FormInstance | undefined) => { if (!formEl) return; - formEl.resetFields(); + // formEl.resetFields(); + accountForm.id = ""; + accountForm.headPicId = ""; + accountForm.account = ""; + accountForm.username = ""; + accountForm.deptId = ""; + accountForm.roleIds = []; + accountForm.remark = ""; }; const handleDrawerClosed = () => { + accountForm.id = ""; + accountForm.headPicId = ""; + accountForm.account = ""; + accountForm.username = ""; + accountForm.deptId = ""; + accountForm.roleIds = []; + accountForm.remark = ""; props.closeDrawer(); }; @@ -238,7 +252,7 @@ onMounted(() => { @@ -323,10 +337,12 @@ onMounted(() => {