scroll-view 实现滚动效果
<scroll-view scroll-x="true" class="head-scroll">
<view class="scroll-list member-commodity-list-item" v-for="item in memberKind">
<view class="member-commodity-list-item-sign item">
{{item.kind}}
</view>
<view class="member-commodity-list-item-price item">
¥ {{item.price}}
</view>
</view>
</scroll-view>
重点样式
.head-scroll{ // 父级 scroll-view
width: 100%;
white-space: nowrap;
}
::-webkit-scrollbar { // 滚动条不显示
width: 0;
height: 0;
color: transparent;
}
.member-commodity-list-item{ // 子级
display: inline-block;
}