From 0865f659490c2106d04ec9c57cf476a67779488b Mon Sep 17 00:00:00 2001 From: bighuixiang <472705331@qq.com> Date: Thu, 24 Jul 2025 22:08:39 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=B7=BB=E5=8A=A0=E6=B6=B2=E5=8C=96?= =?UTF-8?q?=E6=93=8D=E4=BD=9C=E9=94=99=E8=AF=AF=E6=8F=90=E7=A4=BA=EF=BC=8C?= =?UTF-8?q?=E4=BC=98=E5=8C=96=E7=94=A8=E6=88=B7=E4=BD=93=E9=AA=8C,?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=B6=B2=E5=8C=96=E7=82=B9=E5=87=BB=E7=A9=BA?= =?UTF-8?q?=E7=99=BD=E5=8C=BA=E5=9F=9F=E6=B6=B2=E5=8C=96=E6=95=88=E6=9E=9C?= =?UTF-8?q?=E8=A2=AB=E9=87=8D=E7=BD=AE=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CanvasEditor/components/LiquifyPanel.vue | 33 +++++++++++++------ 1 file changed, 23 insertions(+), 10 deletions(-) diff --git a/src/component/Canvas/CanvasEditor/components/LiquifyPanel.vue b/src/component/Canvas/CanvasEditor/components/LiquifyPanel.vue index 8010a385..36d7c43d 100644 --- a/src/component/Canvas/CanvasEditor/components/LiquifyPanel.vue +++ b/src/component/Canvas/CanvasEditor/components/LiquifyPanel.vue @@ -138,6 +138,7 @@ import { import { OperationType } from "../utils/layerHelper"; import { LiquifyRealTimeUpdater } from "../managers/liquify/LiquifyRealTimeUpdater"; import { LiquifyStateManager } from "../managers/liquify/LiquifyStateManager"; +import { Modal } from "ant-design-vue"; // Props定义 const props = defineProps({ @@ -431,7 +432,19 @@ function showPanel(event) { if (!detail.canLiquify && !detail.targetObject) { if (detail.layerStatus && detail.layerStatus.message) { console.log("液化操作提示:", detail.layerStatus.message); + Modal.error({ + title: "错误提示", + content: detail.layerStatus.message, + okText: "确定", + centered: true, + }); } else { + Modal.error({ + title: "错误提示", + content: "未选择有效图像或图层不适合液化操作", + okText: "确定", + centered: true, + }); console.log("未选择有效图像或图层不适合液化操作"); } visible.value = true; // 仍然显示面板以便用户看到提示 @@ -868,18 +881,18 @@ async function handleMouseDown(event) { console.log( `开始液化操作,图像坐标: (${imageCoords.x}, ${imageCoords.y})` ); + + // 应用液化效果 + applyLiquifyAtPoint(pointer.x, pointer.y); + + // 开始持续按压 + isPressing.value = true; + pressStartTime.value = Date.now(); + pressX.value = pointer.x; + pressY.value = pointer.y; + startPressTimer(); } } - - // 应用液化效果 - applyLiquifyAtPoint(pointer.x, pointer.y); - - // 开始持续按压 - isPressing.value = true; - pressStartTime.value = Date.now(); - pressX.value = pointer.x; - pressY.value = pointer.y; - startPressTimer(); } /**