jiaqingjiayi-xiaochengxu/甲情_甲意/miniprogram/node_modules/antd-mini/es/Switch/index.axml
2024-11-10 15:01:22 +08:00

13 lines
645 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">
<icon type="UndoOutline" a:if="{{loading}}" className="ant-switch-loading-icon"/>
</view>
<view class="ant-switch-inner">
<slot name="checkedText" a:if="{{mixin.value}}">{{checkedText}}</slot>
<slot name="uncheckedText" a:else>{{uncheckedText}}</slot>
</view>
</view>