constructor(props){ super(props); this.state = {text:'125'}; } render(){ return( <View> <Button title='状态' onPress={()=>{ this.setState({text:'7777'}); alert(this.state.text) }}></Button> </View> ); }
State
猜你喜欢
转载自my.oschina.net/u/2355512/blog/1527078
今日推荐
周排行