ant-design-vue/components/switch/demo/text.md

25 lines
465 B
Markdown
Raw Normal View History

2018-02-27 04:14:29 +00:00
<cn>
#### 文字和图标
带有文字和图标。
</cn>
<us>
#### Text & icon
With text and icon.
</us>
```html
<template>
<div>
<a-switch checkedChildren="开" unCheckedChildren="关" defaultChecked/>
<br>
<a-switch checkedChildren="1" unCheckedChildren="0"/>
<br>
<a-switch defaultChecked >
<a-icon type="check" slot="checkedChildren"/>
2018-11-30 05:18:59 +00:00
<a-icon type="close" slot="unCheckedChildren"/>
2018-02-27 04:14:29 +00:00
</a-switch>
</div>
</template>
```