我想使用本机基数将单行输入和多行输入以表格的形式放置,但是它们未正确对齐垂直线。有什么我想念的东西,或者不应该一起使用吗?谢谢。
package.json的一部分
"expo": "~37.0.3",
"native-base": "2.13.8",
"react": "~16.9.0",
"react-dom": "~16.9.0",
"react-native": "https://github.com/expo/react-native/archive/sdk-37.0.1.tar.gz",
我的代码
<Content padder>
<Form>
<Item regular floatingLabel>
<Label style={{paddingTop: 2}}>Label</Label>
<Input onChangeText={url => setUrl(url)}/>
</Item>
<Textarea
rowSpan={5}
onChangeText={content => setContent(content)}
bordered
placeholder="this is textarea"
/>
</Form>
</Content>
========编辑
我找到了答案,只是用常规替换了floatLabel。但是,占位符仍未对齐。
<Item regular>
<Label>URL</Label>
<Input onChangeText={url => setUrl(url)}/>
</Item>
您必须将填充设置为文本区域的样式。
<Textarea style={{paddingLeft: over9000}} ... />