如题,element message box 确定在右面,取消在左面,要怎么做才能让确定在左面,取消在右面?
代码:
<template>
<el-button type="text" @click="open">点击打开 Message Box</el-button>
</template>
<script>
export default {
methods: {
open() {
this.$alert('这是一段内容', '标题名称', {
confirmButtonText: '确定',
callback: action => {
this.$message({
type: 'info',
message: `action: ${ action }`
});
}
});
}
}
}
</script>
效果:
我试过把确认和取消的位置换了,再改style,但是确认有一个额外的class可以显示成蓝色,取消没有额外的class,没有办法改。。。
你好!可以通过
cancelButtonClass
设置自定义取消按钮的类名,然后浮动、设置边距即可。见codepen示例