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] =?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(() => {