mirror of
https://gitee.com/ant-design-blazor/ant-design-blazor.git
synced 2024-12-14 08:51:27 +08:00
f904676578
* Tree: 1.add new node action 2.fixed data sort selection issue 3.add Expand() Collapse() Toggle() * fixed Tree.OnRendered summary * remove the `Is` prefix * refactor(tree): renaming Co-authored-by: 王的强 <wdq@sinotex.cn> Co-authored-by: ElderJames <shunjiey@hotmail.com>
38 lines
1.4 KiB
C#
38 lines
1.4 KiB
C#
@namespace AntDesign
|
|
@inherits AntDomComponentBase
|
|
@typeparam TItem
|
|
|
|
<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.Loading?"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.Loading?"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>
|
|
|