fix(接口测试): 修复jsonschema高级设置属性丢失的缺陷

--bug=1019655 --user=王孝刚 [接口测试]
github#19733在JSON-SCHEMA开启时编辑了高级设置字段,然后将JSON-SCHEMA关闭,高级字段属性丢失。
https://www.tapd.cn/55049933/s/1297827
This commit is contained in:
wxg0103 2022-11-17 17:40:28 +08:00 committed by lyh
parent 64cb68e213
commit c8172b2e24
1 changed files with 4 additions and 2 deletions

View File

@ -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) {