[Vuejs]-Vue js error message only shows once. Trying to figure out how to show it everytime there's an error

0👍

In your notification component add v-if and close button with hide function

<div class="ui message" :class="type" v-if="!hidden">
   <i class="close icon" @click="hide"></i>
   <div class="header">
      {{header}}
   </div>
   <slot></slot>
</div>
...
data() {
        return {
            hidden: false
        }
    },
    methods: {
        hide() {
            this.hidden = true
        }
    }

But If message is automatically closed (with some delay), then you should destroy component and emit changes in parent.

Leave a comment