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(); } /**