From 0478e95f4f66f7d92fad10e2cc17123fb272bc99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=BF=97=E9=B9=8F?= <2916022834@qq.com> Date: Thu, 13 Nov 2025 16:07:32 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=BB=E5=B8=83=E6=96=87=E5=AD=97=E5=8F=96?= =?UTF-8?q?=E6=B6=88=E7=BC=96=E8=BE=91=E5=85=B3=E9=97=AD=E6=96=87=E5=AD=97?= =?UTF-8?q?=E9=9D=A2=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CanvasEditor/components/TextEditorPanel.vue | 9 ++++++++- src/component/Canvas/CanvasEditor/index.vue | 14 +++++++------- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/src/component/Canvas/CanvasEditor/components/TextEditorPanel.vue b/src/component/Canvas/CanvasEditor/components/TextEditorPanel.vue index 33a0c17c..2c01a627 100644 --- a/src/component/Canvas/CanvasEditor/components/TextEditorPanel.vue +++ b/src/component/Canvas/CanvasEditor/components/TextEditorPanel.vue @@ -620,12 +620,19 @@ export default { // 监听显示文本编辑面板事件 document.addEventListener("showTextEditor", showEditor); document.addEventListener("hideTextEditor", close); - + if(props.canvas) { + // props.canvas.on("text:editing:entered", showEditor); + props.canvas.on("text:editing:exited", close); + } }); onUnmounted(() => { document.removeEventListener("showTextEditor", showEditor); document.removeEventListener("hideTextEditor", close); + if(props.canvas) { + // props.canvas.off("text:editing:entered", showEditor); + props.canvas.off("text:editing:exited", close); + } }); // 返回所有需要在模板中使用的数据和方法 diff --git a/src/component/Canvas/CanvasEditor/index.vue b/src/component/Canvas/CanvasEditor/index.vue index aebda612..69dcdacd 100644 --- a/src/component/Canvas/CanvasEditor/index.vue +++ b/src/component/Canvas/CanvasEditor/index.vue @@ -1209,13 +1209,6 @@ defineExpose({ :activeTool="activeTool" /> - - - + + +
{{ t("Canvas.Scale") }}: {{ currentZoom }}%