mirror of
https://github.com/WeBankFinTech/fes.js.git
synced 2025-10-15 12:02:18 +08:00
refactor: 代码规范
This commit is contained in:
parent
c29d09d626
commit
6b90acb51c
@ -34,7 +34,8 @@ let param = null; // 配置项
|
|||||||
let _wmMo = null; // MutationObserver
|
let _wmMo = null; // MutationObserver
|
||||||
let _wmTimer = null; // timestamp
|
let _wmTimer = null; // timestamp
|
||||||
|
|
||||||
function _destroyWatermark() {
|
// 销毁水印
|
||||||
|
export function destroyWatermark() {
|
||||||
// 监听器关闭
|
// 监听器关闭
|
||||||
_wmMo && _wmMo.disconnect();
|
_wmMo && _wmMo.disconnect();
|
||||||
_wmMo = null;
|
_wmMo = null;
|
||||||
@ -68,7 +69,7 @@ export function createWatermark({
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 为避免多次调用 createWatermark 触发重复监听,这里先执行销毁水印操作
|
// 为避免多次调用 createWatermark 触发重复监听,这里先执行销毁水印操作
|
||||||
_destroyWatermark();
|
destroyWatermark();
|
||||||
|
|
||||||
param = {
|
param = {
|
||||||
container,
|
container,
|
||||||
@ -162,8 +163,3 @@ export function createWatermark({
|
|||||||
}, timeout);
|
}, timeout);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 销毁水印
|
|
||||||
export function destroyWatermark() {
|
|
||||||
_destroyWatermark();
|
|
||||||
}
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user