From 664cb87755ba1dc85e6cee826f1a369054fd5b6f Mon Sep 17 00:00:00 2001 From: gargameljyh <1954914724@qq.com> Date: Sat, 25 Nov 2023 00:43:57 -0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E7=AE=80=E5=8C=96operations?= =?UTF-8?q?=E7=A9=BA=E5=88=A4=E6=96=AD=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../canvas/src/components/container/CanvasMenu.vue | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) 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')