修复删除最后一个列表数据,重新加载数据报错
This commit is contained in:
@@ -228,7 +228,7 @@ export default {
|
||||
type: 'success',
|
||||
message: '删除成功'
|
||||
})
|
||||
if (this.tableData.length == ids.length) {
|
||||
if (this.tableData.length == ids.length && this.page > 1) {
|
||||
this.page--;
|
||||
}
|
||||
this.deleteVisible = false
|
||||
@@ -272,7 +272,7 @@ export default {
|
||||
type: "success",
|
||||
message: "删除成功"
|
||||
});
|
||||
if (this.tableData.length == 1) {
|
||||
if (this.tableData.length == 1 && this.page > 1 ) {
|
||||
this.page--;
|
||||
}
|
||||
this.getTableData();
|
||||
|
Reference in New Issue
Block a user