mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2025-12-14 13:03:07 +00:00
fix: return first if input schema is a react dom
This commit is contained in:
parent
5ada0a4020
commit
f5438ff1ab
@ -493,6 +493,11 @@ export default function baseRendererFactory(): IBaseRenderComponent {
|
|||||||
return schema.map((item, idy) => this.__createVirtualDom(item, scope, parentInfo, (item as IPublicTypeNodeSchema)?.__ctx?.lceKey ? '' : String(idy)));
|
return schema.map((item, idy) => this.__createVirtualDom(item, scope, parentInfo, (item as IPublicTypeNodeSchema)?.__ctx?.lceKey ? '' : String(idy)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// @ts-expect-error 如果直接转换好了,可以返回
|
||||||
|
if (schema.$$typeof) {
|
||||||
|
return schema;
|
||||||
|
}
|
||||||
|
|
||||||
const _children = getSchemaChildren(schema);
|
const _children = getSchemaChildren(schema);
|
||||||
if (!schema.componentName) {
|
if (!schema.componentName) {
|
||||||
logger.error('The componentName in the schema is invalid, please check the schema: ', schema);
|
logger.error('The componentName in the schema is invalid, please check the schema: ', schema);
|
||||||
@ -510,11 +515,6 @@ export default function baseRendererFactory(): IBaseRenderComponent {
|
|||||||
schema.children = [text];
|
schema.children = [text];
|
||||||
}
|
}
|
||||||
|
|
||||||
// @ts-expect-error 如果直接转换好了,可以返回
|
|
||||||
if (schema.$$typeof) {
|
|
||||||
return schema;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!isSchema(schema)) {
|
if (!isSchema(schema)) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user