Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/BootstrapBlazor/Components/Layout/Layout.razor
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
@<main class="@MainClassString">
@if (UseTabSet)
{
<Tab ClickTabToNavigation="true" ShowExtendButtons="true" ShowClose="true"
<Tab ClickTabToNavigation="true" ShowExtendButtons="true" ShowClose="true" AllowDrag="AllowDragTab"
AdditionalAssemblies="@AdditionalAssemblies" NotFoundTabText="@NotFoundTabText"
DefaultUrl="@TabDefaultUrl" ExcludeUrls="@ExcludeUrls" IsOnlyRenderActiveTab="IsOnlyRenderActiveTab"
Body="@Main" NotAuthorized="NotAuthorized!" NotFound="NotFound!" />
Expand Down
6 changes: 6 additions & 0 deletions src/BootstrapBlazor/Components/Layout/Layout.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,12 @@ public partial class Layout : IHandlerException
[Parameter]
public bool IsOnlyRenderActiveTab { get; set; }

/// <summary>
/// 获得/设置 是否允许拖动标签页 默认 true
/// </summary>
[Parameter]
public bool AllowDragTab { get; set; } = true;

/// <summary>
/// 获得/设置 是否固定 Footer 组件
/// </summary>
Expand Down
1 change: 1 addition & 0 deletions test/UnitTest/Components/LayoutTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ public void UseTabSet_OK()
pb.Add(a => a.ExcludeUrls, new String[] { "/Index" });
pb.Add(a => a.TabDefaultUrl, "/Index");
pb.Add(a => a.IsOnlyRenderActiveTab, true);
pb.Add(a => a.AllowDragTab, true);
pb.Add(a => a.NotFoundTabText, "Test");
pb.Add(a => a.NotAuthorized, (RenderFragment?)null);
pb.Add(a => a.NotFound, (RenderFragment?)null);
Expand Down