File tree Expand file tree Collapse file tree 8 files changed +54
-8
lines changed Expand file tree Collapse file tree 8 files changed +54
-8
lines changed Original file line number Diff line number Diff line change @@ -124,6 +124,30 @@ private AttributeItem[] GetAttributes() =>
124124 DefaultValue = "false"
125125 } ,
126126 new ( )
127+ {
128+ Name = "SidebarMinWidth" ,
129+ Description = Localizer [ "Layouts_SidebarMinWidth_Description" ] ,
130+ Type = "int?" ,
131+ ValueList = " — " ,
132+ DefaultValue = " — "
133+ } ,
134+ new ( )
135+ {
136+ Name = "SidebarMaxWidth" ,
137+ Description = Localizer [ "Layouts_SidebarMaxWidth_Description" ] ,
138+ Type = "int?" ,
139+ ValueList = " — " ,
140+ DefaultValue = " — "
141+ } ,
142+ new ( )
143+ {
144+ Name = "ShowSplitebar" ,
145+ Description = Localizer [ "Layouts_ShowSplitebar_Description" ] ,
146+ Type = "bool" ,
147+ ValueList = "true|false" ,
148+ DefaultValue = "false"
149+ } ,
150+ new ( )
127151 {
128152 Name = "ShowFooter" ,
129153 Description = Localizer [ "Layouts_ShowFooter_Description" ] ,
Original file line number Diff line number Diff line change 14321432 "Layouts_IsFixedFooter_Description": "Whether to fix the Footer component",
14331433 "Layouts_IsFixedHeader_Description": "Whether to fix the Header component",
14341434 "Layouts_ShowCollapseBar_Description": "Whether to show contraction and expansion Bar",
1435+ "Layouts_ShowSplitebar_Description": "Whether to display the left and right split bar",
1436+ "Layouts_SidebarMinWidth_Description": "Minimum sidebar width",
1437+ "Layouts_SidebarMaxWidth_Description": "Maximum sidebar width",
14351438 "Layouts_ShowFooter_Description": "Whether to show Footer template",
14361439 "Layouts_ShowGotoTop_Description": "Whether to display the back to top button",
14371440 "Layouts_UseTabSet_Description": "Whether to open multi-label mode",
Original file line number Diff line number Diff line change 14321432 "Layouts_IsFixedFooter_Description" : " 是否固定 Footer 组件" ,
14331433 "Layouts_IsFixedHeader_Description" : " 是否固定 Header 组件" ,
14341434 "Layouts_ShowCollapseBar_Description" : " 是否显示收缩展开 Bar" ,
1435+ "Layouts_ShowSplitebar_Description" : " 是否显示左右分割栏" ,
1436+ "Layouts_SidebarMinWidth_Description" : " 侧边栏最小宽度" ,
1437+ "Layouts_SidebarMaxWidth_Description" : " 侧边栏最大宽度" ,
14351438 "Layouts_ShowFooter_Description" : " 是否显示 Footer 模板" ,
14361439 "Layouts_ShowGotoTop_Description" : " 是否显示返回顶端按钮" ,
14371440 "Layouts_UseTabSet_Description" : " 是否开启多标签模式" ,
Original file line number Diff line number Diff line change 11<Project Sdk =" Microsoft.NET.Sdk.Razor" >
22
33 <PropertyGroup >
4- <Version >9.3.1-beta36 </Version >
4+ <Version >9.3.1-beta38 </Version >
55 </PropertyGroup >
66
77 <ItemGroup >
Original file line number Diff line number Diff line change 8888 {
8989 @Side
9090 }
91- @if (ShowSplitBar )
91+ @if (ShowSplitebar )
9292 {
93- < LayoutSplitebar >< / LayoutSplitebar >
93+ < LayoutSplitebar Min = " SidebarMinWidth " Max = " SidebarMaxWidth " >< / LayoutSplitebar >
9494 }
9595 @if (Menus != null )
9696 {
Original file line number Diff line number Diff line change @@ -70,7 +70,19 @@ public partial class Layout : IHandlerException
7070 /// 仅在 左右布局时有效
7171 /// </summary>
7272 [ Parameter ]
73- public bool ShowSplitBar { get ; set ; }
73+ public bool ShowSplitebar { get ; set ; }
74+
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 ; }
7486
7587 /// <summary>
7688 /// 获得/设置 NotAuthorized 模板 默认 null NET6.0/7.0 有效
Original file line number Diff line number Diff line change 66{
77 <CascadingValue Value =" this" IsFixed =" true" >
88 <EditForm @attributes =" @AdditionalAttributes" id =" @Id" Model =" @Model"
9- data-bb-dissubmit =" @DisableAutoSubmitString" data-bb-invalid-result =" @ShowAllInvalidResultString"
10- style =" @StyleString "
11- OnValidSubmit =" @OnValidSubmitForm" OnInvalidSubmit =" @OnInvalidSubmitForm" >
9+ data-bb-dissubmit =" @DisableAutoSubmitString" data-bb-invalid-result =" @ShowAllInvalidResultString"
10+ style =" @StyleString "
11+ OnValidSubmit =" @OnValidSubmitForm" OnInvalidSubmit =" @OnInvalidSubmitForm" >
1212 <BootstrapBlazorDataAnnotationsValidator @ref =" Validator" />
1313 @ChildContent
1414 </EditForm >
Original file line number Diff line number Diff line change @@ -245,13 +245,17 @@ public void ShowLayouSidebar_Ok()
245245 pb . Add ( a => a . UseTabSet , true ) ;
246246 pb . Add ( a => a . AdditionalAssemblies , new Assembly [ ] { GetType ( ) . Assembly } ) ;
247247 pb . Add ( a => a . IsFullSide , true ) ;
248- pb . Add ( a => a . ShowSplitBar , true ) ;
248+ pb . Add ( a => a . ShowSplitebar , true ) ;
249+ pb . Add ( a => a . SidebarMinWidth , 100 ) ;
250+ pb . Add ( a => a . SidebarMaxWidth , 300 ) ;
249251 pb . Add ( a => a . Side , new RenderFragment ( builder =>
250252 {
251253 builder . AddContent ( 0 , "test" ) ;
252254 } ) ) ;
253255 } ) ;
254256 cut . Contains ( "layout-splitebar" ) ;
257+ cut . Contains ( "data-bb-min=\" 100\" " ) ;
258+ cut . Contains ( "data-bb-max=\" 300\" " ) ;
255259 }
256260
257261 [ Fact ]
You can’t perform that action at this time.
0 commit comments