1.删除单条数据的时候返回上一页
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 })
}
}
}
2.多选删除, 多选删除逻辑差不多,只不过这时候使用total-多选的key的length,是否为当前分页*size,