🐛 fix: 修复object有required属性时,弹窗后加载为自定义属性的问题

This commit is contained in:
albert
2022-07-24 23:39:13 +08:00
parent d0465656b0
commit fe1e6fb8ce
2 changed files with 2 additions and 2 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "json-schema-editor-vue",
"version": "2.0.3",
"version": "2.0.4",
"author": "zhangyq",
"description": "A json-schema editor of high efficient and easy-to-use, base on Vue",
"keywords": [

View File

@@ -233,7 +233,7 @@ export default {
},
methods: {
parseCustomProps () {
const ownProps = [ 'type', 'title', 'properties', 'items', ...Object.keys(this.advancedAttr)]
const ownProps = [ 'type', 'title', 'properties', 'items','required', ...Object.keys(this.advancedAttr)]
Object.keys(this.pickValue).forEach(key => {
ownProps.indexOf(key) === -1 && this.confirmAddCustomNode({ key: key, value: this.pickValue[key] })
})