Skip to content

Commit

Permalink
fix(SwipeCell): avoid Vue 2.6 event bubble issues (#5348)
Browse files Browse the repository at this point in the history
  • Loading branch information
chenjiahan committed Dec 22, 2019
1 parent 6a20400 commit e037082
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions src/swipe-cell/index.js
Expand Up @@ -48,6 +48,10 @@ export default createComponent({
}
},

mounted() {
this.bindTouchEvent(this.$el);
},

methods: {
getWidthByRef(ref) {
if (this.$refs[ref]) {
Expand Down Expand Up @@ -227,14 +231,7 @@ export default createComponent({
};

return (
<div
class={bem()}
onClick={this.getClickHandler('cell')}
onTouchstart={this.onTouchStart}
onTouchmove={this.onTouchMove}
onTouchend={this.onTouchEnd}
onTouchcancel={this.onTouchEnd}
>
<div class={bem()} onClick={this.getClickHandler('cell')}>
<div class={bem('wrapper')} style={wrapperStyle}>
{this.genLeftPart()}
{this.slots()}
Expand Down

0 comments on commit e037082

Please sign in to comment.