2020-11-27 13:13:26 +08:00
|
|
|
|
@using AntDesign.Select.Internal
|
|
|
|
|
@namespace AntDesign
|
2020-06-14 18:54:14 +08:00
|
|
|
|
@inherits AntDomComponentBase
|
2020-11-27 13:13:26 +08:00
|
|
|
|
@typeparam TItemValue
|
|
|
|
|
@typeparam TItem
|
|
|
|
|
<div @ref="Ref"
|
|
|
|
|
@key="@this"
|
|
|
|
|
class="@ClassMapper.Class"
|
|
|
|
|
role="option"
|
|
|
|
|
aria-selected="@IsSelected"
|
|
|
|
|
style="@InnerStyle"
|
|
|
|
|
@onclick="@OnClick"
|
2021-02-04 23:40:47 +08:00
|
|
|
|
@onmouseenter="@OnMouseEnter">
|
2020-11-27 13:13:26 +08:00
|
|
|
|
<div class="@ClassPrefix-content">
|
|
|
|
|
@if (ItemTemplate != null)
|
|
|
|
|
{
|
|
|
|
|
@ItemTemplate(Model.Item)
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
@InternalLabel
|
|
|
|
|
}
|
|
|
|
|
</div>
|
2020-06-14 18:54:14 +08:00
|
|
|
|
@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">
|
2020-11-27 13:13:26 +08:00
|
|
|
|
<Icon Type="check"></Icon>
|
2020-06-14 18:54:14 +08:00
|
|
|
|
</span>
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
}
|
2020-11-27 13:13:26 +08:00
|
|
|
|
</div>
|