| 1 | <template> |
| 2 | <transition name="loading-fade"> |
| 3 | <div v-if="show" class="splash-screen-loading-box"> |
| 4 | <n-spin :size="80" /> |
| 5 | </div> |
| 6 | </transition> |
| 7 | </template> |
| 8 | |
| 9 | <script lang="ts" setup> |
| 10 | import { NSpin } from "naive-ui" |
| 11 | |
| 12 | const { show } = defineProps<{ |
| 13 | show: boolean |
| 14 | }>() |
| 15 | </script> |
| 16 | |
| 17 | <style scoped lang="scss"> |
| 18 | .splash-screen-loading-box { |
| 19 | position: fixed; |
| 20 | z-index: 99999; |
| 21 | top: 0; |
| 22 | left: 0; |
| 23 | right: 0; |
| 24 | bottom: 0; |
| 25 | width: 100vw; |
| 26 | height: 100vh; |
| 27 | background: rgba(255, 255, 255, 0.2); |
| 28 | backdrop-filter: blur(20px); |
| 29 | display: flex; |
| 30 | align-content: center; |
| 31 | justify-content: center; |
| 32 | align-items: center; |
| 33 | |
| 34 | &.loading-fade-enter-active, |
| 35 | &.loading-fade-leave-active { |
| 36 | transition: opacity 0.5s ease; |
| 37 | } |
| 38 | |
| 39 | &.loading-fade-enter-from, |
| 40 | &.loading-fade-leave-to { |
| 41 | opacity: 0; |
| 42 | } |
| 43 | } |
| 44 | </style> |