From 2a0f53e8ffbd042bcabfe8d79968ad38db9bc8f8 Mon Sep 17 00:00:00 2001 From: guy Date: Wed, 19 Aug 2020 20:33:35 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=87=E6=9C=AC=E6=94=AF=E6=8C=81=E7=82=B9?= =?UTF-8?q?=E5=87=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/base/single/label/abstract.label.js | 8 +++++--- src/base/single/text.js | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/base/single/label/abstract.label.js b/src/base/single/label/abstract.label.js index a3954e094..b51ee8d80 100644 --- a/src/base/single/label/abstract.label.js +++ b/src/base/single/label/abstract.label.js @@ -18,7 +18,8 @@ BI.AbstractLabel = BI.inherit(BI.Single, { tgap: 0, bgap: 0, text: "", - highLight: false + highLight: false, + handler: null }); }, @@ -33,7 +34,8 @@ BI.AbstractLabel = BI.inherit(BI.Single, { value: o.value, py: o.py, keyword: o.keyword, - highLight: o.highLight + highLight: o.highLight, + handler: o.handler }; }, @@ -368,4 +370,4 @@ BI.AbstractLabel = BI.inherit(BI.Single, { populate: function () { BI.AbstractLabel.superclass.populate.apply(this, arguments); } -}); \ No newline at end of file +}); diff --git a/src/base/single/text.js b/src/base/single/text.js index c3457e85a..79d10a2fc 100644 --- a/src/base/single/text.js +++ b/src/base/single/text.js @@ -59,7 +59,7 @@ BI.Text = BI.inherit(BI.Single, { textOverflow: o.whiteSpace === "nowrap" ? "ellipsis" : "", overflow: o.whiteSpace === "nowrap" ? "" : (BI.isWidthOrHeight(o.height) ? "auto" : "") }); - if (o.handler) { + if (o.handler && o.handler !== BI.emptyFn) { this.text = BI.createWidget({ type: "bi.layout", tagName: "span"