frequi_origin/src/components/ftbot/BotAlerts.vue
2020-08-15 17:31:29 +02:00

34 lines
623 B
Vue

<template>
<div>
<b-alert
variant="warning"
dismissible
:show="5"
v-for="(alert, index) in activeMessages"
:key="index"
:value="!!alert.message"
@dismissed="closeAlert"
>
{{ alert.message }}
</b-alert>
</div>
</template>
<script lang="ts">
import { Component, Vue } from 'vue-property-decorator';
import { namespace } from 'vuex-class';
const alerts = namespace('alerts');
@Component({})
export default class BotAlerts extends Vue {
@alerts.State activeMessages;
@alerts.Mutation removeAlert;
closeAlert() {
this.removeAlert();
}
}
</script>