mirror of
https://gitee.com/ant-design-blazor/ant-design-blazor.git
synced 2024-12-15 09:21:24 +08:00
53 lines
1.4 KiB
C#
53 lines
1.4 KiB
C#
@namespace AntDesign
|
|
@inherits AntDomComponentBase
|
|
|
|
@if (Simple)
|
|
{
|
|
@simpleTemplate(this)
|
|
}
|
|
else
|
|
{
|
|
<div class="@WrapperClassMapper.Class">
|
|
<div>
|
|
@simpleTemplate(this)
|
|
</div>
|
|
</div>
|
|
}
|
|
|
|
@code{
|
|
RenderFragment defaultTemplate =
|
|
@<span class="ant-spin-dot ant-spin-dot-spin">
|
|
<i class="ant-spin-dot-item"></i>
|
|
<i class="ant-spin-dot-item"></i>
|
|
<i class="ant-spin-dot-item"></i>
|
|
<i class="ant-spin-dot-item"></i>
|
|
</span>;
|
|
|
|
RenderFragment<Spin> simpleTemplate = spin=>
|
|
@<Template>
|
|
@if (spin._isLoading)
|
|
{
|
|
<div class="@spin.ClassMapper.Class" id="@spin.Id" style="@spin.Style" @ref="spin.Ref">
|
|
@if (spin.Indicator != null)
|
|
{
|
|
@spin.Indicator
|
|
}
|
|
else
|
|
{
|
|
@spin.defaultTemplate
|
|
}
|
|
@if (spin.Tip != null)
|
|
{
|
|
<div class="ant-spin-text">@spin.Tip</div>
|
|
}
|
|
</div>
|
|
}
|
|
|
|
@if (!spin.Simple)
|
|
{
|
|
<div class="ant-spin-container @spin.ContainerClass">
|
|
@spin.ChildContent
|
|
</div>
|
|
}
|
|
</Template>;
|
|
} |