https://github.com/riskers/rc-loadmore
react loadmore component
https://github.com/riskers/rc-loadmore
component loadmore react
Last synced: 7 months ago
JSON representation
react loadmore component
- Host: GitHub
- URL: https://github.com/riskers/rc-loadmore
- Owner: riskers
- Created: 2018-06-01T03:43:59.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-06-04T02:39:13.000Z (over 7 years ago)
- Last Synced: 2025-02-08T01:18:35.795Z (8 months ago)
- Topics: component, loadmore, react
- Language: JavaScript
- Size: 61.5 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# rc-loadmore
a loadmore component for react
[demo](https://stackblitz.com/edit/rc-loadmore)
## install
```
npm install rc-loadmore
```## Usage
```
{
console.log('trigger cb...')
}}
>
{this.renderContent()}
```
## API
| props | type | |
| ---| --- | -- |
| threshold | number | 触发 cb() 时,滚动到页面底部的距离 |
| timer | number | debounce 函数的 timer |
| disabled | boolean | 组件是否生效 |
| hasMore | boolean | 是否有更多内容,控制底部显示 |
| loadingContent | React.Node | hasMore === ture 时显示 |
| noMoreContent | React.Node | hasMore === false 时显示 |
| cb | function | 到底时触发的函数 |