Skip to content

Commit

Permalink
fix(PullRefresh): avoid Vue 2.6 event bubble issues (#5347)
Browse files Browse the repository at this point in the history
  • Loading branch information
chenjiahan committed Dec 22, 2019
1 parent 6ed535c commit 6a20400
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
2 changes: 1 addition & 1 deletion packages/vant-cli/site/mobile/components/DemoSection.vue
Expand Up @@ -26,7 +26,7 @@ export default {
<style lang="less">
.van-doc-demo-section {
box-sizing: border-box;
min-height: 100vh;
min-height: calc(100vh - 56px);
padding-bottom: 20px;
}
</style>
10 changes: 2 additions & 8 deletions src/pull-refresh/index.js
Expand Up @@ -64,6 +64,7 @@ export default createComponent({
},

mounted() {
this.bindTouchEvent(this.$refs.track);
this.scrollEl = getScrollEventTarget(this.$el);
},

Expand Down Expand Up @@ -162,14 +163,7 @@ export default createComponent({

return (
<div class={bem()}>
<div
class={bem('track')}
style={style}
onTouchstart={this.onTouchStart}
onTouchmove={this.onTouchMove}
onTouchend={this.onTouchEnd}
onTouchcancel={this.onTouchEnd}
>
<div ref="track" class={bem('track')} style={style}>
<div class={bem('head')}>{Status}</div>
{this.slots()}
</div>
Expand Down

0 comments on commit 6a20400

Please sign in to comment.