首页 > 解决方案 > PrimeNG ConfirmDialog 版本更改后未弹出

问题描述

版本更改为 9.1.3 后,确认对话框未居中。

如果我将confirmDialog标签放在 HTML 页面的顶部,它会显示在顶部并移动其他组件。如果我把它放在 HTML 页面的底部,那么它就会显示在屏幕的底部。它不会弹出,而是根据标签位置显示。

HTML 代码:

<p-confirmDialog header="Confirmation" icon="pi pi-exclamation-triangle"></p-confirmDialog>

打字稿:

this.confirmationService.confirm({
        message: 'Are you sure that you want to proceed?',
        accept: () => {
          ---
          --
        },
        reject: () => {
          //alert('do not navigate to next screen');
        }
      });

标签: angularprimengconfirm-dialog

解决方案


推荐阅读