Last active
December 22, 2021 07:00
-
-
Save Luke-SNAW/8860c2730247cb92c90dac75271355d2 to your computer and use it in GitHub Desktop.
[Lazy Renderer] #vue
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-if="isTimeToRender"> | |
<slot /> | |
</div> | |
</template> | |
<script> | |
export default { | |
props: { | |
timeToRender: { type: Number, default: 300 }, | |
}, | |
data: () => ({ isTimeToRender: false }), | |
created() { | |
setTimeout(() => { | |
this.isTimeToRender = true | |
}, this.timeToRender) | |
}, | |
} | |
</script> |
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
<script> | |
import LazyRenderer from '@/components/common/lazy-renderer' | |
const HorizontalScroll = () => | |
import( | |
/* webpackChunkName: "CancerDiseasesRest" */ './international-intro__horizontal-scroll.vue' | |
) | |
export default { | |
components: { | |
LazyRenderer, | |
HorizontalScroll, | |
} | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment