商品列表标签修改
Test Runner / hello (push) Successful in 4s

This commit is contained in:
2026-08-26 18:16:09 +08:00
parent 374719423b
commit 3b4a2f9a78
+28 -13
View File
@@ -37,7 +37,12 @@
mode="aspectFill" mode="aspectFill"
v-if="item.image" v-if="item.image"
></image> ></image>
<view class="product-badges"> </view>
<!-- 商品信息 -->
<view class="product-info">
<text class="product-name">{{ item.name }}</text>
<!-- 标签 - 商品名下方价格上方 (Figma 1523:344) -->
<view class="product-badges" v-if="item.tags && item.tags.length > 0">
<view <view
class="product-badge" class="product-badge"
:style="{ background: tag.bg, color: tag.color }" :style="{ background: tag.bg, color: tag.color }"
@@ -45,11 +50,11 @@
:key="tIdx" :key="tIdx"
>{{ tag.text }}</view> >{{ tag.text }}</view>
</view> </view>
</view> <!-- 价格 + "起" -->
<!-- 商品信息 --> <view class="price-row">
<view class="product-info"> <text class="product-price">{{ item.price }}</text>
<text class="product-name">{{ item.name }}</text> <text class="price-unit"></text>
<text class="product-price">{{ item.price }}</text> </view>
</view> </view>
</view> </view>
</view> </view>
@@ -183,14 +188,12 @@ export default {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
/* 标签 - 位于商品名下方、价格上方,横向排列 */
.product-badges { .product-badges {
position: absolute;
top: 12rpx;
left: 12rpx;
display: flex; display: flex;
flex-direction: column; flex-wrap: wrap;
gap: 8rpx; gap: 8rpx;
z-index: 1; margin-top: 8rpx;
} }
.product-badge { .product-badge {
padding: 4rpx 12rpx; padding: 4rpx 12rpx;
@@ -213,15 +216,27 @@ export default {
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
} }
/* 价格行 - 价格 + "起"字横向排列 */
.price-row {
display: flex;
align-items: baseline;
margin-top: 16rpx;
}
/* 价格 15px Heavy #FF0000 红色 */ /* 价格 15px Heavy #FF0000 红色 */
.product-price { .product-price {
display: block;
margin-top: 16rpx;
font-size: 30rpx; font-size: 30rpx;
font-weight: 900; font-weight: 900;
color: #ff0000; color: #ff0000;
line-height: 1.2; line-height: 1.2;
} }
/* "起"字 - 比价格字体小,其他样式相同 */
.price-unit {
font-size: 22rpx;
font-weight: 900;
color: #ff0000;
line-height: 1.2;
margin-left: 4rpx;
}
/* 底部加载提示 */ /* 底部加载提示 */
.load-tip { .load-tip {