mirror of
https://gitee.com/ant-design-blazor/ant-design-blazor.git
synced 2024-12-16 01:41:14 +08:00
ab19703301
* refactor: remove md of tabs demo * feat: add demos of steps * refactor: tabs demo * fix: icon * refactor: tag Co-authored-by: ElderJames <shunjiey@hotmail.com>
53 lines
1.2 KiB
C#
53 lines
1.2 KiB
C#
@namespace AntDesign
|
|
@inherits AntInputComponentBase<bool>
|
|
|
|
<button type="button" role="switch"
|
|
aria-checked="@(_isChecked?"true":"false")"
|
|
disabled="@Disabled"
|
|
class="@ClassMapper.Class"
|
|
style="@Style"
|
|
ant-click-animating="@(_clickAnimating?"true":"false")"
|
|
@onmouseover="HandleMouseOver"
|
|
@onmouseout="HandleMouseOut"
|
|
@onclick="HandleClick">
|
|
@if (Loading)
|
|
{
|
|
<Icon Type="loading" Class="@($"{_prefixCls}-loading-icon")" />
|
|
}
|
|
<div class="@($"{_prefixCls}-handle")"></div>
|
|
<span class="@($"{_prefixCls}-inner")">
|
|
@if (_isChecked)
|
|
{
|
|
if (CheckedChildren.IsT0)
|
|
{
|
|
@(CheckedChildren.AsT0)
|
|
}
|
|
else
|
|
{
|
|
@(CheckedChildren.AsT1)
|
|
}
|
|
}
|
|
else
|
|
{
|
|
if (UnCheckedChildren.IsT0)
|
|
{
|
|
@(UnCheckedChildren.AsT0)
|
|
}
|
|
else
|
|
{
|
|
@(UnCheckedChildren.AsT1)
|
|
}
|
|
}
|
|
</span>
|
|
|
|
<!--animation-->
|
|
@if (_isChecked)
|
|
{
|
|
<div class="ant-click-animating-node"></div>
|
|
}
|
|
else
|
|
{
|
|
<div class="ant-click-animating-node"></div>
|
|
}
|
|
</button>
|