fix: 修复组件缓存问题

This commit is contained in:
Nuro
2023-03-21 20:18:41 +08:00
parent 6c7847fecc
commit 0b37b54910
3 changed files with 10 additions and 4 deletions
+2 -2
View File
@@ -2,12 +2,12 @@
<router-view>
<template #default="{ Component, route }">
<component
v-if="route.noKeepAlive"
v-if="route.meta.noKeepAlive"
:is="Component"
:key="route.fullPath"
></component>
<keep-alive v-else>
<component :is="Component" :key="route.fullPath"></component>
<component :is="Component" :key="route.meta?.key"></component>
</keep-alive>
</template>
</router-view>