MCPcopy Index your code
hub / github.com/alibaba/lowcode-engine / prevSibling

Method prevSibling

packages/designer/src/document/node/node.ts:894–906  ·  view source on GitHub ↗

* 获取上一个兄弟节点

()

Source from the content-addressed store, hash-verified

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 结构

Callers

nothing calls this directly

Calls 1

getMethod · 0.65

Tested by

no test coverage detected