ant-design-blazor/components/tree/TreeNodeSwitcher.razor
TimChen 542b66d383 refactor: tree (#672)
* feat: refactor tree

* feat: refactor tree

Co-authored-by: James Yeung <shunjiey@hotmail.com>
2020-10-09 15:13:32 +08:00

49 lines
1.3 KiB
C#

@namespace AntDesign
<span class="@ClassMapper.Class" @onclick="OnClick">
@if (IsShowSwitchIcon)
{
@if (!SelfNode.IsLoading)
{
if (TreeComponent.SwitcherIconTemplate != null)
{
@TreeComponent.SwitcherIconTemplate(SelfNode)
}
else
{
<Icon Type="caret-down" Theme="outline" class="ant-tree-switcher-icon" />
}
}
else
{
<Icon Type="loading" Theme="outline" class="ant-tree-switcher-loading-icon" />
}
}
@if (TreeComponent.ShowLine)
{
@if (!SelfNode.IsLoading)
{
if (TreeComponent.SwitcherIconTemplate != null)
{
@TreeComponent.SwitcherIconTemplate(SelfNode)
}
else
{
@if (IsShowLineIcon)
{
<Icon Type="@(IsSwitcherOpen ? "minus-square" : "plus-square")" Theme="outline" class="ant-tree-switcher-line-icon" />
}
else
{
<Icon Type="file" Theme="outline" class="ant-tree-switcher-line-icon" />
}
}
}
else
{
<Icon Type="loading" Theme="outline" class="ant-tree-switcher-loading-icon" />
}
}
</span>