|
@@ -3,14 +3,14 @@
|
|
|
<view class="address-list">
|
|
|
<u-swipe-action v-for="(item, index) in addressList" :key="index" :index="index" @click="deleteAddress" :options="options">
|
|
|
<view class="address-row" @click="setAddress(item)">
|
|
|
- <view class="address-first-name" :class="item.isDefault == 1 ? 'address-first-name-active' : ''">{{item.username ? item.username.slice(0,1) : ''}}</view>
|
|
|
+ <view class="address-first-name" :class="item.isDefault ? 'address-first-name-active' : ''">{{item.username ? item.username.slice(0,1) : ''}}</view>
|
|
|
<view class="address-info">
|
|
|
<view class="address-name-phone">
|
|
|
<text class="address-name">{{item.username}}</text>
|
|
|
<text class="address-phone">{{item.phone}}</text>
|
|
|
</view>
|
|
|
<view class="address-type-text">
|
|
|
- <view class="address-type" :class="item.isDefault == 1 ? 'address-type-active' : ''">{{item.isDefault == 1 ? '默认' : item.tag}}</view>
|
|
|
+ <view v-if="item.isDefault || item.tag" class="address-type" :class="item.isDefault? 'address-type-active' : ''">{{item.isDefault ? '默认' : item.tag}}</view>
|
|
|
<text class="address-text">{{item.province}},{{item.city}},{{item.area}},{{item.address}}</text>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -139,11 +139,12 @@
|
|
|
|
|
|
.address-row {
|
|
|
width: 100%;
|
|
|
- height: 77px;
|
|
|
+ // height: 77px;
|
|
|
float: left;
|
|
|
border-bottom: 1px solid #DBDBDB;
|
|
|
box-sizing: border-box;
|
|
|
padding: 20px 15px;
|
|
|
+ position: relative;
|
|
|
|
|
|
.address-first-name {
|
|
|
width: 36px;
|
|
@@ -156,6 +157,9 @@
|
|
|
font-family: PingFang SC;
|
|
|
text-align: center;
|
|
|
line-height: 36px;
|
|
|
+ top: 50%;
|
|
|
+ position: absolute;
|
|
|
+ transform: translateY(-50%);
|
|
|
}
|
|
|
|
|
|
.address-first-name-active {
|
|
@@ -164,13 +168,13 @@
|
|
|
|
|
|
.address-info {
|
|
|
width: calc(100% - 103px);
|
|
|
- height: 36px;
|
|
|
+ // height: 36px;
|
|
|
float: left;
|
|
|
- margin: 0 10px 0 15px;
|
|
|
+ margin: 0 10px 0 51px;
|
|
|
|
|
|
.address-name-phone {
|
|
|
width: 100%;
|
|
|
- height: 16px;
|
|
|
+ // height: 16px;
|
|
|
float: left;
|
|
|
line-height: 16px;
|
|
|
font-family: PingFang SC;
|
|
@@ -189,14 +193,11 @@
|
|
|
|
|
|
.address-type-text {
|
|
|
width: 100%;
|
|
|
- height: 16px;
|
|
|
+ // height: 16px;
|
|
|
margin-top: 4px;
|
|
|
float: left;
|
|
|
line-height: 16px;
|
|
|
font-family: PingFang SC;
|
|
|
- white-space: nowrap;
|
|
|
- text-overflow: ellipsis;
|
|
|
- overflow: hidden;
|
|
|
|
|
|
.address-type {
|
|
|
height: 16px;
|
|
@@ -216,6 +217,7 @@
|
|
|
.address-text {
|
|
|
font-size: 12px;
|
|
|
color: #333333;
|
|
|
+ word-break:break-all;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -231,6 +233,10 @@
|
|
|
font-size: 12px;
|
|
|
font-family: PingFang SC;
|
|
|
color: #656565;
|
|
|
+ top: 50%;
|
|
|
+ right: 15px;
|
|
|
+ position: absolute;
|
|
|
+ transform: translateY(-50%);
|
|
|
}
|
|
|
}
|
|
|
}
|