feat: add alias for get index

This commit is contained in:
飞百 2020-05-13 15:58:53 +08:00
parent 77e325f07d
commit e853a4f510

View File

@ -426,12 +426,6 @@ export class Node<Schema extends NodeSchema = NodeSchema> {
return this.parent.children.indexOf(this);
}
/**
* alias index
*/
getIndex = () => {
return this.index;
};
/**
*
@ -625,6 +619,9 @@ export class Node<Schema extends NodeSchema = NodeSchema> {
getId() {
return this.id;
}
getIndex() {
return this.index;
}
getNode() {
return this;
}