click-debounce
v0.0.1
Published
one vue directive for click event debounce. Click on the event will be executed immediately, click on the event will not trigger for a subsequent period of time, continuous clicks will reset the time calculation.
Readme
click debounce
one vue directive for click event debounce. Click on the event will be executed immediately, click on the event will not trigger for a subsequent period of time, continuous clicks will reset the time calculation.
eg:
// use directive
import ClickDebounce from 'click-debounce'
const app = createApp(App)
app.directive('click-debounce', ClickDebounce)// default debounce time is 300ms
<button v-click-debounce @click=""></button>
// use custom debounce time
<button v-click-debounce="500" @click=""></button>