There was an error while loading. Please reload this page.
1 parent da90f93 commit 54d7d4eCopy full SHA for 54d7d4e
src/lib/backtop/index.vue
@@ -1,19 +1,24 @@
1
<template>
2
- <div
3
- v-if="visible"
4
- class="jw-backtop"
5
- :style="{
6
- right: right + 'px',
7
- bottom: bottom + 'px',
8
- }"
9
- @click.stop="handleClick"
+ <transition
+ leave-active-class="animate__bounceOut"
+ enter-active-class="animate__bounceIn"
10
>
11
- <slot>
12
- <jw-icon :size="26">
13
- <BackToTop />
14
- </jw-icon>
15
- </slot>
16
- </div>
+ <div
+ v-if="visible"
+ class="jw-backtop animate__animated"
+ :style="{
+ right: right + 'px',
+ bottom: bottom + 'px',
+ }"
+ @click.stop="handleClick"
+ >
+ <slot>
+ <jw-icon :size="26">
17
+ <BackToTop />
18
+ </jw-icon>
19
+ </slot>
20
+ </div>
21
+ </transition>
22
</template>
23
24
<script setup lang="ts">
0 commit comments