fix(接口定义,接口自动化): 修复接口定义文档跳转异常和表格全选列数据展示异常的问题

--bug=1005046 --user=宋天阳 【github#4573】接口定义中,接口列表文档右侧目录跳转异常[BUG]
https://www.tapd.cn/55049933/s/1025336   --bug=1005048 --user=宋天阳
【接口自动化】批量处理,选择全部数据,名称会显示... https://www.tapd.cn/55049933/s/1025337
This commit is contained in:
song-tianyang 2021-07-14 14:24:20 +08:00 committed by 刘瑞斌
parent 0a56df37fc
commit 3f83b84fa9
2 changed files with 20 additions and 3 deletions

View File

@ -1,6 +1,6 @@
<template>
<div>
<el-container>
<el-container v-loading="isLoading">
<el-main style="padding-top: 0px;padding-bottom: 0px">
<el-row v-if="sharePage" style="margin-top: 10px">
<el-select size="small" :placeholder="$t('api_test.definition.document.order')" v-model="apiSearch.orderCondition" style="float: right;width: 180px;margin-right: 5px"
@ -340,6 +340,7 @@ export default {
},
data() {
return {
isLoading: false,
shareUrl:"",
batchShareUrl:"",
apiStepIndex: 0,
@ -552,6 +553,8 @@ export default {
//itemIndex,afterNodeIndex,beforeNodeIndex showArray isRedirectScroll:
selectApiInfoBatch(indexArr,apiIdArr,itemIndex,afterNodeIndex,beforeNodeIndex,isRedirectScroll) {
if(indexArr.length != apiIdArr.length){
this.isLoading = false;
this.clickStepFlag = false;
return;
}else {
let params = {};
@ -572,6 +575,8 @@ export default {
},
clickStep(apiId) {
this.isLoading = true;
this.clickStepFlag = true;
for (let index = 0; index < this.apiInfoArray.length; index++) {
if (apiId == this.apiInfoArray[index].id) {
this.apiStepIndex = index;
@ -770,9 +775,13 @@ export default {
}
}
this.clickStepFlag = true;
let scrollTopIndex = this.$refs.apiDocInfoDiv.scrollTop;
if(this.$refs.apiDocInfoDiv&&this.$refs.apiDocInfoDiv.scrollTop){
this.$refs.apiDocInfoDiv.scrollTop = (apiDocDivClientTop+itemHeightCount);
}else if(scrollTopIndex === 0){
this.$refs.apiDocInfoDiv.scrollTop = (apiDocDivClientTop+itemHeightCount);
}
this.isLoading = false;
},
//api2showArray
@ -823,7 +832,9 @@ export default {
}else{
if(isRedirectScroll){
//
this.redirectScroll();
this.$nextTick(() => {
this.redirectScroll();
});
}
}
},

View File

@ -54,6 +54,12 @@
}
},
},
created() {
if(this.keyIndex === 0){
this.keyIndex++;
this.reload();
}
},
data() {
return {
isShow: true,
@ -79,12 +85,12 @@
this.selectAllFontColor.color = "gray";
this.selectPageFontColor.color = "gray";
}
this.$emit(even);
//使keyIndex
if(this.keyIndex === 0){
this.keyIndex++;
this.reload();
}
this.$emit(even);
},
reload() {
this.isShow = false;