1.0.0 • Published 6 years ago

yunye-loadmore v1.0.0

Weekly downloads
4
License
MIT
Repository
github
Last release
6 years ago

yunye-loadmore

安装

npm i yunye-loadmore -S

使用

<template>
    <yy-loadmore @pull="pull" @loadmore="loadmore" :loading="loading" :all-loaded="allLoaded">
        ...
    </yyloadmore>
</template>
<script>
//引入
import YyLoadmore from "yunye-loadmore";
export default {
    components: { YyLoadmore },
    data(){
        return {
            loading: false,
            allLoaded: false
        }
    },
    methods: {
        pull() {},
        loadmore() {
            this.loading  =  true;
            setTimeout(() => {
                this.loading  =  false;
                setTimeout(() => {
                    this.allLoaded  =  true;
                }, 1000);
            }, 1000);
        }
    }
}
</script>

事件

事件名称说明回调参数
pull下拉事件--
loadmore加载更多--

属性

属性名称说明类型默认值
loading是否在加载中Booleanfalse
allLoaded是否全部加载完Booleanfalse
topDistance下拉刷新的下拉的距离Number40
pull是否需要下拉刷新功能Booleantrue
up是否需要加载更多功能Booleantrue
topPullText下拉文字String下拉刷新
topText下来一段距离文字String松手刷新
bottomText底部文字String加载更多
bottomLoadingText底部加载中文字String加载中...
bottomNomoreText数据加载完底部文字String暂无更多了~
1.0.0

6 years ago