Skip to content

Commit 877c665

Browse files
authored
Merge pull request #4 from include-all/dev
fix: 由于defaultSchema.string被引用,导致所有节点的默认值和备注等引用同一个对象,会一起变化
2 parents 0f92954 + 8b765d6 commit 877c665

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/json-schema-editor.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ export default {
410410
const ranName = 'field_' + uuid()
411411
const propertiesData = get(this.schemaData, parentPrefix)
412412
newPropertiesData = Object.assign({}, propertiesData)
413-
newPropertiesData[ranName] = defaultSchema.string
413+
newPropertiesData[ranName] = cloneDeep(defaultSchema.string)
414414
const cloneSchema = cloneDeep(this.schemaData)
415415
set(cloneSchema, parentPrefix, newPropertiesData)
416416

0 commit comments

Comments
 (0)