Home > Software engineering >  Update vue-toast-notification library
Update vue-toast-notification library

Time:03-17

I'm working with vue, I installed vue-toast-notification library.

This is my code:

this.$toast.info(`<i ></i> start`)
looping -> send req and res status
this.$toast.info(`<i ></i> Building... ${status}`)
end looping
this.$toast.info(`done!`)

Every toast building shows on a new line.

I wish to see only the relevant response, I don't want the notification to pop every time. I only wish to see that the update was made successfully.

CodePudding user response:

do you need create const toast like this:

  const toast = this.$toast.default(
     `<i ></i> start`,
      { duration: 0, dismissible: false }
  )

and update like this:

toast.message =`<i ></i> Building... ${status}`

after loop:

toast.message =`done!`
  • Related