mirror of
https://gitee.com/ant-design-blazor/ant-design-blazor.git
synced 2024-12-16 01:41:14 +08:00
542b66d383
* feat: refactor tree * feat: refactor tree Co-authored-by: James Yeung <shunjiey@hotmail.com>
49 lines
1.3 KiB
C#
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> |