From 96bd4089569673ecb2987a0cc7fc57174c62368b Mon Sep 17 00:00:00 2001 From: zhao_juchang <2233737325@qq.com> Date: Sat, 20 Apr 2024 10:33:42 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B8=85=E9=99=A4=E6=B0=B4=E5=8D=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/waterMark.vue | 9 ++++++++- src/language/en.json | 3 ++- src/language/zh.json | 3 ++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/components/waterMark.vue b/src/components/waterMark.vue index e7633a47..01eea7a5 100644 --- a/src/components/waterMark.vue +++ b/src/components/waterMark.vue @@ -13,8 +13,9 @@
{{ $t('waterMark.setting.name') }} @@ -95,6 +96,12 @@ const onMadalCancel = () => { waterMarkState.isRotate = 0; }; +const onCleanUpWaterMark = () => { + canvasEditor.canvas.overlayImage = null; // 清空覆盖层 + canvasEditor.canvas.renderAll(); + onMadalCancel(); +}; + const createCanvas = (width: number, height: number) => { const waterCanvas = document.createElement('canvas'); waterCanvas.width = width; diff --git a/src/language/en.json b/src/language/en.json index b2e87bd2..7b44ba3c 100644 --- a/src/language/en.json +++ b/src/language/en.json @@ -184,5 +184,6 @@ "clearTip": "Are you sure you want to clear it?", "replaceTip": "Are you sure you want to add to the canvas?", "ok": "ok", - "cancel": "cancel" + "cancel": "cancel", + "cleanUp": "cleanUp" } \ No newline at end of file diff --git a/src/language/zh.json b/src/language/zh.json index cb39dc7b..3c3309dc 100644 --- a/src/language/zh.json +++ b/src/language/zh.json @@ -173,5 +173,6 @@ "clearTip": "确定要清空吗?", "replaceTip": "确定要添加到画布中吗?", "ok": "确认", - "cancel": "取消" + "cancel": "取消", + "cleanUp": "清除" } \ No newline at end of file