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
前端-源码代码位置:@/components/Table/src/hooks/useDataSources.ts 源码: function fetch(){ ......
const resultTotal: number = isArrayResult ? 0 : get(res, totalField); // 假如数据变少,导致总页数变少并小于当前选中页码,通过getPaginationRef获取到的页码是不正确的,需获取正确的页码再次执行 if (resultTotal) { const currentTotalPage = Math.ceil(Number(resultTotal) / pageSize); if (current > currentTotalPage) { setPagination({ current: currentTotalPage, }); return await fetch(opt); } }
...... } // 建议这里加上Number()做容错处理。 const resultTotal: number = isArrayResult ? 0 : Number(get(res, totalField)); 当后端返回数据为字符串时,且total=‘0’时,会导致if (resultTotal) {...}执行,那就会发现重复请求。
The text was updated successfully, but these errors were encountered:
版本号?
Sorry, something went wrong.
No branches or pull requests
前端-源码代码位置:@/components/Table/src/hooks/useDataSources.ts
源码:
function fetch(){
......
......
}
// 建议这里加上Number()做容错处理。
const resultTotal: number = isArrayResult ? 0 : Number(get(res, totalField));
当后端返回数据为字符串时,且total=‘0’时,会导致if (resultTotal) {...}执行,那就会发现重复请求。
The text was updated successfully, but these errors were encountered: