docs: complete some examples of button/cell/checkbox/radio

This commit is contained in:
linrz
2019-12-29 21:21:24 +08:00
committed by neverland
parent 7b905a6de8
commit f0815bc405
16 changed files with 209 additions and 8 deletions
+6
View File
@@ -94,6 +94,12 @@ Vue.use(Cell).use(CellGroup);
</van-cell>
```
### Vertical Center
```html
<van-cell center title="Cell title" value="Multiple lines content, multiple lines content" />
```
## API
### CellGroup Props
+9
View File
@@ -102,6 +102,15 @@ Vue.use(Cell).use(CellGroup);
</van-cell>
```
### 垂直居中
通过`center`属性在多行文本时控制左侧标题垂直居中
```html
<van-cell center title="单元格" value="多行内容多行内容多行内容多行内容" />
```
## API
### CellGroup Props
+10 -2
View File
@@ -54,6 +54,10 @@
</template>
</van-cell>
</demo-block>
<demo-block :title="$t('verticalCenter')">
<van-cell center :title="$t('cell')" :value="$t('multipleLinesContent')" />
</demo-block>
</demo-section>
</template>
@@ -71,7 +75,9 @@ export default {
router: '页面导航',
urlRoute: 'URL 跳转',
vueRoute: '路由跳转',
useSlots: '使用插槽'
useSlots: '使用插槽',
verticalCenter: '垂直居中',
multipleLinesContent: '多行内容多行内容多行内容多行内容',
},
'en-US': {
cell: 'Cell title',
@@ -84,7 +90,9 @@ export default {
router: 'Router',
urlRoute: 'URL',
vueRoute: 'Vue Router',
useSlots: 'Use Slots'
useSlots: 'Use Slots',
verticalCenter: 'Vertical center',
multipleLinesContent: 'Multiple lines content, multiple lines content'
}
}
};
@@ -98,5 +98,11 @@ exports[`renders demo correctly 1`] = `
<!----></i>
</div>
</div>
<div>
<div class="van-cell van-cell--center">
<div class="van-cell__title"><span>单元格</span></div>
<div class="van-cell__value"><span>多行内容多行内容多行内容多行内容</span></div>
</div>
</div>
</div>
`;