[new feature] CellGroup: add title prop (#2928)

This commit is contained in:
neverland
2019-03-09 11:04:58 +08:00
committed by GitHub
parent 2297baa917
commit 4d0e3d6644
6 changed files with 86 additions and 1 deletions
+14
View File
@@ -64,6 +64,19 @@ Vue.use(Cell).use(CellGroup);
<van-cell title="单元格" is-link to="index" />
```
#### 分组标题
通过`CellGroup`的`title`属性可以指定分组标题
```html
<van-cell-group title="分组1">
<van-cell title="单元格" value="内容" />
</van-cell-group>
<van-cell-group title="分组2">
<van-cell title="单元格" value="内容" />
</van-cell-group>
```
#### 高级用法
如以上用法不能满足你的需求,可以使用对应的`slot`来自定义显示的内容
@@ -85,6 +98,7 @@ Vue.use(Cell).use(CellGroup);
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|------|------|------|------|------|
| title | 分组标题 | `String` | `-` | 1.6.9 |
| border | 是否显示外边框 | `Boolean` | `true` | - |
### Cell API