mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-01-26 12:18:21 +00:00
fix: props.getNode 防死循环
This commit is contained in:
parent
d95da04eff
commit
444e25cf24
@ -336,9 +336,14 @@ export class Props implements IPropParent {
|
|||||||
*/
|
*/
|
||||||
getNode() {
|
getNode() {
|
||||||
const nodeForVision = this.owner;
|
const nodeForVision = this.owner;
|
||||||
|
// 判断是否已经是 nodeForVision
|
||||||
|
if (!nodeForVision.isVisionNode) {
|
||||||
|
const children = nodeForVision.getChildren();
|
||||||
nodeForVision.getChildren = () => {
|
nodeForVision.getChildren = () => {
|
||||||
return this.owner?.getChildren()?.getChildrenArray() || [];
|
return children?.getChildrenArray() || [];
|
||||||
};
|
};
|
||||||
|
nodeForVision.isVisionNode = true;
|
||||||
|
}
|
||||||
return nodeForVision;
|
return nodeForVision;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user