Quellcode durchsuchen

rename component Loading to LoadingScreen and add a new Loading

Olivier Massot vor 3 Jahren
Ursprung
Commit
c531cf1a08
3 geänderte Dateien mit 30 neuen und 1 gelöschten Zeilen
  1. 0 0
      components/Layout/LoadingScreen.vue
  2. 29 0
      components/Ui/Loading.vue
  3. 1 1
      config/nuxtConfig/build.js

+ 0 - 0
components/Layout/Loading.vue → components/Layout/LoadingScreen.vue


+ 29 - 0
components/Ui/Loading.vue

@@ -0,0 +1,29 @@
+<!-- Animation circulaire à afficher durant les chargements -->
+
+<template>
+  <v-progress-circular
+    indeterminate
+    :size="size"
+  />
+</template>
+
+<script lang="ts">
+import { defineComponent, ref, Ref } from '@nuxtjs/composition-api'
+
+export default defineComponent({
+  props: {
+    size: {
+      type: Number,
+      required: false,
+      default: 32
+    }
+  },
+  setup (props) {
+    const size: Ref<number> = ref(props.size)
+
+    return {
+      size
+    }
+  }
+})
+</script>

+ 1 - 1
config/nuxtConfig/build.js

@@ -7,7 +7,7 @@ export default {
   // Auto import components (https://go.nuxtjs.dev/config-components)
   components: true,
 
-  loading: '~/components/Layout/Loading.vue',
+  loading: '~/components/Layout/LoadingScreen.vue',
 
   // Build Configuration (https://go.nuxtjs.dev/config-build)
   build: {