Fix:4216 【商城小程序】领取礼包,选择收货地址时,增加一个选中样式
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
v-for="(item, index) in addressList"
|
||||
:key="index"
|
||||
class="address-item"
|
||||
:class="{'active': item.id == activeIndex}"
|
||||
>
|
||||
<view class="address-wrap" @click="handleSelect(item)">
|
||||
<view class="v12-font-28 v12-font-bold text">
|
||||
@@ -58,6 +59,7 @@ export default {
|
||||
return {
|
||||
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||
showPopup: false, // 新增控制弹窗显示的状态
|
||||
activeIndex: ''
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -78,6 +80,7 @@ export default {
|
||||
},
|
||||
// 选择地址
|
||||
handleSelect(item) {
|
||||
this.activeIndex = item.id
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '确认选择这个收货地址吗?',
|
||||
@@ -165,4 +168,8 @@ export default {
|
||||
width: 100%;
|
||||
padding: 20rpx 0;
|
||||
}
|
||||
.active{
|
||||
background-color: #F5F5F5;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user