.wxml
<scroll-view class="prods_list" scroll-x="true">
<block
wx:for="{{ cardMsg.items }}"
wx:for-item="good"
wx:key="product"
>
<view class="prod_item" scroll-x="true">
<view class="prod_img">
<image style="width: 272rpx;height: 272rpx; margin: 0" src="{{ good.image_url }}"/>
</view>
<view class="prod_info">
<view class="prod_name">{{ good.product }}</view>
</view>
</view>
</block>
</scroll-view>
.wxss
.prods_list {
width: 100%;
display: flex;
justify-content: flex-start;
flex-wrap: nowrap;
overflow-x: scroll;
white-space: nowrap;
}
.json
{
"component": true
}
这是一个component,但是
使用的时候水平的滚动完全是无效的