fix: 修复删除导入数据后页码可能不对的问题
This commit is contained in:
@@ -272,12 +272,12 @@ export default {
|
|||||||
removeImportedData (index) {
|
removeImportedData (index) {
|
||||||
const toRemoveIndex = (this.importedPageObj.pageNo - 1) * this.importedPageObj.pageSize + index
|
const toRemoveIndex = (this.importedPageObj.pageNo - 1) * this.importedPageObj.pageSize + index
|
||||||
this.importedData.splice(toRemoveIndex, 1)
|
this.importedData.splice(toRemoveIndex, 1)
|
||||||
|
this.importedPageObj.total--
|
||||||
this.handleShowImportedData()
|
this.handleShowImportedData()
|
||||||
// 若删除后本页无数据,则页码减1,或者提示无数据
|
// 若删除后本页无数据,则页码减1,或者提示无数据
|
||||||
if (this.showImportedData.length === 0) {
|
if (this.showImportedData.length === 0) {
|
||||||
if (this.importedData.length > 0) {
|
if (this.importedData.length > 0) {
|
||||||
this.importedPageObj.pageNo--
|
this.importedPageObj.pageNo--
|
||||||
this.importedPageObj.total = this.importedData.length
|
|
||||||
this.handleShowImportedData()
|
this.handleShowImportedData()
|
||||||
} else {
|
} else {
|
||||||
this.importedDataNoData = true
|
this.importedDataNoData = true
|
||||||
|
|||||||
Reference in New Issue
Block a user