File tree Expand file tree Collapse file tree 3 files changed +3
-14
lines changed
src/BootstrapBlazor/Components/Button Expand file tree Collapse file tree 3 files changed +3
-14
lines changed Original file line number Diff line number Diff line change @@ -50,14 +50,7 @@ protected virtual async Task OnClickButton()
5050 IsDisabled = true ;
5151 }
5252
53- if ( IsAsync )
54- {
55- await Task . Run ( ( ) => InvokeAsync ( HandlerClick ) ) ;
56- }
57- else
58- {
59- await HandlerClick ( ) ;
60- }
53+ await HandlerClick ( ) ;
6154
6255 // 恢复按钮
6356 if ( IsAsync && ButtonType == ButtonType . Button )
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ protected override async Task OnClickButton()
3636 IsAsyncLoading = true ;
3737 IsDisabled = true ;
3838
39- await Task . Run ( ( ) => InvokeAsync ( HandlerClick ) ) ;
39+ await HandlerClick ( ) ;
4040 await UpdateCount ( ) ;
4141
4242 IsDisabled = false ;
Original file line number Diff line number Diff line change @@ -99,11 +99,7 @@ private async Task OnClickConfirm()
9999 IsDisabled = true ;
100100 IsAsyncLoading = true ;
101101 StateHasChanged ( ) ;
102-
103- if ( OnConfirm != null )
104- {
105- await Task . Run ( ( ) => InvokeAsync ( OnConfirm ) ) ;
106- }
102+ await OnConfirm ( ) ;
107103
108104 if ( ButtonType == ButtonType . Submit )
109105 {
You can’t perform that action at this time.
0 commit comments