@wecode/pulltorefresh-react

1.0.4 • Public • Published

wecode 下拉组件

基于PulltoRefresh.js


安装

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 元素 id
  • onRefresh (function) 返回 promise ,例如:请求结束时,resolve 即停止加载动画

Package Sidebar

Install

npm i @wecode/pulltorefresh-react

Weekly Downloads

2

Version

1.0.4

License

none

Unpacked Size

16.5 kB

Total Files

3

Last publish

Collaborators

  • wecode