mirror of
https://gitee.com/fit2cloud-feizhiyun/MeterSphere.git
synced 2024-12-04 21:19:52 +08:00
fix(接口定义): 修复导入API 编辑问题
This commit is contained in:
parent
9d9f949414
commit
3dda8e849d
@ -199,6 +199,7 @@
|
||||
}
|
||||
},
|
||||
created() {
|
||||
if (this.parameters) {
|
||||
if (this.parameters.length === 0 || this.parameters[this.parameters.length - 1].name) {
|
||||
this.parameters.push(new KeyValue({
|
||||
type: 'text',
|
||||
@ -210,6 +211,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
@ -182,6 +182,7 @@
|
||||
if (!this.body.type) {
|
||||
this.body.type = BODY_TYPE.FORM_DATA;
|
||||
}
|
||||
if (this.body.kvs) {
|
||||
this.body.kvs.forEach(param => {
|
||||
if (!param.type) {
|
||||
param.type = 'text';
|
||||
@ -189,6 +190,7 @@
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
@ -27,7 +27,13 @@ export const DEFAULT_DATA = [{
|
||||
|
||||
export const REQ_METHOD = [
|
||||
{id: 'GET', label: 'GET'},
|
||||
{id: 'POST', label: 'POST'}
|
||||
{id: 'POST', label: 'POST'},
|
||||
{id: 'PUT', label: 'PUT'},
|
||||
{id: 'PATCH', label: 'PATCH'},
|
||||
{id: 'DELETE', label: 'DELETE'},
|
||||
{id: 'OPTIONS', label: 'OPTIONS'},
|
||||
{id: 'HEAD', label: 'HEAD'},
|
||||
{id: 'CONNECT', label: 'CONNECT'}
|
||||
]
|
||||
|
||||
export const API_STATUS = [
|
||||
|
Loading…
Reference in New Issue
Block a user