2018-12-12 15:52:32 +08:00

50 lines
932 B
Plaintext

<demo-block title="基础用法" padding>
<van-switch
checked="{{ checked }}"
bind:change="onChange"
/>
</demo-block>
<demo-block title="禁用状态" padding>
<van-switch
checked="{{ checked }}"
disabled
bind:change="onChange"
/>
</demo-block>
<demo-block title="加载状态" padding>
<van-switch
checked="{{ checked }}"
loading
bind:change="onChange"
/>
</demo-block>
<demo-block title="自定义大小" padding>
<van-switch
checked="{{ checked }}"
size="24px"
bind:change="onChange"
/>
</demo-block>
<demo-block title="自定义颜色" padding>
<van-switch
checked="{{ checked }}"
active-color="#4b0"
inactive-color="#f44"
bind:change="onChange"
/>
</demo-block>
<demo-block title="异步控制" padding>
<van-switch
checked="{{ checked2 }}"
size="36px"
bind:change="onChange2"
/>
</demo-block>
<van-dialog id="van-dialog" />