diff --git a/src/BootstrapBlazor/BootstrapBlazor.csproj b/src/BootstrapBlazor/BootstrapBlazor.csproj index 77af704ec30..3d9e6b24abe 100644 --- a/src/BootstrapBlazor/BootstrapBlazor.csproj +++ b/src/BootstrapBlazor/BootstrapBlazor.csproj @@ -1,7 +1,7 @@ - 7.4.3-beta06 + 7.4.3-beta07 diff --git a/src/BootstrapBlazor/Components/Switch/Switch.razor.cs b/src/BootstrapBlazor/Components/Switch/Switch.razor.cs index 581b009d679..58c493dba61 100644 --- a/src/BootstrapBlazor/Components/Switch/Switch.razor.cs +++ b/src/BootstrapBlazor/Components/Switch/Switch.razor.cs @@ -130,7 +130,10 @@ private async Task OnClick() } // 回调 OnValueChanged 再调用 EventCallback - OnValueChanged?.Invoke(Value); + if (OnValueChanged != null) + { + await OnValueChanged(Value); + } } } }