factory 中 control 查找 可以删掉了

This commit is contained in:
liaoxuezhi 2019-07-15 14:20:36 +08:00
parent 337e4612f3
commit a3d920932b
1 changed files with 7 additions and 7 deletions

View File

@ -421,13 +421,13 @@ class SchemaRenderer extends React.Component<SchemaRendererProps, any> {
path = path.replace(/(?!.*\/).*/, schema.type); path = path.replace(/(?!.*\/).*/, schema.type);
} }
// value 会提前从 control 中获取到所有需要把control中的属性也补充完整 // value 会提前从 control 中获取到所有需要把control中的属性也补充完整
if (schema.control && schema.control.$ref) { // if (schema.control && schema.control.$ref) {
schema.control = { // schema.control = {
...props.resolveDefinitions(schema.control.$ref), // ...props.resolveDefinitions(schema.control.$ref),
...schema.control // ...schema.control
} // }
delete schema.control.$ref; // delete schema.control.$ref;
} // }
this.renderer = rendererResolver(path, schema, props); this.renderer = rendererResolver(path, schema, props);
return schema; return schema;
} }