uniapp x中,scroll-view竖向滚动问题,用了各个方法,想让子项在一行中显示几个,超出的会自动换行。但是不知道为什么一行只能显示一个子项,
现在上下滑动没问题
<scroll-view class="scroll-view" direction="vertical" >
<view v-for="(item, index) in aaList" :key="index" class="scroll-item">
</view>
</scroll-view>
.scroll-view {
width: 100%;
flex: 1;
// height: 1000rpx; //和高度没关系
border-radius: 30rpx;
overflow: hidden;
padding: 20rpx;
display: flex;
flex-wrap: wrap;
justify-content: center;
// flex-direction: column;//用row就彻底不滑动了,
background-color: pink;
}
.scroll-item {
width: 100rpx;
height: 110rpx;
background-color: #F5F5F5;
margin: 10rpx;
// 转换为行内块元素,也试了
//display: inline-block;
}