fix(接口测试): 修复json schema编辑器对数组类型处理错误问题
This commit is contained in:
parent
0dd125a589
commit
bd67a51757
|
@ -70,7 +70,7 @@
|
||||||
:disabled="disabled"
|
:disabled="disabled"
|
||||||
:need-mock="needMock"
|
:need-mock="needMock"
|
||||||
@editScenarioAdvance="editScenarioAdvance"
|
@editScenarioAdvance="editScenarioAdvance"
|
||||||
:lang="lang" :custom="custom" @changeAllItemsType="changeAllItemsType"/>
|
:lang="lang" :custom="custom" @changeAllItemsType="changeAllItemsType" @reloadItems="reloadItems"/>
|
||||||
</template>
|
</template>
|
||||||
<!-- 高级设置-->
|
<!-- 高级设置-->
|
||||||
<el-dialog append-to-body :close-on-click-modal="true" :title="$t('schema.adv_setting')"
|
<el-dialog append-to-body :close-on-click-modal="true" :title="$t('schema.adv_setting')"
|
||||||
|
@ -325,6 +325,7 @@ export default {
|
||||||
} else {
|
} else {
|
||||||
this.$set(this.pickValue, 'items', [childObj]);
|
this.$set(this.pickValue, 'items', [childObj]);
|
||||||
}
|
}
|
||||||
|
this.reloadItems();
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
const name = this._joinName()
|
const name = this._joinName()
|
||||||
|
@ -355,7 +356,7 @@ export default {
|
||||||
}
|
}
|
||||||
} else if (this.parent.type && this.parent.type === 'array') {
|
} else if (this.parent.type && this.parent.type === 'array') {
|
||||||
const {items, required} = this.parent
|
const {items, required} = this.parent
|
||||||
delete items[this.pickKey]
|
items.splice(this.pickKey, 1);
|
||||||
if (required) {
|
if (required) {
|
||||||
const pos = required.indexOf(this.pickKey)
|
const pos = required.indexOf(this.pickKey)
|
||||||
pos >= 0 && required.splice(pos, 1)
|
pos >= 0 && required.splice(pos, 1)
|
||||||
|
|
Loading…
Reference in New Issue