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:
parent
0a56df37fc
commit
3f83b84fa9
|
@ -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;
|
||||
},
|
||||
|
||||
//检查要展示的api信息节点,和上下个2个及以内的范围内数据有没有查询过。并赋值为showArray
|
||||
|
@ -823,7 +832,9 @@ export default {
|
|||
}else{
|
||||
if(isRedirectScroll){
|
||||
//进行跳转
|
||||
this.redirectScroll();
|
||||
this.$nextTick(() => {
|
||||
this.redirectScroll();
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue