p-confirmDialog没有得到关注

时间:2019-01-23 12:44:37

标签: angular modal-dialog primeng confirm-dialog

每当我单击按钮时,对话框都会打开,但是整个屏幕都变灰,并且我无法单击该对话框。

.html文件

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

<button type="text" (click)="confirm()" pButton icon="pi pi-check" 
label="Confirm"></button>

.ts文件

constructor(private confirmationService: ConfirmationService) {}

confirm() {
this.confirmationService.confirm({
    message: 'Are you sure that you want to perform this action?',
    accept: () => {
        //Actual logic to perform a confirmation
    }
});
}

click here to see how the dialogbox is rendering

0 个答案:

没有答案