【问题标题】:React Native <Text> inside <Grid> <Col> is not wrapping<Grid> <Col> 内的 React Native <Text> 未包装
【发布时间】:2019-08-23 23:44:20
【问题描述】:

我在 react-native 应用程序中使用 react-native-easy-grid,并且在 .文本似乎溢出了列,但没有环绕。

我已尝试添加其他问题(如 React native text going off my screen, refusing to wrap. What to do?)中提供的 flexString、flexDirection、flexWrap 属性,但它不适用于 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 到云,因为您不是设备屏幕内的所有者”,但它被截断并仅显示部分字符串

【问题讨论】:

    标签: reactjs react-native


    【解决方案1】:

    我意识到问题所在。是我添加的高度参数搞砸了

    我将身高设置为 100,它开始正常工作

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-05-06
      • 2017-09-18
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多