0

我创建了 Ext.tip.Tip 的一个实例。所以当我点击某个点时会出现一个提示,我正在设置一个可关闭的配置。但是当我点击另一个字段提示时没有设置新的可关闭值?如何设置运行时这个值?这是代码的一部分:

var customTip = new Ext.tip.Tip({
    minWidth: 120,
    listeners: {
        beforehide : function(tip) {
          if (tip.body != null) {
             tip.body.un('mouseenter', window.tipMouseEnter, window);
          }
        }
    }
});
var customTipShowTask = new Ext.util.DelayedTask({});
var currentWindow = window;

function showCustomTip(event, html, closable, delayed) {
    if (!(event instanceof Ext.EventObjectImpl)) {
        event = new Ext.EventObjectImpl(event);
    }
    if (delayed == null || delayed) {
        customTipShowTask.delay(500, proceedToShowCustomTip, window, [event, html, closable, delayed]);
        //currentWindow.customTip.update(html);
    } else {
        proceedToShowCustomTip(event, html, closable, delayed);
    }
}

function proceedToShowCustomTip(event, html, closable, delayed) {
    customTipShowTask.cancel();
    currentWindow.customTip.hide();
    currentWindow.customTip.update('');
    if (closable != null) { customTip.closable = closable;
        currentWindow.customTip.closable = closable;
    }
    var xy = getTipXY(event);
    currentWindow.customTip.update(html);
    currentWindow.customTip.showAt(xy);

    if (delayed != null && delayed) {
        currentWindow.customTip.body.on('mouseenter', window.tipMouseEnter, window);
    }
}

如何更改可关闭的?

4

0 回答 0