样式优化

h5
wangdong 4 months ago
parent 4007fd2d24
commit f283eeeaaa
  1. 8
      pages/shopList/shopPage.vue

@ -81,7 +81,7 @@
<view class="goods-list"> <view class="goods-list">
<view v-for="(item, index) in goods" :key="index" class="good" <view v-for="(item, index) in goods" :key="index" class="good"
@click="onGoodDetail(item.goods_id)"> @click="onGoodDetail(item.goods_id)">
<image :src="item.goods_image" mode="aspectFill"></image> <image :src="item.goods_image" mode="widthFix"></image>
<view class="name">{{ item.goods_name }}</view> <view class="name">{{ item.goods_name }}</view>
<view class="price"> <view class="price">
<text <text
@ -651,6 +651,7 @@
overflow-y: auto; overflow-y: auto;
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
justify-content: space-between;
.good { .good {
width: 290rpx; width: 290rpx;
@ -658,13 +659,12 @@
background: #FFFFFF; background: #FFFFFF;
border-radius: 10rpx; border-radius: 10rpx;
border: 1px solid #EAEAEA; border: 1px solid #EAEAEA;
margin-right: 22rpx;
margin-bottom: 20rpx; margin-bottom: 20rpx;
border-radius: 10rpx; border-radius: 10rpx;
border: 1px solid #EAEAEA; border: 1px solid #EAEAEA;
&:nth-child(2n) { &:nth-child(2n +1) {
margin-right: 0; margin-right: auto;
} }
>image { >image {

Loading…
Cancel
Save