diff --git a/src/BootstrapBlazor/Components/Layout/Layout.razor b/src/BootstrapBlazor/Components/Layout/Layout.razor index 85657a898fb..bb08d388dc1 100644 --- a/src/BootstrapBlazor/Components/Layout/Layout.razor +++ b/src/BootstrapBlazor/Components/Layout/Layout.razor @@ -96,7 +96,7 @@ @
@if (UseTabSet) { - diff --git a/src/BootstrapBlazor/Components/Layout/Layout.razor.cs b/src/BootstrapBlazor/Components/Layout/Layout.razor.cs index e2b65315215..b13fb2d8073 100644 --- a/src/BootstrapBlazor/Components/Layout/Layout.razor.cs +++ b/src/BootstrapBlazor/Components/Layout/Layout.razor.cs @@ -121,6 +121,12 @@ public partial class Layout : IHandlerException [Parameter] public bool IsOnlyRenderActiveTab { get; set; } + /// + /// 获得/设置 是否允许拖动标签页 默认 true + /// + [Parameter] + public bool AllowDragTab { get; set; } = true; + /// /// 获得/设置 是否固定 Footer 组件 /// diff --git a/test/UnitTest/Components/LayoutTest.cs b/test/UnitTest/Components/LayoutTest.cs index 411797109b2..f2ef2ab746f 100644 --- a/test/UnitTest/Components/LayoutTest.cs +++ b/test/UnitTest/Components/LayoutTest.cs @@ -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);