customLoading.vue 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <template>
  2. <div v-if="getCount > 0" class="loading-container">
  3. <div class="loading-background">
  4. <!-- <v-icon class="cursor-default" color="black" icon="mdi-cow mdi-spin" size="200" style=""></v-icon> -->
  5. <v-progress-circular indeterminate :size="80"></v-progress-circular>
  6. </div>
  7. </div>
  8. </template>
  9. <script setup>
  10. import {useLoadingStore} from "~/stores/loading"
  11. // 로딩 스토어
  12. let store = useLoadingStore()
  13. let { getCount } = storeToRefs(store) // state 의 경우 반응성 유지를 위해 필요
  14. let {$log} = useNuxtApp()
  15. $log.debug('로딩컴포넌트')
  16. </script>
  17. <style lang="scss" scoped>
  18. .loading-container {
  19. z-index: 9999 !important;
  20. position: fixed;
  21. top: 0;
  22. left: 0;
  23. width: 100%;
  24. height: 100%;
  25. .loading-background {
  26. position: absolute;
  27. top: 0;
  28. left: 0;
  29. width: 100%;
  30. height: 100%;
  31. background-color: rgba(0, 0, 0, 0.2);
  32. display: flex;
  33. justify-content: center;
  34. align-items: center;
  35. }
  36. }
  37. </style>