style: 商户折扣页名称单行撑满省略,地址与距离合并为同一模块

This commit is contained in:
jacobxu666
2026-09-02 20:56:56 +08:00
parent 80838143fb
commit d0ca2d961b
+21 -7
View File
@@ -22,11 +22,14 @@
<view class="card-info">
<text class="card-name">{{ item.name }}</text>
<text class="card-category">{{ item.category }}</text>
<text class="card-address">{{ item.address }}</text>
</view>
<view class="card-distance" v-if="item.distance !== null">
<u-icon name="map" color="#999999" size="24"></u-icon>
<text class="distance-text">{{ item.distance < 1 ? Math.round(item.distance * 1000) + 'm' : Math.round(item.distance) + 'km' }}</text>
<!-- xuchao: 地址与距离同属一个模块 -->
<view class="card-address-row">
<text class="card-address">{{ item.address }}</text>
<view class="card-distance" v-if="item.distance !== null">
<u-icon name="map" color="#999999" size="24"></u-icon>
<text class="distance-text">{{ item.distance < 1 ? Math.round(item.distance * 1000) + 'm' : Math.round(item.distance) + 'km' }}</text>
</view>
</view>
</view>
</view>
<view v-if="hasScrolled" class="nomore-area">
@@ -218,6 +221,10 @@ export default {
font-size: 16px;
font-weight: 500;
color: #000000;
width: 100%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.card-category {
@@ -226,14 +233,21 @@ export default {
margin-top: 8px;
}
.card-address-row {
display: flex;
align-items: center;
gap: 8px;
width: 100%;
margin-top: 8px;
}
.card-address {
flex: 1;
font-size: 14px;
color: #727272;
margin-top: 8px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
max-width: 200px;
}
.card-distance {