gpt4 book ai didi

angular - 无法访问 Primeng 对话框

转载 作者:太空狗 更新时间:2023-10-29 18:13:35 24 4
gpt4 key购买 nike

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

enter image description here

我希望对话框是可点击的,但电话 UI 是不可点击的。鳕鱼的片段如下所示:

html

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

typescript

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()
}
}

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

谢谢

最佳答案

我认为您需要将其添加到 p-confirmdialog。我在使用多个事件模式时遇到过这个问题。

appendTo="body"

关于angular - 无法访问 Primeng 对话框,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43315425/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com