perf: 优化路由过渡动画

This commit is contained in:
pany 2023-05-17 20:27:39 +08:00
parent 7cae618b50
commit 857b95043b
2 changed files with 2 additions and 2 deletions

View File

@ -14,7 +14,7 @@ const key = computed(() => {
<template> <template>
<section class="app-main"> <section class="app-main">
<router-view v-slot="{ Component }"> <router-view v-slot="{ Component }">
<transition name="fade-transform" mode="out-in"> <transition name="el-fade-in" mode="out-in">
<keep-alive :include="tagsViewStore.cachedViews"> <keep-alive :include="tagsViewStore.cachedViews">
<component :is="Component" :key="key" /> <component :is="Component" :key="key" />
</keep-alive> </keep-alive>

View File

@ -1,4 +1,4 @@
// See https://staging-cn.vuejs.org/guide/built-ins/transition.html for detail // See https://cn.vuejs.org/guide/built-ins/transition.html for detail
// fade-transform // fade-transform
.fade-transform-leave-active, .fade-transform-leave-active,