加载更多配合滑动删除
:key="item.id" 必须唯一 不可使用 index
<template v-if="listData.length > 0">
<u-swipe-action :show="item.show" @content-click='handleDetail' :index="index" v-for="(item, index) in listData" :key="item.id"
@click="handleDel" @open="open" :options="options">
<view class="mx3 my2 p3 bg-color-white" style="border-radius: 16rpx">
<view class="d-flex j-between">
<view class="f-size-32 f-weight-bold text-color-3">订单结算</view>
<view class="f-size-26 text-color-b">2020-10-26</view>
</view>
<view class="f-size-28 text-color-3 f-weight-4 mt-2">您的订单结算成功</view>
</view>
</u-swipe-action>
<view class="py3">
<u-loadmore :status="status" />
</view>
</template>
// 给数组数据增加一个属性 show 默认为 false
data.forEach(item => {
item.show = false
})