react-infinite-loading 基于浏览器的 React 无限滚动插件开源项目

我要开发同款
匿名用户2017年11月23日
172阅读

技术信息

开源地址
https://github.com/monsterooo/react-infinite-loading
授权协议
MIT

作品详情

react-ifiite-loadig

基于浏览器的React无限滚动插件

安装

react-ifiite-loadig要求React15或更高版本

istall --save-dev react-ifiite-loadig

使用

import Ifiite from 'react-ifiite-loadig';<Ifiite hadleLoadig={this.hadleLoadig} loadig={this.state.loadig}>  {/* scrolled elemet */}</Ifiite>

参数

一些控制参数,用在组件的属性中

Ifiite.propTypes = {  // cotrol the curret status. loadig = true the aimatio is displayed ad o loger triggers hadleLoadig evet  loadig: PropTypes.bool,  // whether to display the loadig aimatio  isLoadig: PropTypes.bool,  // load aimatio compoets  asLoadig: PropTypes.ode,  // if true, scroll rage as a curret compoet o the cotrary scroll rage as a widow  elemetScroll: PropTypes.bool,  // set the height of the scroll cotaier, scrollHeight={300} or scrollHeight="calc(100% - 100px)"  scrollHeight: PropTypes.ay.isRequired,  // trigger hadleLoadig evet threshold  scrollThreshold: PropTypes.um,  // scroll to the bottom evet  hadleLoadig: PropTypes.fuc,  // sisplayed cotet  childre: PropTypes.ode}

功能介绍

react-infinite-loading 基于浏览器的 React 无限滚动插件 安装 react-infinite-loading 要求 React 15 或更高版本 install --...

示例图片

声明:本文仅代表作者观点,不代表本站立场。如果侵犯到您的合法权益,请联系我们删除侵权资源!如果遇到资源链接失效,请您通过评论或工单的方式通知管理员。未经允许,不得转载,本站所有资源文章禁止商业使用运营!
下载安装【程序员客栈】APP
实时对接需求、及时收发消息、丰富的开放项目需求、随时随地查看项目状态

评论