refactor(接口测试): 优化接口测试http协议前置操作过滤方法
This commit is contained in:
parent
298f0990c0
commit
a2928346b6
|
@ -302,17 +302,22 @@ export default {
|
||||||
hasLicense,
|
hasLicense,
|
||||||
tabClick() {
|
tabClick() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
if (this.activeName === 'preOperate' && this.$refs.preStep) {
|
setTimeout(() => {
|
||||||
this.$refs.preStep.filter();
|
this.filter(this.activeName);
|
||||||
}
|
});
|
||||||
if (this.activeName === 'postOperate' && this.$refs.postStep) {
|
|
||||||
this.$refs.postStep.filter();
|
|
||||||
}
|
|
||||||
if (this.activeName === 'assertionsRule' && this.$refs.assertionsRule) {
|
|
||||||
this.$refs.assertionsRule.filter();
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
filter(activeName) {
|
||||||
|
if (activeName === 'preOperate' && this.$refs.preStep) {
|
||||||
|
this.$refs.preStep.filter();
|
||||||
|
}
|
||||||
|
if (activeName === 'postOperate' && this.$refs.postStep) {
|
||||||
|
this.$refs.postStep.filter();
|
||||||
|
}
|
||||||
|
if (activeName === 'assertionsRule' && this.$refs.assertionsRule) {
|
||||||
|
this.$refs.assertionsRule.filter();
|
||||||
|
}
|
||||||
|
},
|
||||||
generate() {
|
generate() {
|
||||||
if (this.request.body && (this.request.body.jsonSchema || this.request.body.raw)) {
|
if (this.request.body && (this.request.body.jsonSchema || this.request.body.raw)) {
|
||||||
if (!this.request.body.jsonSchema) {
|
if (!this.request.body.jsonSchema) {
|
||||||
|
|
Loading…
Reference in New Issue