Browse Source

Merge pull request #973 in VISUAL/fineui from ~WINDY/fineui:master to master

* commit '1bf1c408b31b0c0f2e1aa109c859d5f7af2a6c38':
  BI-46911 refactor 减少doRedMark次数
master
guy 6 years ago
parent
commit
a051d2abb2
  1. 5
      src/case/editor/editor.shelter.js
  2. 2
      src/case/editor/editor.sign.js

5
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 () {

2
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));
},

Loading…
Cancel
Save