引用时在 template 模板中使用 this.confirm 

调用方法:

    

this.$confirm('确认删除?', '系统提示', {
    confirmButtonText: '确定',
    cancelButtonText: '取消',
    cancelButtonClass: 'btn-custom-cancel',
    type: 'warning'
}).then(function(){
    console.log("删除成功!");
})
.catch(function(){
    console.log("取消成功!");
})

 

Logo

Vue社区为您提供最前沿的新闻资讯和知识内容

更多推荐