element-ui报错:Uncaught (in promise) cancel

分析:出现Uncaught (in promise) cancel的原因因为this.$confirm方法内置promise方法不能去掉.catch(),没有.catch取消操作无法捕获.
会报错的用法如下:

控制台报错如下:

 正确用法如下:

转载于https://blog.csdn.net/maichaoqun/article/details/105682986(只为做个笔记)

 

posted @ 2021-10-26 18:17  挥不去的执念  阅读(445)  评论(0编辑  收藏  举报