<uni-swipe-action-item
:right-options="options"
class="address-item"
@tap="tapAddressItem"
@change="addressItemChange($event, index)"
v-for="(address, index) in addresses"
:key="index"
>
<view class="left">
<view class="font-size-lg font-weight-bold" style="margin-bottom: 10rpx;">{{ address.consigneeAddressPath }} {{ address.detail }}</view>
<view class="font-size-sm text-color-assist">{{ address.name }} {{ address.mobile }}</view>
<view class="bottom">
<view class="default" v-if="address.isDefault">{{ address.isDefault ? '默认' : '' }}</view>
<view class="alias" v-if="address.alias">{{ address.alias }}</view>
</view>
</view>
<!-- 自定义滑动内容 -->
<template v-slot:right>
<view @tap="delAdress(adress)"><text>删除</text></view>
<view @tap="editAdress(adress)"><text>编辑</text></view>
</template>
</uni-swipe-action-item>
</uni-swipe-action>
问题:<view @tap="delAdress(adress)"><text>删除</text></view><view @tap="editAdress(adress)"><text>编辑</text></view>的delAdress,editAdress方法里面获取不到address
1***@qq.com (作者)
在addressItemChange里面保存到data 在delAdress在获取保存到data中的当前信息
2021-09-16 12:08