[new feature] Cell: add size prop (#2086)

This commit is contained in:
neverland
2018-11-14 17:25:14 +08:00
committed by GitHub
parent 469e8191df
commit 0860901ec1
8 changed files with 229 additions and 144 deletions
+23 -4
View File
@@ -18,11 +18,12 @@ Vue.use(Cell).use(CellGroup);
</van-cell-group>
```
#### Value only
#### Size
```html
<van-cell-group>
<van-cell value="Content" />
<van-cell title="Cell title" value="Content" size="large" />
<van-cell title="Cell title" value="Content" size="large" label="Description" />
</van-cell-group>
```
@@ -34,6 +35,14 @@ Vue.use(Cell).use(CellGroup);
</van-cell-group>
```
#### Value only
```html
<van-cell-group>
<van-cell value="Content" />
</van-cell-group>
```
#### Link
```html
@@ -44,19 +53,28 @@ Vue.use(Cell).use(CellGroup);
</van-cell-group>
```
#### Router
```html
<van-cell-group>
<van-cell title="Cell title" is-link url="//youzan.github.io/vant/mobile.html" />
<van-cell title="Cell title" is-link to="index" />
</van-cell-group>
```
#### Advanced Usage
```html
<van-cell-group>
<van-cell value="Content" icon="shop" is-link>
<template slot="title">
<span class="van-cell-text">Cell title</span>
<span class="custom-text">Cell title</span>
<van-tag type="danger">Tag</van-tag>
</template>
</van-cell>
<van-cell title="Cell title" icon="location" is-link />
<van-cell title="Cell title">
<van-icon slot="right-icon" name="search" class="van-cell__right-icon" />
<van-icon slot="right-icon" name="search" class="custom-icon" />
</van-cell>
</van-cell-group>
```
@@ -75,6 +93,7 @@ Vue.use(Cell).use(CellGroup);
| title | Title | `String | Number` | - |
| value | Right text | `String | Number` | - |
| label | Description below the title | `String` | - |
| size | Sizecan be set to `large` | `String` | - |
| border | Whether to show inner border | `Boolean` | `true` |
| center | Whether to center content vertically | `Boolean` | `true` |
| url | Link URL | `String` | - |