2022.09.19 - el-table 自定义对话框样式
额嗯...,这个功能好像在新版本中弃用了

但不影响我记录:
<el-dialog
v-model="visible"
:title="title"
:width="width"
append-to-body
// 声明自定义类名
custom-class="dialogTrick"
:before-close="handleClose"
>
// 再不会确保类名不会冲突的情况下使用
<style lang="scss">
.dialogTrick {
position: fixed;
//让元素垂直水平居中
top: 0;
bottom:0;
left: 0;
right: 0;
height: 80vh;
.el-dialog__footer {
position: absolute;
right: 0;
bottom:0;
margin-bottom: 10px;
padding-top: 0;
padding-bottom: 0;
}
}
</style>

浙公网安备 33010602011771号