fix: 修复 RouterView 直接嵌套 Transition 的弃用警告
改用 Vue Router 推荐的 slot props 模式,避免未来版本兼容性问题
This commit is contained in:
+5
-3
@@ -15,9 +15,11 @@ const route = useRoute();
|
|||||||
<MyHead />
|
<MyHead />
|
||||||
</el-header>
|
</el-header>
|
||||||
<el-main class="shell-main">
|
<el-main class="shell-main">
|
||||||
<Transition name="fade-up" mode="out-in">
|
<RouterView v-slot="{ Component }">
|
||||||
<RouterView :key="route.fullPath" />
|
<Transition name="fade-up" mode="out-in">
|
||||||
</Transition>
|
<component :is="Component" :key="route.fullPath" />
|
||||||
|
</Transition>
|
||||||
|
</RouterView>
|
||||||
</el-main>
|
</el-main>
|
||||||
<el-footer class="shell-footer">
|
<el-footer class="shell-footer">
|
||||||
<MyFooter />
|
<MyFooter />
|
||||||
|
|||||||
Reference in New Issue
Block a user