fix(create-form-by-form demo): 修改key

修改生成的表单的key
This commit is contained in:
liuxuewei
2019-04-27 21:01:42 +08:00
parent 1c5e3e1615
commit 8633d624fe
@@ -96,14 +96,14 @@ export default {
console.log('initBuildJsonSchema',JSON.stringify(initBuildJsonSchema));
this.buildJsonSchemaForm = initBuildJsonSchema;
},
//构建预览表单
//构建运营表单
initJsonSchemaComponents(jsonSchema){
const currentProperties = {};
for(const key in jsonSchema){
const componentItem = jsonSchema[key];
if(componentItem.type && componentItem.label && componentItem.name){
const componentItemKey = `json-form-item-${this.componentKeyIndex}`;
const componentItemKey = `json-form-item-${key}`;
const componentItemProperties = deepCopy(require(`./components-schema/${componentItem.type}`));
componentItemProperties.key = componentItemKey;