Skip to content

Commit

Permalink
fix: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
lareinayanyu committed Dec 17, 2024
1 parent af8b6b6 commit e7fee94
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions packages/webpack-plugin/lib/runtime/components/web/event.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,14 @@ function MpxEvent (layer) {
dataset: parseDataset(event.target.dataset)
})
extendEvent(touchEvent, {
timeStamp: event.timeStamp,
changedTouches,
touches: changedTouches,
detail: {
// pc端点击事件可能没有changedTouches,所以直接从 event 中取
x: changedTouches[0]?.pageX || event.pageX || 0,
y: changedTouches[0]?.pageY || event.pageY || 0
}
timeStamp: event.timeStamp,
changedTouches,
touches: changedTouches,
detail: {
// pc端点击事件可能没有changedTouches,所以直接从 event 中取
x: changedTouches[0]?.pageX || event.pageX || 0,
y: changedTouches[0]?.pageY || event.pageY || 0
}
})
targetElement && targetElement.dispatchEvent(touchEvent)
}
Expand Down

0 comments on commit e7fee94

Please sign in to comment.