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