feat: 修改收支明细列表加载问题

This commit is contained in:
2026-06-26 15:30:49 +08:00
parent 1902549342
commit baacf1be41
4 changed files with 11 additions and 6 deletions
+7 -2
View File
@@ -123,12 +123,17 @@
* *
* @param state 布尔值,表示 Mescroll 组件的状态,默认为 true * @param state 布尔值,表示 Mescroll 组件的状态,默认为 true
* @param num 数字,表示数据长度,默认为 0 * @param num 数字,表示数据长度,默认为 0
* @param total 数字,表示总条数(可选)。传入后会使用 endBySize 精确判断是否还有下一页
*/ */
const getState = (state = true, num = 0) => { const getState = (state = true, num = 0, total) => {
const mescroll = getMescroll(); const mescroll = getMescroll();
if (state) { if (state) {
mescroll.endSuccess(num); if (Number.isFinite(Number(total))) {
mescroll.endBySize(num, Number(total));
} else {
mescroll.endSuccess(num);
}
} else { } else {
mescroll.endErr(); mescroll.endErr();
} }
+1 -1
View File
@@ -109,7 +109,7 @@ const getList = async (mescroll) => {
const list = res.data?.list || []; const list = res.data?.list || [];
if (mescroll.num === 1) detailList.value = []; if (mescroll.num === 1) detailList.value = [];
detailList.value = detailList.value.concat(list); detailList.value = detailList.value.concat(list);
cardPages.value?.getState(true, list.length); cardPages.value?.getState(true, list.length, res.data?.total);
return; return;
} }
+2 -2
View File
@@ -481,7 +481,7 @@
// border-radius: 0 0 30rpx 30rpx; // border-radius: 0 0 30rpx 30rpx;
} }
.top-area1{ .top-area1{
border-radius: 0 0 30rpx 30rpx;
background: #2556ec; background: #2556ec;
} }
@@ -574,7 +574,7 @@
margin-top: 18rpx; margin-top: 18rpx;
background: #f1f5ff; background: #f1f5ff;
border-radius: 30rpx 30rpx 0 0; border-radius: 30rpx 30rpx 0 0;
padding: 0 24rpx; padding: 0 24rpx 50rpx;
overflow: hidden; overflow: hidden;
} }
+1 -1
View File
@@ -1,5 +1,5 @@
<template> <template>
<view class="p-t-16 p-b-300"> <view class="p-t-16" style="padding-bottom: 500rpx;">
<view class="m-b-24" v-for="(v, i) in list" :key="i"> <view class="m-b-24" v-for="(v, i) in list" :key="i">
<aiOrder :data="v" @addCar="emit('addCar', $event)" :source="0" @update="emit('update')" @shipment="emit('shipment')" /> <aiOrder :data="v" @addCar="emit('addCar', $event)" :source="0" @update="emit('update')" @shipment="emit('shipment')" />
</view> </view>