MessageBox 弹框 消息提示、确认消息

type		消息类型,用于显示图标	success / info / warning / error

1、消息提示

this.$alert('这是一段内容', '标题名称', {
    
    
	confirmButtonText: '确定',
	callback: action => {
    
    
		this.$message({
    
    
			type: 'success',
			message: '普通的提示消息'
		});
	}
});

在这里插入图片描述
在这里插入图片描述

2、确认消息

this.$confirm('此操作将禁用该充值包, 是否继续?禁用后用户仍可正常充值此充值包', '提示', {
    
    
	confirmButtonText: '确定',
	cancelButtonText: '取消',
	type: 'warning'
}).then(() => {
    
    
	this.$message({
    
    
		type: 'success',
		message: '禁用成功!'
	})
	// 发送接口请求
}).catch(() => console.log('取消'))

在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/qq_40745143/article/details/130485340