2020-05-31 22:26:33 +08:00
|
|
|
|
@namespace AntDesign
|
|
|
|
|
@inherits AntDesign.AntDomComponentBase
|
|
|
|
|
|
|
|
|
|
@{
|
|
|
|
|
RenderFragment<RateItem> template = item =>
|
|
|
|
|
@<li class="@item._starClassMapper.Class">
|
|
|
|
|
<div role="radio" aria-checked="true" aria-posinset="@(item.IndexOfGroup + 1)" aria-setsize="5" tabindex="@item.IndexOfGroup">
|
|
|
|
|
<div class="ant-rate-star-first" @onclick="@(async e => await item.OnClick(true))" @onmouseover="@(async e => await item.OnHover(true))">
|
|
|
|
|
@if (@item.Character != null)
|
|
|
|
|
{
|
|
|
|
|
@item.Character.Invoke(new RateItemRenderContext());
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
2020-06-07 19:41:00 +08:00
|
|
|
|
<Icon Type="star" Theme="fill"></Icon>
|
2020-05-31 22:26:33 +08:00
|
|
|
|
}
|
|
|
|
|
</div>
|
|
|
|
|
<div class="ant-rate-star-second" @onclick="@(async e => await item.OnClick(false))" @onmouseover="@(async e => await item.OnHover(false))">
|
|
|
|
|
@if (@item.Character != null)
|
|
|
|
|
{
|
|
|
|
|
@item.Character.Invoke(new RateItemRenderContext());
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
2020-06-07 19:41:00 +08:00
|
|
|
|
<Icon Type="star" Theme="fill"></Icon>
|
2020-05-31 22:26:33 +08:00
|
|
|
|
}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</li>;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@if (string.IsNullOrWhiteSpace(Tooltip))
|
|
|
|
|
{
|
|
|
|
|
@template(this)
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
<Tooltip Title="@Tooltip">
|
|
|
|
|
@template(this)
|
|
|
|
|
</Tooltip>
|
|
|
|
|
}
|