* 获取下一个兄弟节点
()
| 875 | * 获取下一个兄弟节点 |
| 876 | */ |
| 877 | get nextSibling(): INode | null | undefined { |
| 878 | if (!this.parent) { |
| 879 | return null; |
| 880 | } |
| 881 | const { index } = this; |
| 882 | if (typeof index !== 'number') { |
| 883 | return null; |
| 884 | } |
| 885 | if (index < 0) { |
| 886 | return null; |
| 887 | } |
| 888 | return this.parent.children?.get(index + 1); |
| 889 | } |
| 890 | |
| 891 | /** |
| 892 | * 获取上一个兄弟节点 |