mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-01-20 23:52:28 +00:00
polyfill getRoot
This commit is contained in:
parent
208bccfcb9
commit
1e642089cb
@ -450,6 +450,11 @@ export class DocumentModel {
|
|||||||
const config = parent.componentMeta;
|
const config = parent.componentMeta;
|
||||||
return config.checkNestingDown(parent, obj) && this.checkNestingUp(parent, obj);
|
return config.checkNestingDown(parent, obj) && this.checkNestingUp(parent, obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ======= compatibles
|
||||||
|
getRoot() {
|
||||||
|
return this.rootNode;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export function isDocumentModel(obj: any): obj is DocumentModel {
|
export function isDocumentModel(obj: any): obj is DocumentModel {
|
||||||
|
|||||||
@ -469,7 +469,7 @@ export class Node {
|
|||||||
|
|
||||||
// ======= compatibles ====
|
// ======= compatibles ====
|
||||||
isEmpty(): boolean {
|
isEmpty(): boolean {
|
||||||
return this.children?.isEmpty() || true;
|
return this.children ? this.children.isEmpty() : true;
|
||||||
}
|
}
|
||||||
getStatus() {
|
getStatus() {
|
||||||
return 'default';
|
return 'default';
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user