qtip 在 fullcalendar 中多次出现

qtip appears multiple times in fullcalendar

我已经在 fullcalendar 中实现了 qtip2 以下是我编写的用于呈现工具提示的代码

eventRender: function (event, element) {
        element.find('.fc-title').append("<br/>" + event.shiftname);
        element.qtip({
            content: {
                text: function (api) {
                    var content = event.description;
                    if (content != '')
                        return content;
                }
            },
            position: { viewport: true },
            style: { classes: 'qtip-custom' },
        });
    }

当鼠标悬停在事件上时出现。但是当我调整事件大小时,qtip 出现多次。

我在 qtip 中添加了 show: {solo:true} 选项

            element.qtip({
            content: {
                text: function (api) {
                    var content = event.description;
                    if (content != '')
                        return content;
                }
            },
            position: { viewport: true },
            style: { classes: 'qtip-custom' },
            show: { solo: true }
        });

这解决了我的问题。