mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-01-13 09:41:57 +00:00
fix(react-renderer): fix hasLoop logic
This commit is contained in:
parent
0987b49753
commit
577e0eb540
@ -234,15 +234,18 @@ export default class BaseEngine extends PureComponent {
|
||||
}
|
||||
|
||||
if (schema.loop != null) {
|
||||
return this.__createLoopVirtualDom(
|
||||
{
|
||||
...schema,
|
||||
loop: parseData(schema.loop, self),
|
||||
},
|
||||
self,
|
||||
parentInfo,
|
||||
idx,
|
||||
);
|
||||
const loop = parseData(schema.loop, self);
|
||||
if (Array.isArray(loop) && loop.length > 0 || isJSExpression(loop)) {
|
||||
return this.__createLoopVirtualDom(
|
||||
{
|
||||
...schema,
|
||||
loop,
|
||||
},
|
||||
self,
|
||||
parentInfo,
|
||||
idx,
|
||||
);
|
||||
}
|
||||
}
|
||||
const condition = schema.condition == null ? true : parseData(schema.condition, self);
|
||||
if (!condition) return null;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user