vue3-directive-long-press
v1.1.0
Published
Vue 3 directive for detection long press
Downloads
63
Readme
vue3-directive-long-press
Detected long press
Features
- Сallback is triggered when the keys are held down for a long time
Installation
npm install vue3-directive-long-press
Usage
App.vue
<template>
<input v-long-press="longPress" />
</template>
<script>
export default {
methods: {
longPress() {
console.log('detect');
}
}
}
</script>
main.ts
import { createApp } from 'vue';
import App from './App.vue';
import LongPress from 'vue3-directive-long-press';
createApp(App)
.use(LongPress)
.mount('#app');
License
MIT License