From 702110147435a59e9521fe3689e7d30bda2b7a41 Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Thu, 27 Mar 2025 18:46:10 +0800 Subject: [PATCH 1/4] =?UTF-8?q?chore:=20=E6=9B=B4=E6=96=B0=20header=20?= =?UTF-8?q?=E6=8F=8F=E8=BF=B0=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/BootstrapBlazor/Icons/BootstrapIcons.cs | 7 ++++--- src/BootstrapBlazor/Icons/MaterialDesignIcons.cs | 7 ++++--- .../Services/Bluetooth/BluetoothDeviceInfo.cs | 7 ++++--- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/src/BootstrapBlazor/Icons/BootstrapIcons.cs b/src/BootstrapBlazor/Icons/BootstrapIcons.cs index 51cf458b9f6..f24f92780f7 100644 --- a/src/BootstrapBlazor/Icons/BootstrapIcons.cs +++ b/src/BootstrapBlazor/Icons/BootstrapIcons.cs @@ -1,6 +1,7 @@ -// Copyright (c) Argo Zhang (argo@163.com). All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -// Website: https://www.blazor.zone or https://argozhang.github.io/ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the Apache 2.0 License +// See the LICENSE file in the project root for more information. +// Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone namespace BootstrapBlazor.Components; diff --git a/src/BootstrapBlazor/Icons/MaterialDesignIcons.cs b/src/BootstrapBlazor/Icons/MaterialDesignIcons.cs index 7792c063da5..cbd83eefd1c 100644 --- a/src/BootstrapBlazor/Icons/MaterialDesignIcons.cs +++ b/src/BootstrapBlazor/Icons/MaterialDesignIcons.cs @@ -1,6 +1,7 @@ -// Copyright (c) Argo Zhang (argo@163.com). All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -// Website: https://www.blazor.zone or https://argozhang.github.io/ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the Apache 2.0 License +// See the LICENSE file in the project root for more information. +// Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone namespace BootstrapBlazor.Components; diff --git a/src/BootstrapBlazor/Services/Bluetooth/BluetoothDeviceInfo.cs b/src/BootstrapBlazor/Services/Bluetooth/BluetoothDeviceInfo.cs index 40249890263..9fee44b98a7 100644 --- a/src/BootstrapBlazor/Services/Bluetooth/BluetoothDeviceInfo.cs +++ b/src/BootstrapBlazor/Services/Bluetooth/BluetoothDeviceInfo.cs @@ -1,6 +1,7 @@ -// Copyright (c) Argo Zhang (argo@163.com). All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -// Website: https://www.blazor.zone or https://argozhang.github.io/ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the Apache 2.0 License +// See the LICENSE file in the project root for more information. +// Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone namespace BootstrapBlazor.Components; From 6bb601f2cba7c4cb43b7c1639b58d4ab884c27d7 Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Thu, 27 Mar 2025 18:46:40 +0800 Subject: [PATCH 2/4] =?UTF-8?q?refactor:=20Layout=20=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=20Tab=20=E5=8F=B3=E9=94=AE=E8=8F=9C=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Components/Layout/Layout.razor | 47 ++++++++--- .../Components/Layout/Layout.razor.cs | 81 ++++++++++++++++++- src/BootstrapBlazor/Enums/ComponentIcons.cs | 20 +++++ src/BootstrapBlazor/Locales/en.json | 6 +- src/BootstrapBlazor/Locales/zh.json | 6 +- 5 files changed, 147 insertions(+), 13 deletions(-) diff --git a/src/BootstrapBlazor/Components/Layout/Layout.razor b/src/BootstrapBlazor/Components/Layout/Layout.razor index d712f36af28..4b5c4fe496a 100644 --- a/src/BootstrapBlazor/Components/Layout/Layout.razor +++ b/src/BootstrapBlazor/Components/Layout/Layout.razor @@ -116,16 +116,31 @@ @
@if (UseTabSet) { - - + @if (ShowTabContextMenu) + { + + @RenderTab + + @if (BeforeTabContextMenuTemplate != null) + { + @BeforeTabContextMenuTemplate(_tab) + } + + + + + + @if (TabContextMenuTemplate != null) + { + @TabContextMenuTemplate(_tab) + } + + + } + else + { + @RenderTab + } } else { @@ -133,6 +148,18 @@ }
; + RenderFragment RenderTab => + @ + ; + RenderFragment RenderFooter => @