fix. 로딩 상태 수정

This commit is contained in:
clkim
2025-11-13 12:29:07 +09:00
parent 6765ae905c
commit c92f2e69db
5 changed files with 24 additions and 17 deletions

View File

@@ -194,6 +194,7 @@ onBeforeUnmount(() => {
<BlocksModalToast />
<!-- 로딩 컴포넌트 -->
<AtomsLoadingSimple />
<AtomsLoadingFull />
<AtomsLoadingLocal />
</template>

View File

@@ -3,7 +3,26 @@ interface Props {
isLoading?: boolean
}
const { isLoading = false } = defineProps<Props>()
const isLoading = ref(true)
const router = useRouter()
// 페이지 전환 감지 및 로딩 상태 관리
if (import.meta.client) {
router.beforeEach((to, from) => {
if (from.path !== to.path) {
isLoading.value = true
}
})
router.afterEach(() => {
isLoading.value = false
})
}
onMounted(() => {
isLoading.value = false
})
</script>
<template>
@@ -14,7 +33,7 @@ const { isLoading = false } = defineProps<Props>()
<style scoped>
.spinner-wrap {
@apply absolute inset-0 flex items-center justify-center z-[90];
@apply fixed inset-0 flex items-center justify-center bg-black z-[90];
}
.spinner {
@apply w-[80px] h-[80px] bg-cover bg-center bg-no-repeat bg-[url('/images/common/publisning_template_loader_black.png')];

View File

@@ -65,16 +65,3 @@ onBeforeUnmount(() => {
<template>
<div id="stove-wrap" class="relative h-[48px] z-[5]" />
</template>
<style scoped>
[data-theme='light'] {
#stove-wrap {
@apply bg-white;
}
}
[data-theme='dark'] {
#stove-wrap {
@apply bg-black;
}
}
</style>

View File

@@ -8,7 +8,7 @@ onMounted(() => {
<template>
<LayoutsHeader />
<main class="relative">
<main class="main-default relative">
<slot />
</main>
<LayoutsFooter />

View File

@@ -2,7 +2,7 @@
<template>
<LayoutsHeader />
<main class="relative">
<main class="main-promotion relative">
<BlocksButtonHome />
<LayoutsEventNavigation />
<slot />