添加快捷键

This commit is contained in:
lzp
2026-03-05 14:25:08 +08:00
parent 232cac5805
commit 66694fbcfa
7 changed files with 55 additions and 12 deletions

View File

@@ -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()
}