[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 |
+12 -9
View File
@@ -1,15 +1,16 @@
## Switch 开关
# Switch 开关
### 引入
### 使用指南
``` javascript
import { Switch } from 'vant';
Vue.use(Switch);
```
### 代码演示
## 代码演示
#### 基础用法
### 基础用法
```html
<van-switch v-model="checked" />
@@ -25,7 +26,7 @@ export default {
};
```
#### 禁用状态
### 禁用状态
```html
<van-switch
@@ -34,7 +35,7 @@ export default {
/>
```
#### 加载状态
### 加载状态
```html
<van-switch
@@ -43,7 +44,7 @@ export default {
/>
```
#### 自定义大小
### 自定义大小
```html
<van-switch
@@ -52,7 +53,7 @@ export default {
/>
```
#### 自定义颜色
### 自定义颜色
```html
<van-switch
@@ -62,7 +63,7 @@ export default {
/>
```
#### 异步控制
### 异步控制
```html
<van-switch
@@ -92,6 +93,8 @@ export default {
};
```
## API
### Props
| 参数 | 说明 | 类型 | 默认值 | 版本 |