将如下代码粘贴到组件的css部分即可:
::v-deep .el-dialog{ display: flex; flex-direction: column; margin:0 !important; position:absolute; top:50%; left:50%; transform:translate(-50%,-50%); max-height:calc(100% - 30px); max-width:calc(100% - 30px); } ::v-deep .el-dialog .el-dialog__body{ flex:1; overflow: auto; }