2020-10-09 15:13:32 +08:00
|
|
|
|
@namespace AntDesign
|
2020-12-30 18:38:35 +08:00
|
|
|
|
@typeparam TItem
|
2020-10-09 15:13:32 +08:00
|
|
|
|
|
|
|
|
|
<span class="@TitleClassMapper.Class" title="@SelfNode.Title" @onclick="OnClick" @ondblclick="OnDblClick" draggable="@CanDraggable" aria-grabbed="@CanDraggable">
|
|
|
|
|
@if (TreeComponent.TitleIconTemplate != null && TreeComponent.ShowIcon)
|
|
|
|
|
{
|
|
|
|
|
<span class="ant-tree-iconEle @(IsSwitcherOpen?"ant-tree-icon__open":"") @(IsSwitcherClose?"ant-tree-icon__close":"") @(SelfNode.IsLoading?"ant-tree-icon_loading":"")">
|
|
|
|
|
<span class="ant-tree-iconEle ant-tree-icon__customize">
|
|
|
|
|
@TreeComponent.TitleIconTemplate(SelfNode)
|
|
|
|
|
</span>
|
|
|
|
|
</span>
|
|
|
|
|
}
|
|
|
|
|
else if (string.IsNullOrWhiteSpace(SelfNode.Icon) == false && TreeComponent.ShowIcon)
|
|
|
|
|
{
|
|
|
|
|
<span class="ant-tree-iconEle @(IsSwitcherOpen?"ant-tree-icon__open":"") @(IsSwitcherClose?"ant-tree-icon__close":"") @(SelfNode.IsLoading?"ant-tree-icon_loading":"")">
|
|
|
|
|
<span class="ant-tree-iconEle ant-tree-icon__customize">
|
|
|
|
|
@if (string.IsNullOrWhiteSpace(SelfNode.Icon) == false)
|
|
|
|
|
{
|
|
|
|
|
<Icon Type="@SelfNode.Icon" Theme="outline" />
|
|
|
|
|
}
|
|
|
|
|
</span>
|
|
|
|
|
</span>
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@if (TreeComponent.TitleTemplate != null)
|
|
|
|
|
{
|
|
|
|
|
@TreeComponent.TitleTemplate(SelfNode)
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
<span class="ant-tree-title">
|
|
|
|
|
@SelfNode.Title
|
|
|
|
|
</span>
|
|
|
|
|
}
|
|
|
|
|
</span>
|
|
|
|
|
|