fix(接口自动化): 修复展开步骤时卡死问题
This commit is contained in:
parent
039898c635
commit
d1a9332188
|
@ -107,7 +107,8 @@
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
active() {
|
active() {
|
||||||
this.$set(this.data, 'active', !this.data.active);
|
// 这种写法性能极差,不要再放开了
|
||||||
|
//this.$set(this.data, 'active', !this.data.active);
|
||||||
this.$emit('active');
|
this.$emit('active');
|
||||||
},
|
},
|
||||||
copyRow() {
|
copyRow() {
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
v-loading="loading"
|
v-loading="loading"
|
||||||
@copy="copyRow"
|
@copy="copyRow"
|
||||||
@remove="remove"
|
@remove="remove"
|
||||||
|
@active="active"
|
||||||
:is-show-name-input="!isDeletedOrRef"
|
:is-show-name-input="!isDeletedOrRef"
|
||||||
:data="request"
|
:data="request"
|
||||||
:draggable="true"
|
:draggable="true"
|
||||||
|
@ -95,7 +96,6 @@
|
||||||
if (!this.request.requestResult) {
|
if (!this.request.requestResult) {
|
||||||
this.request.requestResult = {responseResult: {}};
|
this.request.requestResult = {responseResult: {}};
|
||||||
}
|
}
|
||||||
console.log(this.request)
|
|
||||||
// 加载引用对象数据
|
// 加载引用对象数据
|
||||||
this.getApiInfo();
|
this.getApiInfo();
|
||||||
if (this.request.protocol === 'HTTP') {
|
if (this.request.protocol === 'HTTP') {
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
v-loading="loading"
|
v-loading="loading"
|
||||||
@copy="copyRow"
|
@copy="copyRow"
|
||||||
@remove="remove"
|
@remove="remove"
|
||||||
|
@active="active"
|
||||||
:data="scenario"
|
:data="scenario"
|
||||||
:show-collapse="false"
|
:show-collapse="false"
|
||||||
:is-show-name-input="!isDeletedOrRef"
|
:is-show-name-input="!isDeletedOrRef"
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
<api-base-component
|
<api-base-component
|
||||||
@copy="copyRow"
|
@copy="copyRow"
|
||||||
@remove="remove"
|
@remove="remove"
|
||||||
|
@active="active"
|
||||||
:data="jsr223Processor"
|
:data="jsr223Processor"
|
||||||
:draggable="draggable"
|
:draggable="draggable"
|
||||||
:color="color"
|
:color="color"
|
||||||
|
@ -57,6 +58,10 @@
|
||||||
copyRow() {
|
copyRow() {
|
||||||
this.$emit('copyRow', this.jsr223Processor, this.node);
|
this.$emit('copyRow', this.jsr223Processor, this.node);
|
||||||
},
|
},
|
||||||
|
active() {
|
||||||
|
this.jsr223Processor.active = !this.jsr223Processor.active;
|
||||||
|
this.reload();
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -301,6 +301,7 @@
|
||||||
this.activeName = this.requestResult && this.requestResult.scenarios && this.requestResult.scenarios != null && this.requestResult.scenarios.length > 0 ? this.requestResult.scenarios[0].name : "";
|
this.activeName = this.requestResult && this.requestResult.scenarios && this.requestResult.scenarios != null && this.requestResult.scenarios.length > 0 ? this.requestResult.scenarios[0].name : "";
|
||||||
// 把请求结果分给各个请求
|
// 把请求结果分给各个请求
|
||||||
this.setResult(this.controller.hashTree);
|
this.setResult(this.controller.hashTree);
|
||||||
|
this.$emit('refReload');
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
|
|
|
@ -131,7 +131,7 @@
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
active() {
|
active() {
|
||||||
// item.active = !item.active;
|
this.assertions.active = !this.assertions.active;
|
||||||
this.reload();
|
this.reload();
|
||||||
},
|
},
|
||||||
remove() {
|
remove() {
|
||||||
|
|
|
@ -2,12 +2,13 @@
|
||||||
<api-base-component
|
<api-base-component
|
||||||
@copy="copyRow"
|
@copy="copyRow"
|
||||||
@remove="remove"
|
@remove="remove"
|
||||||
|
@active="active"
|
||||||
:data="extract"
|
:data="extract"
|
||||||
:draggable="draggable"
|
:draggable="draggable"
|
||||||
color="#015478"
|
color="#015478"
|
||||||
background-color="#E6EEF2"
|
background-color="#E6EEF2"
|
||||||
:title="$t('api_test.definition.request.extract_param')">
|
:title="$t('api_test.definition.request.extract_param')">
|
||||||
<div style="margin: 20px">
|
<div style="margin: 20px" v-loading="loading">
|
||||||
<div class="extract-description">
|
<div class="extract-description">
|
||||||
{{$t('api_test.request.extract.description')}}
|
{{$t('api_test.request.extract.description')}}
|
||||||
</div>
|
</div>
|
||||||
|
@ -99,8 +100,8 @@
|
||||||
this.loading = false
|
this.loading = false
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
active(item) {
|
active() {
|
||||||
item.active = !item.active;
|
this.extract.active = !this.extract.active;
|
||||||
this.reload();
|
this.reload();
|
||||||
},
|
},
|
||||||
suggestJsonOpen() {
|
suggestJsonOpen() {
|
||||||
|
@ -157,6 +158,10 @@
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.icon.is-active {
|
||||||
|
transform: rotate(90deg);
|
||||||
|
}
|
||||||
|
|
||||||
/deep/ .el-card__body {
|
/deep/ .el-card__body {
|
||||||
padding: 15px;
|
padding: 15px;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue