修改动画

This commit is contained in:
zouzhibing 2022-05-23 20:35:30 +08:00
parent f0b809091b
commit b893691579
3 changed files with 20 additions and 4 deletions

View File

@ -1,8 +1,8 @@
<template>
<section class="app-main" >
<router-view v-slot="{ Component }">
<transition name="fade-transform" mode="out-in">
<component :is="Component" />
<router-view v-slot="{ Component,route }">
<transition name="fade-slide" mode="out-in">
<component :is="Component" :key="route.path"/>
</transition>
</router-view>
<u-setting/>

View File

@ -11,7 +11,7 @@ const externalLink = {
{
path: 'https://github.com/zouzhibin/vue-admin-perfect',
name: 'external',
meta: { title: '外链', noCache: true , icon: 'link' }
meta: { title: 'github 地址', noCache: true , icon: 'link' }
},
]
}

View File

@ -10,6 +10,22 @@
.fade-leave-active {
opacity: 0;
}
/* router view transition fade-slide */
.fade-slide-leave-active,
.fade-slide-enter-active {
transition: all 0.3s;
}
.fade-slide-enter-from {
opacity: 0;
transform: translateX(-30px);
}
.fade-slide-leave-to {
opacity: 0;
transform: translateX(30px);
}
//
///* fade-transform */
//.fade-transform-leave-active,