fix(接口测试): 修复创建接口未catch报错情况,刷新loading的缺陷

--bug=1031380 --user=王孝刚
【接口测试】github#26945,创建接口路径重复后,弹出报错信息,关掉报错信息后,再点击创建接口一直在转圈
https://www.tapd.cn/55049933/s/1423236
This commit is contained in:
wxg0103 2023-10-08 15:28:02 +08:00 committed by fit2-zhao
parent 3aed2f00a9
commit 4059568c67
2 changed files with 4 additions and 0 deletions

View File

@ -168,6 +168,8 @@ export default {
this.$success(this.$t('commons.save_success')); this.$success(this.$t('commons.save_success'));
this.visible = false; this.visible = false;
this.$emit('refresh'); this.$emit('refresh');
}).finally(() => {
this.loading = false;
}); });
} }
} else { } else {

View File

@ -188,6 +188,8 @@ export default {
this.loading = false; this.loading = false;
this.$emit('refresh'); this.$emit('refresh');
} }
}).catch(() => {
this.loading = false;
}); });
} else { } else {
return false; return false;