美文网首页
ElementUI msgbox

ElementUI msgbox

作者: Cherry丶小丸子 | 来源:发表于2022-06-27 18:56 被阅读0次
    this.$msgbox({
        title: '提示', // 标题
        message: `此操作将永久删除此文件, 是否继续?`, // MessageBox 消息正文内容
        customClass: '', // 自定义类名
        showConfirmButton: true, // 是否显示确定按钮
        showCancelButton: true, // 是否显示取消按钮
        confirmButtonText: '确定', // 确定按钮的文本内容
        cancelButtonText: '取消', // 取消按钮的文本内容
        confirmButtonClass: 'sureBtn', // 确定按钮的自定义类名
        cancelButtonClass: 'cancelBtn', // 取消按钮的自定义类名
        closeOnClickModal: false, // 是否可通过点击遮罩关闭 MessageBox
        closeOnPressEscape: false, // 是否可通过按下 ESC 键关闭 MessageBox
        type: 'warning'
    }).then(() => {
        this.$axios.questionBank.deleteProblemBase({
            doorProblemId: row.id
        }).then(res => {
            if(res.data.data == '删除成功'){
                this.$message.success('删除成功');
            }else{
                this.$message.success('删除失败');
            }
            this.getQuestionList(); // 重新获取列表
        })
    }).catch(() => {
        this.$message({
            type: 'info',
            message: '已取消删除'
        });
    });
    

    相关文章

      网友评论

          本文标题:ElementUI msgbox

          本文链接:https://www.haomeiwen.com/subject/nynfvrtx.html