Skip to content

Commit 82a0f30

Browse files
committed
feat: 怎加 is-page 样式
1 parent a62986b commit 82a0f30

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

src/BootstrapBlazor/Components/Watermark/Watermark.razor.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ public partial class Watermark
5454
public int? Gap { get; set; }
5555

5656
private string? ClassString => CssBuilder.Default("bb-watermark")
57+
.AddClass("is-page", ChildContent is null)
5758
.AddClassFromAttributes(AdditionalAttributes)
5859
.Build();
5960

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
.bb-watermark {
22
position: relative;
3-
pointer-events: none;
4-
}
53

6-
body > .bb-watermark {
7-
position: fixed;
8-
inset: 0;
9-
z-index: 9999;
4+
&.is-page {
5+
position: fixed;
6+
inset: 0;
7+
z-index: 9999;
8+
pointer-events: none;
9+
}
1010
}

0 commit comments

Comments
 (0)