mirror of
https://gitee.com/ant-design-blazor/ant-design-blazor.git
synced 2024-12-16 01:41:14 +08:00
39 lines
907 B
C#
39 lines
907 B
C#
|
@namespace AntDesign
|
|||
|
@inherits AntDomComponentBase
|
|||
|
|
|||
|
@if (IsRealDisplay)
|
|||
|
{
|
|||
|
<CascadingValue Value="this" Name="SelfNode">
|
|||
|
<div @key="NodeId" class="@TreeNodeClassMapper.Class">
|
|||
|
|
|||
|
<TreeIndent TreeLevel="@TreeLevel"></TreeIndent>
|
|||
|
|
|||
|
@if (TreeComponent.ShowExpand)
|
|||
|
{
|
|||
|
<TreeNodeSwitcher OnSwitcherClick="OnSwitcherClick"></TreeNodeSwitcher>
|
|||
|
}
|
|||
|
|
|||
|
@if (TreeComponent.Checkable)
|
|||
|
{
|
|||
|
<TreeNodeCheckbox OnCheckBoxClick="OnCheckBoxClick"></TreeNodeCheckbox>
|
|||
|
}
|
|||
|
|
|||
|
<TreeNodeTitle></TreeNodeTitle>
|
|||
|
|
|||
|
</div>
|
|||
|
</CascadingValue>
|
|||
|
}
|
|||
|
<CascadingValue Value="this" Name="Node">
|
|||
|
@if (DataItem != null)
|
|||
|
{
|
|||
|
foreach (var item in ChildDataItems)
|
|||
|
{
|
|||
|
<TreeNode DataItem="@item"></TreeNode>
|
|||
|
}
|
|||
|
}
|
|||
|
else
|
|||
|
{
|
|||
|
@Nodes
|
|||
|
}
|
|||
|
</CascadingValue>
|