废话不多上代码
<script> this.$confirm(`确定进行${id ? '删除' : '批量删除'}操作?`, '提示', { confirmButtonText: '确定', cancelButtonText: '取消', type: 'warning', // confirmButtonClass: 'btnFalses',//按钮样式 customClass: 'winClass',//弹窗样式 }).then(() => { var param = ids this.$http({ url: 'XXXXXX', method: 'post', data: param }).then(({data}) => { if (data && data.code === 0) { this.$message({ message: '操作成功', type: 'success', duration: 1500, onClose: () => { this.getXXX() } }) } else { this.$message.error(data.msg) } }) }) </script>
<style > .winClass{ width: 300px; } /* .btnFalses{ background-color: #022F92 }*/ </style >