Skip to content

Commit

Permalink
fix(picker): 修复组件事件捕获问题 fix #13696
Browse files Browse the repository at this point in the history
  • Loading branch information
ZakaryCode committed May 29, 2023
1 parent 2f14d84 commit 56e5959
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -193,10 +193,8 @@ export class TaroPickerGroup implements ComponentInterface {
this.handleMoveStart(e.clientY)
}

@Listen('mousemove')
@Listen('mousemove', { capture: true })
onMouseMove (e: MouseEvent) {
e.preventDefault()

if (!this.isMove) return

this.handleMoving(e.clientY)
Expand All @@ -216,10 +214,8 @@ export class TaroPickerGroup implements ComponentInterface {
this.handleMoveStart(e.changedTouches[0].clientY)
}

@Listen('touchmove')
@Listen('touchmove', { capture: true })
onTouchMove (e: TouchEvent) {
e.preventDefault()

this.handleMoving(e.changedTouches[0].clientY)
}

Expand Down

0 comments on commit 56e5959

Please sign in to comment.