Skip to content

Commit

Permalink
- [新增] 添加基础动画事件
Browse files Browse the repository at this point in the history
  • Loading branch information
montage-f committed Sep 29, 2019
1 parent f12e50c commit bd1ffb1
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 9 deletions.
13 changes: 9 additions & 4 deletions src/components/common/Fade/index.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/**Created by montage_fz on 2019-09-29**/
<template>
<div class="Fade">

</div>
<transition>
<slot></slot>
</transition>
</template>

<script>
Expand All @@ -20,6 +20,11 @@
</script>

<style scoped lang="less">
.Fade {
.v-enter, .v-leave-to {
opacity: 0;
}
.v-enter-active, .v-leave-active {
transition: opacity 0.5s;
}
</style>
15 changes: 10 additions & 5 deletions src/views/Detail/components/Banner.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,26 @@
</div>
</div>
</div>
<Gallery
v-if="showGallery"
:imgs="imgs"
@closeGallery="closeGallery"
></Gallery>
<FadeAnimation>
<Gallery
v-if="showGallery"
:imgs="imgs"
@closeGallery="closeGallery"
></Gallery>
</FadeAnimation>

</div>
</template>

<script>
import Gallery from '@/components/common/Gallery';
import FadeAnimation from '@/components/common/Fade';
export default {
name: 'Banner',
components: {
Gallery,
FadeAnimation,
},
data() {
return {
Expand Down

0 comments on commit bd1ffb1

Please sign in to comment.