feat: 商品卡片颜色单位显示一行,有面积时另起一行显示规格
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Agent
2026-04-01 15:30:50 +00:00
parent 6df829cf90
commit d9881a50c1

View File

@@ -38,10 +38,15 @@
<text class="product-name">{{ item.name }}</text> <text class="product-name">{{ item.name }}</text>
<text class="product-category" v-if="item.categoryName">{{ item.categoryName }}</text> <text class="product-category" v-if="item.categoryName">{{ item.categoryName }}</text>
</view> </view>
<view class="product-row">
<text class="product-spec">{{ item.spec || '-' }}</text> <text class="product-spec">{{ item.spec || '-' }}</text>
<text class="product-unit">/{{ item.unit }}</text>
</view>
<view class="product-spec-row" v-if="item.length && item.width">
<text class="spec-text">规格{{ item.length }} x {{ item.width }} = {{ item.area }} </text>
</view>
<view class="product-price"> <view class="product-price">
<text class="price">¥{{ item.price }}</text> <text class="price">¥{{ item.price }}</text>
<text class="unit">/{{ item.unit }}</text>
</view> </view>
<view class="product-status"> <view class="product-status">
<text :class="['status', item.status === 1 ? 'on' : 'off']"> <text :class="['status', item.status === 1 ? 'on' : 'off']">
@@ -474,10 +479,33 @@ export default {
.product-spec { .product-spec {
font-size: 24rpx; font-size: 24rpx;
color: #999; color: #999;
margin-top: 8rpx;
display: block; display: block;
} }
.product-row {
display: flex;
align-items: center;
margin-top: 8rpx;
}
.product-unit {
color: #999;
font-size: 24rpx;
margin-left: 4rpx;
}
.product-spec-row {
margin-top: 8rpx;
}
.spec-text {
font-size: 24rpx;
color: #666;
background: #f5f5f5;
padding: 4rpx 12rpx;
border-radius: 4rpx;
}
.product-price { .product-price {
margin-top: 12rpx; margin-top: 12rpx;
} }