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

This commit is contained in:
hooray
2022-06-15 21:02:52 +08:00
parent 9103294340
commit 5d8a6fa1f6
+1 -2
View File
@@ -82,8 +82,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>