jiaqingjiayi-xiaochengxu/甲情_甲意/node_modules/antd-mini/less/Switch/index.axml
2024-11-15 11:51:28 +08:00

21 lines
744 B
XML

<view
class="ant-switch {{className ? className : ''}} ant-switch-{{size}} {{mixin.value ? 'ant-switch-checked' : ''}} {{disabled ? 'ant-switch-disabled' : ''}} {{loading ? 'ant-switch-loading' : ''}}"
style="{{mixin.value && color ? 'background:' + color + '; border-color:' + color : ''}};{{style || ''}}"
onTap="onChange"
>
<view class="ant-switch-handle">
<ant-icon
a:if="{{loading}}"
type="UndoOutline"
className="ant-switch-loading-icon"
></ant-icon>
</view>
<view class="ant-switch-inner">
<block a:if="{{mixin.value}}">
<slot name="checkedText">{{checkedText}}</slot>
</block>
<block a:else>
<slot name="uncheckedText">{{uncheckedText}}</slot>
</block>
</view>
</view>