Skip to content

usePointerSwipe

类别
导出大小
1.29 kB
最近修改
2 days ago

基于 PointerEvents 的响应式滑动检测。

🌐 Reactive swipe detection based on PointerEvents.

示例

用法

🌐 Usage

vue
<script setup lang="ts">
import { 
usePointerSwipe
} from '@vueuse/core'
import {
useTemplateRef
} from 'vue'
const
el
=
useTemplateRef
('el')
const {
isSwiping
,
direction
} =
usePointerSwipe
(
el
)
</script> <template> <
div
ref
="
el
">
Swipe here </
div
>
</template>