React native 反应本机模式框内容溢出
我有下面的模式框。问题是无论显示什么React native 反应本机模式框内容溢出,react-native,react-native-android,react-native-ios,React Native,React Native Android,React Native Ios,我有下面的模式框。问题是无论显示什么renderContent都会在模态框的右边界之外视觉上溢出。如何修复它 <Modal transparent animationType="fade" visible={this.state.visible} onRequestClose={this.hideModal} > <Container style={styles.overlay}>
renderContent
都会在模态框的右边界
之外视觉上溢出。如何修复它
<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}
/>
);
};
你试过这个吗
container: {
overflow: hidden,
backgroundColor: Colors.white,
borderRadius: Metrics.WIDTH * 0.04,
flexDirection: 'column',
width: '96%',
},
如果不起作用,请定义宽度内容的最大和最小长度您尝试过这个吗
container: {
overflow: hidden,
backgroundColor: Colors.white,
borderRadius: Metrics.WIDTH * 0.04,
flexDirection: 'column',
width: '96%',
},
如果不起作用,请定义宽度内容的最大和最小长度