fix(接口文档): #1006735 【接口定义】接口列表,API-CASE-文档,互相切换时页面会报错
【【接口定义】接口列表,API-CASE-文档,互相切换时页面会报错】https://www.tapd.cn/55049933/bugtrace/bugs/view?bug_id=1155049933001006735
This commit is contained in:
parent
296ecca115
commit
845d817a09
|
@ -665,7 +665,7 @@ export default {
|
||||||
this.$message.error(this.$t('api_report.error'));
|
this.$message.error(this.$t('api_report.error'));
|
||||||
},
|
},
|
||||||
handleScroll(){
|
handleScroll(){
|
||||||
if(!this.clickStepFlag){
|
if(!this.clickStepFlag && this.$refs.apiDocInfoDiv){
|
||||||
//apiDocInfoDiv的总高度,是(每个item的高度+20)数量
|
//apiDocInfoDiv的总高度,是(每个item的高度+20)数量
|
||||||
let apiDocDivScrollTop = 0;
|
let apiDocDivScrollTop = 0;
|
||||||
if(this.$refs.apiDocInfoDiv&&this.$refs.apiDocInfoDiv.scrollTop){
|
if(this.$refs.apiDocInfoDiv&&this.$refs.apiDocInfoDiv.scrollTop){
|
||||||
|
@ -758,6 +758,9 @@ export default {
|
||||||
this.clickStepFlag = false;
|
this.clickStepFlag = false;
|
||||||
},
|
},
|
||||||
redirectScroll(){
|
redirectScroll(){
|
||||||
|
if(!this.$refs.apiDocInfoDiv){
|
||||||
|
return;
|
||||||
|
}
|
||||||
//滚动条跳转:将滚动条下拉到显示对应对api接口的位置
|
//滚动条跳转:将滚动条下拉到显示对应对api接口的位置
|
||||||
let apiDocDivClientTop = 0;
|
let apiDocDivClientTop = 0;
|
||||||
let itemHeightCount = 0;
|
let itemHeightCount = 0;
|
||||||
|
|
|
@ -561,7 +561,9 @@ export default {
|
||||||
this.$message.error(this.$t('api_report.error'));
|
this.$message.error(this.$t('api_report.error'));
|
||||||
},
|
},
|
||||||
handleScroll(){
|
handleScroll(){
|
||||||
|
if(!this.$refs.apiDocInfoDiv){
|
||||||
|
return;
|
||||||
|
}
|
||||||
//apiDocInfoDiv的总高度,是(每个item的高度+20)数量
|
//apiDocInfoDiv的总高度,是(每个item的高度+20)数量
|
||||||
let apiDocDivScrollTop = this.$refs.apiDocInfoDiv.scrollTop;
|
let apiDocDivScrollTop = this.$refs.apiDocInfoDiv.scrollTop;
|
||||||
let apiDocDivClientTop = this.$refs.apiDocInfoDiv.clientHeight;
|
let apiDocDivClientTop = this.$refs.apiDocInfoDiv.clientHeight;
|
||||||
|
@ -591,7 +593,9 @@ export default {
|
||||||
let itemHeight = this.$refs.apiDocInfoDivItem[i].offsetHeight+20;
|
let itemHeight = this.$refs.apiDocInfoDivItem[i].offsetHeight+20;
|
||||||
itemHeightCount+=itemHeight;
|
itemHeightCount+=itemHeight;
|
||||||
}
|
}
|
||||||
this.$refs.apiDocInfoDiv.scrollTop = (apiDocDivClientTop+itemHeightCount);
|
if(this.$refs.apiDocInfoDiv){
|
||||||
|
this.$refs.apiDocInfoDiv.scrollTop = (apiDocDivClientTop+itemHeightCount);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
checkApiInfoNode(itemIndex){
|
checkApiInfoNode(itemIndex){
|
||||||
//检查要展示的api信息节点,和上下个3个及以内的范围内数据有没有查询过
|
//检查要展示的api信息节点,和上下个3个及以内的范围内数据有没有查询过
|
||||||
|
|
Loading…
Reference in New Issue