* Adjust code for Api doc.

This commit is contained in:
zhujinyong
2021-10-19 11:00:55 +08:00
parent e667a33996
commit 4bb27b624e
13 changed files with 91 additions and 140 deletions
+9 -9
View File
@@ -9,8 +9,8 @@ var app = new Vue({
defaultHeader: { field: '', required: '', desc: '' },
},
created() {
this.header.push({...this.defaultHeader})
this.queryP.push({...this.defaultHeader})
this.header.push({...this.defaultHeader});
this.queryP.push({...this.defaultHeader});
},
watch: {
header: {
@@ -21,13 +21,13 @@ var app = new Vue({
},
queryP: {
handler() {
this.setParams()
this.setParams();
},
deep: true
},
body: {
handler() {
this.setParams()
this.setParams();
},
deep: true
}
@@ -37,7 +37,7 @@ var app = new Vue({
this.body = val;
},
changeRes(val) {
this.response = JSON.stringify(val)
this.response = JSON.stringify(val);
},
setParams() {
const params = {
@@ -49,14 +49,14 @@ var app = new Vue({
},
del(data, key) {
if (data.length <= 1) {
return
return;
}
data.splice(key, 1)
data.splice(key, 1);
},
add(data, key, t) {
if (t == "header" || t == 'query') {
data.splice(key+1, 0, this.defaultHeader)
data.splice(key+1, 0, this.defaultHeader);
}
}
}
})
})