diff --git a/packages/react-renderer/src/engine/blockEngine.jsx b/packages/react-renderer/src/engine/blockEngine.jsx
index 9712ef3ea..1485b3e64 100644
--- a/packages/react-renderer/src/engine/blockEngine.jsx
+++ b/packages/react-renderer/src/engine/blockEngine.jsx
@@ -59,7 +59,7 @@ export default class BlockEngine extends BaseEngine {
}
render() {
- const { __schema } = this.props;
+ const { __schema, __components } = this.props;
if (!isSchema(__schema, true) || (__schema.componentName !== 'Block' && __schema.componentName !== 'Div')) {
return '区块schema结构异常!';
@@ -69,7 +69,33 @@ export default class BlockEngine extends BaseEngine {
this.__generateCtx();
this.__render();
- const { id, className, style, autoLoading, defaultHeight = 300, loading } = this.__parseData(__schema.props);
+ const props = this.__parseData(__schema.props);
+ const { id, className, style, autoLoading, defaultHeight = 300, loading } = props;
+
+ const { Block } = __components;
+ if (Block) {
+ const { engine } = this.context || {};
+ return (
+
+ {engine.createElement(
+ Block,
+ {
+ ...props,
+ ref: this.__getRef,
+ className: classnames(getFileCssName(__schema.fileName), className, this.props.className),
+ __id: __schema.id,
+ },
+ this.__createDom(),
+ )}
+
+ );
+ }
+
const renderContent = () => (