From ac188810180c7850de51e438aa2e344b9b33e552 Mon Sep 17 00:00:00 2001 From: Argo-Supper Date: Fri, 29 Dec 2023 09:45:56 +0800 Subject: [PATCH 1/4] =?UTF-8?q?doc:=20=E6=9B=B4=E6=96=B0=E7=A4=BA=E4=BE=8B?= =?UTF-8?q?=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Components/Samples/Responsives.razor | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/BootstrapBlazor.Server/Components/Samples/Responsives.razor b/src/BootstrapBlazor.Server/Components/Samples/Responsives.razor index 664d9b7f4b1..5e997cc31ab 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/Responsives.razor +++ b/src/BootstrapBlazor.Server/Components/Samples/Responsives.razor @@ -4,9 +4,7 @@

@Localizer["ResponsiveTitle"]

@Localizer["ResponsiveDescription"]

- +
@Localizer["ResponsiveNormalIntroCurrentText"] Breakpoint:@Size
From 3b9b7717896c9e8d8e86ea04696a5fa8bb6dc5ed Mon Sep 17 00:00:00 2001 From: Argo-Supper Date: Fri, 29 Dec 2023 09:46:34 +0800 Subject: [PATCH 2/4] =?UTF-8?q?feat:=20=E5=A2=9E=E5=8A=A0=E9=A6=96?= =?UTF-8?q?=E6=AC=A1=E5=80=BC=E4=BC=A0=E9=80=92=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ResizeNotification/ResizeNotificationService.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/BootstrapBlazor/Components/ResizeNotification/ResizeNotificationService.cs b/src/BootstrapBlazor/Components/ResizeNotification/ResizeNotificationService.cs index 1832dfe3f2c..55d3b4d4c90 100644 --- a/src/BootstrapBlazor/Components/ResizeNotification/ResizeNotificationService.cs +++ b/src/BootstrapBlazor/Components/ResizeNotification/ResizeNotificationService.cs @@ -26,6 +26,11 @@ public class ResizeNotificationService /// public void Unsubscribe(object target) => Cache.TryRemove(target, out _); + /// + /// 获得 当前值 + /// + public BreakPoint CurrentValue { get; private set; } + /// /// 内部调用 /// @@ -33,6 +38,8 @@ public class ResizeNotificationService /// internal async Task InvokeAsync(BreakPoint breakPoint) { + CurrentValue = breakPoint; + foreach (var cb in Cache.Values) { await cb(breakPoint); From a3d7e0ab72a82141d1481016615d542c79a1e223 Mon Sep 17 00:00:00 2001 From: Argo-Supper Date: Fri, 29 Dec 2023 09:46:59 +0800 Subject: [PATCH 3/4] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E9=A6=96=E6=AC=A1?= =?UTF-8?q?=E5=8A=A0=E8=BD=BD=E6=9C=AA=E8=8E=B7=E5=8F=96=E5=80=BC=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Components/ResizeNotification/Responsive.cs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/BootstrapBlazor/Components/ResizeNotification/Responsive.cs b/src/BootstrapBlazor/Components/ResizeNotification/Responsive.cs index 4b711bbb5c2..6a8c16d485e 100644 --- a/src/BootstrapBlazor/Components/ResizeNotification/Responsive.cs +++ b/src/BootstrapBlazor/Components/ResizeNotification/Responsive.cs @@ -27,6 +27,22 @@ protected override void OnInitialized() ResizeService.Subscribe(this, OnResize); } + /// + /// + /// + /// + /// + protected override async Task OnAfterRenderAsync(bool firstRender) + { + if (firstRender) + { + if (OnBreakPointChanged != null) + { + await OnBreakPointChanged(ResizeService.CurrentValue); + } + } + } + /// /// 客户端通知断点已改变 /// From ead0ae7b57e664446d6139921cd7e430eec993f3 Mon Sep 17 00:00:00 2001 From: Argo-Supper Date: Fri, 29 Dec 2023 09:47:56 +0800 Subject: [PATCH 4/4] chore: bump version 8.0.7-beta03 --- src/BootstrapBlazor/BootstrapBlazor.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/BootstrapBlazor/BootstrapBlazor.csproj b/src/BootstrapBlazor/BootstrapBlazor.csproj index 89de8baf356..efd9c988bdb 100644 --- a/src/BootstrapBlazor/BootstrapBlazor.csproj +++ b/src/BootstrapBlazor/BootstrapBlazor.csproj @@ -1,7 +1,7 @@ - 8.0.7-beta02 + 8.0.7-beta03