【发布时间】:2017-06-27 22:36:28
【问题描述】:
我想知道如何使用 react-native 中提供的 flexbox 属性仅在有足够空间时显示组件。
<View style={{ flexDirection: 'row' }}>
<Text>
Text with unknown length
</Text>
<Text>
Some more text with unknown length
</Text>
<Text>
this should be hidden if the above text is too long
</Text>
<View>
我不知道前 2 个文本组件的宽度,那么如何确保最后一个文本组件仅在屏幕上有足够空间时显示?
谢谢
p.s:不要急于将我的问题标记为重复,正如我所问的 关于 react-native 而不是一般的 flexbox。
auto值不是 react-native flexbox 支持。
【问题讨论】:
标签: react-native flexbox