vue报错Uncaught (in promise) cancel
原因:this.$confirm方法内置promise方法,
.catch()不能省略(因为取消操作时,无法捕获)
解决: .then(res => {…}) .catch(()=>{});(then之后把catch加上)
微信扫一扫
vue报错Uncaught (in promise) cancel
原因:this.$confirm方法内置promise方法,
.catch()不能省略(因为取消操作时,无法捕获)
解决: .then(res => {…}) .catch(()=>{});(then之后把catch加上)
相关推荐