2020-05-29 00:33:49 +08:00
|
|
|
@namespace AntDesign
|
2020-05-28 15:44:07 +08:00
|
|
|
@inherits AntDomComponentBase
|
|
|
|
|
|
|
|
<span class="@ClassMapper.Class" @ref="Ref" id="@Id">
|
|
|
|
@if (ChildContent != null)
|
|
|
|
{
|
|
|
|
@ChildContent
|
|
|
|
}
|
|
|
|
|
2020-09-23 16:00:03 +08:00
|
|
|
@if (HasStatusOrColor && ChildContent == null)
|
2020-05-28 15:44:07 +08:00
|
|
|
{
|
2021-05-17 00:40:52 +08:00
|
|
|
<span class="@($"ant-badge-status-dot {(StatusOrPresetColor!=null? $"ant-badge-status-{StatusOrPresetColor.ToLowerInvariant()}":"")}")" style="@DotColorStyle @Style"></span>
|
2020-05-28 15:44:07 +08:00
|
|
|
|
|
|
|
@if (!string.IsNullOrEmpty(Text))
|
|
|
|
{
|
|
|
|
<span class="ant-badge-status-text">@Text</span>
|
|
|
|
}
|
|
|
|
}
|
2020-09-23 16:00:03 +08:00
|
|
|
else if (CountTemplate != null)
|
2020-05-28 15:44:07 +08:00
|
|
|
{
|
|
|
|
<span role="img" class="ant-scroll-number-custom-component">@CountTemplate</span>
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
@if (!string.IsNullOrEmpty(Text))
|
|
|
|
{
|
|
|
|
<span class="ant-badge-status-text">@Text</span>
|
|
|
|
}
|
2020-09-16 13:58:16 +08:00
|
|
|
if (_showSup)
|
2020-05-28 15:44:07 +08:00
|
|
|
{
|
2020-09-23 16:00:03 +08:00
|
|
|
<sup class="@CountClassMapper.Class" style="@CountStyle @DotColorStyle @Style" title="@Count">
|
2021-03-07 17:54:40 +08:00
|
|
|
@if (!Dot && !HasStatusOrColor)
|
2020-05-28 15:44:07 +08:00
|
|
|
{
|
2020-09-16 13:58:16 +08:00
|
|
|
@if (Count <= OverflowCount)
|
2020-05-28 15:44:07 +08:00
|
|
|
{
|
|
|
|
@for (int i = 0; i < _maxNumberArray.Length; i++)
|
|
|
|
{
|
|
|
|
@if (_countArray.Length > i)
|
|
|
|
{
|
|
|
|
<span class="ant-scroll-number-only" style="transform: @($"translateY(-{_countArray[i] * 100}%)")">
|
|
|
|
@foreach (var p in _countSingleArray)
|
|
|
|
{
|
|
|
|
<p class="ant-scroll-number-only-unit @(p == _countArray[i] ? "current" : "")">
|
|
|
|
@p
|
|
|
|
</p>
|
|
|
|
}
|
|
|
|
</span>
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
@($"{OverflowCount}+")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</sup>
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</span>
|