feat: 选择商品页面卡片显示长宽面积与颜色同一行
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Agent
2026-04-01 15:48:40 +00:00
parent 45d6cc53ca
commit 0500d3e688

View File

@@ -30,7 +30,10 @@
<view v-for="item in productList" :key="item.productId" class="product-item" @click="openProductDetail(item)"> <view v-for="item in productList" :key="item.productId" class="product-item" @click="openProductDetail(item)">
<view class="product-info"> <view class="product-info">
<text class="product-name">{{ item.name }}</text> <text class="product-name">{{ item.name }}</text>
<view class="product-row">
<text class="product-spec">{{ item.spec || '-' }}</text> <text class="product-spec">{{ item.spec || '-' }}</text>
<text class="product-size" v-if="item.length && item.width">{{ item.length }} x {{ item.width }} = {{ item.area }} m²</text>
</view>
</view> </view>
<view class="product-price"> <view class="product-price">
<text class="price">¥{{ item.price }}</text> <text class="price">¥{{ item.price }}</text>
@@ -278,6 +281,21 @@ export default {
color: #999; color: #999;
} }
.product-row {
display: flex;
align-items: center;
flex-wrap: wrap;
gap: 8rpx;
}
.product-size {
font-size: 22rpx;
color: #667eea;
background: #f0f0ff;
padding: 2rpx 8rpx;
border-radius: 4rpx;
}
.product-price { .product-price {
text-align: right; text-align: right;
} }