* 获取上一个兄弟节点
()
| 892 | * 获取上一个兄弟节点 |
| 893 | */ |
| 894 | get prevSibling(): INode | null | undefined { |
| 895 | if (!this.parent) { |
| 896 | return null; |
| 897 | } |
| 898 | const { index } = this; |
| 899 | if (typeof index !== 'number') { |
| 900 | return null; |
| 901 | } |
| 902 | if (index < 1) { |
| 903 | return null; |
| 904 | } |
| 905 | return this.parent.children?.get(index - 1); |
| 906 | } |
| 907 | |
| 908 | /** |
| 909 | * 获取符合搭建协议-节点 schema 结构 |