fix: 修复删除导入数据后页码可能不对的问题

This commit is contained in:
chenjinsong
2023-03-08 18:10:55 +08:00
parent fb9034229e
commit 32a04eec4c

View File

@@ -272,12 +272,12 @@ export default {
removeImportedData (index) {
const toRemoveIndex = (this.importedPageObj.pageNo - 1) * this.importedPageObj.pageSize + index
this.importedData.splice(toRemoveIndex, 1)
this.importedPageObj.total--
this.handleShowImportedData()
// 若删除后本页无数据则页码减1或者提示无数据
if (this.showImportedData.length === 0) {
if (this.importedData.length > 0) {
this.importedPageObj.pageNo--
this.importedPageObj.total = this.importedData.length
this.handleShowImportedData()
} else {
this.importedDataNoData = true