fix: 文档不超过5个数据时下滚出现问题

文档不超过5个数据时下滚出现问题
This commit is contained in:
song.tianyang 2021-03-25 16:59:09 +08:00
parent bd351f1c3e
commit 321a35aeab
1 changed files with 4 additions and 4 deletions

View File

@ -643,7 +643,7 @@ export default {
if(lastIndex < this.currentApiIndexInApiShowArray){ if(lastIndex < this.currentApiIndexInApiShowArray){
// //
if(this.needAsyncSelect){ // if(this.needAsyncSelect){
//apiShowArray 2 //apiShowArray 2
// apiStepIndex-1- 2 < apiInfoArray // apiStepIndex-1- 2 < apiInfoArray
let dataIndex = this.apiStepIndex -3; let dataIndex = this.apiStepIndex -3;
@ -657,11 +657,11 @@ export default {
if(this.apiShowArray.length > (this.currentApiIndexInApiShowArray+3)){ if(this.apiShowArray.length > (this.currentApiIndexInApiShowArray+3)){
this.apiShowArray.pop(); this.apiShowArray.pop();
} }
} // }
this.apiStepIndex --; this.apiStepIndex --;
}else if(lastIndex > this.currentApiIndexInApiShowArray){ }else if(lastIndex > this.currentApiIndexInApiShowArray){
// //
if(this.needAsyncSelect){ // if(this.needAsyncSelect){
//apiShowArray 2 //apiShowArray 2
// apiStepIndex+1+ 2 < apiInfoArray // apiStepIndex+1+ 2 < apiInfoArray
let dataIndex = this.apiStepIndex +3; let dataIndex = this.apiStepIndex +3;
@ -678,7 +678,7 @@ export default {
let itemHeight = this.$refs.apiDocInfoDivItem[0].offsetHeight+10; let itemHeight = this.$refs.apiDocInfoDivItem[0].offsetHeight+10;
this.$refs.apiDocInfoDiv.scrollTop = (apiDocDivScrollTop-itemHeight); this.$refs.apiDocInfoDiv.scrollTop = (apiDocDivScrollTop-itemHeight);
} }
} // }
this.apiStepIndex ++; this.apiStepIndex ++;
} }
} }