mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-04-20 12:28:08 +00:00
feat: add alias for get index
This commit is contained in:
parent
77e325f07d
commit
e853a4f510
@ -426,12 +426,6 @@ export class Node<Schema extends NodeSchema = NodeSchema> {
|
|||||||
return this.parent.children.indexOf(this);
|
return this.parent.children.indexOf(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* alias index
|
|
||||||
*/
|
|
||||||
getIndex = () => {
|
|
||||||
return this.index;
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取下一个兄弟节点
|
* 获取下一个兄弟节点
|
||||||
@ -625,6 +619,9 @@ export class Node<Schema extends NodeSchema = NodeSchema> {
|
|||||||
getId() {
|
getId() {
|
||||||
return this.id;
|
return this.id;
|
||||||
}
|
}
|
||||||
|
getIndex() {
|
||||||
|
return this.index;
|
||||||
|
}
|
||||||
getNode() {
|
getNode() {
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user