Skip to content

Commit 6d1860f

Browse files
fix(Watermark): multiple elements not displayed (#6058)
Co-Authored-By: BBFish <[email protected]>
1 parent 97bd421 commit 6d1860f

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

src/BootstrapBlazor/Components/Watermark/Watermark.razor.js

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -121,17 +121,7 @@ const monitor = watermark => {
121121
return;
122122
}
123123

124-
if (options.isPage === false && el.children.length !== 2) {
125-
clearWatermark(watermark);
126-
return;
127-
}
128-
129-
const mark = options.isPage ? el.children[0] : el.children[1];
130-
if (mark.className !== 'bb-watermark-bg') {
131-
clearWatermark(watermark);
132-
return;
133-
}
134-
124+
const mark = el.querySelector('.bb-watermark-bg');
135125
const style = getComputedStyle(mark);
136126
const { display, opacity, position, inset, zIndex, zoom, transform, backgroundRepeat, backgroundImage, backgroundSize } = style;
137127
if (display !== 'block') {

0 commit comments

Comments
 (0)