fix(接口测试): 修复接口定义http协议编辑保存后仍提示未保存的缺陷 (#13107)
--bug=1012615 --user=王孝刚 【接口测试】接口定义-编辑接口定义后保存成功了,关闭时仍提示未保存。 https://www.tapd.cn/55049933/s/1149211 Co-authored-by: wxg0103 <727495428@qq.com>
This commit is contained in:
parent
c5252d64da
commit
c0858c674c
|
@ -66,7 +66,7 @@ export default {
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
request: {
|
request: {
|
||||||
handler(newObj, oldObj) {
|
handler(newObj) {
|
||||||
this.count++
|
this.count++
|
||||||
if (this.count > 2) {
|
if (this.count > 2) {
|
||||||
this.$store.state.apiStatus.set("requestChange", true);
|
this.$store.state.apiStatus.set("requestChange", true);
|
||||||
|
@ -276,10 +276,12 @@ export default {
|
||||||
data.remark = response.data.remark;
|
data.remark = response.data.remark;
|
||||||
this.$emit('saveApi', data);
|
this.$emit('saveApi', data);
|
||||||
});
|
});
|
||||||
|
this.responseCount = 0;
|
||||||
|
this.count = 0;
|
||||||
|
this.$store.state.apiStatus.set("requestChange", false);
|
||||||
|
this.$store.state.apiMap.set(this.currentApi.id, this.$store.state.apiStatus);
|
||||||
this.$store.state.apiStatus.set("responseChange", false);
|
this.$store.state.apiStatus.set("responseChange", false);
|
||||||
this.$store.state.apiMap.set(this.currentApi.id, this.$store.state.apiStatus);
|
this.$store.state.apiMap.set(this.currentApi.id, this.$store.state.apiStatus);
|
||||||
this.responseCount = 0;
|
|
||||||
this.count = 0
|
|
||||||
},
|
},
|
||||||
handleSave() {
|
handleSave() {
|
||||||
if (this.$refs.httpApi) {
|
if (this.$refs.httpApi) {
|
||||||
|
|
Loading…
Reference in New Issue