vue消息提示this.$message方法

//弹出信息  th传的是this
function alertMessage(th,action,a){
    var msg,type;
    switch(a){
        case '1':
            type='success';
            msg = action+'成功';
            break;
        case '2':
            type='warning';
            msg = action;
            break;
        case '3':
            type='info';
            msg = '取消'+action;
            break;
        case '4':
            type='error';
            msg = action+'失败';
            break;
        default:
            break;
    }
    th.$message({
        message: msg,
        type: type,
    });
}

//弹出信息
            alertMessage(th,action,msg){
                this.$message({
                    message: msg,
                    type: action,
                });
            },
————————————————
原文链接:https://blog.csdn.net/qq_41488724/java/article/details/87935456

   this.$message.warning("领取截止时间不能小于结束日期");

posted @ 2020-07-27 09:22  BloggerSb  阅读(12082)  评论(0编辑  收藏  举报