报错提示
报错代码
在有删除功能的提示框中都会有这样的报错:
const confirmResult = await this.$confirm(
'此操作将删除xx, 是否继续?',
'提示',
{
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}
).cath(err => err)
解决
const confirmResult = await this.$confirm(
'此操作将删除xx, 是否继续?',
'提示',
{
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}
)
.catch(err => err)
.then(data => data)
添加了 .then
之后就可以了 ?
也不知道为什么
版权声明:本文为kMONSTER4原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。