From 1bd7c58af00cd72a770ab5e36fe8c2aa12e9c086 Mon Sep 17 00:00:00 2001 From: zsmj Date: Tue, 6 Sep 2022 14:18:40 +0800 Subject: [PATCH] =?UTF-8?q?KERNEL-11911=20feat:=20label=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E9=BB=98=E8=AE=A4=E4=BD=BF=E7=94=A8text=E4=BD=9C=E4=B8=BAtoolt?= =?UTF-8?q?ip,=E4=BB=85=E5=AF=B9label=E7=94=9F=E6=95=88,=E4=B8=8D=E5=BD=B1?= =?UTF-8?q?=E5=93=8Dhtml=5Flabel?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/base/single/label/abstract.label.js | 17 ----------------- src/base/single/label/label.js | 17 +++++++++++++++++ 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/base/single/label/abstract.label.js b/src/base/single/label/abstract.label.js index c0443b39d..ab67a671a 100644 --- a/src/base/single/label/abstract.label.js +++ b/src/base/single/label/abstract.label.js @@ -24,23 +24,6 @@ }); }, - getTitle: function () { - var title = this.options.title; - var text = this.options.text; - if (BI.isFunction(title)) { - return title(); - } - if (BI.isNotNull(title)) { - return title; - } - - if (BI.isFunction(text)) { - return text(); - } - - return text; - }, - _createJson: function () { var o = this.options; diff --git a/src/base/single/label/label.js b/src/base/single/label/label.js index 98bfa3707..905efd29a 100644 --- a/src/base/single/label/label.js +++ b/src/base/single/label/label.js @@ -10,6 +10,23 @@ BI.Label = BI.inherit(BI.AbstractLabel, { keyword: "", }, + getTitle: function () { + var title = this.options.title; + var text = this.options.text; + if (BI.isFunction(title)) { + return title(); + } + if (BI.isNotNull(title)) { + return title; + } + + if (BI.isFunction(text)) { + return text(); + } + + return text; + }, + doRedMark: function () { this.text.doRedMark.apply(this.text, arguments); },