<lazy-component wrapper-tag="section" @intersected="optionalDispatch">
<your-component/>
<!-- Optional -->
<template #placeholder>
<span>Loading...</span>
</template>
</lazy-component>
idle variant
....
<button @click="isIntersected = true">Click for Render</button>
<lazy-component :is-intersected="isIntersected" idle>
<your-component/>
<!-- Optional -->
<template #placeholder>
<span>Loading...</span>
</template>
</lazy-component>
placeholder | Content that is loaded as a placeholder until it comes into view |
---|
intersected | dispatch event when visible |
---|
.v-lazy-component.v-lazy-component--loading {
filter: blur(20px);
}
.v-lazy-component.v-lazy-component--loaded {
filter: blur(0);
transition: filter 1s;
}