无法访问 Primeng 对话框

Primeng dialog not accessible

我正在使用“primeng”:“^4.0.0-rc.2”和“@angular/cli”:“^1.0.0”和angular4。当我尝试使用对话框时,对话框不可访问 - 它隐藏在覆盖层后面,应该阻止访问页面的其余部分。请看下图

我希望对话框可以点击,但 Phone UI 无法点击。鳕鱼的片段如下所示:

html

 <p-confirmDialog width = "425"
                           class = 'dialog-z-index'></p-confirmDialog>

打字稿

confirm() {
    this._confirmationSrvc.confirm(
        {
          message: `Are you sure you want to delete the phone entry? ${
              jsonStringify( this.deletionData )}`,
          header: 'Delete Confirmation',
          icon: 'fa fa-trash',
          accept: () => {
          }
        } )
  }

  onDeleteConfirm( event ): void {
    this.deletionData = event.data as IPhone
    this.isDialog = true
    if ( this.isDialog ) {
      this.confirm()
      event.confirm.resolve()
      event.source.onChangedSource.subscribe(
          changedSrc => {
            if ( this.currentData.length < 1 ) {
            }
            else {
            
            }
          } )
      
    }
    else {
      event.confirm.reject()
    }
  }

是什么导致了这种意外行为?

谢谢

我猜你在 HTML 页面中给出了两个 p-confirmDialog。因为你调用了两个 p-confirmDialog 覆盖层来了。

所以如果你删除任何一个 p-confirmDialog 它必须工作。

我认为您需要将其添加到 p-confirmdialog。在使用多个活动模式时,我 运行 对此感兴趣。

appendTo="body"