无畏无知

博客园 首页 新随笔 联系 订阅 管理

按照官网多次调用会出现这种问题

 

 

 

修改之后

data() {
    return {
      notifyPromise: Promise.resolve()
    }
},
methods: {
    notify(msg) {
      this.notifyPromise =     this.notifyPromise.then(this.$nextTick).then(()=>{
        this.$notify({
          title: "标题",
          message: msg,
          dangerouslyUseHTMLString: true,
          duration: 0,
        })
      })
    },
  }


    

这样多次调用即完美解决

posted on 2019-12-20 10:15  无知才无畏  阅读(1137)  评论(0编辑  收藏  举报