<el-dialog title="xxx" :visible.sync="dialogTimeVisible "@close='closeDialog'>
<div class="el-dialog-div"> XXX.... </div> </el-dialog> <style lang="scss" scoped> .el-dialog-div{ height: 60vh; overflow: auto; } </style>
methods: {
closeDialog(){
this.XXX= '';
}
}
分析:在dialog里写一个div ,div的大小设置为相对视窗的大小就行