mint-ui icon indicating copy to clipboard operation
mint-ui copied to clipboard

message-box点取消时会报错

Open wanrengang opened this issue 9 years ago • 2 comments

message-box点取消时会报如下错: Uncaught (in promise) cancel 官方的demo也是如此。

wanrengang avatar Mar 10 '17 03:03 wanrengang

这不是报错,只是被 reject 的 Promise 没有 catch。好像只有 Chrome 会这样。

Leopoldthecoder avatar Mar 10 '17 04:03 Leopoldthecoder

加上catch 什么也不做就可以了: this.$confirm('确认关闭?', '提示', { confirmButtonText: '确定', cancelButtonText: '取消', type: 'warning' }).then(() => { // Do something }).catch(() => {})

ylhyh avatar Aug 08 '18 09:08 ylhyh