schema 添加 render 属性,直接渲染内容

This commit is contained in:
liaoxuezhi 2019-09-19 13:15:22 +08:00
parent a2c25b4133
commit 4110a4c338

View File

@ -508,6 +508,12 @@ class SchemaRenderer extends React.Component<SchemaRendererProps, any> {
$path: $path,
render: this.renderChild
});
} else if (typeof schema.render === 'function') {
return schema.render({
...rest,
$path: $path,
render: this.renderChild
});
} else if (!this.renderer) {
return (
<LazyComponent