Browse Source

REPORT-60473 fix:实现一下setWaterMark

es6
Freddy 3 years ago
parent
commit
6e2e112dd0
  1. 2
      src/case/editor/editor.state.js
  2. 3
      src/case/editor/editor.state.simple.js

2
src/case/editor/editor.state.js

@ -156,8 +156,6 @@ BI.StateEditor = BI.inherit(BI.Widget, {
setWaterMark: function (v) { setWaterMark: function (v) {
this.options.watermark = v; this.options.watermark = v;
this.options.defaultText = v;
this.setState(BI.isNull(this.stateValue) || this.stateValue === "" ? v : this.stateValue);
this.editor.setWaterMark(v); this.editor.setWaterMark(v);
}, },

3
src/case/editor/editor.state.simple.js

@ -143,8 +143,6 @@ BI.SimpleStateEditor = BI.inherit(BI.Widget, {
setWaterMark: function (v) { setWaterMark: function (v) {
this.options.watermark = v; this.options.watermark = v;
this.options.text = v;
this.setState(this.stateValue);
this.editor.setWaterMark(v); this.editor.setWaterMark(v);
}, },
@ -234,7 +232,6 @@ BI.SimpleStateEditor = BI.inherit(BI.Widget, {
setState: function (v) { setState: function (v) {
var o = this.options; var o = this.options;
BI.SimpleStateEditor.superclass.setValue.apply(this, arguments); BI.SimpleStateEditor.superclass.setValue.apply(this, arguments);
this.stateValue = v;
if (BI.isNumber(v)) { if (BI.isNumber(v)) {
if (v === BI.Selection.All) { if (v === BI.Selection.All) {
this._setText(BI.i18nText("BI-Already_Selected")); this._setText(BI.i18nText("BI-Already_Selected"));

Loading…
Cancel
Save