[Doc] add Advanced components english document
This commit is contained in:
WyTiny
2017-10-24 00:30:12 -05:00
committed by neverland
parent 6efaa1e132
commit 7e5dae3221
3 changed files with 57 additions and 56 deletions
+10 -10
View File
@@ -1,6 +1,6 @@
## SwitchCell
`SwitchCell`组件是对`Switch``Cell`组件的封装
`SwitchCell` component is an encapsulation of `Switch` and `Cell`.
<script>
export default {
@@ -42,9 +42,9 @@ export default {
:::
#### Disabled
通过`disabled`属性可以将组件设置为禁用状态
use `disabled` property to disable the component
:::demo 禁用状态
:::demo Disabled component
```html
<van-cell-group>
<van-switch-cell v-model="checked" :disabled="true" title="标题" />
@@ -53,9 +53,9 @@ export default {
:::
#### Loading
通过`loading`属性可以将组件设置为加载状态
use `loading` property to keep component in loading state
:::demo 加载状态
:::demo Component in loading
```html
<van-cell-group>
<van-switch-cell v-model="checked" :loading="true" title="标题" />
@@ -67,13 +67,13 @@ export default {
| Attribute | Description | Type | Default | Accepted Values |
|-----------|-----------|-----------|-------------|-------------|
| v-model | 开关状态 | `Boolean` | - | - |
| title | 左侧标题 | `String` | `''` | - |
| loading | 是否为加载状态 | `Boolean` | `false` | - |
| disabled | 是否为禁用状态 | `Boolean` | `false` | - |
| v-model | on-off state of the switch | `Boolean` | - | - |
| title | the leftside title | `String` | `''` | - |
| loading | whether the component is in loading state | `Boolean` | `false` | - |
| disabled | whether to disable the component | `Boolean` | `false` | - |
### Event
| Event | Description | Attribute |
|-----------|-----------|-----------|
| change | 开关状态切换回调 | checked: 是否选中开关 |
| change | triggered when the on-off state is changed | checked: switch is on or not |