Browse Source

KERNEL-12408:base中eslint的修改

es6
chaos0156 2 years ago
parent
commit
d0fb3f62a8
  1. 16
      src/base/single/tip/tip.tooltip.js

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

@ -8,7 +8,7 @@
BI.Tooltip = BI.inherit(BI.Tip, {
_const: {
hgap: 8,
vgap: 4
vgap: 4,
},
_defaultConfig: function () {
@ -23,12 +23,12 @@ BI.Tooltip = BI.inherit(BI.Tip, {
},
render: function () {
var self = this, o = this.options;
var o = this.options;
this.element.addClass("tooltip-" + o.level);
var fn = function (e) {
function fn(e) {
o.stopPropagation && e.stopPropagation();
o.stopEvent && e.stopEvent();
};
}
this.element.bind({
click: fn,
mousedown: fn,
@ -36,7 +36,7 @@ BI.Tooltip = BI.inherit(BI.Tip, {
mouseover: fn,
mouseenter: fn,
mouseleave: fn,
mousemove: fn
mousemove: fn,
});
var texts = (o.text + "").split("\n");
@ -52,9 +52,9 @@ BI.Tooltip = BI.inherit(BI.Tip, {
textAlign: o.textAlign,
whiteSpace: "normal",
text: text,
textHeight: 18
textHeight: 18,
};
})
}),
});
} else {
this.text = BI.createWidget({
@ -81,7 +81,7 @@ BI.Tooltip = BI.inherit(BI.Tip, {
setLevel: function (level) {
this.element.removeClass("tooltip-success").removeClass("tooltip-warning");
this.element.addClass("tooltip-" + level);
}
},
});
BI.shortcut("bi.tooltip", BI.Tooltip);

Loading…
Cancel
Save