diff --git a/src/base/single/0.single.js b/src/base/single/0.single.js index 0d42ec143..c13e02e81 100644 --- a/src/base/single/0.single.js +++ b/src/base/single/0.single.js @@ -33,8 +33,10 @@ BI.Single = BI.inherit(BI.Widget, { var title = this.getTitle(); if (title instanceof Promise) { + this.requestingTitle = title; title.then(resolvedTitle => { - this.mouseOver && showToolTip(this._getTooltipOptions(resolvedTitle)); + // 由于是异步的,所以无法避免Promise resolve时机问题,所以设计为:鼠标移出了则不显示,并且只显示最后一次发起的查询结果 + this.mouseOver && this.requestingTitle === title && showToolTip(this._getTooltipOptions(resolvedTitle)); }); } else { showToolTip(this._getTooltipOptions(title));