Jelajahi Sumber

rename component Loading to LoadingScreen and add a new Loading

Olivier Massot 3 tahun lalu
induk
melakukan
c531cf1a08

+ 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: {