fix(接口自动化): 修复展开步骤时卡死问题

This commit is contained in:
fit2-zhao 2021-02-05 09:50:56 +08:00
parent 039898c635
commit d1a9332188
7 changed files with 19 additions and 6 deletions

View File

@ -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() {

View File

@ -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') {

View File

@ -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"

View File

@ -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>

View File

@ -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;
} }

View File

@ -131,7 +131,7 @@
}) })
}, },
active() { active() {
// item.active = !item.active; this.assertions.active = !this.assertions.active;
this.reload(); this.reload();
}, },
remove() { remove() {

View File

@ -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;
} }