fix: watermark自定义container时样式优化 (#119)

* fix: watermark自定义container时样式优化

* fix: watermark支持container时样式优化
This commit is contained in:
ocean_gao 2022-04-24 09:49:03 +08:00 committed by GitHub
parent 83d9a5bc3f
commit cb40631a86
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;