Skip to content

Commit 6327869

Browse files
committed
perf[transition]: refine transition animation
1 parent c861dd1 commit 6327869

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

src/styles/transition.scss

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,21 @@
1111
opacity: 0;
1212
}
1313

14-
/*fade*/
14+
/*fade-transform*/
15+
.fade-transform-leave-active,
16+
.fade-transform-enter-active {
17+
transition: all .5s;
18+
}
19+
.fade-transform-enter {
20+
opacity: 0;
21+
transform: translateX(-30px);
22+
}
23+
.fade-transform-leave-to {
24+
opacity: 0;
25+
transform: translateX(30px);
26+
}
27+
28+
/*breadcrumb transition*/
1529
.breadcrumb-enter-active,
1630
.breadcrumb-leave-active {
1731
transition: all .5s;

src/views/layout/components/AppMain.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<template>
22
<section class="app-main" style="min-height: 100%">
3-
<transition name="fade" mode="out-in">
3+
<transition name="fade-transform" mode="out-in">
44
<keep-alive :include="cachedViews">
55
<router-view></router-view>
66
</keep-alive>

0 commit comments

Comments
 (0)