})<template><router-viewv-slot="{ Component }"><keep-alive:include="cacheList"><component:is="Component":key="route.fullPath"/></keep-alive></router-view></template> AI代码助手复制代码 这样就可以实现嵌套路由的缓存了。
-- vue2.x配置 --><keep-alive><router-viewv-if="$route.meta.keepAlive"/></keep-alive><router-viewv-if="!$route.meta.keepAlive"/></template> AI代码助手复制代码 <template><!-- vue3.0配置 --><router-viewv-slot="{ Component }"><keep-alive><component:is="Component"v-if="$route...
<transition :name="name" mode="out-in" name="fade"> <keep-alive> <router-view v-if="this.$route.meta.keepAlive"></router-view> </keep-alive> </transition> <transition :name="name" mode="out-in" name="fade"> <router-view v-if="!this.$route.meta.keepAlive"></router-view> ...