2020-10-09 15:13:32 +08:00
|
|
|
|
@namespace AntDesign
|
|
|
|
|
@inherits AntDomComponentBase
|
2020-12-30 18:38:35 +08:00
|
|
|
|
@typeparam TItem
|
2020-10-09 15:13:32 +08:00
|
|
|
|
|
2021-01-07 00:41:26 +08:00
|
|
|
|
@if (RealDisplay)
|
2020-10-09 15:13:32 +08:00
|
|
|
|
{
|
2021-02-23 15:15:50 +08:00
|
|
|
|
<CascadingValue Value="this" Name="SelfNode">
|
2021-01-10 18:49:52 +08:00
|
|
|
|
<div @key="NodeId" class="@ClassMapper.Class" style="@Style">
|
2020-10-09 15:13:32 +08:00
|
|
|
|
|
2020-12-30 18:38:35 +08:00
|
|
|
|
<TreeIndent TreeLevel="@TreeLevel" TItem="TItem"></TreeIndent>
|
2020-10-09 15:13:32 +08:00
|
|
|
|
|
|
|
|
|
@if (TreeComponent.ShowExpand)
|
|
|
|
|
{
|
2021-01-07 00:41:26 +08:00
|
|
|
|
<TreeNodeSwitcher OnSwitcherClick="OnSwitcherClick" TItem="TItem"></TreeNodeSwitcher>
|
2020-10-09 15:13:32 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@if (TreeComponent.Checkable)
|
|
|
|
|
{
|
2021-01-07 00:41:26 +08:00
|
|
|
|
<TreeNodeCheckbox OnCheckBoxClick="OnCheckBoxClick" TItem="TItem"></TreeNodeCheckbox>
|
2020-10-09 15:13:32 +08:00
|
|
|
|
}
|
|
|
|
|
|
2021-01-07 00:41:26 +08:00
|
|
|
|
<TreeNodeTitle TItem="TItem"></TreeNodeTitle>
|
2020-10-09 15:13:32 +08:00
|
|
|
|
</div>
|
|
|
|
|
</CascadingValue>
|
|
|
|
|
}
|
2021-03-24 21:41:27 +08:00
|
|
|
|
<CascadingValue Value="this" Name="Node">
|
2020-10-09 15:13:32 +08:00
|
|
|
|
@if (DataItem != null)
|
|
|
|
|
{
|
|
|
|
|
foreach (var item in ChildDataItems)
|
|
|
|
|
{
|
2021-01-07 00:41:26 +08:00
|
|
|
|
<TreeNode DataItem="@item" @key="item.GetHashCode()"></TreeNode>
|
2020-10-09 15:13:32 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
@Nodes
|
|
|
|
|
}
|
2021-01-10 18:49:52 +08:00
|
|
|
|
</CascadingValue>
|