需求:tabs打开detail?id=1和detail?id=2首次需要刷新,但是在tabs切换时需要缓存
解决方案:增加`route`,用`fullPath`判断`component`的`key`。如下图
<router-view v-slot="{ Component, route }">
<KeepAlive>
<component :is="Component" :key="route.fullPath" />
</KeepAlive>
</router-view>