<template>
    <div>
        <div class="ht-base-back-top-demo">
            <ht-base-back-top :height="distance" :bottom="240">
                <div class="demo-top">
                    <ht-base-icon type='LiRa_up' />
                </div>
            </ht-base-back-top>
        </div>
    </div>

</template>

<script>
    export default {
        name: 'HtBaseBackTopDemo',
        data() {
            return {
                distance: 10
            }
        },
        //实际项目中不需要methods里面的东西
        mounted() {
            let body = document.body, app = document.getElementById('app')
            body.style.overflow = 'unset'
            app.style.overflow = 'unset'
        },
        //实际项目中不需要destroyed里面的东西
        destroyed() {
            let body = document.body, app = document.getElementById('app')
            body.style.overflow = 'hidden'
            app.style.overflowY = 'hidden'
        }
    }
</script>
<style lang="less">
    .ht-base-back-top-demo {
        .demo-top {
            width: 60px;
            text-align: center;
            line-height: 40px;
            background: #4d4d4d;
            margin-bottom: 10px;
        }
    }
</style>

