问题描述
我开发了一个 mat-dialog,只有当我点击关闭按钮时才会关闭,这意味着它被设置为禁用。当我的对话框打开时,我想在后台输入。如何启用?
代码:
// Important snippet from dialog component
constructor(
public dialogRef: MatDialogRef<KagListComponent>) {
dialogRef.disableClose = true;
}
// Important snippet from app component
/**
* Open the dialog
*/
openDialog(): void {
const dialogRef = this.dialog.open(DialogComponent,{
width: '600px',backdropClass: 'transparent'
});
dialogRef.afterClosed().subscribe(result => {
console.log(`Dialog will be closed!`,result);
});
}
我尝试在函数中使用 hasBackDrop= true
激活背景。不幸的是它没有用。你知道我该如何解决这个问题吗?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)