feat: 修改收支明细列表加载问题
This commit is contained in:
@@ -123,12 +123,17 @@
|
||||
*
|
||||
* @param state 布尔值,表示 Mescroll 组件的状态,默认为 true
|
||||
* @param num 数字,表示数据长度,默认为 0
|
||||
* @param total 数字,表示总条数(可选)。传入后会使用 endBySize 精确判断是否还有下一页
|
||||
*/
|
||||
|
||||
const getState = (state = true, num = 0) => {
|
||||
const getState = (state = true, num = 0, total) => {
|
||||
const mescroll = getMescroll();
|
||||
if (state) {
|
||||
mescroll.endSuccess(num);
|
||||
if (Number.isFinite(Number(total))) {
|
||||
mescroll.endBySize(num, Number(total));
|
||||
} else {
|
||||
mescroll.endSuccess(num);
|
||||
}
|
||||
} else {
|
||||
mescroll.endErr();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user