srcdev-nuxt-components 2.2.2 → 2.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<p>Loading gallery...</p>
|
|
6
6
|
</div>
|
|
7
7
|
|
|
8
|
-
<div class="gallery-content" :class="[{ loaded: isLoading }]">
|
|
8
|
+
<div v-if="showGallery" class="gallery-content" :class="[{ loaded: isLoading }]">
|
|
9
9
|
<div class="list" ref="sliderGalleryImagesList">
|
|
10
10
|
<div v-for="(item, index) in galleryData" :key="index" class="item">
|
|
11
11
|
<img :src="item.src" :alt="item.alt" @load="handleImageLoad(index)" @error="handleImageError(index)" loading="lazy" />
|
|
@@ -84,6 +84,7 @@ const sliderGalleryImagesList = useTemplateRef('sliderGalleryImagesList');
|
|
|
84
84
|
const sliderGalleryThumbnailsList = useTemplateRef('sliderGalleryThumbnailsList');
|
|
85
85
|
|
|
86
86
|
const isLoading = ref(true);
|
|
87
|
+
const showGallery = ref(false);
|
|
87
88
|
const loadedImages = ref<Set<number>>(new Set());
|
|
88
89
|
const preloadedImages = ref<Array<HTMLImageElement>>([]);
|
|
89
90
|
|
|
@@ -231,6 +232,10 @@ onBeforeUnmount(() => {
|
|
|
231
232
|
clearTimeout(runTimeOut);
|
|
232
233
|
clearTimeout(runNextAuto);
|
|
233
234
|
});
|
|
235
|
+
|
|
236
|
+
onMounted(() => {
|
|
237
|
+
showGallery.value = true;
|
|
238
|
+
});
|
|
234
239
|
</script>
|
|
235
240
|
|
|
236
241
|
<style lang="css">
|
package/package.json
CHANGED