react-native-pull
react-native-pull copied to clipboard
请问一下pullrelease状态不显示是什么问题
版本:"react-native-pull": "latest", ` async onPullRelease(resolve){ let that=this; await that.getWeather(that.state.localCity); console.log('刷新'); resolve(); }
topIndicatorRender=(pulling, pullok, pullrelease)=> {
const hide = {position: 'absolute', left: 10000};
const show = {position: 'relative', left: 0};
setTimeout(() => {
if (pulling) {
this.txtPulling && this.txtPulling.setNativeProps({style: show});
this.txtPullok && this.txtPullok.setNativeProps({style: hide});
this.txtPullrelease && this.txtPullrelease.setNativeProps({style: hide});
} else if (pullok) {
this.txtPulling && this.txtPulling.setNativeProps({style: hide});
this.txtPullok && this.txtPullok.setNativeProps({style: show});
this.txtPullrelease && this.txtPullrelease.setNativeProps({style: hide});
} else if (pullrelease) {
this.txtPulling && this.txtPulling.setNativeProps({style: hide});
this.txtPullok && this.txtPullok.setNativeProps({style: hide});
this.txtPullrelease && this.txtPullrelease.setNativeProps({style: show});
}
}, 1);
return (
<View style={{flexDirection: 'row', justifyContent: 'center', alignItems: 'center', height: 60}}>
<ActivityIndicator size="small" color="white" />
<Text style={{color:'white'}} ref={(c) => {this.txtPulling = c;}}>下拉刷新</Text>
<Text style={{color:'white'}} ref={(c) => {this.txtPullok = c;}}>松开刷新</Text>
<Text style={{color:'white'}} ref={(c) => {this.txtPullrelease = c;}}>刷新中</Text>
</View>
);
}
<PullView style={{width: Dimensions.get('window').width}} onPullRelease={this.onPullRelease} topIndicatorRender={this.topIndicatorRender} topIndicatorHeight={60}> </PullView >` 下拉的时候显示“下拉刷新”, 下拉到一定高度的时候显示“松开刷新” 可是松开的时候没有显示“刷新中”,而是直接隐藏刷新条 onPullRelease里的getWeather是请求 请问一下哪里出问题了?