localhost-front/src/views/LoadingPage.vue
2025-03-07 14:05:34 +09:00

72 lines
1.5 KiB
Vue

<template>
<div v-if="isLoading" class="loading-overlay">
<div class="loading-container">
<div class="spinner">
<img src="/img/icons/loading.png" class="loading-img" />
</div>
<p class="loading-text">LOADING...</p>
</div>
</div>
</template>
<script setup>
import { defineProps } from "vue";
defineProps({
isLoading: Boolean, // 부모 컴포넌트에서 전달받는 로딩 상태
});
</script>
<style scoped>
/* 회색 배경으로 클릭 방지 */
.loading-overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.4); /* 회색 반투명 */
display: flex;
align-items: center;
justify-content: center;
z-index: 9999; /* 가장 위에 위치 */
pointer-events: auto; /* 모든 클릭 방지 */
}
/* 로딩 컨테이너 */
.loading-container {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 20px;
background: none;
border-radius: 10px;
}
.loading-img {
width: 80px; /* 원하는 크기로 조정 */
height: 80px;
}
/* 빙글빙글 돌아가는 스피너 */
.spinner {
font-size: 50px;
animation: spin 2.2s linear infinite;
}
/* 로딩 텍스트 */
.loading-text {
margin-top: 10px;
font-size: 18px;
font-weight: bold;
color: #ffffff;
}
/* 회전 애니메이션 */
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
</style>