mirror of
https://github.com/kihashi/stardew_community_checklist.git
synced 2025-10-19 08:03:17 +00:00
Add page and bundle transitions
This commit is contained in:
parent
0158c36349
commit
8b2687f051
15
src/App.vue
15
src/App.vue
@ -1,7 +1,10 @@
|
|||||||
<template>
|
<template>
|
||||||
<div id="app">
|
<div id="app">
|
||||||
<header-bar/>
|
<header-bar/>
|
||||||
|
<transition name="fade"
|
||||||
|
mode="out-in">
|
||||||
<router-view/>
|
<router-view/>
|
||||||
|
</transition>
|
||||||
<app-footer/>
|
<app-footer/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -26,3 +29,15 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</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>
|
<div>
|
||||||
<BundleNav />
|
<BundleNav />
|
||||||
<section class="section">
|
<section class="section">
|
||||||
<router-view></router-view>
|
<transition
|
||||||
|
name="fade"
|
||||||
|
mode="out-in"
|
||||||
|
>
|
||||||
|
<router-view :key="bundle"></router-view>
|
||||||
|
</transition>
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -11,6 +16,23 @@
|
|||||||
import BundleNav from '@/components/bundles/BundleNav.vue'
|
import BundleNav from '@/components/bundles/BundleNav.vue'
|
||||||
export default {
|
export default {
|
||||||
components: {BundleNav},
|
components: {BundleNav},
|
||||||
name: 'bundles'
|
name: 'bundles',
|
||||||
|
computed: {
|
||||||
|
bundle: function () {
|
||||||
|
return this.$store.getters.GetBundleById(this.$route.params.id)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</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