| 123456789101112131415161718192021222324252627282930313233343536373839404142 |
- <!--
- Container principal pour l'affichage d'une ou plusieurs alertes
- -->
- <!-- eslint-disable vue/valid-v-for -->
- <template>
- <main class="alertContainer">
- <client-only>
- <LayoutAlertContent
- v-for="(alert, index) in alerts"
- :key="index"
- :alert="alert"
- class="alertContent"
- />
- </client-only>
- </main>
- </template>
- <script setup lang="ts">
- import { computed } from 'vue'
- import type { Alert } from '~/types/interfaces'
- import { usePageStore } from '~/stores/page'
- const pageStore = usePageStore()
- // Using alerts in the template's v-for directive
- const alerts = computed<Array<Alert>>(() => pageStore.alerts)
- </script>
- <style scoped>
- .alertContainer {
- position: fixed;
- bottom: 0;
- right: 20px;
- z-index: 1000;
- }
- .alertContainer > .alertContent {
- position: relative;
- margin-bottom: 10px;
- }
- </style>
|