|
|
@ -321,7 +321,7 @@ export function useDataSource( |
|
|
const isArrayResult = Array.isArray(res); |
|
|
const isArrayResult = Array.isArray(res); |
|
|
|
|
|
|
|
|
let resultItems: Recordable[] = isArrayResult ? res : get(res, listField); |
|
|
let resultItems: Recordable[] = isArrayResult ? res : get(res, listField); |
|
|
const resultTotal: number = isArrayResult ? res.length : get(res, totalField); |
|
|
const resultTotal: number = isArrayResult ? res.length : Number(get(res, totalField)); |
|
|
|
|
|
|
|
|
// 假如数据变少,导致总页数变少并小于当前选中页码,通过getPaginationRef获取到的页码是不正确的,需获取正确的页码再次执行
|
|
|
// 假如数据变少,导致总页数变少并小于当前选中页码,通过getPaginationRef获取到的页码是不正确的,需获取正确的页码再次执行
|
|
|
if (resultTotal) { |
|
|
if (resultTotal) { |
|
|
|