fix(Layout): can't collapse side when set side with value (#3977)

Co-authored-by: SamXMG <SamXMG@noreply.gitcode.com>
Co-authored-by: Argo Zhang <argo@live.ca>
This commit is contained in:
SamXMG 2024-08-05 17:21:51 +08:00 committed by GitHub
parent e2c60b7a9d
commit 656c028bd2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -252,7 +252,7 @@ public partial class Layout : IHandlerException
/// 获得 侧边栏 Style 字符串
/// </summary>
private string? SideStyleString => CssBuilder.Default()
.AddClass($"width: {SideWidth.ConvertToPercentString()}", !string.IsNullOrEmpty(SideWidth) && SideWidth != "0")
.AddClass($"width: {SideWidth.ConvertToPercentString()}", !IsCollapsed && !string.IsNullOrEmpty(SideWidth) && SideWidth != "0")
.Build();
/// <summary>