From 3cd127f586849adb0e5ad4c8b4d59c17dd732764 Mon Sep 17 00:00:00 2001 From: Theo <971366405@qq.com> Date: Fri, 3 Jan 2025 15:14:12 +0800 Subject: [PATCH 1/2] =?UTF-8?q?refactor:=20:recycle:=20=E9=87=8D=E7=BD=AE?= =?UTF-8?q?=E8=A1=A8=E5=8D=95=E7=9A=84=E6=96=B9=E6=B3=95=E5=90=8D=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 重置表单的方法名修改 --- src/views/system/menu/index.vue | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/views/system/menu/index.vue b/src/views/system/menu/index.vue index 5ad53346..c4c4b9c3 100644 --- a/src/views/system/menu/index.vue +++ b/src/views/system/menu/index.vue @@ -424,6 +424,7 @@ function handleOpenDialog(parentId?: string, menuId?: string) { }); } else { dialog.title = "新增菜单"; + // formData.value = { ...initialMenuFormData.value }; formData.value.parentId = parentId?.toString(); } }); @@ -504,7 +505,7 @@ function handleDelete(menuId: number) { ); } -function resetRorm() { +function resetForm() { menuFormRef.value.resetFields(); menuFormRef.value.clearValidate(); formData.value = { @@ -522,7 +523,7 @@ function resetRorm() { // 关闭弹窗 function handleCloseDialog() { dialog.visible = false; - resetRorm(); + resetForm(); } onMounted(() => { From 9bece96e3ef24ba9ff4b0b22b5d64a9a911907a5 Mon Sep 17 00:00:00 2001 From: Theo <971366405@qq.com> Date: Fri, 3 Jan 2025 15:17:11 +0800 Subject: [PATCH 2/2] =?UTF-8?q?refactor:=20:recycle:=20=E5=8E=BB=E6=8E=89?= =?UTF-8?q?=E6=B3=A8=E9=87=8A=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 去掉注释代码 --- src/views/system/menu/index.vue | 1 - 1 file changed, 1 deletion(-) diff --git a/src/views/system/menu/index.vue b/src/views/system/menu/index.vue index c4c4b9c3..8622309a 100644 --- a/src/views/system/menu/index.vue +++ b/src/views/system/menu/index.vue @@ -424,7 +424,6 @@ function handleOpenDialog(parentId?: string, menuId?: string) { }); } else { dialog.title = "新增菜单"; - // formData.value = { ...initialMenuFormData.value }; formData.value.parentId = parentId?.toString(); } });