1.0.3 • Published 9 months ago

react-native-orzhtml-list v1.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

react-native-orzhtml-list

FlatList with pull-to-refresh and infinite scrolling for Android and iOS React-Native apps.

基于FlatList的上拉、下拉刷新组件。

npm.io

Install

npm install react-native-orzhtml-list --save

or

yarn add react-native-orzhtml-list

Props

PropDescriptionTypeRequired/Default
initialNumToRender首屏加载数量number10
refreshable是否可刷新booltrue
setRefreshing刷新状态回调方法funcnull
setRefresh刷新方法funcnull
setEndReached加载更多方法funcnull
isRefresh下拉是否是刷新boolfalse
renderItem渲染项目funcnull
refreshableTitle可刷新的标题stringnull
refreshableColors可刷新的颜色array['dimgray', 'tomato', 'limegreen']
refreshableProgressBackgroundColor可刷新的进展背景颜色string#fff
refreshableSize可刷新的大小stringnull
refreshableTintColor可刷新的色调的颜色stringlightgray
customRefreshControl自定义刷新控制funcnull
pagination是否显示分页booltrue
allLoadedText加载完成文字stringEnd of List
spinnerColor等待加载动画的颜色stringundefined
waitingSpinnerSize等待加载动画的大小stringsmall
waitingSpinnerText等待加载的文案stringLoading...
paginationBtnText分页按钮文案stringLoad more...
emptyViewText空视图的文案stringSorry no data

handle ref

methoddescription
firstAddData第一次数据加载
updateDataSource手动更新数据
refresh手动刷新
getRows获取已存的所有数据
scrollToEnd滚动到底部: 参考 FlatList scrollToEnd
scrollToIndex将位于指定位置的元素滚动到可视区的指定位置: 参考 FlatList scrollToIndex
scrollToItem这个方法会顺序遍历元素。尽可能使用 scrollToIndex 代替: 参考 FlatList scrollToItem
scrollToOffset滚动列表到指定的偏移(以像素为单位),等同于 ScrollView 的 scrollTo 方法: 参考 FlatList scrollToOffset
1.0.3

9 months ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago