YuJian
/
Storyofvue
Archived
1
0
Fork 0
Browse Source

animation final

detail-animation
遇见 5 years ago
parent
commit
9d3ad43dbc
  1. 16
      src/commom/fade/FadeAnimation.vue
  2. 16
      src/pages/detail/components/banner.vue

16
src/commom/fade/FadeAnimation.vue

@ -0,0 +1,16 @@ @@ -0,0 +1,16 @@
<template>
<transition><slot></slot></transition>
</template>
<script>
export default {
name: "Fade"
};
</script>
<style lang="stylus" scoped>
.v-enter, .v-leave-to
opacity: 0
.v-enter-active, .v-leave-active
transition: opacity .5s
</style>

16
src/pages/detail/components/banner.vue

@ -10,16 +10,19 @@ @@ -10,16 +10,19 @@
</div>
</div>
</div>
<commit-gallery
:imgs="gallaryImgs"
v-show="showGallery"
@close="handleGalleryClose"
></commit-gallery>
<fade-animation>
<commit-gallery
:imgs="gallaryImgs"
v-show="showGallery"
@close="handleGalleryClose"
></commit-gallery>
</fade-animation>
</div>
</template>
<script>
import CommitGallery from "commom/gallery/Gallery";
import FadeAnimation from "commom/fade/FadeAnimation";
export default {
name: "DetailBanner",
@ -34,7 +37,8 @@ export default { @@ -34,7 +37,8 @@ export default {
}
},
components: {
CommitGallery: CommitGallery
CommitGallery: CommitGallery,
FadeAnimation: FadeAnimation
},
methods: {
handleBannerClick: function() {