1
0
mirror of https://gitee.com/vant-contrib/vant-weapp.git synced 2025-04-06 03:58:05 +08:00

docs: update cell ()

This commit is contained in:
neverland 2019-08-30 11:53:49 +08:00 committed by GitHub
parent 6c10c8177a
commit f382d98a90
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 6 deletions
example/pages/cell
packages/cell

@ -68,14 +68,13 @@
</van-cell-group>
</demo-block>
<demo-block title="高级用法">
<demo-block title="使用插槽">
<van-cell value="内容" icon="shop-o" is-link>
<view slot="title">
<view class="title">单元格</view>
<van-tag type="danger">标签</van-tag>
</view>
</van-cell>
<van-cell title="单元格" icon="location-o" is-link />
<van-cell title="单元格" border="{{ false }}">
<van-icon slot="right-icon" name="search" />
</van-cell>

@ -44,7 +44,7 @@
### 展示箭头
传入`is-link`属性则会在右侧显示箭头,并且可以通过传入`arrow-direction`属性控制箭头方向
设置`is-link`属性后会在单元格右侧显示箭头,并且可以通过`arrow-direction`属性控制箭头方向
```html
<van-cell title="单元格" is-link />
@ -78,9 +78,9 @@
</van-cell-group>
```
### 高级用法
### 使用插槽
如以上用法不能满足你的需求,可以使用对应的插槽来自定义显示的内容
如以上用法不能满足你的需求,可以使用插槽来自定义内容
```html
<van-cell value="内容" icon="shop-o" is-link>
@ -137,7 +137,7 @@
| 名称 | 说明 |
|-----------|-----------|
| - | 自定义`value`显示内容,如果设置了`value`属性则不生效 |
| default | 自定义`value`显示内容,如果设置了`value`属性则不生效 |
| title | 自定义`title`显示内容,如果设置了`title`属性则不生效 |
| label | 自定义`label`显示内容,需要设置 `use-label-slot`属性 |
| icon | 自定义`icon`显示内容,如果设置了`icon`属性则不生效 |