[Improvement] CellSwipe: add open method (#1546)

This commit is contained in:
neverland
2018-07-26 21:50:59 +08:00
committed by GitHub
parent f1a5a73124
commit 2c536b7d4a
3 changed files with 30 additions and 6 deletions
+11 -1
View File
@@ -73,7 +73,17 @@ export default {
| right | 右侧滑动内容 |
### onClose 参数
| 参数 | 类型 | 说明 |
|-----------|-----------|-----------|
| clickPosition | `String` | 关闭时的点击位置 (`left` `right` `cell` `outside`) |
| instance | `Object` | CellSwipe 实例,挂载有 close 方法 |
| instance | `Object` | CellSwipe 实例 |
### 方法
通过 ref 可以获取到 CellSwipe 实例并调用实例方法
| 方法名 | 参数 | 返回值 | 介绍 |
|-----------|-----------|-----------|-------------|
| open | position: 'left' \| 'right' | - | 打开单元格侧边栏 |
| close | - | - | 收起单元格侧边栏 |