gpt4 book ai didi

material-ui - 如何在单击内部后禁用 Material 扩展的 mde popover 的关闭

转载 作者:行者123 更新时间:2023-12-04 02:58:56 25 4
gpt4 key购买 nike

我正在通过导入 Material 扩展 mde popopver 使用的 popover 添加聊天机器人。但是当我尝试聊天或单击弹出窗口时,弹出窗口关闭,是否有任何真/假触发器,以防止在我单击后关闭弹出窗口?任何帮助表示赞赏。我想用 typescript 而不是 javascript 来实现它。

这是说 xyz.component.html This is what i have done so far. I am not able to chat here in this window as the popover window closes , immediately once I click on it

  <button class="mdc-fab app-fab--absolute"  
[mdePopoverTriggerFor]="appPopover"
mdePopoverTriggerOn="click" aria-label="Favorite" mat-fab ><mat-icon>
<span class="mdc-fab__icon material-icons">textsms</span>
</mat-icon></button>

<mde-popover #appPopover="mdePopover" [mdePopoverOverlapTrigger]="false">
Hi this is the chatbot.
</mde-popover>

最佳答案

我想出了如何做到这一点,只需添加 [mdePopoverCloseOnClick]="false"来禁用点击关闭。如下图

<button class="mdc-fab app-fab--absolute"  
[mdePopoverTriggerFor]="appPopover"
mdePopoverTriggerOn="click" aria-label="Favorite" mat-fab ><mat-icon>
<span class="mdc-fab__icon material-icons">textsms</span>
</mat-icon></button>

<mde-popover #appPopover="mdePopover" [mdePopoverCloseOnClick]="false" [mdePopoverOverlapTrigger]="false">
Hi this is the chatbot.
</mde-popover>

这是更多属性的链接 https://stackblitz.com/edit/angular-material-extended-mde-popover?file=app%2Fapp.component.html

关于material-ui - 如何在单击内部后禁用 Material 扩展的 mde popover 的关闭,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51060961/

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