<template>
    <div class="ht-base-affix-callback-demo">
        <ht-base-affix :offset-top="200" @on-change="change">
            <span class="demo-affix">固定在距离顶部 200px 的位置</span>
        </ht-base-affix>
    </div>
</template>

<script>
    export default {
        name: 'HtBaseAffixCallbackDemo',
        methods: {
            change(affixed) {
                console.log(affixed)
            }
        }
    }
</script>
<style lang="less">
    .ht-base-affix-callback-demo {

    .demo-affix {
        display: inline-block;
        color: #ffffff;
        padding: 5px 10px;
        background: #2D8cF0;
    }

    }
</style>

