From b242b385d814caa35d1b271c84cc65892422579c Mon Sep 17 00:00:00 2001 From: lzp Date: Thu, 5 Mar 2026 17:14:29 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=87=E6=9C=AC=E8=8A=82=E7=82=B9=E5=88=A0?= =?UTF-8?q?=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../FlowCanvas/components/nodes/text.vue | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/src/components/Canvas/FlowCanvas/components/nodes/text.vue b/src/components/Canvas/FlowCanvas/components/nodes/text.vue index ed162d7..cfabaf8 100644 --- a/src/components/Canvas/FlowCanvas/components/nodes/text.vue +++ b/src/components/Canvas/FlowCanvas/components/nodes/text.vue @@ -1,5 +1,5 @@ @@ -26,7 +29,7 @@ default: () => ({}) } }) - const emit = defineEmits(['update-data']) + const emit = defineEmits(['update-data', 'delete-node']) const data = reactive({ text: props.data?.text || '点击编辑文本' }) @@ -70,6 +73,7 @@ user-select: none; border: 1px solid transparent; padding: 2px; + position: relative; &.active { border-color: #000; > .input { @@ -81,5 +85,15 @@ min-width: 2px; font-size: 16px; } + > .delete { + position: absolute; + top: 4px; + right: 4px; + transform: translate(100%, -100%); + background-color: #fff; + padding: 2px; + border-radius: 50%; + cursor: pointer; + } }