1.0.13 • Published 5 years ago

uat-lifetime v1.0.13

Weekly downloads
2
License
ISC
Repository
github
Last release
5 years ago

使用说明

安装依赖

- npm install --save react-native-image-zoom-viewer
- npm install --save uat-image-browser
- npm install --save react-native-video[具体步骤](https://github.com/react-native-community/react-native-video#ios-installation)
- npm install --save react-native-uat-alert

使用

```
render(){
	const {style} = this.props;
		const {
				refreshing,
				loading,
				data,
			} = this.state;
			return <UatLifetime data={data} 
													style={styles.container}
													refreshing={refreshing}
													loading={loading}
													onRefresh={this.refreshData}
													onEndReached={this.loadMoreData}
													onPraise={this.onPraise}
													ref={ref=>this.lifetime=ref}
													onSendComment={this.onComment}
													supportReply={false}
													onDelComment={this.onDelComment}
											/>
}
几个重要属性
外部维护数据
当数据发生变化时,直接修改data就可以
```

属性Props说明

属性类型说明
styleViewStyle容器样式
loadingboolean是否正在加载更多
dataMsg[]列表显示的数据源
err?string错误内容,空表示请求成功
firstLoadingViewReact.Element首次数据加载样式 (废弃)
onDelComment(comment:Comment,msg:Msg)=>{}删除评论
supportReplyboolean是否支持回复,如果禁用,则用户无法通过点击评论回复别人
onPraise(msg:Msg)=>{}点赞,取消点赞,根据selfHasPraise判断是取消还是点赞
onSendComment(content:String,comment:?Comment,msg:Msg)=>{}点击发送评论
onLoad()=>{}滚动到底部加载更多
onRefresh()=>{}下拉刷新

外部方法说明

1.0.13

5 years ago

1.0.12

5 years ago

1.0.11

5 years ago

1.0.10

5 years ago

1.0.9

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago