當在某個頁面中需要對element-ui組件dialog彈窗樣式重置,需要使用custom-class(Dialog 的自定義類名)
例子:在style scoped樣式表里面為彈窗樣式進行重置:
custom-class="schedule-task-diaog"
/deep/.schedule-task-diaog{ height:100vh !important; margin:0px !important; /deep/.el-dialog__header{ width:100%; padding:0px !important; height:50px; line-height:50px; } /deep/ .el-dialog__body{ width:100%; height:calc(~"100% - 50px"); box-sizing: border-box; } }