From a1360076b90c94a817624717b9084cdb58cbb120 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E6=B4=AA=E6=B4=AA?= <2498601771@qq.com> Date: Thu, 27 Apr 2023 14:47:55 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=AE=80=E5=8C=96=E7=9F=A5=E8=AF=86?= =?UTF-8?q?=E5=BA=93=E7=BC=96=E8=BE=91=E6=97=B6=E7=82=B9=E5=87=BBadd?= =?UTF-8?q?=E6=93=8D=E4=BD=9C=E6=97=B6=E7=9A=84=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/setting/KnowledgeBaseForm.vue | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/views/setting/KnowledgeBaseForm.vue b/src/views/setting/KnowledgeBaseForm.vue index 593ef4f6..a23d1b44 100644 --- a/src/views/setting/KnowledgeBaseForm.vue +++ b/src/views/setting/KnowledgeBaseForm.vue @@ -816,17 +816,14 @@ export default { this.addEditFlag = true // 如果已经有新增空白项,则不再进行新增操作 if (this.importedData.length === 0 || (this.importedData[this.importedData.length - 1].tagItem !== '' && this.importedData[this.importedData.length - 1].tagValue !== '')) { - if (total > 0 && total < 10) { - this.importedData.push({ tagItem: '', tagValue: '', status: 1 }) - this.showImportedData.push({ tagItem: '', tagValue: '', status: 1 }) - this.importedDataNoData = false - } else { + if (total >= 10) { const lastPageSize = Math.ceil((total + 1) / 10) this.pageNo(lastPageSize) - this.importedData.push({ tagItem: '', tagValue: '', status: 1 }) - this.showImportedData.push({ tagItem: '', tagValue: '', status: 1 }) - this.importedDataNoData = false } + this.importedData.push({ tagItem: '', tagValue: '', status: 1 }) + this.showImportedData.push({ tagItem: '', tagValue: '', status: 1 }) + this.importedDataNoData = false + this.importedPageObj.total = this.importedData.length this.timer = setTimeout(() => { this.editIndex = this.showImportedData.length - 1