MessageBox报错Uncaught (in promise) cancel
当使用MessageBox
或Message
组件时,如果组件方法后面不加上catch()
方法会报错
原因是因为这两个组件是基于promise().catch()
做的取消事件捕获
正确应该加上
js
MessageBox({
// ...
}).catch(() => {})
当使用MessageBox
或Message
组件时,如果组件方法后面不加上catch()
方法会报错
原因是因为这两个组件是基于promise().catch()
做的取消事件捕获
正确应该加上
MessageBox({
// ...
}).catch(() => {})