fix(接口定义): 修复用例加载后未及时刷新问题

--bug=1007961 --user=赵勇 【接口测试】接口定义-test-加载用例,选择用例后,没有加载用例的json请求体 https://www.tapd.cn/55049933/s/1068130
This commit is contained in:
fit2-zhao 2021-11-16 14:17:37 +08:00 committed by fit2-zhao
parent 8957efdb6b
commit 4fefff7d11
2 changed files with 6 additions and 0 deletions

View File

@ -130,6 +130,9 @@ export default {
}, },
watch: { watch: {
'body.typeChange'(){
this.reloadCodeEdit();
},
'body.raw'() { 'body.raw'() {
if (this.body.format !== 'JSON-SCHEMA' && this.body.raw) { if (this.body.format !== 'JSON-SCHEMA' && this.body.raw) {
try { try {

View File

@ -198,6 +198,9 @@ export default {
if (this.request.arguments && this.request.arguments.length > 1) { if (this.request.arguments && this.request.arguments.length > 1) {
this.activeName = 'parameters'; this.activeName = 'parameters';
} }
if(this.request.body) {
this.request.body.typeChange = this.request.changeId;
}
this.reload(); this.reload();
} }
}, },