为什么 angular material 模态是透明的?

Why is the angular material modal transparent?

我有一个 angular material 模态:

process(assignmentNumber) {
    const dialogConfig = new MatDialogConfig();
    dialogConfig.autoFocus = true;
    dialogConfig.data = { assignmentNumber }
    this.dialog.open(ProcessPostReleaseExceptionComponent, dialogConfig);

}

访问模式时它是完全透明的:

我在文档中找不到说明如何更改此设置的设置。是否缺少某些步骤?

angular 模式只会为您提供一个叠加层。在您的 ProcessPostReleaseExceptionComponent 中,只需将 <div>background-color.