这个是处理不分页的函数
// 目录的
pageLook() {
console.log(this);
// 为了在删除最后一页的最后一条数据时能成功跳转回最后一页的上一页
const resultsPagination = Math.ceil(
(this.resultsPagination.total - 1) / this.resultsPagination.size
); // 总页数
this.resultsPagination.current =
this.resultsPagination.current > resultsPagination
? resultsPagination
: this.resultsPagination.current;
this.resultsPagination.current =
this.resultsPagination.current < 1 ? 1 : this.resultsPagination.current;
}
对应的分页查询对象 根据自己定义的替换处理分页函数中变量
// 查询条件
resultsPagination: {
total: 0,
current: 1, // 页数
size: "10", //每页中显示10条数据
},
处理分页函数在删除逻辑结束后 重新调用刷新列表的函数前调用即可