We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
5.18.0
iOS, Android
所有
No response
出现的问题:在懒加载时会无限重复请求 期望:只加载一次
// 无限加载方法 const loadMoreData = () => { return getPointPage(inputShowValue, filterPage + 1) }; // 获取接口 const getPointPage = (value: string, page?: number = 1) => { const params = { keywords: value, current: page, size: 20 } return getPointListPage(params).then((res: any) => { setFilterPage(page) if (filterPage === 1) { setPointPage(res.records) } else { setPointPage(pointPage.concat(res.records)); } setTotal(res.total) }) } // 组件 <InfiniteScroll loadMore={loadMoreData} hasMore={pointPage.length < total} threshold={250} > // 这个loading <InfiniteScrollContent hasMore={pointPage.length < total} page={pointPage.length > 10 ? pointPage.length / 10 : 1} /> </InfiniteScroll>
The text was updated successfully, but these errors were encountered:
我是在taro框架里用的InfiniteScroll这个组件
Sorry, something went wrong.
怎么解决的呢
No branches or pull requests
Version of antd-mobile
5.18.0
Operating system and its version
iOS, Android
Browser and its version
所有
Sandbox to reproduce
No response
What happened?
出现的问题:在懒加载时会无限重复请求
期望:只加载一次
Relevant log output
The text was updated successfully, but these errors were encountered: