React Native-滚动包装时,ScrollView不起作用

时间:2019-11-27 08:30:51

标签: react-native flexbox

滚动视图在被包装时不滚动。滚动仅在横向模式下有效。

<View style={{ flex: 1, flexDirection: 'row', flexWrap: 'wrap', alignContent: 'stretch' }}>
    <View style={{ flex: 1, flexBasis: 300, minHeight: 300, backgroundColor: 'skyblue' }}>
        // Top content in portrait mode OR LHS content in landscape mode
    </View>
    <View style={{ flex: 1, flexBasis: 300, position: 'relative', backgroundColor: 'pink' }}>
        // Bottom content in portrait mode OR RHS content in landscape mode
        <ScrollView>
            <Items />
        </ScrollView>
    </View>
</View>

0 个答案:

没有答案