Skip to content

Commit 9f00774

Browse files
committed
Added route transition
1 parent def343f commit 9f00774

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
<meta charset="utf-8">
55
<title>Routing</title>
66
<link rel="stylesheet" href="/node_modules/bootstrap/dist/css/bootstrap.min.css">
7+
<link rel="stylesheet" href="/node_modules/animate.css/animate.min.css">
78
</head>
89
<body>
910
<div id="app"></div>

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"build": "cross-env NODE_ENV=production webpack --progress --hide-modules"
1010
},
1111
"dependencies": {
12+
"animate.css": "^3.5.2",
1213
"bootstrap": "^3.3.7",
1314
"vue": "^2.2.1",
1415
"vue-router": "^2.7.0"

src/App.vue

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,12 @@
2727
</div>
2828
</nav>
2929

30-
<router-view :cart="cart"></router-view>
30+
<transition
31+
enter-active-class="animated fadeInRight"
32+
leave-active-class="animated fadeOutLeft"
33+
mode="out-in">
34+
<router-view :cart="cart"></router-view>
35+
</transition>
3136
</div>
3237
</div>
3338
</template>

0 commit comments

Comments
 (0)