Define state for loading overlay
This commit is contained in:
@@ -5,6 +5,11 @@
|
||||
import { Swiper, SwiperSlide } from "swiper/vue";
|
||||
import type { SwiperClass } from "swiper/react";
|
||||
import useHomeData from "~/composables/api/home/useHomeData";
|
||||
import type { LoadingOverlayProvideType } from "~/pages/index.vue";
|
||||
|
||||
// provide / inject
|
||||
|
||||
const { changeLoadingOverlay } = inject("loadingOverlay") as LoadingOverlayProvideType;
|
||||
|
||||
// state
|
||||
|
||||
@@ -31,6 +36,7 @@ let gsapTimeline: gsap.core.Timeline;
|
||||
// methods
|
||||
|
||||
const onSwiper = (swiper: SwiperClass) => {
|
||||
changeLoadingOverlay(false);
|
||||
swiper_instance.value = swiper;
|
||||
};
|
||||
|
||||
@@ -105,7 +111,7 @@ onMounted(() => {
|
||||
padding: "0px 80px"
|
||||
}, {
|
||||
padding: "0px 40px"
|
||||
}, "=")
|
||||
}, "=");
|
||||
|
||||
ScrollTrigger.create({
|
||||
trigger: "#header-slider-container",
|
||||
|
||||
Reference in New Issue
Block a user