守候你守候我
render(){ let leftcontent1 = "React Native通过一个基于Flexbox的布局引擎,在所有移动平台上实现了一致的跨平台样式和布局方案"; let leftcontent2 = "H"; let rightcontent = "元素"; return <View style={{flex:1, alignItems:'center'}}> <TouchableOpacity style={styles.button} activeOpacity={0.8} onPress={this.test.bind(this,3,4)}> <Text>test 不适用匿名参数传递参数</Text> </TouchableOpacity> <TouchableOpacity style={styles.button} activeOpacity={1} onPress={()=>{this.testB(3,4)}}> <Text>testB</Text> </TouchableOpacity> <View style={{flex:1,width:"100%",flexDirection:'row',justifyContent:"space-between"}}> <View style={[styles.item,{minWidth: 30,flexShrink:2}]}> <Text>{leftcontent1}</Text> </View> <View style={[styles.item,{minWidth: 30,marginLeft: 20,}]}> <Text>{rightcontent}</Text> </View> </View> </View> }