2020-05-29 00:33:49 +08:00
|
|
|
|
@namespace AntDesign
|
2020-05-15 14:31:12 +08:00
|
|
|
|
@inherits AntDomComponentBase
|
|
|
|
|
|
|
|
|
|
@if (Simple)
|
|
|
|
|
{
|
|
|
|
|
@simpleTemplate(this)
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
2021-01-21 17:20:10 +08:00
|
|
|
|
<div class="@WrapperClassMapper.Class" @ref="Ref">
|
2020-05-15 14:31:12 +08:00
|
|
|
|
<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>;
|
|
|
|
|
}
|