fix default body type.

This commit is contained in:
xiawenlong
2021-10-19 20:40:26 +08:00
parent d4133f4128
commit f02595167f
6 changed files with 27 additions and 4 deletions
+11
View File
@@ -7,6 +7,7 @@ var app = new Vue({
params: "",
response: "",
defaultHeader: {field: '', required: '', desc: ''},
attrType: '',
},
created() {
this.header.push({...this.defaultHeader});
@@ -30,12 +31,21 @@ var app = new Vue({
this.setParams();
},
deep: true
},
attrType: {
handler() {
this.setParams()
},
deep: true
}
},
methods: {
changeAttr(val) {
this.body = val;
},
changeType(val) {
this.attrType = val
},
changeRes(val) {
val = this.filterParams(val)
this.response = JSON.stringify(val);
@@ -47,6 +57,7 @@ var app = new Vue({
const params = {
header: header,
params: body,
paramsType: this.attrType,
query: queryP,
}
this.params = JSON.stringify(params);