frequi_origin/src/components/ftbot/BotAlerts.vue
2022-04-21 07:50:18 +02:00

31 lines
618 B
Vue

<template>
<div class="bot-alerts">
<b-alert
v-for="(alert, index) in alertStore.activeMessages"
:key="index"
variant="warning"
dismissible
:show="5"
:value="!!alert.message"
@dismissed="alertStore.removeAlert"
>
{{ alert.message }}
</b-alert>
</div>
</template>
<script lang="ts">
import { defineComponent } from '@vue/composition-api';
import { useAlertsStore } from '@/stores/alerts';
export default defineComponent({
name: 'BotAlerts',
setup() {
const alertStore = useAlertsStore();
return {
alertStore,
};
},
});
</script>