vue-lazy-input
A Vue.js directive for lazily binding @input events (v-model)
Table of contents
Installation
bundler
npm i --save vue-lazy-input
browser
<!-- dependency -->
What it does
It wraps existing @input event listeners bound on a custom component or DOM element with either lodash debounce or throttle.
v-lazy-input must be coupled with either a v-model directive or an @input event listener, or both. On its own it does nothing.
Syntax
v-lazy-input:type="duration"
type is either debounce, throttle or sync (fires immediately), default is debounce.
duration is a number, default is 500.
Hence v-lazy-input
with no type nor duration is equivalent to v-lazy-input:debounce="500"
Example usage
<!-- with global registration --> <!-- with local registration -->