<template>
    <div class="loading-container">
        <div class="loading-content">
            <el-icon class="loading-icon" :size="40">
                <Loading />
            </el-icon>
            <p class="loading-text">加载中...</p>
        </div>
    </div>
</template>

<script setup lang="ts">
import { Loading } from '@element-plus/icons-vue'
</script>

<style lang="scss" scoped>
.loading-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.loading-icon {
    animation: rotate 2s linear infinite;
    color: var(--el-color-primary);
}

.loading-text {
    font-size: 16px;
    color: var(--el-text-color-regular);
    margin: 0;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}
</style>