在完整日历中,如何按住 Popover 框直到我的鼠标离开它?

How can I hold Popover box until my mouse moves away from it in Full calendar?

我在 angular 项目中使用完整日历来显示事件。我正在使用弹出窗口显示 activity 并在该弹出窗口中的按钮上触发新的单击事件。但我的主要问题是,当我尝试在该弹出窗口上拖动鼠标时,该弹出窗口被隐藏了。我希望在将鼠标移开之前显示此弹出窗口。

        eventRender: function (event, element) {
            var chk = $(event.target).css('display', 'block');
            element.popover({
                animation: false,
                delay: 300,
                html:true,
                content: '<div ng-show="checked"><button>abc</button><b>Item</b>:' + event.start + "<b>Fin</b>:" + event.end + "</div>",
                //offset: 10,
                //container: '#calendar',
                trigger: 'hover'
            });

我通过应用 mouseenter 和 mouseleave 事件解决了这个问题

            element.popover({
            animation: false,
            delay: 300,
            html:true,
            content: '<div ng-show="checked"><button>abc</button><b>Item</b>:' + event.start + "<b>Fin</b>:" + event.end + "</div>",
            //offset: 10,
            //container: '#calendar',
            trigger: 'hover'
            })
                .on("mouseenter", function () {
                    var _this = this;
                    $(this).popover("show");
                    $(".popover").on("mouseleave", function () {
                        $(_this).popover('hide');
                    });
                }).on("mouseleave", function () {
                    var _this = this;
                    setTimeout(function () {
                        if (!$(".popover:hover").length) {
                            $(_this).popover("hide");
                        }
                    }, 300);
                });