Created
September 16, 2017 21:33
-
-
Save afontcu/fde8512e2f2f9ced9c557e22cb15f614 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div v-lazy:background-image="image" class="c-lazy-background"> | |
<slot></slot> | |
</div> | |
</template> | |
<script> | |
import Vue from 'vue' | |
import VueLazyload from 'vue-lazyload' | |
Vue.use(VueLazyload) | |
export default { | |
name: 'LazyBackground', | |
props: { | |
image: { | |
type: Object, | |
required: true | |
} | |
} | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment