mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-01-15 10:48:17 +00:00
fix: 区块模板根节点支持 Div
This commit is contained in:
parent
15c8988a24
commit
c3b796e6a2
@ -23,7 +23,7 @@ const ENGINE_COMPS = {
|
|||||||
BlockEngine,
|
BlockEngine,
|
||||||
AddonEngine,
|
AddonEngine,
|
||||||
TempEngine,
|
TempEngine,
|
||||||
// DivEngine: BlockEngine,
|
DivEngine: BlockEngine,
|
||||||
};
|
};
|
||||||
|
|
||||||
class FaultComponent extends PureComponent {
|
class FaultComponent extends PureComponent {
|
||||||
@ -141,7 +141,7 @@ export default class Engine extends PureComponent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
createElement(Component, props, children) {
|
createElement(Component, props, children) {
|
||||||
// TODO: enable in runtime mode?
|
// TODO: enable in runtime mode?s
|
||||||
this.patchDidCatch(Component);
|
this.patchDidCatch(Component);
|
||||||
return (this.props.customCreateElement || reactCreateElement)(Component, props, children);
|
return (this.props.customCreateElement || reactCreateElement)(Component, props, children);
|
||||||
}
|
}
|
||||||
@ -157,7 +157,8 @@ export default class Engine extends PureComponent {
|
|||||||
if (isEmpty(schema)) {
|
if (isEmpty(schema)) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
if (!isFileSchema(schema)) {
|
// 兼容乐高区块模板
|
||||||
|
if (schema.componentName !== 'Div' && !isFileSchema(schema)) {
|
||||||
return '模型结构异常';
|
return '模型结构异常';
|
||||||
}
|
}
|
||||||
debug('entry.render');
|
debug('entry.render');
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user