添加快捷键
This commit is contained in:
@@ -101,6 +101,9 @@ export class StateManager {
|
||||
}
|
||||
/** 删除节点 */
|
||||
deleteNode(id: string) {
|
||||
const node = this.getNodeById(id)
|
||||
if (!node) return console.warn(`没有找到指定id:${id}`)
|
||||
if (node.data.disableDelete) return console.warn('该节点禁用删除')
|
||||
this.nodes.value = this.nodes.value.filter((node: NodesItem) => node.id !== id)
|
||||
this.recordState()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user