Skip to content

Commit e431fa9

Browse files
committed
refactor:add transition
1 parent 4332f02 commit e431fa9

File tree

2 files changed

+34
-11
lines changed

2 files changed

+34
-11
lines changed

src/styles/index.scss

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
@import './element-ui.scss';
22
@import './mixin.scss';
3+
@import './transition.scss';
4+
35
body {
46
-moz-osx-font-smoothing: grayscale;
57
-webkit-font-smoothing: antialiased;
@@ -45,17 +47,6 @@ a:hover {
4547
}
4648
}
4749

48-
//vue router transition css
49-
.fade-enter-active,
50-
.fade-leave-active {
51-
transition: all .2s ease
52-
}
53-
54-
.fade-enter,
55-
.fade-leave-active {
56-
opacity: 0;
57-
}
58-
5950
//main-container全局样式
6051
.app-main{
6152
min-height: 100%

src/styles/transition.scss

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
//globl transition css
2+
3+
/*fade*/
4+
.fade-enter-active,
5+
.fade-leave-active {
6+
transition: opacity 0.28s;
7+
}
8+
9+
.fade-enter,
10+
.fade-leave-active {
11+
opacity: 0;
12+
}
13+
14+
/*fade*/
15+
.breadcrumb-enter-active,
16+
.breadcrumb-leave-active {
17+
transition: all .5s;
18+
}
19+
20+
.breadcrumb-enter,
21+
.breadcrumb-leave-active {
22+
opacity: 0;
23+
transform: translateX(20px);
24+
}
25+
26+
.breadcrumb-move {
27+
transition: all .5s;
28+
}
29+
30+
.breadcrumb-leave-active {
31+
position: absolute;
32+
}

0 commit comments

Comments
 (0)