1、Message提示:
this.$message.warnging('请......') // 警告(提示)信息
this.$message.success('......成功') // ....成功信息
this.$message.error('......失败') // .....失败信息
this.$message.info('......') // 提示信息
this.$message({
title:'成功',
message:'...成功',
type:'seccess',
duration:2000
})
type的类型:success/warning/info/error
· showCancelButton: false, //不显示取消按钮
2、confirm二次确认提示:
this.$confirm('是否删除' , '提示' , {
confirmButtonText:'确认',
cancelButtonText:'取消',
type:'warning',
distinguishCancelAndClose: true, // 重要,设置为true才会把右上角X和取消区分开来
// closeOnClickModal: false
}).then(()=>{
.....删除或确认修改的方法(多用于确认删除操作,减少失误操作)
}).catch(function (e) {
if (e == 'cancel') {// TODO 确认不通过执行逻辑
}
else if(e == 'close') {// TODO 右上角X的执行逻辑
}
})
3、notify提示:
this.$notify({
title:'成功',
message:'...成功',
type:'seccess',
duration:2000
})
type的类型:success/warning/info/error
4、$alert原生弹框:
this.$alert(res.data.data, '操作提示', {
confirmButtonText: '确定',
});