From 6b90acb51c794d756a992c78d244bc6ba9648c6c Mon Sep 17 00:00:00 2001 From: ocean-gao Date: Tue, 10 May 2022 16:18:12 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E4=BB=A3=E7=A0=81=E8=A7=84?= =?UTF-8?q?=E8=8C=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/fes-plugin-watermark/src/runtime/core.js | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/packages/fes-plugin-watermark/src/runtime/core.js b/packages/fes-plugin-watermark/src/runtime/core.js index 5b2c6ee4..b4e4d1bc 100644 --- a/packages/fes-plugin-watermark/src/runtime/core.js +++ b/packages/fes-plugin-watermark/src/runtime/core.js @@ -34,7 +34,8 @@ let param = null; // 配置项 let _wmMo = null; // MutationObserver let _wmTimer = null; // timestamp -function _destroyWatermark() { +// 销毁水印 +export function destroyWatermark() { // 监听器关闭 _wmMo && _wmMo.disconnect(); _wmMo = null; @@ -68,7 +69,7 @@ export function createWatermark({ } // 为避免多次调用 createWatermark 触发重复监听,这里先执行销毁水印操作 - _destroyWatermark(); + destroyWatermark(); param = { container, @@ -162,8 +163,3 @@ export function createWatermark({ }, timeout); } } - -// 销毁水印 -export function destroyWatermark() { - _destroyWatermark(); -}