样式优化

pifa
wangdong 4 months ago
parent 85e26862eb
commit 36999ceb18
  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