|
@@ -188,8 +188,8 @@ export default function useSmoothSwipe({
|
|
|
if (scrollTargetRef) { // todo: 不能用if包裹吧?
|
|
|
watch(scrollTargetRef, (v) => {
|
|
|
if (v) {
|
|
|
- v.addEventListener('touchstart', onTouchStart)
|
|
|
- v.addEventListener('touchmove', onTouchMove)
|
|
|
+ v.addEventListener('touchstart', onTouchStart, { passive: true })
|
|
|
+ v.addEventListener('touchmove', onTouchMove, { passive: true })
|
|
|
v.addEventListener('touchend', onTouchEnd)
|
|
|
v.addEventListener('touchcancel', onTouchCancel)
|
|
|
}
|