You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

30 lines
688 B

<template>
<view>
<view class="scrolltop" v-show="isshow" @tap="gotop"><image class="image" :src="event_rul + '/static/img/static/img/gotop.png'"/></view>
</view>
</template>
<script>
var app = getApp();
export default {
props: {
isshow:{}
},
data() {
return {
event_rul: app.globalData.event_url,
}
},
methods:{
gotop: function () {
uni.pageScrollTo({
scrollTop: 0,
duration:100
});
}
}
}
</script>
<style>
.scrolltop{position:fixed;bottom:160rpx;right:20rpx;width:60rpx;height:60rpx;background:rgba(0,0,0,0.4);color:#fff;border-radius:50%;padding:12rpx 10rpx 8rpx 10rpx;z-index:9;}
.scrolltop .image{width:100%;height:100%;}
</style>