diff --git a/frontend/src/business/components/api/definition/components/body/ApiBody.vue b/frontend/src/business/components/api/definition/components/body/ApiBody.vue index 119f63e456..e43dcdd1f2 100644 --- a/frontend/src/business/components/api/definition/components/body/ApiBody.vue +++ b/frontend/src/business/components/api/definition/components/body/ApiBody.vue @@ -189,9 +189,11 @@ export default { } } // 清除多出部分属性 + let property = ['description', 'maxLength', 'minLength', 'pattern', 'format', 'enum', 'default']; + // 清除多出部分属性 for (let key in to) { - if (!this.hasOwnProperty.call(from, key) && key !== 'description') { - this.$delete(to, key) + if (!this.hasOwnProperty.call(from, key) && property.indexOf(key) === -1) { + delete to[key] } } if (Object.getOwnPropertySymbols) {