uniapp:【商品列表】样式 review

This commit is contained in:
YunaiV 2022-12-26 22:18:40 +08:00
parent d4ceceee8c
commit 4aeaa21854

View File

@ -3,10 +3,13 @@
<u-navbar :title="title" :autoBack="true" placeholder="true" titleStyle="font-size: 28rpx"> <u-navbar :title="title" :autoBack="true" placeholder="true" titleStyle="font-size: 28rpx">
</u-navbar> </u-navbar>
<view class="context"> <view class="context">
<!-- 分类列表 -->
<!-- TODO @Luowenfeng不应该展示商品分类应该是上面一个筛选之后是综合销量价格的排序 -->
<view class="tabs-top"> <view class="tabs-top">
<u-tabs :list="categoryList" @click="changeTabs" :current="current" lineHeight="2" lineWidth="85rpx" <u-tabs :list="categoryList" @click="changeTabs" :current="current" lineHeight="2" lineWidth="85rpx"
itemStyle="padding-left: 15px; padding-right: 15px; height: 85rpx;"></u-tabs> itemStyle="padding-left: 15px; padding-right: 15px; height: 85rpx;"></u-tabs>
</view> </view>
<!-- 商品列表 -->
<scroll-view scroll-y="true" class="product-list" enable-flex="true"> <scroll-view scroll-y="true" class="product-list" enable-flex="true">
<view class="flex-box"> <view class="flex-box">
<block v-for="(item, index) in productList[current]" :key="index"> <block v-for="(item, index) in productList[current]" :key="index">
@ -52,7 +55,7 @@
}, },
methods: { methods: {
changeTabs(item) { changeTabs(item) {
if (item.index != this.current) { if (item.index !== this.current) {
this.handleProductSpu(item.index) this.handleProductSpu(item.index)
} }
}, },