From 58d7e50de3432a4772ec0749661ec1f51c9c6086 Mon Sep 17 00:00:00 2001
From: NickLuo <69481226@qq.com>
Date: 星期三, 13 十二月 2023 08:55:46 +0800
Subject: [PATCH] !63 关闭动态路由tab页签时不清理组件缓存 * 动态路由页面关闭时不清理组件缓存,避免清理已打开的多个路由页面缓存

---
 src/views/system/config/index.vue |   16 ++++++----------
 1 files changed, 6 insertions(+), 10 deletions(-)

diff --git a/src/views/system/config/index.vue b/src/views/system/config/index.vue
index 8ed9f79..7e2e161 100644
--- a/src/views/system/config/index.vue
+++ b/src/views/system/config/index.vue
@@ -207,22 +207,18 @@
 }
 /** 鏂板鎸夐挳鎿嶄綔 */
 const handleAdd = () => {
+  reset();
   dialog.visible = true;
   dialog.title = "娣诲姞鍙傛暟";
-  nextTick(() => {
-    reset();
-  })
 }
 /** 淇敼鎸夐挳鎿嶄綔 */
-const handleUpdate = (row?: ConfigVO) => {
+const handleUpdate = async (row?: ConfigVO) => {
+  reset();
+  const configId = row?.configId || ids.value[0];
+  const res = await getConfig(configId);
+  Object.assign(form.value, res.data);
   dialog.visible = true;
   dialog.title = "淇敼鍙傛暟";
-  const configId = row?.configId || ids.value[0];
-  nextTick(async () => {
-    reset();
-    const res = await getConfig(configId);
-    form.value = res.data;
-  })
 }
 /** 鎻愪氦鎸夐挳 */
 const submitForm = () => {

--
Gitblit v1.9.3