fix(module: tabs): Exception caused by cascade assignment to TabTemplate (#1708)

This commit is contained in:
James Yeung 2021-07-05 18:40:59 +08:00 committed by GitHub
parent 6705eb23e5
commit 486f6cb6cf

View File

@ -4,11 +4,16 @@
<Tabs Class="@Class" Style="@Style" Id="@Id" HideAdd Type="@TabType.EditableCard" @bind-ActiveKey="@CurrentUrl" OnClose="RemovePage">
@foreach (var item in Pages)
{
<TabPane @key="@item.Url" TabTemplate="@item.Title" Key="@item.Url" Class="@TabPaneClass" Closable ForceRender>
<TabPane @key="@item.Url" Key="@item.Url" Class="@TabPaneClass" Closable ForceRender>
<TabTemplate>
@item.Title
</TabTemplate>
<ChildContent>
@if (Body != null)
{
@Body(item)
}
</ChildContent>
</TabPane>
}
</Tabs>