Skip to content

Commit e67e054

Browse files
committed
refactor: 更新 LayoutId 获得逻辑
1 parent a69cff4 commit e67e054

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -580,7 +580,9 @@ protected override async Task OnAfterRenderAsync(bool firstRender)
580580
/// <inheritdoc/>
581581
/// </summary>
582582
/// <returns></returns>
583-
protected override Task InvokeInitAsync() => InvokeVoidAsync("init", Id, Interop, nameof(DragItemCallback), Layout?.Id);
583+
protected override Task InvokeInitAsync() => InvokeVoidAsync("init", Id, Interop, nameof(DragItemCallback), LayoutId);
584+
585+
private string? LayoutId => Layout is { ShowTabInHeader: true } ? Layout.Id : null;
584586

585587
private void RemoveLocationChanged()
586588
{

0 commit comments

Comments
 (0)