【发布时间】:2020-10-26 02:25:46
【问题描述】:
我正在尝试使用组件创建 Accordian:来自 library:'react-native-simple-accordian'。 但是当手风琴标题的数量更多时,我看不到 ScrollView 正常工作。
我的代码:
<View style={{flex:1}}>
<ScrollView style={{flex:1}}>
<View style={styles.container}>
<SimpleAccordion
style= {{
borderWidth:1,
borderRadius:15,
margin:3,
padding:5,
backgroundColor:'#ffffff'
}}
sections={sectionData}
renderHeader= {this.renderHeader}
renderContent={this.renderContent}
duration={1000}
touchableComponent={TouchableOpacity}
onChange={this.onChangeAccordian.bind(this)}
activeSection={this.state.open}
/>
</View>
</ScrollView>
</View>
样式对象是这样的:
container: {
flex: 1,
justifyContent: 'center',
},
我在这里为 ScrollView 做错了什么样式或定位? 反应原生
【问题讨论】:
标签: react-native react-native-scrollview