fix(接口测试): 接口定义页面tabs无法关闭
This commit is contained in:
parent
431c1ee61e
commit
501fe437bf
|
@ -267,6 +267,8 @@ export default {
|
||||||
this.$emit('saveApi', data);
|
this.$emit('saveApi', data);
|
||||||
});
|
});
|
||||||
this.$store.state.apiMap.delete(this.currentApi.id);
|
this.$store.state.apiMap.delete(this.currentApi.id);
|
||||||
|
this.responseCount = 0;
|
||||||
|
this.count = 0
|
||||||
},
|
},
|
||||||
handleSave() {
|
handleSave() {
|
||||||
if (this.$refs.httpApi) {
|
if (this.$refs.httpApi) {
|
||||||
|
|
|
@ -72,7 +72,7 @@
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item :label="$t('commons.tag')" prop="tag">
|
<el-form-item :label="$t('commons.tag')" prop="tag">
|
||||||
<ms-input-tag :currentScenario="httpForm" ref="tag"/>
|
<ms-input-tag :currentScenario="httpForm" ref="tag" v-model="httpForm.tags"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
|
@ -179,6 +179,7 @@
|
||||||
label: 'name',
|
label: 'name',
|
||||||
},
|
},
|
||||||
mockBaseUrl: "",
|
mockBaseUrl: "",
|
||||||
|
count: 0
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
props: {moduleOptions: {}, request: {}, response: {}, basisData: {}, syncTabs: Array, projectId: String},
|
props: {moduleOptions: {}, request: {}, response: {}, basisData: {}, syncTabs: Array, projectId: String},
|
||||||
|
@ -232,6 +233,14 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
'httpForm.tags': {
|
||||||
|
handler(v, v1) {
|
||||||
|
this.count++;
|
||||||
|
if (v && v1 && JSON.stringify(v) !== JSON.stringify(v1) && this.count > 1) {
|
||||||
|
this.apiMapStatus();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
syncTabs() {
|
syncTabs() {
|
||||||
if (this.basisData && this.syncTabs && this.syncTabs.includes(this.basisData.id)) {
|
if (this.basisData && this.syncTabs && this.syncTabs.includes(this.basisData.id)) {
|
||||||
// 标示接口在其他地方更新过,当前页面需要同步
|
// 标示接口在其他地方更新过,当前页面需要同步
|
||||||
|
@ -337,6 +346,8 @@
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.setParameter();
|
this.setParameter();
|
||||||
this.$emit('saveApi', this.httpForm);
|
this.$emit('saveApi', this.httpForm);
|
||||||
|
this.count = 0;
|
||||||
|
this.$store.state.apiMap.delete(this.httpForm.id);
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue