fix: keep-alive key

This commit is contained in:
张传龙
2022-09-24 14:44:59 +08:00
parent 85a04fd06d
commit 8806a6cb43
3 changed files with 8 additions and 2 deletions

View File

@@ -1,7 +1,7 @@
<template>
<router-view v-slot="{ Component, route }">
<KeepAlive :include="keepAliveRouteNames">
<component :is="Component" v-if="appStore.reloadFlag" :key="route.meta?.key || route.fullPath" />
<component :is="Component" v-if="appStore.reloadFlag" :key="appStore.aliveKeys[route.name] || route.fullPath" />
</KeepAlive>
</router-view>
</template>