123
This commit is contained in:
@@ -94,6 +94,14 @@ export class StateManager {
|
||||
deleteNode(id: string) {
|
||||
this.nodes.value = this.nodes.value.filter((node: NodesItem) => node.id !== id)
|
||||
}
|
||||
/** 获取节点 */
|
||||
getNodeById(id: string) {
|
||||
return this.nodes.value.find((node: NodesItem) => node.id === id)
|
||||
}
|
||||
/** 获取下级节点 */
|
||||
getSubordNodeByID(id: string) {
|
||||
return this.nodes.value.find((node: NodesItem) => node.data.superiorID === id)
|
||||
}
|
||||
getLastNode() {
|
||||
return this.nodes.value[this.nodes.value.length - 1]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user