LoadingScreen.vue 733 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <!-- Animation circulaire à afficher durant les chargements -->
  2. <template>
  3. <v-overlay :value="loading" class="loading-page">
  4. <v-progress-circular
  5. indeterminate
  6. size="64"
  7. />
  8. </v-overlay>
  9. </template>
  10. <script setup lang="ts">
  11. import {Ref, ref} from "@vue/reactivity";
  12. const loading: Ref<boolean> = ref(false)
  13. const set = (_num: number) => {
  14. loading.value = true
  15. }
  16. const start = () => {
  17. loading.value = true
  18. }
  19. const finish = () => {
  20. loading.value = false
  21. }
  22. const fail = () => {
  23. loading.value = false
  24. }
  25. </script>
  26. <style scoped>
  27. .loading-page {
  28. position: fixed;
  29. top: 0;
  30. left: 0;
  31. width: 100%;
  32. height: 100%;
  33. z-index: 1001!important;
  34. }
  35. </style>