// 解绑
unBind(row) {
this.$confirm('是否确认解除该条表单绑定?', '确认', {
confirmButtonText: '确定',
cancelButtonText: '取消',
customClass: 'customConfirm',
cancelButtonClass: 'btn-custom-cancel',
type: 'warning'
})
.then(() => {
this.$Puting(this.$api.updateFormBind, { relationId: row.relationId, defId: '' }).then((res) => {
if (res.code === '0') {
this.$message.success('解绑成功')
this.updateData(row.pid)
} else {
this.$message.error(res.message)
}
})
})
.catch(() => {})
},
增加了自定义样式 customConfirm
和 btn-custom-cancel
修改样式
.customConfirm .el-message-box__btns {
display: flex;
align-items: center;
justify-content: center;
}
.btn-custom-cancel {
margin-left: 10px;
order: 2 /* 将取消置到后面 */
}