Skip to content

Commit

Permalink
refactor: 更新代码
Browse files Browse the repository at this point in the history
  • Loading branch information
ArgoZhang committed Feb 2, 2025
1 parent 65ca872 commit df965b1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/BootstrapBlazor/Components/Affix/Affix.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public partial class Affix

private string? StyleString => CssBuilder.Default("position: sticky;")
.AddStyle("z-index", $"{ZIndex}", ZIndex.HasValue)
.AddStyle($"{Position.ToDescriptionString()}", $"{Offset}px")
.AddStyle(Position.ToDescriptionString(), $"{Offset}px")
.AddStyleFromAttributes(AdditionalAttributes)
.Build();
}
6 changes: 3 additions & 3 deletions src/BootstrapBlazor/Components/Drawer/Drawer.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,16 @@ public partial class Drawer
.Build();

private string? StyleString => CssBuilder.Default()
.AddStyle("--bb-drawer-position", $"{Position}", !string.IsNullOrEmpty(Position))
.AddStyle("--bb-drawer-position", Position)
.AddStyleFromAttributes(AdditionalAttributes)
.Build();

/// <summary>
/// 获得 抽屉 Style 字符串
/// </summary>
private string? DrawerStyleString => CssBuilder.Default()
.AddStyle("--bb-drawer-width", $"{Width}", !string.IsNullOrEmpty(Width) && Placement != Placement.Top && Placement != Placement.Bottom)
.AddStyle("--bb-drawer-height", $"{Height}", !string.IsNullOrEmpty(Height) && (Placement == Placement.Top || Placement == Placement.Bottom))
.AddStyle("--bb-drawer-width", Width, Placement != Placement.Top && Placement != Placement.Bottom)
.AddStyle("--bb-drawer-height", Height, Placement == Placement.Top || Placement == Placement.Bottom)
.Build();

/// <summary>
Expand Down

0 comments on commit df965b1

Please sign in to comment.