From cb40631a8641b4ec8dba760f1df97c49003420f0 Mon Sep 17 00:00:00 2001 From: ocean_gao Date: Sun, 24 Apr 2022 09:49:03 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20watermark=E8=87=AA=E5=AE=9A=E4=B9=89cont?= =?UTF-8?q?ainer=E6=97=B6=E6=A0=B7=E5=BC=8F=E4=BC=98=E5=8C=96=20(#119)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: watermark自定义container时样式优化 * fix: watermark支持container时样式优化 --- packages/fes-plugin-watermark/src/runtime/core.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/fes-plugin-watermark/src/runtime/core.js b/packages/fes-plugin-watermark/src/runtime/core.js index f927d255..fb3a3460 100644 --- a/packages/fes-plugin-watermark/src/runtime/core.js +++ b/packages/fes-plugin-watermark/src/runtime/core.js @@ -88,12 +88,12 @@ export function createWatermark({ let __wm = document.querySelector('.__wm'); const watermarkDiv = __wm || document.createElement('div'); const styleStr = ` - position: fixed; + position: ${container === document.body ? 'fixed' : 'absolute'}; user-select: none; top: 0; left: 0; - width: 100vw; - height: 100vh; + width: 100%; + height: 100%; z-index: ${zIndex}; pointer-events: none !important; background-repeat: repeat;