mirror of
https://gitee.com/ant-design-blazor/ant-design-blazor.git
synced 2024-12-16 01:41:14 +08:00
41077bc2fb
* select-rewritten select-rewritten * modul: select - update 1 * select-update2 * select-update3 * select-update 4 * feat: append label tag & auto tokenization * fix: conflict in drpdown demo Co-authored-by: Lars Diederich <diederich@evodata.de> Co-authored-by: ElderJames <shunjiey@hotmail.com>
39 lines
1.1 KiB
C#
39 lines
1.1 KiB
C#
@using AntDesign.Select.Internal
|
|
@namespace AntDesign
|
|
@inherits AntDomComponentBase
|
|
@typeparam TItemValue
|
|
@typeparam TItem
|
|
<div @ref="Ref"
|
|
@key="@this"
|
|
class="@ClassMapper.Class"
|
|
role="option"
|
|
aria-selected="@IsSelected"
|
|
style="@InnerStyle"
|
|
@onclick="@OnClick"
|
|
@onmouseenter="@OnMouseEnter"
|
|
@onmouseleave="@OnMouseLeave">
|
|
<div class="@ClassPrefix-content">
|
|
@if (ItemTemplate != null)
|
|
{
|
|
@ItemTemplate(Model.Item)
|
|
}
|
|
else
|
|
{
|
|
@InternalLabel
|
|
}
|
|
</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">
|
|
<Icon Type="check"></Icon>
|
|
</span>
|
|
}
|
|
break;
|
|
}
|
|
</div> |