[improvement] SwipeCell: add click event (#1848)

This commit is contained in:
neverland 2018-09-23 15:30:52 +08:00 committed by GitHub
parent 40d965db67
commit 86c1d255f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 0 deletions

View File

@ -72,6 +72,12 @@ export default {
| left | content of left scrollable area |
| right | content of right scrollabe area |
### Event
| Event | Description | Arguments |
|-----------|-----------|-----------|
| click | Triggered when clicked | Click positon (`left` `right` `cell` `outside`) |
### onClose Params
| Argument | Type | Description |

View File

@ -137,6 +137,8 @@ export default create({
},
onClick(position = 'outside') {
this.$emit('click', position);
if (!this.offset) {
return;
}

View File

@ -72,6 +72,12 @@ export default {
| left | 左侧滑动内容 |
| right | 右侧滑动内容 |
### Event
| 事件名 | 说明 | 参数 |
|-----------|-----------|-----------|
| click | 点击时触发 | 关闭时的点击位置 (`left` `right` `cell` `outside`) |
### onClose 参数
| 参数 | 类型 | 说明 |