diff --git a/frontend/src/business/components/track/plan/view/comonents/functional/FunctionalTestCaseEdit.vue b/frontend/src/business/components/track/plan/view/comonents/functional/FunctionalTestCaseEdit.vue index 8b4b4d1a82..7892ea9f71 100644 --- a/frontend/src/business/components/track/plan/view/comonents/functional/FunctionalTestCaseEdit.vue +++ b/frontend/src/business/components/track/plan/view/comonents/functional/FunctionalTestCaseEdit.vue @@ -366,6 +366,7 @@ export default { return; } else if (this.index === this.testCases.length - 1) { this.$emit('nextPage'); + this.index = 0; return; } this.index++; @@ -384,6 +385,7 @@ export default { return; } else if (this.index === 0) { this.$emit('prePage'); + this.index = this.pageSize - 1; return; } this.index--; diff --git a/frontend/src/business/components/track/review/view/components/TestReviewTestCaseEdit.vue b/frontend/src/business/components/track/review/view/components/TestReviewTestCaseEdit.vue index b01c0cf5a5..680a20be35 100644 --- a/frontend/src/business/components/track/review/view/components/TestReviewTestCaseEdit.vue +++ b/frontend/src/business/components/track/review/view/components/TestReviewTestCaseEdit.vue @@ -368,9 +368,12 @@ export default { }, handleNext() { if (this.index === this.testCases.length - 1 && this.pageNum === this.pageTotal) { + // 最后一条不处理 return; } else if (this.index === this.testCases.length - 1) { + // 到本页最后一条数据,则翻页 this.$emit('nextPage'); + this.index = 0; return; } this.index++; @@ -381,6 +384,7 @@ export default { return; } else if (this.index === 0) { this.$emit('prePage'); + this.index = this.pageSize - 1; return; } this.index--; diff --git a/frontend/src/business/components/track/review/view/components/TestReviewTestCaseList.vue b/frontend/src/business/components/track/review/view/components/TestReviewTestCaseList.vue index 4091c6c164..6ebf672bd3 100644 --- a/frontend/src/business/components/track/review/view/components/TestReviewTestCaseList.vue +++ b/frontend/src/business/components/track/review/view/components/TestReviewTestCaseList.vue @@ -372,7 +372,7 @@ export default { this.total = data.itemCount; this.tableData = data.listObject; this.getPreData(); - if (callback && typeof callback === "function") { + if (callback && callback instanceof Function) { callback(); } setTimeout(() => {