You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
627 B

  1. <template lang="pug">
  2. transition(name='alert', enter-active-class="animated zoomIn", leave-active-class="animated fadeOutRight")
  3. .alert(v-if='shown', v-bind:class='style')
  4. .alert-icon: i(v-bind:class='icon')
  5. .alert-msg {{ msg }}
  6. </template>
  7. <script>
  8. export default {
  9. name: 'alert',
  10. data () {
  11. return {}
  12. },
  13. computed: {
  14. shown() { return this.$store.state.alert.shown },
  15. style() { return 'is-' + this.$store.state.alert.style },
  16. icon() { return 'nc-icon-outline ' + this.$store.state.alert.icon },
  17. msg() { return this.$store.state.alert.msg },
  18. }
  19. }
  20. </script>