From 1bf1c408b31b0c0f2e1aa109c859d5f7af2a6c38 Mon Sep 17 00:00:00 2001 From: windy <1374721899@qq.com> Date: Thu, 27 Jun 2019 14:48:46 +0800 Subject: [PATCH] =?UTF-8?q?BI-46911=20refactor=20=E5=87=8F=E5=B0=91doRedMa?= =?UTF-8?q?rk=E6=AC=A1=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/case/editor/editor.shelter.js | 5 +++-- src/case/editor/editor.sign.js | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/case/editor/editor.shelter.js b/src/case/editor/editor.shelter.js index d063827ed..1f8ca3d03 100644 --- a/src/case/editor/editor.shelter.js +++ b/src/case/editor/editor.shelter.js @@ -137,7 +137,7 @@ BI.ShelterEditor = BI.inherit(BI.Widget, { }); this._showHint(); self._checkText(); - this.text.doRedMark(o.keyword); + BI.isKey(o.keyword) && this.text.doRedMark(o.keyword); }, _checkText: function () { @@ -231,9 +231,10 @@ BI.ShelterEditor = BI.inherit(BI.Widget, { }, setValue: function (k) { + var o = this.options; this.editor.setValue(k); this._checkText(); - this.text.doRedMark(this.options.keyword); + BI.isKey(o.keyword) && this.text.doRedMark(o.keyword); }, getValue: function () { diff --git a/src/case/editor/editor.sign.js b/src/case/editor/editor.sign.js index ba3c79833..6840cd953 100644 --- a/src/case/editor/editor.sign.js +++ b/src/case/editor/editor.sign.js @@ -150,7 +150,7 @@ BI.SignEditor = BI.inherit(BI.Widget, { } else { this.text.setValue(this.editor.getValue()); this.text.element.removeClass("bi-water-mark"); - this.text.doRedMark(o.keyword); + BI.isKey(o.keyword) && this.text.doRedMark(o.keyword); } }, this)); },