目前我正在使用来自 PrimeNG 的对话框,如下所示:
<button type="button" class="button button-3 button-3a"
(click)="openCloseFront()"><iclass="fa fa-eye"></i>View Image
</button>
<button type="button" class="button button-3 button-3a"
(click)="openCloseBack()"><iclass="fa fa-eye"></i>View Image
</button>
<p-dialog [(visible)]="frontOpened" header="ID Front Side"
[responsive]="true"
[style]="{width: '350px', minWidth: '200px'}"
[minY]="70" [maximizable]="true"
[baseZIndex]="10000">
/* code here with img*/
</p-dialog>
<p-dialog [(visible)]="backOpened" header="ID Back Side"
[responsive]="true"
[style]="{width: '350px', minWidth: '200px'}"
[minY]="70" [maximizable]="true"
[baseZIndex]="10000">
/* code here with img*/
</p-dialog>
我使用按钮打开它们,如下所示:
public openCloseFront() {
this.frontOpened = !this.frontOpened;
}
public openCloseBack() {
this.backOpened = !this.backOpened;
}
当前行为是最后打开的对话框是最大的z-index
。这里的问题是当我单击它时找不到显示对话框的方法。我的意思是,z-index
当我单击对话框时,我想将其设置为最高,以便将它放在最前面。任何想法?