 <template>
    <section class="back-top">
        <div class="back-btn" @click="backTop">
            <img src="../../images/backTop.png"/>
        </div>
      
    </section>
</template>

<script>
import {
    m_search_result_colligation_top
    } from '@/utils/buryingPoint'
    export default {
    	data(){
            return {
                objPoint:{}
            }
        },
        props: {
            burialPoint:{
                default:'',
                type:String
            }
        },
        // computed: {
        //     cNeedShow() {
        //         return this.needShow
        //     }
        // },
        mounted(){
            
        },
  
        methods: {
            backTop: function(){
                this.pageBurialPoin({
                    ...m_search_result_colligation_top,
                    labelValue: '',
                    createdTime: new Date().getTime(),
                })
               
                var osTop = document.documentElement.scrollTop || document.body.scrollTop; 
                if(osTop > 0){
                    document.documentElement.scrollTop = document.body.scrollTop = 0;
                    this.$emit('backTop')
                    // this.needShow = false
                }
            }
            
        },
    }
</script>

<style lang="scss" scoped>
    @import '../../style/mixin';
	.back-btn{
        position: fixed;
        width: px2rem(35px);
        height: px2rem(35px);
        right: px2rem(15px);
        z-index: 100;
        bottom: px2rem(80px);;
        img{
            width: 100%;
            height: 100%;
            display: block;
        }

    }
    
</style>

