mirror of
https://gitee.com/ant-design-blazor/ant-design-blazor.git
synced 2024-12-05 13:37:35 +08:00
600c8595dc
* feat(module: tree): Add 'Checkable' to TreeNode. * feat(module: tree): Remove the dependency of 'Uncheckable' on 'CheckStrictly'.
43 lines
1.0 KiB
C#
43 lines
1.0 KiB
C#
@namespace AntDesign
|
|
@inherits AntDomComponentBase
|
|
@typeparam TItem
|
|
|
|
@if (RealDisplay)
|
|
{
|
|
<CascadingValue Value="this" Name="SelfNode">
|
|
<div @key="NodeId" class="@ClassMapper.Class" style="@Style">
|
|
|
|
<TreeIndent TreeLevel="@TreeLevel" TItem="TItem"></TreeIndent>
|
|
|
|
@if (TreeComponent.ShowExpand)
|
|
{
|
|
<TreeNodeSwitcher OnSwitcherClick="OnSwitcherClick" TItem="TItem"></TreeNodeSwitcher>
|
|
}
|
|
|
|
@if (Checkable)
|
|
{
|
|
<TreeNodeCheckbox OnCheckBoxClick="OnCheckBoxClick" TItem="TItem"></TreeNodeCheckbox>
|
|
}
|
|
|
|
<TreeNodeTitle TItem="TItem"></TreeNodeTitle>
|
|
</div>
|
|
</CascadingValue>
|
|
}
|
|
<CascadingValue Value="this" Name="Node">
|
|
@if (DataItem != null)
|
|
{
|
|
foreach (var item in ChildDataItems)
|
|
{
|
|
<TreeNode DataItem="@item" @key="item.GetHashCode()"></TreeNode>
|
|
}
|
|
}
|
|
else if (ChildContent != null)
|
|
{
|
|
@ChildContent
|
|
}
|
|
else
|
|
{
|
|
@Nodes
|
|
}
|
|
</CascadingValue>
|