
<template>
    <as-scroll-refresh
        class="as-scroll"
        @refresh="$emit('refresh', $event)">
        <as-scroll-loading
            :finished="finished"
            ref="refScrollLoading"
            @load="$emit('load', $event)">
            <slot></slot>
        </as-scroll-loading>
    </as-scroll-refresh>
</template>

<script>
    import AsScrollLoading from '../as-scroll-loading'
    import AsScrollRefresh from '../as-scroll-refresh'
    export default {
        name: 'AsScroll',
        props: {
            finished: { type: Boolean, default: false },
        },
        components: {
            AsScrollLoading,
            AsScrollRefresh,
        },
    }
</script>

<style lang="scss" scoped>
    @import "../../assets/scss/define";
    .as-scroll{
        @extend %df1;
        @extend %h100;
        @extend %oya;
        height: j(150);
        //overflow-y: auto;
    }
</style>
