改成左滑删除

This commit is contained in:
kron
2025-11-04 14:38:16 +08:00
parent aa4fe1babd
commit 3f6d8cb821
7 changed files with 13239 additions and 949 deletions

View File

@@ -37,7 +37,7 @@ const openSelector = (index) => {
showModal.value = true;
};
const onLongPress = (item) => {
const onRemoveRecord = (item) => {
removeId.value = item.id;
showTip.value = true;
};
@@ -96,8 +96,9 @@ const onSelectOption = (itemIndex, value) => {
</view>
<view class="point-records">
<ScrollList :onLoading="onListLoading">
<view v-for="(item, index) in list" :key="index">
<PointRecord :data="item" :longPress="onLongPress" />
<view v-for="item in list" :key="item.id">
<PointRecord :data="item" :onRemove="onRemoveRecord" />
<view :style="{ height: '25rpx' }"></view>
</view>
<view class="no-data" v-if="list.length === 0">暂无数据</view>
</ScrollList>