constructor(props){
super(props);
this.state = {
ucodeUri:SERVER+'/org/showimage.jsp?v='+Math.random(),
}
}
<TouchableOpacity
onPress={this._handle.bind(this, 2)}
style={{alignItems: 'center',}}>
<Image style={{height:30, width:65}}
source={{uri:this.state.ucodeUri}} resizeMode='contain'/>
</TouchableOpacity>
_handle(position){
switch (position) {
case 2:
this.setState({
ucodeUri:SERVER+'/org/showimage.jsp?v='+Math.random(),
});
break;
default:
}
}
网友评论