fix(接口测试): 修复jsonschema高级设置属性丢失的缺陷
--bug=1019655 --user=王孝刚 [接口测试] github#19733在JSON-SCHEMA开启时编辑了高级设置字段,然后将JSON-SCHEMA关闭,高级字段属性丢失。 https://www.tapd.cn/55049933/s/1297827
This commit is contained in:
parent
64cb68e213
commit
c8172b2e24
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue