@aligov/use-pull-reload
TypeScript icon, indicating that this package has built-in type declarations

0.1.11 • Public • Published

rax-example

Install

$ npm install @aligov/use-pull-reload --save

Usage

用法与 g 端 UseFormTableHooks 相似,主要用于下拉刷新

API

Props

loading data page onEnd search, reload, changePage, increasePage, updateData, updatePageSize, readyToSearch, stopSearch, forceUpdate

Function

name param return describe
loading boolean / 刷新状态(初始化和搜索会触发 loading,分页不会)
data Object / 请求结果
page number / 当前页数
onEnd boolean / 是否到达底部(需要保证 pageSize 大于屏幕一页可展示区域)
search function / 搜索
reload function / 刷新
changePage function / 分页
increasePage function / 下一页
updateData function / 更新数据
updatePageSize function / 更新 pageSize
readyToSearch function / 开始请求
stopSearch function / 停止请求
forceUpdate function / 强制重新刷新数据

Example

见 demo

Readme

Keywords

Package Sidebar

Install

npm i @aligov/use-pull-reload

Weekly Downloads

5

Version

0.1.11

License

MIT

Unpacked Size

142 kB

Total Files

32

Last publish

Collaborators

  • jasoncapricorn
  • qingkaili
  • huguoxin
  • shenyu.wsy
  • liunian
  • tao1991123
  • itrip
  • xiazhiqiang
  • mo.zhou
  • guoliang.hgl
  • daip
  • baizhao