【问题标题】:How to hide the uib-popover when clicking outside单击外部时如何隐藏uib-popover
【发布时间】:2020-05-15 22:46:02
【问题描述】:

我的 uib-popover 没有隐藏在 outsideClick 上。

<button 
    tooltip-placement="bottom" 
    tooltip="{{'common.addRemoveColumn'| translate}}" 
    class="btn btn-default pull-right" 
    uib-popover 
    popover-trigger="'outsideClick'" 
    popover-placement="bottom" 
    uib-popover-template="'gridColumns.html'" 
    data-original-title="{{'common.customizeColumn'| translate}}">
        <i class="fa fa-columns"></i>
</button>

我已经关注了这些 stackOverflow 问题,

uib-popover not closing on outside click

How to hide uib-popover on click outside of the popover in angular JS?

并没有解决问题。

我的 angularJs 版本是 1.3.13。

我的 Bootstrap 版本是 3.2.0。

【问题讨论】:

    标签: html angularjs angular-ui-bootstrap


    【解决方案1】:
    $scope.myTrigger = "outsideClick"
    

    然后

    popover-trigger="myTrigger">Click Me</button>
    

    【讨论】:

    • 我试过了,不幸的是这个解决方案也不起作用
    【解决方案2】:
    Pls check in below URL: 
    
    https://codepen.io/minhdynasty/pen/ozvAPJ
    
    It will close th pop up
    

    【讨论】:

    • 这个解决方案在我提到的版本中也不起作用
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-11-22
    • 1970-01-01
    • 1970-01-01
    • 2011-09-20
    • 1970-01-01
    相关资源
    最近更新 更多