From d0fb3f62a8d017fc22e15af8c2ec73890d41d601 Mon Sep 17 00:00:00 2001 From: chaos0156 <429018715@qq.com> Date: Mon, 15 Aug 2022 14:17:40 +0800 Subject: [PATCH] =?UTF-8?q?KERNEL-12408:base=E4=B8=ADeslint=E7=9A=84?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/base/single/tip/tip.tooltip.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/base/single/tip/tip.tooltip.js b/src/base/single/tip/tip.tooltip.js index 5499f05ac..70c710497 100644 --- a/src/base/single/tip/tip.tooltip.js +++ b/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);