@mintjamsinc/vue-lazy
v1.2.2
Published
A reusable lazy directive for Vue.js 2.x.
Downloads
9
Readme
vue-lazy
A reusable lazy directive for Vue.js 2.x.
Installation
npm install --save-dev @mintjamsinc/vue-lazy
Usage
import VueLazy from '@mintjamsinc/vue-lazy';
Vue.use(VueLazy);
<img v-lazy:src="image.jpg">
<div v-lazy:background-image="image.jpg"></div>
If you want to register a directive locally:
import {lazy} from '@mintjamsinc/vue-lazy';
export default {
directives: {
lazy,
},
}
License
Copyright (c) 2021 MintJams Inc.