WXML:
<view class="goods-Box">
<view class="list">
<view class="list-item" wx:for="{{productList}}" wx:key='item' data-item="{{item}}">
<image src="{{item.logourl}}" mode="aspectFill"></image>
<view class="item-title">{{item.name}}</view>
<view class="item-price">¥{{item.price}}
</view>
</view>
</view>
</view>
WXSS:
.goods-Box {
background-color: #f9f9f9;
padding: 32rpx;
overflow: hidden;
}
.goods-Box .list {
overflow: hidden;
display: flex;
justify-content: space-between;
flex-flow: wrap;
}
.goods-Box .list-item {
width: 216rpx;
border-radius: 8rpx;
margin-bottom: 24rpx;
}
.goods-Box .list-item image {
width: 100%;
height: 216rpx;
display: block;
background: #ddd;
border-radius: 16rpx;
}
.goods-Box .list-item .item-title {
color: #333;
font-size: 28rpx;
margin: 16rpx 0;
display: -webkit-Box;
display: -moz-Box;
overflow: hidden;
text-overflow: ellipsis;
word-break: break-all;
-webkit-Box-orient: vertical;
-webkit-line-clamp: 2;
}
.goods-Box .list-item .item-price {
color: #F86363;
font-size: 32rpx;
overflow: hidden;
}
.goods-Box .list-item .item-price text {
color: #aaa;
font-size: 28rpx;
text-decoration: line-through;
margin-left: 8rpx;
}
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。