giscafer / vue-json-schema-editor-visual

A json-schema editor of high efficient and easy-to-use, base on Vue.
http://blog.giscafer.com/vue-json-schema-editor-visual/
63 stars 25 forks source link

fix: 由于defaultSchema.string被引用,导致所有节点的默认值和备注等引用同一个对象,会一起变化 #4

Closed include-all closed 3 years ago

include-all commented 3 years ago

由于新增节点时,都是用的defaultSchema.string这个对象,导致所有的节点引用的同一个对象,新增节点就是和上一个一样,而且改变其中一个节点的默认值或者备注,另一个也会同步更新,使得无法修改,应该要深拷贝一下,当然直接{...defaultSchema.string}也可以