mirror of
https://gitee.com/ant-design-blazor/ant-design-blazor.git
synced 2024-12-09 07:27:34 +08:00
96fc45f4ae
* feat: add Rate * fix: fix two-way binding Co-authored-by: James Yeung <shunjiey@hotmail.com>
24 lines
1.0 KiB
C#
24 lines
1.0 KiB
C#
@namespace AntDesign
|
|
@inherits AntDesign.AntDomComponentBase
|
|
@using Microsoft.AspNetCore.Components;
|
|
|
|
<ul class="@ClassMapper.Class" tabindex="0" role="radiogroup" style="@Style" @ref="Ref" id="@Id"
|
|
@onblur="@Blur"
|
|
@onfocus="@Focus"
|
|
@onkeydown="@KeyDown" @onkeydown:preventDefault
|
|
@onmouseout="@MouseLeave" @onmouseout:stopPropagation>
|
|
@foreach (RateMetaData item in RateMetaDatas)
|
|
{
|
|
<CascadingValue Value="@Character" Name="Character">
|
|
<RateItem AllowHalf="@AllowHalf"
|
|
IndexOfGroup="@item.SerialNumber"
|
|
Tooltip="@item.ToolTipText"
|
|
HoverValue="@_hoverValue"
|
|
HasHalf="@_hasHalf"
|
|
IsFocused="@_isFocused"
|
|
OnItemClick="@(itemIsHalf=>ItemClick(item.SerialNumber,itemIsHalf))"
|
|
OnItemHover="@(itemIshalf=>ItemHoverChange(item.SerialNumber,itemIshalf))" />
|
|
</CascadingValue>
|
|
}
|
|
|
|
</ul> |