frequi_origin/src/components/ftbot/BotAlerts.vue

36 lines
787 B
Vue
Raw Normal View History

2020-05-11 18:22:23 +00:00
<template>
2020-08-16 13:41:43 +00:00
<div class="bot-alerts">
2020-05-11 18:22:23 +00:00
<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-09-02 18:18:17 +00:00
import { AlertActions } from '@/store/modules/alerts';
import StoreModules from '@/store/storeSubModules';
2020-05-11 18:22:23 +00:00
const alerts = namespace(StoreModules.alerts);
2020-08-09 13:19:16 +00:00
@Component({})
export default class BotAlerts extends Vue {
@alerts.State activeMessages;
2020-09-02 18:18:17 +00:00
@alerts.Action [AlertActions.removeAlert];
2020-08-09 13:19:16 +00:00
closeAlert() {
2020-09-02 18:18:17 +00:00
this[AlertActions.removeAlert]();
2020-08-09 13:19:16 +00:00
}
}
2020-05-11 18:22:23 +00:00
</script>