fix. 로딩 상태 수정
This commit is contained in:
@@ -194,6 +194,7 @@ onBeforeUnmount(() => {
|
||||
<BlocksModalToast />
|
||||
|
||||
<!-- 로딩 컴포넌트 -->
|
||||
<AtomsLoadingSimple />
|
||||
<AtomsLoadingFull />
|
||||
<AtomsLoadingLocal />
|
||||
</template>
|
||||
|
||||
@@ -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')];
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -8,7 +8,7 @@ onMounted(() => {
|
||||
|
||||
<template>
|
||||
<LayoutsHeader />
|
||||
<main class="relative">
|
||||
<main class="main-default relative">
|
||||
<slot />
|
||||
</main>
|
||||
<LayoutsFooter />
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<template>
|
||||
<LayoutsHeader />
|
||||
<main class="relative">
|
||||
<main class="main-promotion relative">
|
||||
<BlocksButtonHome />
|
||||
<LayoutsEventNavigation />
|
||||
<slot />
|
||||
|
||||
Reference in New Issue
Block a user