移除 keep-alive 组件延迟设置 include 参数无效的 hack 写法

This commit is contained in:
hooray
2022-06-15 21:02:44 +08:00
parent 36b3c926db
commit 795b8b6899
+1 -2
View File
@@ -83,8 +83,7 @@ function switchMenu(index) {
<div class="main">
<router-view v-slot="{ Component, route }">
<transition name="main" mode="out-in" appear>
<!-- BUG https://github.com/vuejs/vue-next/issues/4984 -->
<keep-alive :include="[...keepAliveStore.list]">
<keep-alive :include="keepAliveStore.list">
<component :is="Component" :key="route.fullPath" />
</keep-alive>
</transition>