gpt4 book ai didi

angularjs - 如何为 uib-popover 使用不同的触发器组合?

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

官方文档:https://angular-ui.github.io/bootstrap/#/popover说以下触发组合可以作为参数传递给 popover-trigger属性 :

mouseenter: mouseleave
click: click
outsideClick: outsideClick
focus: blur
none

我想使用组合
mouseenter: outsideClick

如何在不使用 popover-is-open 的情况下实现此目的属性?

最佳答案

你不能,文档状态

The outsideClick trigger will cause the popover to toggle on click, and hide when anything else is clicked.



“任何其他”包括元素本身,因此使用 outsideClick 切换元素打开或关闭,并会干扰其他触发器的自然行为。

例如,如果像这样说明您的触发器 popover-trigger="mouseleave outsideClick",触发器 mouseleave如果您已经单击了元素,将隐藏弹出窗口而不是显示它,否则它只会在休假时显示它。 ( plunk )。

如果您可以使用 popover-is-open 破解它然后继续这样做,如果它太困扰您,您可以随时请求一个功能。

关于angularjs - 如何为 uib-popover 使用不同的触发器组合?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36789948/

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