[Doc] new theme

This commit is contained in:
陈嘉涵
2019-05-15 20:53:04 +08:00
parent 3cae4288f2
commit d0f4169c86
130 changed files with 1460 additions and 1147 deletions
+11 -8
View File
@@ -1,15 +1,16 @@
## Switch
# Switch
### Install
``` javascript
import { Switch } from 'vant';
Vue.use(Switch);
```
### Usage
## Usage
#### Basic Usage
### Basic Usage
```html
<van-switch v-model="checked" />
@@ -25,7 +26,7 @@ export default {
};
```
#### Disabled
### Disabled
```html
<van-switch
@@ -34,7 +35,7 @@ export default {
/>
```
#### Loading
### Loading
```html
<van-switch
@@ -43,7 +44,7 @@ export default {
/>
```
#### Custom Size
### Custom Size
```html
<van-switch
@@ -52,7 +53,7 @@ export default {
/>
```
#### Custom Color
### Custom Color
```html
<van-switch
@@ -62,7 +63,7 @@ export default {
/>
```
#### Async Control
### Async Control
```html
<van-switch
@@ -92,6 +93,8 @@ export default {
};
```
## API
### Props
| Attribute | Description | Type | Default |