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


    

这样多次调用即完美解决


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM