fix: 修复router-view页面组件因transition导致使用多个根节点告警问题
This commit is contained in:
parent
2bd85e6e60
commit
585bf4a4c4
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user