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

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

View File

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