regulation
v0.1.1
Published
Abstract component to throttle and debounce
Downloads
1
Maintainers
Readme
Regulation
Set up
npm install regulation --save
Usage
main.js
import Vue from 'vue'
import Regulation from 'regulation'
Vue.use(Regulation)
// ...
component.vue
<template>
<!-- set interval zero to take it disabled -->
<Regulation events="input" :delay="500" :interval="0">
<input @input="handleAjaxCheck" />
</Regulation>
</template>
<script>
export default {
methods: {
handleAjaxCheck () {
// some ajax ...
}
}
}
</script>