问题描述:
删除最后一页的所有数据之后,数据显示为空,此时的接口参数是对应的还是最后一页的参数
解决方法
在删除之后重新赋值一下当前页
async delData(rows) {
let query = {
sid:rows.sid,
concurrencyVersion:rows.concurrencyVersion
};
let res = await deleteTableData(query);
let totalPage = Math.ceil((this.tbObj.total - 1) / this.tbObj.pageSize)
let currentPage = this.tbObj.currentPage > totalPage ?totalPage:this.tbObj.currentPage
this.tbObj.currentPage = currentPage <1?1:currentPage
this.updateTable();
this.$message({
message: '删除成功',
type: 'success'
})
},