关于element-ui Notification 多次调用重叠问题

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

修改之后

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,
        })
      })
    },
  }


    

这样多次调用即完美解决

猜你喜欢

转载自www.cnblogs.com/yangjunboHTML/p/12071676.html
今日推荐