修复表格分页搜索和删除BUG #20

This commit is contained in:
zhengjie
2019-06-25 09:21:07 +08:00
parent 94b2e78246
commit 6c06d89355
17 changed files with 33 additions and 0 deletions

View File

@@ -37,6 +37,15 @@ export default {
this.page = 0
this.size = e
this.init()
},
// 预防删除第二页最后一条数据时,或者多选删除第二页的数据时,页码错误导致请求无数据
dleChangePage(size) {
if (size === undefined) {
size = 1
}
if (this.data.length === size && this.page !== 0) {
this.page = this.page - 1
}
}
}
}