1.protable 删除 分页问题 创建11条数据 分页是每页10条 跳到第二页 - 此时显示一条数据 删除该数据

actionRef?.current?.reload();

const pageInfo: any = actionRef.current?.pageInfo //获取当前分页数据

if (pageInfo?.pageSize * pageInfo.current - pageInfo?.total === (pageInfo?.pageSize - 1)) { //判断是否分页数量*size -total =所剩是否为分页数-1

if (pageInfo.current === 1) {

if (actionRef.current?.setPageInfo) {

actionRef.current.setPageInfo({ current: 1 })

}

} else {

if (actionRef.current?.setPageInfo) {

actionRef.current.setPageInfo({ current: pageInfo.current - 1 })

}

}

}

相关链接

评论可见,请评论后查看内容,谢谢!!!
 您阅读本篇文章共花了: