<template>
  <div class="toTop-image">
    <img src="~@/assets/img/icons/returntop.png" @click="toTop" />
  </div>
</template>
<script>
export default {
  name:'toTop',
  methods:{
    toTop(){
      document.body.scrollTop = document.documentElement.scrollTop = 0;
    }
  }
}
</script>
<style lang="scss" scoped>
  .toTop-image{
    position: fixed;
    right: 20px;
    bottom: 150px;
    z-index: 10;
    // @media screen and (max-width:790px) {
    //   bottom: 40px;
    // }
    img{
      width: 40px;
      cursor: pointer;
    }
  }
</style>