[英]React Native <Text> inside <Grid> <Col> is not wrapping
我在react-native app中使用react-native-easy-grid,我在元素內部有一個text元素。 文本似乎溢出了列,但沒有環繞。
我已經嘗試添加flexString,flexDirection,flexWrap屬性,如其他問題所提供,例如React本機文本從屏幕上消失,拒絕換行。 該怎么辦? 但它不適用於Grid
render() {
return (
<View>
<Grid>
<Row style={{ height: 50, padding: 10 }}>
<Col><AntIcon name="warning" size={25} /></Col>
<Col style={{flexDirection:'row'}}>
<Text style={{flex: 1, flexShrink: 1}}>
0 devices could not sync'd to cloud since you are not the owner.
</Text>
</Col>
</Row>
</Grid>
</View>
);
}
我希望文本“0設備無法同步; d到雲,因為你不是設備屏幕內的所有者”但它的截止並顯示只有部分字符串
我意識到問題是什么。 這是我添加的高度參數搞砸了
我做了100高,它開始工作正常
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.