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('取消'))