extjs提示设置可关闭

时间:2013-10-16 13:27:03

标签: extjs tooltip extjs4.2

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

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);
    }
}

如何更改关闭?

0 个答案:

没有答案