| 123456789101112131415161718192021222324252627282930313233343536373839404142 |
- <template>
- <main class="alertContainer">
- <LayoutAlertContent
- class="alertContent"
- v-for="(alert, key) in alerts"
- :key="key"
- :alert="alert"
- />
- </main>
- </template>
- <script lang="ts">
- import {defineComponent, computed} from "@vue/composition-api";
- import {useContext} from "@nuxtjs/composition-api";
- export default defineComponent({
- setup() {
- const {store} = useContext()
- const alerts = computed(() => {
- return store.state.page.alerts
- })
- return {
- alerts
- }
- }
- })
- </script>
- <style scoped>
- .alertContainer {
- position: fixed;
- bottom: 0;
- right: 20px;
- z-index: 100;
- }
- .alertContainer > .alertContent {
- position: relative;
- margin-bottom: 10px;
- }
- </style>
|