这个也是我在网上找的,感谢大家的优秀共享。我也是不自信看官网,官网给了一个自定义添加类名的方法custom-class,css类名前要加/deep/,然后代码里面这样写:
<el-dialog
title="提示"
:visible.sync="centerDialogVisible"
width="30%"
custom-class=“my_class”
center>
</el-dialog>`
<style>
/deep/ .my_class {
height: 50vh
}
</style>