[Doc] SwipeCell: update demo

This commit is contained in:
陈嘉涵
2019-05-29 14:59:51 +08:00
parent 764cad3393
commit 3059f5dcc4
4 changed files with 118 additions and 70 deletions
+36 -12
View File
@@ -13,24 +13,48 @@ Vue.use(SwipeCell);
### 基础用法
```html
<van-swipe-cell :right-width="65" :left-width="65">
<span slot="left">选择</span>
<van-cell-group>
<van-cell title="单元格" value="内容" />
</van-cell-group>
<span slot="right">删除</span>
<van-swipe-cell :right-width="60" :left-width="60">
<van-button
square
slot="left"
type="danger"
text="选择"
/>
<van-cell
:border="false"
title="单元格"
value="内容"
/>
<van-button
square
slot="right"
type="danger"
text="删除"
/>
</van-swipe-cell>
```
### 异步关闭
```html
<van-swipe-cell :right-width="65" :left-width="65" :on-close="onClose">
<span slot="left">选择</span>
<van-cell-group>
<van-cell title="单元格" value="内容" />
</van-cell-group>
<span slot="right">删除</span>
<van-swipe-cell :right-width="60" :left-width="60" :on-close="onClose">
<van-button
square
slot="left"
type="danger"
text="选择"
/>
<van-cell
:border="false"
title="单元格"
value="内容"
/>
<van-button
square
slot="right"
type="danger"
text="删除"
/>
</van-swipe-cell>
```