From c8a57915f4d6f49393594f28c534eb81a798ffa6 Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Sat, 18 Apr 2026 16:12:28 +0800 Subject: [PATCH 1/2] =?UTF-8?q?feat:=20=E5=A2=9E=E5=8A=A0=20UnregisterAsyn?= =?UTF-8?q?cSubmitButton=20=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Components/ValidateForm/ValidateForm.razor.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/BootstrapBlazor/Components/ValidateForm/ValidateForm.razor.cs b/src/BootstrapBlazor/Components/ValidateForm/ValidateForm.razor.cs index d07a803386f..44e93186817 100644 --- a/src/BootstrapBlazor/Components/ValidateForm/ValidateForm.razor.cs +++ b/src/BootstrapBlazor/Components/ValidateForm/ValidateForm.razor.cs @@ -577,6 +577,16 @@ internal void RegisterAsyncSubmitButton(ButtonBase button) AsyncSubmitButtons.Add(button); } + /// + /// 注销提交按钮 + /// Unregisters a submit button + /// + /// + internal void UnregisterAsyncSubmitButton(ButtonBase button) + { + AsyncSubmitButtons.Remove(button); + } + private TaskCompletionSource? _tcs; private async Task OnValidSubmitForm(EditContext context) From 871e2ee027aaf7d0b4625661a84db000a9552f3b Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Sat, 18 Apr 2026 16:21:21 +0800 Subject: [PATCH 2/2] =?UTF-8?q?revert:=20=E6=92=A4=E9=94=80=E5=AF=B9=20But?= =?UTF-8?q?tonBase=20=E7=9A=84=E6=9B=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/BootstrapBlazor/Components/Button/ButtonBase.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/BootstrapBlazor/Components/Button/ButtonBase.cs b/src/BootstrapBlazor/Components/Button/ButtonBase.cs index a854bdb69c6..a7aa5c21fb3 100644 --- a/src/BootstrapBlazor/Components/Button/ButtonBase.cs +++ b/src/BootstrapBlazor/Components/Button/ButtonBase.cs @@ -3,6 +3,8 @@ // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone +using Microsoft.AspNetCore.Components.Web; + namespace BootstrapBlazor.Components; /// @@ -63,7 +65,7 @@ public abstract class ButtonBase : TooltipWrapperBase /// Gets or sets the OnClick event /// [Parameter] - public EventCallback OnClick { get; set; } + public EventCallback OnClick { get; set; } /// /// 获得/设置 OnClick 事件不刷新父组件 @@ -334,7 +336,7 @@ protected override async ValueTask DisposeAsync(bool disposing) { if (OnClick.HasDelegate) { - OnClick = EventCallback.Empty; + OnClick = EventCallback.Empty; } if (IsAsync && ValidateForm != null)