Browse Source

BI-46911 refactor 减少doRedMark次数

master
windy 5 years ago
parent
commit
1bf1c408b3
  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