Replies: 1 comment
-
@wsaisai 麻烦提一下 issue 并附上可复现的 demo |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
@wsaisai 麻烦提一下 issue 并附上可复现的 demo |
Beta Was this translation helpful? Give feedback.
-
用taro写的评价页面,上滑加载数据 每次进行concat 最后使用setState方法进行更新,现在的情况是加载超过1024之后就白屏了,请问怎么解决?
useReachBottom(async () => {
const { currentPage, appraiseList, totalElement } = state;
// eslint-disable-next-line @typescript-eslint/no-unused-vars
let page = currentPage;
Taro.showLoading({
title: '加载中',
});
if (appraiseList.length >= totalElement) {
Taro.hideLoading();
setState({
moreData: true,
});
} else {
page++;
const list = appraiseList;
const result: any = await getAppraise(page);
const currentList: any = list.concat(result);
setState({
currentPage: page,
appraiseList: currentList,
});
if (currentList) {
setTimeout(() => {
Taro.hideLoading();
}, 1000);
}
}
});
Beta Was this translation helpful? Give feedback.
All reactions