1
0
mirror of https://github.com/kihashi/stardew_community_checklist.git synced 2025-10-19 08:03:17 +00:00

Add page and bundle transitions (#143)

This commit is contained in:
John Cleaver 2019-12-05 14:50:42 -05:00 committed by GitHub
parent 0158c36349
commit 19570bc266
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 40 additions and 3 deletions

View File

@ -1,7 +1,10 @@
<template>
<div id="app">
<header-bar/>
<router-view/>
<transition name="fade"
mode="out-in">
<router-view/>
</transition>
<app-footer/>
</div>
</template>
@ -26,3 +29,15 @@ export default {
}
}
</script>
<style lang="scss" scoped>
.fade-enter-active, .fade-leave-active {
transition: opacity 0.5s ease;
}
.fade-enter, .fade-leave-active {
opacity: 0;
}
</style>

View File

@ -2,7 +2,12 @@
<div>
<BundleNav />
<section class="section">
<router-view></router-view>
<transition
name="fade"
mode="out-in"
>
<router-view :key="bundle"></router-view>
</transition>
</section>
</div>
</template>
@ -11,6 +16,23 @@
import BundleNav from '@/components/bundles/BundleNav.vue'
export default {
components: {BundleNav},
name: 'bundles'
name: 'bundles',
computed: {
bundle: function () {
return this.$store.getters.GetBundleById(this.$route.params.id)
}
}
}
</script>
<style lang="scss" scoped>
.fade-enter-active, .fade-leave-active {
transition: opacity 0.5s ease;
}
.fade-enter, .fade-leave-active {
opacity: 0;
}
</style>