@wecode/pulltorefresh-react
v1.0.4
Published
基于[**PulltoRefresh.js**](http://www.boxfactura.com/pulltorefresh.js/)。
Downloads
2
Readme
wecode 下拉组件
安装
yarn
$ yarn add pulltorefreshjs
npm
$ npm install pulltorefreshjs
使用示例:
import PullToRefresh from '@wlk/pulltorefresh-react';
<PullToRefresh
mainElement="home-refresh1"
onRefresh={() => {
return new Promise(resolve => {
setTimeout(() => {
resolve();
}, 1800);
});
}}
>
</PullToRefresh>
参数
mainElement
(string) 指定下拉刷新的 dom 元素 idonRefresh
(function) 返回 promise ,例如:请求结束时,resolve 即停止加载动画