2020-10-09 15:13:32 +08:00
|
|
|
|
@namespace AntDesign
|
2021-01-10 18:49:52 +08:00
|
|
|
|
@inherits ComponentBase
|
2020-12-30 18:38:35 +08:00
|
|
|
|
@typeparam TItem
|
2020-10-09 15:13:32 +08:00
|
|
|
|
|
|
|
|
|
<span class="@ClassMapper.Class" @onclick="OnClick">
|
|
|
|
|
@if (IsShowSwitchIcon)
|
|
|
|
|
{
|
2021-01-07 00:41:26 +08:00
|
|
|
|
@if (!SelfNode.Loading)
|
2020-10-09 15:13:32 +08:00
|
|
|
|
{
|
|
|
|
|
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)
|
|
|
|
|
{
|
2021-01-07 00:41:26 +08:00
|
|
|
|
@if (!SelfNode.Loading)
|
2020-10-09 15:13:32 +08:00
|
|
|
|
{
|
|
|
|
|
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>
|