我有以下模式框。问题是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}}
答案 0 :(得分:0)
您尝试过吗?
container: {
overflow: hidden,
backgroundColor: Colors.white,
borderRadius: Metrics.WIDTH * 0.04,
flexDirection: 'column',
width: '96%',
},
如果不起作用,请为宽度内容定义最大和最小长度