fix: 修复router-view页面组件因transition导致使用多个根节点告警问题

This commit is contained in:
张传龙 2022-04-20 18:03:23 +08:00
parent 2bd85e6e60
commit 585bf4a4c4

View File

@ -1,9 +1,11 @@
<template>
<router-view v-slot="{ Component, route }">
<transition name="fade-slide" mode="out-in" appear>
<keep-alive :include="keepAliveRouteNames">
<component :is="Component" :key="route.path" />
</keep-alive>
<div :key="route.path">
<keep-alive :include="keepAliveRouteNames">
<component :is="Component" />
</keep-alive>
</div>
</transition>
</router-view>
</template>