Browse Source

无JIRA 解决一下single嵌套导致的tooltip一闪的问题.

es6
zsmj 2 years ago
parent
commit
772663ba8a
  1. 9
      src/base/single/0.single.js

9
src/base/single/0.single.js

@ -9,6 +9,9 @@
* @extends BI.Widget
* @abstract
*/
var delayingTooltips;
BI.Single = BI.inherit(BI.Widget, {
_defaultConfig: function () {
var conf = BI.Single.superclass._defaultConfig.apply(this, arguments);
@ -85,14 +88,16 @@ BI.Single = BI.inherit(BI.Widget, {
this.element.on("mouseenter.title" + this.getName(), function (e) {
self._e = e;
if (self.getTipType() === "warning" || (BI.isKey(self.getWarningTitle()) && !self.isEnabled())) {
delayingTooltips = self.getName();
self.showTimeout = BI.delay(function () {
if (BI.isNotNull(self.showTimeout)) {
if (BI.isNotNull(self.showTimeout) && delayingTooltips === self.getName()) {
self._showToolTip(self._e || e, opt);
}
}, 200);
} else if (self.getTipType() === "success" || self.isEnabled()) {
delayingTooltips = self.getName();
self.showTimeout = BI.delay(function () {
if (BI.isNotNull(self.showTimeout)) {
if (BI.isNotNull(self.showTimeout) && delayingTooltips === self.getName()) {
self._showToolTip(self._e || e, opt);
}
}, 500);

Loading…
Cancel
Save