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:
parent
0158c36349
commit
19570bc266
17
src/App.vue
17
src/App.vue
@ -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>
|
||||
|
||||
@ -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>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user