我正在尝试在一行中创建 3 个 TextInput,但是当我编写 flexDirection: 'row' 时它不起作用(我在设备上看不到任何文本输入)。
var SampleApp = React.createClass({
render: function() {
return (
<View style={styles.container}>
<View style={styles.textInputWrapper}>
<TextInput style={styles.textInput}
placeholder='Month'
placeholderTextColor="#d3d3d3"
/>
</View>
<View style={styles.textInputWrapper}>
<TextInput style={styles.textInput}
placeholder='Day'
placeholderTextColor="#d3d3d3"
/>
</View>
<View style={styles.textInputWrapper}>
<TextInput style={styles.textInput}
placeholder='Year'
placeholderTextColor="#d3d3d3"
/>
</View>
</View>
);
}
});
var styles = StyleSheet.create({
container: {
flex: 1,
flexDirection: 'row'
}
});