Browse Source

Pull request #3034: KERNEL-12609 fix: From FDL 显示日志信息场景,label默认带有tooltip逻辑导致卡顿

Merge in VISUAL/fineui from ~DAILER/fineui:master to master

* commit '1255975a55b3940c6a422af5c16b622986eed306':
  KERNEL-12609 fix: From FDL 显示日志信息场景,label默认带有tooltip逻辑导致卡顿
es6
Dailer 2 years ago
parent
commit
f570f0b244
  1. 6
      src/base/single/tip/tip.tooltip.js

6
src/base/single/tip/tip.tooltip.js

@ -25,10 +25,12 @@ BI.Tooltip = BI.inherit(BI.Tip, {
render: function () { render: function () {
var o = this.options; var o = this.options;
this.element.addClass("tooltip-" + o.level); this.element.addClass("tooltip-" + o.level);
function fn(e) { function fn(e) {
o.stopPropagation && e.stopPropagation(); o.stopPropagation && e.stopPropagation();
o.stopEvent && e.stopEvent(); o.stopEvent && e.stopEvent();
} }
this.element.bind({ this.element.bind({
click: fn, click: fn,
mousedown: fn, mousedown: fn,
@ -48,7 +50,7 @@ BI.Tooltip = BI.inherit(BI.Tip, {
innerVgap: this._const.vgap, innerVgap: this._const.vgap,
items: BI.map(texts, function (i, text) { items: BI.map(texts, function (i, text) {
return { return {
type: "bi.label", type: "bi.text",
textAlign: o.textAlign, textAlign: o.textAlign,
whiteSpace: "normal", whiteSpace: "normal",
text: text, text: text,
@ -58,7 +60,7 @@ BI.Tooltip = BI.inherit(BI.Tip, {
}); });
} else { } else {
this.text = BI.createWidget({ this.text = BI.createWidget({
type: "bi.label", type: "bi.text",
element: this, element: this,
textAlign: o.textAlign, textAlign: o.textAlign,
whiteSpace: "normal", whiteSpace: "normal",

Loading…
Cancel
Save