diff --git a/packages/canvas/src/components/container/CanvasMenu.vue b/packages/canvas/src/components/container/CanvasMenu.vue index cbca11ecc..97bacfc5b 100644 --- a/packages/canvas/src/components/container/CanvasMenu.vue +++ b/packages/canvas/src/components/container/CanvasMenu.vue @@ -108,16 +108,10 @@ export default { const operations = { del() { - const currentSchemaId = getCurrent().schema?.id - if (currentSchemaId) { - removeNodeById(currentSchemaId) - } + removeNodeById(getCurrent().schema?.id) }, copy() { - const currentSchemaId = getCurrent().schema?.id - if (currentSchemaId) { - copyNode(currentSchemaId) - } + copyNode(getCurrent().schema?.id) }, config() { useLayout().activeSetting('props')