[Improvement] CellGroup add 'border' prop (#420)

This commit is contained in:
neverland 2017-12-12 20:11:34 +08:00 committed by GitHub
parent c455301129
commit 51ce4d0843
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 23 additions and 4 deletions

View File

@ -63,7 +63,13 @@ Vue.use(CellGroup);
</van-cell-group>
```
### API
### CellGroup API
| Attribute | Description | Type | Default | Accepted Values |
|-----------|-----------|-----------|-------------|-------------|
| border | Whether to show outer border | `Boolean` | `true` | - |
### Cell API
| Attribute | Description | Type | Default | Accepted Values |
|-----------|-----------|-----------|-------------|-------------|

View File

@ -70,7 +70,13 @@ Vue.use(CellGroup);
</van-cell-group>
```
### API
### CellGroup API
| 参数 | 说明 | 类型 | 默认值 | 可选值 |
|-----------|-----------|-----------|-------------|-------------|
| border | 是否显示外边框 | `Boolean` | `true` | - |
### Cell API
| 参数 | 说明 | 类型 | 默认值 | 可选值 |
|-----------|-----------|-----------|-------------|-------------|

View File

@ -1,5 +1,5 @@
<template>
<div class="van-cell-group van-hairline--top-bottom">
<div class="van-cell-group" :class="{ 'van-hairline--top-bottom': border }">
<slot></slot>
</div>
</template>
@ -8,6 +8,13 @@
import { create } from '../utils';
export default create({
name: 'van-cell-group'
name: 'van-cell-group',
props: {
border: {
type: Boolean,
default: true
}
}
});
</script>