反应本机模态框内容溢出

时间:2019-08-12 19:57:10

标签: react-native react-native-android react-native-ios

我有以下模式框。问题是right boundary所显示的内容在模态框的 <Modal transparent animationType="fade" visible={this.state.visible} onRequestClose={this.hideModal} > <Container style={styles.overlay}> <View style={[styles.container]}> { this.renderContent() } </View> </Container> </Modal> renderContent = () => { return ( <ShopList ref={ref => (this.shopList = ref)} loadData={this.props.fetch} /> ); }; 之外在视觉上都会溢出。如何解决?

    overlay: {
      flex: 1,
      justifyContent: 'center',
      alignItems: 'center',
      backgroundColor: Colors.overlay,
    },
    container: {
      backgroundColor: Colors.white,
      borderRadius: Metrics.WIDTH * 0.04,
      flexDirection: 'column',
      width: '96%',
    },

样式

{{1}}

1 个答案:

答案 0 :(得分:0)

您尝试过吗?

container: {
      overflow: hidden,
      backgroundColor: Colors.white,
      borderRadius: Metrics.WIDTH * 0.04,
      flexDirection: 'column',
      width: '96%',
    },

如果不起作用,请为宽度内容定义最大和最小长度