Skip to content

Commit 347853c

Browse files
committed
refactor: 增加部分 Tab 参数
1 parent 3bbb6bc commit 347853c

File tree

2 files changed

+22
-2
lines changed

2 files changed

+22
-2
lines changed

src/BootstrapBlazor/Components/Layout/Layout.razor

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,10 +118,12 @@
118118
@<main class="@MainClassString">
119119
@if (UseTabSet)
120120
{
121-
<Tab ClickTabToNavigation="true" ShowExtendButtons="true" ShowClose="true" AllowDrag="AllowDragTab"
121+
<Tab ClickTabToNavigation="ClickTabToNavigation"
122+
ShowExtendButtons="ShowTabExtendButtons" ShowClose="ShowTabItemClose" AllowDrag="AllowDragTab"
122123
AdditionalAssemblies="@AdditionalAssemblies" NotFoundTabText="@NotFoundTabText"
123124
DefaultUrl="@TabDefaultUrl" ExcludeUrls="@ExcludeUrls" IsOnlyRenderActiveTab="IsOnlyRenderActiveTab"
124-
Body="@Main" NotAuthorized="NotAuthorized!" NotFound="NotFound!" />
125+
Body="@Main" NotAuthorized="NotAuthorized!" NotFound="NotFound!">
126+
</Tab>
125127
}
126128
else
127129
{

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

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,24 @@ public partial class Layout : IHandlerException
181181
[Parameter]
182182
public string TabDefaultUrl { get; set; } = "";
183183

184+
/// <summary>
185+
/// 获得/设置 标签是否显示关闭按钮 默认 true
186+
/// </summary>
187+
[Parameter]
188+
public bool ShowTabItemClose { get; set; } = true;
189+
190+
/// <summary>
191+
/// 获得/设置 标签是否显示扩展按钮 默认 true
192+
/// </summary>
193+
[Parameter]
194+
public bool ShowTabExtendButtons { get; set; } = true;
195+
196+
/// <summary>
197+
/// 获得/设置 点击标签页是否切换地址栏 默认 true
198+
/// </summary>
199+
[Parameter]
200+
public bool ClickTabToNavigation { get; set; } = true;
201+
184202
/// <summary>
185203
/// 获得/设置 授权回调方法多用于权限控制
186204
/// </summary>

0 commit comments

Comments
 (0)