diff --git a/src/renderer/src/components/whiteboard/whiteboard.vue b/src/renderer/src/components/whiteboard/whiteboard.vue index c6eb9a2..1c8b781 100644 --- a/src/renderer/src/components/whiteboard/whiteboard.vue +++ b/src/renderer/src/components/whiteboard/whiteboard.vue @@ -507,6 +507,11 @@ const backToCenter = () => { app.scrollToCenter() } +const cancelActiveElement = () =>{ + app.cancelActiveElement() +} + + // 显示全部 const showFit = () => { let elementList = app.elements.elementList @@ -700,8 +705,6 @@ const getCanvasBlob = async () =>{ }) } - - watch(() => props.data, (newVal) => { if (newVal) { setCanvasData(newVal) @@ -791,7 +794,8 @@ defineExpose({ getCanvasJson, getCanvasBase64, setCanvasData, - getCanvasBlob + getCanvasBlob, + cancelActiveElement })