38 lines
798 B
Vue
38 lines
798 B
Vue
<template>
|
|
<view>
|
|
<view v-if="showTop" class="backTop-box">
|
|
<image class="animated pulse infinite" @tap="backTop" src="/static/public/backTop.png"></image>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
name:"backTop",
|
|
props:{
|
|
showTop:{
|
|
type:Boolean,
|
|
default:false
|
|
}
|
|
},
|
|
data() {
|
|
return {
|
|
|
|
};
|
|
},
|
|
onPageScroll(e) {
|
|
// console.log(e);
|
|
},
|
|
methods:{
|
|
backTop(){
|
|
this.$emit('backTop')
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style scoped>
|
|
.backTop-box{position: fixed;right: 20rpx;bottom: 160rpx;}
|
|
.backTop-box>image{width: 60rpx;height: 50rpx;}
|
|
</style>
|