Skip to content

Commit

Permalink
animation finished
Browse files Browse the repository at this point in the history
  • Loading branch information
ssasdkkkx committed Jul 24, 2019
1 parent 72e81e7 commit a8accc1
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 6 deletions.
16 changes: 16 additions & 0 deletions src/common/fade/FadeAnimation.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<template>
<transition>
<slot></slot>
</transition>
</template>
<script>
export default {
name: 'FadeAnimation'
}
</script>
<style lang="stylus" scoped>
.v-enter, .v-leave-to
opacity: 0
.v-enter-active, .v-leave-active
transition: opacity .5s
</style>
17 changes: 11 additions & 6 deletions src/pages/detail/components/Banner.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,19 @@
</div>
</div>
</div>
<common-gallery
:imgs="bannerImgs"
v-show="showGallery"
@close="handleGalleryClose"
></common-gallery>
<fade-animation>
<common-gallery
:imgs="bannerImgs"
v-show="showGallery"
@close="handleGalleryClose"
>
</common-gallery>
</fade-animation>
</div>
</template>
<script>
import CommonGallery from 'common/gallery/Gallery'
import FadeAnimation from 'common/fade/FadeAnimation'
export default {
name: 'DetailBanner',
props: {
Expand All @@ -40,7 +44,8 @@ export default {
}
},
components: {
CommonGallery
CommonGallery,
FadeAnimation
}
}
</script>
Expand Down

0 comments on commit a8accc1

Please sign in to comment.