docs: complete some examples of button/cell/checkbox/radio
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -102,6 +102,15 @@ Vue.use(Cell).use(CellGroup);
|
||||
</van-cell>
|
||||
```
|
||||
|
||||
### 垂直居中
|
||||
|
||||
通过`center`属性在多行文本时控制左侧标题垂直居中
|
||||
|
||||
```html
|
||||
<van-cell center title="单元格" value="多行内容多行内容多行内容多行内容" />
|
||||
```
|
||||
|
||||
|
||||
## API
|
||||
|
||||
### CellGroup Props
|
||||
|
||||
+10
-2
@@ -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>
|
||||
`;
|
||||
|
||||
Reference in New Issue
Block a user