docs: update some examples of button and cell

This commit is contained in:
linrz
2019-12-29 21:21:24 +08:00
committed by neverland
parent abdc38eeee
commit 1b18c15d28
7 changed files with 16 additions and 16 deletions
+1 -1
View File
@@ -97,7 +97,7 @@ Vue.use(Cell).use(CellGroup);
### Vertical Center
```html
<van-cell center title="Cell title" value="Multiple lines content, multiple lines content" />
<van-cell center title="Cell title" value="Content" label="Description" />
```
## API
+2 -2
View File
@@ -104,10 +104,10 @@ Vue.use(Cell).use(CellGroup);
### 垂直居中
通过`center`属性在多行文本时控制左侧标题垂直居中
通过`center`属性可以让`Cell`的左右内容都垂直居中
```html
<van-cell center title="单元格" value="多行内容多行内容多行内容多行内容" />
<van-cell center title="单元格" value="内容" label="描述信息" />
```
+3 -5
View File
@@ -56,7 +56,7 @@
</demo-block>
<demo-block :title="$t('verticalCenter')">
<van-cell center :title="$t('cell')" :value="$t('multipleLinesContent')" />
<van-cell center :title="$t('cell')" :value="$t('content')" :label="$t('desc')" />
</demo-block>
</demo-section>
</template>
@@ -76,8 +76,7 @@ export default {
urlRoute: 'URL 跳转',
vueRoute: '路由跳转',
useSlots: '使用插槽',
verticalCenter: '垂直居中',
multipleLinesContent: '多行内容多行内容多行内容多行内容',
verticalCenter: '垂直居中'
},
'en-US': {
cell: 'Cell title',
@@ -91,8 +90,7 @@ export default {
urlRoute: 'URL',
vueRoute: 'Vue Router',
useSlots: 'Use Slots',
verticalCenter: 'Vertical center',
multipleLinesContent: 'Multiple lines content, multiple lines content'
verticalCenter: 'Vertical center'
}
}
};
@@ -100,8 +100,10 @@ exports[`renders demo correctly 1`] = `
</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 class="van-cell__title"><span>单元格</span>
<div class="van-cell__label">描述信息</div>
</div>
<div class="van-cell__value"><span>内容</span></div>
</div>
</div>
</div>