frequi_origin/src/components/ftbot/BotAlerts.vue

34 lines
623 B
Vue
Raw Normal View History

2020-05-11 18:22:23 +00:00
<template>
<div>
<b-alert
2020-08-31 15:43:44 +00:00
v-for="(alert, index) in activeMessages"
:key="index"
2020-05-11 18:22:23 +00:00
variant="warning"
dismissible
:show="5"
:value="!!alert.message"
@dismissed="closeAlert"
>
{{ alert.message }}
</b-alert>
</div>
</template>
2020-08-09 13:19:16 +00:00
<script lang="ts">
import { Component, Vue } from 'vue-property-decorator';
import { namespace } from 'vuex-class';
2020-05-11 18:22:23 +00:00
2020-08-09 13:19:16 +00:00
const alerts = namespace('alerts');
@Component({})
export default class BotAlerts extends Vue {
@alerts.State activeMessages;
2020-08-15 15:31:29 +00:00
@alerts.Mutation removeAlert;
2020-08-09 13:19:16 +00:00
closeAlert() {
this.removeAlert();
}
}
2020-05-11 18:22:23 +00:00
</script>