fix(接口测试): 修复接口定义http协议编辑保存后仍提示未保存的缺陷

--bug=1012615 --user=王孝刚 【接口测试】接口定义-编辑接口定义后保存成功了,关闭时仍提示未保存。
https://www.tapd.cn/55049933/s/1149211
This commit is contained in:
wxg0103 2022-04-27 11:08:37 +08:00 committed by 刘瑞斌
parent a6698bce4d
commit 6cee5f0276
1 changed files with 5 additions and 3 deletions

View File

@ -66,7 +66,7 @@ export default {
},
watch: {
request: {
handler(newObj, oldObj) {
handler(newObj) {
this.count++
if (this.count > 2) {
this.$store.state.apiStatus.set("requestChange", true);
@ -276,10 +276,12 @@ export default {
data.remark = response.data.remark;
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.apiMap.set(this.currentApi.id, this.$store.state.apiStatus);
this.responseCount = 0;
this.count = 0
},
handleSave() {
if (this.$refs.httpApi) {