Vue中常用的提示信息:

 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: '确定',

});

  • 3
    点赞
  • 10
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值