美文网首页
Uncaught (in promise) cancel

Uncaught (in promise) cancel

作者: 她与星河皆遗憾 | 来源:发表于2020-11-27 11:09 被阅读0次

Uncaught (in promise) cancel

这是因为你点击了取消或者是关闭弹窗,但是你没有写catch

this.$confirm('确定替换原有数据?', '提示', {
                    type: 'warning'
                }).then(() => {
                      localStorage.setItem('chosedResourceids',"");
                      localStorage.setItem('PaperMsg',"");
                      if( sessionStorage.getItem('PaperMsg')==''){
                          this.$message({
                            message: '替换成功',
                            type: 'success'
                        });
                        this.$router.push({name:'success',query:{customerId:40}})
                      }
                }).catch(() => {});  //一定别忘了这个

相关文章

网友评论

      本文标题:Uncaught (in promise) cancel

      本文链接:https://www.haomeiwen.com/subject/hstkmctx.html