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/store/modules/permission.ts |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/src/store/modules/permission.ts b/src/store/modules/permission.ts
index dcb3cd4..ed64e46 100644
--- a/src/store/modules/permission.ts
+++ b/src/store/modules/permission.ts
@@ -100,6 +100,10 @@
       }
       if (lastRouter) {
         el.path = lastRouter.path + '/' + el.path;
+        if (el.children && el.children.length) {
+          children = children.concat(filterChildren(el.children, el))
+          return
+        }
       }
       children = children.concat(el);
     });

--
Gitblit v1.9.3