mirror of
https://gitee.com/ant-design-blazor/ant-design-blazor.git
synced 2024-12-14 17:01:18 +08:00
35 lines
1.1 KiB
C#
35 lines
1.1 KiB
C#
|
@namespace AntDesign
|
|||
|
@inherits AntDomComponentBase
|
|||
|
|
|||
|
<div style="@InnerStyle"
|
|||
|
class="@ClassMapper.Class"
|
|||
|
aria-selected="@IsSelected"
|
|||
|
@onclick:preventDefault
|
|||
|
@onclick:stopPropagation="true"
|
|||
|
@onclick="OnSelectOptionClick"
|
|||
|
@onmouseenter="OnSelectOptionMouseEnter"
|
|||
|
@onmouseleave="OnSelectOptionMouseLeave">
|
|||
|
<div class="@ClassPrefix-content" @ref="_contentRef">@ChildContent</div>
|
|||
|
@switch (SelectParent.SelectMode)
|
|||
|
{
|
|||
|
case SelectMode.Default:
|
|||
|
<span class="@ClassPrefix-state" unselectable="on" aria-hidden="true" style="user-select: none;"></span>
|
|||
|
break;
|
|||
|
default:
|
|||
|
if (IsSelected)
|
|||
|
{
|
|||
|
<span unselectable="on" aria-hidden="true" style="user-select: none;" class="@ClassPrefix-state">
|
|||
|
@if (SelectParent.MenuItemSelectedIcon != null)
|
|||
|
{
|
|||
|
@SelectParent.MenuItemSelectedIcon
|
|||
|
}
|
|||
|
else
|
|||
|
{
|
|||
|
<Icon Type="check"></Icon>
|
|||
|
}
|
|||
|
</span>
|
|||
|
}
|
|||
|
break;
|
|||
|
}
|
|||
|
</div>
|