Showing dismissed alert



  • I placed a <q-alert> in the template, it only show up when the errorMessage is not emprty.

                <q-alert v-show="errorMessage" key="negative" color="negative" dismissible class="full-width" style="margin-bottom: 1.5rem">
                    {{errorMessage}}
                </q-alert>
    

    When a user closes this alert, and if there is new errorMessage, I want the alert show up again.

    So my question is: how to make the dismissed alert show up?



  • you should probably be using Alert.create()

    Edit:
    Per docs, you can use the v-model for this. So:

                <q-alert v-model="showErrorMessage" @input="" key="negative" color="negative" dismissible class="full-width" style="margin-bottom: 1.5rem">
                    {{errorMessage}}
                </q-alert>
    


  • @benoitranque Thanks. I finally go with Alert.create().


Log in to reply
 

Looks like your connection to Quasar Framework was lost, please wait while we try to reconnect.