不要造成 breakchanges 新增 component 属性

This commit is contained in:
liaoxuezhi 2019-09-20 11:37:12 +08:00
parent 9674e316e1
commit 529b483510

View File

@ -379,7 +379,7 @@ const defaultOmitList = [
'hiddenOn',
'disabled',
'disabledOn',
'children',
'component',
'detectField'
];
@ -504,13 +504,13 @@ class SchemaRenderer extends React.Component<SchemaRendererProps, any> {
} else if (schema.children) {
return React.isValidElement(schema.children)
? schema.children
: React.createElement(schema.children as any, {
...rest,
$path: $path,
render: this.renderChild
});
} else if (typeof schema.render === 'function') {
return schema.render({
: (schema.children as Function)({
...rest,
$path: $path,
render: this.renderChild
});
} else if (typeof schema.component === 'function') {
return React.createElement(schema.children as any, {
...rest,
$path: $path,
render: this.renderChild