Skip to content

Commit 97d3e3f

Browse files
committed
refactor: 移除 IHandlerException 接口
1 parent a9b4fd0 commit 97d3e3f

File tree

1 file changed

+1
-22
lines changed

1 file changed

+1
-22
lines changed

src/BootstrapBlazor/Components/Tab/Tab.razor.cs

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ namespace BootstrapBlazor.Components;
1313
/// <summary>
1414
/// Tab component
1515
/// </summary>
16-
public partial class Tab : IHandlerException
16+
public partial class Tab
1717
{
1818
private bool FirstRender { get; set; } = true;
1919

@@ -454,9 +454,6 @@ public partial class Tab : IHandlerException
454454
[NotNull]
455455
private IIconTheme? IconTheme { get; set; }
456456

457-
[Inject, NotNull]
458-
private DialogService? DialogService { get; set; }
459-
460457
[Inject]
461458
[NotNull]
462459
private FullScreenService? FullScreenService { get; set; }
@@ -477,16 +474,6 @@ public partial class Tab : IHandlerException
477474

478475
private bool IsPreventDefault => _contextMenuZone != null;
479476

480-
/// <summary>
481-
/// <inheritdoc/>
482-
/// </summary>
483-
protected override void OnInitialized()
484-
{
485-
base.OnInitialized();
486-
487-
ErrorLogger?.Register(this);
488-
}
489-
490477
/// <summary>
491478
/// <inheritdoc/>
492479
/// </summary>
@@ -1014,13 +1001,6 @@ private RenderFragment RenderTabItemContent(TabItem item) => builder =>
10141001
}
10151002
};
10161003

1017-
/// <summary>
1018-
/// HandlerException 错误处理方法
1019-
/// </summary>
1020-
/// <param name="ex"></param>
1021-
/// <param name="errorContent"></param>
1022-
public Task HandlerException(Exception ex, RenderFragment<Exception> errorContent) => DialogService.ShowErrorHandlerDialog(errorContent(ex));
1023-
10241004
private IEnumerable<MenuItem>? _menuItems;
10251005
private MenuItem? GetMenuItem(string url)
10261006
{
@@ -1228,7 +1208,6 @@ protected override async ValueTask DisposeAsync(bool disposing)
12281208
if (disposing)
12291209
{
12301210
RemoveLocationChanged();
1231-
ErrorLogger?.UnRegister(this);
12321211
}
12331212
}
12341213
}

0 commit comments

Comments
 (0)