国家标注,价格筛选
This commit is contained in:
@@ -42,10 +42,19 @@
|
||||
<!-- 商品信息 -->
|
||||
<view class="product-info">
|
||||
<text class="product-name">{{ item.name }}</text>
|
||||
<!-- 价格 + "起"字 -->
|
||||
<!-- 价格 + "起"字 + 国家标签(未选国家时显示商品所属国家) -->
|
||||
<view class="price-row">
|
||||
<text class="product-price">¥{{ item.price }}</text>
|
||||
<text class="price-unit">起</text>
|
||||
<view class="country-tag" v-if="showCountryTag && item.countryName">
|
||||
<image
|
||||
class="country-tag-icon"
|
||||
:src="item.countryIcon"
|
||||
mode="aspectFill"
|
||||
v-if="item.countryIcon"
|
||||
></image>
|
||||
<text class="country-tag-name">{{ item.countryName }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -75,6 +84,8 @@ export default {
|
||||
hasMore: { type: Boolean, default: true },
|
||||
loading: { type: Boolean, default: false },
|
||||
scrollTopVal: { type: Number, default: 0 },
|
||||
// 未选择国家时显示商品所属国家标签
|
||||
showCountryTag: { type: Boolean, default: false },
|
||||
// 商品滚动区固定高度(px),由父组件动态计算传入
|
||||
scrollHeight: { type: Number, default: 400 }
|
||||
},
|
||||
@@ -216,6 +227,34 @@ export default {
|
||||
line-height: 1.2;
|
||||
margin-left: 4rpx;
|
||||
}
|
||||
/* 国家标签 - 价格右侧,国旗图标 + 国家名 */
|
||||
.country-tag {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 6rpx;
|
||||
margin-left: 12rpx;
|
||||
padding: 4rpx 12rpx;
|
||||
background: #f7f7f7;
|
||||
border-radius: 20rpx;
|
||||
max-width: 50%;
|
||||
box-sizing: border-box;
|
||||
overflow: hidden;
|
||||
}
|
||||
.country-tag-icon {
|
||||
width: 28rpx;
|
||||
height: 20rpx;
|
||||
border-radius: 4rpx;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.country-tag-name {
|
||||
font-size: 20rpx;
|
||||
font-weight: 500;
|
||||
color: #666666;
|
||||
line-height: 1.2;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
/* 底部加载提示 */
|
||||
.load-tip {
|
||||
|
||||
Reference in New Issue
Block a user