From 0ee6ed2c834915c5e2d3ec56eb877104912d5c2a Mon Sep 17 00:00:00 2001 From: wanchun <445436867@qq.com> Date: Tue, 22 Mar 2022 12:27:17 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=91=BD=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/runtime/views/MultiTabProvider.vue | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/fes-plugin-layout/src/runtime/views/MultiTabProvider.vue b/packages/fes-plugin-layout/src/runtime/views/MultiTabProvider.vue index 2c355744..a7d35863 100644 --- a/packages/fes-plugin-layout/src/runtime/views/MultiTabProvider.vue +++ b/packages/fes-plugin-layout/src/runtime/views/MultiTabProvider.vue @@ -37,7 +37,7 @@ - + { if (_route.meta['keep-alive']) { const name = _route.meta?.name || _route.name; @@ -159,8 +159,8 @@ export default { // 修改组件的 name Component.type.name = name; // 缓存的关键是组件name在keep-alive的include列表 - if (!includePages.value.includes(name)) { - includePages.value = [...includePages.value, name]; + if (!keepAlivePages.value.includes(name)) { + keepAlivePages.value = [...keepAlivePages.value, name]; } } } @@ -177,7 +177,7 @@ export default { handleCloseTab, actions, getComponent, - includePages + keepAlivePages }; } };