Skip to content

Commit 7f07b93

Browse files
committed
feat: 增加 SidebarMin/MaxValue 参数
1 parent 97c4f42 commit 7f07b93

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

src/BootstrapBlazor/Components/Layout/Layout.razor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@
9090
}
9191
@if (ShowSplitbar)
9292
{
93-
<LayoutSplitebar></LayoutSplitebar>
93+
<LayoutSplitebar Min="SidebarMinWidth" Max="SidebarMaxWidth"></LayoutSplitebar>
9494
}
9595
@if (Menus != null)
9696
{

src/BootstrapBlazor/Components/Layout/Layout.razor.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,18 @@ public partial class Layout : IHandlerException
7272
[Parameter]
7373
public bool ShowSplitbar { get; set; }
7474

75+
/// <summary>
76+
/// 获得/设置 侧边栏最小宽度 默认 null 未设置
77+
/// </summary>
78+
[Parameter]
79+
public int? SidebarMinWidth { get; set; }
80+
81+
/// <summary>
82+
/// 获得/设置 侧边栏最大宽度 默认 null 未设置
83+
/// </summary>
84+
[Parameter]
85+
public int? SidebarMaxWidth { get; set; }
86+
7587
/// <summary>
7688
/// 获得/设置 NotAuthorized 模板 默认 null NET6.0/7.0 有效
7789
/// </summary>

0 commit comments

Comments
 (0)