<template>
    <uni-transition name="fade" :duration="300" :show="isShowToTop">
        <image src="https://www.mescroll.com/img/mescroll-totop.png" class="scroll-totop" @click="goTop" />
    </uni-transition>
</template>
<script>
export default {
    props: {
        isShowToTop: {
            type: Boolean,
            default: false,
        },
    },
    methods: {
        goTop() {
            this.$emit('goTop')
        },
    },
}
</script>
<style lang="scss" scoped>
.scroll-totop {
    position: fixed;
    bottom: 80rpx;
    right: 50rpx;
    width: 72rpx;
    height: 72rpx;
    z-index: 999;
    border-radius: 50%;
}
</style>
