Browse Source

Pull request #2803: 无JIRA editor的watermark可以set为空

Merge in VISUAL/fineui from ~DAILER/fineui:master to master

* commit '9923a814981e778d51f408cc76caead284925524':
  KERNEL-10932 feat: editor支持value响应式
  无JIRA editor的watermark可以set为空
  无JIRA editor的watermark可以set为空
es6
Dailer 2 years ago
parent
commit
ad44494a3a
  1. 3
      src/base/single/editor/editor.js
  2. 5
      src/case/editor/editor.clear.js
  3. 5
      src/case/editor/editor.shelter.js
  4. 5
      src/case/editor/editor.sign.js

3
src/base/single/editor/editor.js

@ -240,9 +240,6 @@ BI.Editor = BI.inherit(BI.Single, {
}, },
setWaterMark: function (v) { setWaterMark: function (v) {
if (!BI.isKey(v)) {
return;
}
this.options.watermark = v; this.options.watermark = v;

5
src/case/editor/editor.clear.js

@ -17,8 +17,11 @@ BI.ClearEditor = BI.inherit(BI.Widget, {
}); });
}, },
_init: function () { _init: function () {
BI.ClearEditor.superclass._init.apply(this, arguments);
var self = this, o = this.options; var self = this, o = this.options;
o.value = BI.isFunction(o.value) ? this.__watch(o.value, function (context, newValue) {
self.setValue(newValue);
}) : o.value;
BI.ClearEditor.superclass._init.apply(this, arguments);
this.editor = BI.createWidget({ this.editor = BI.createWidget({
type: "bi.editor", type: "bi.editor",
simple: o.simple, simple: o.simple,

5
src/case/editor/editor.shelter.js

@ -26,8 +26,11 @@ BI.ShelterEditor = BI.inherit(BI.Widget, {
}, },
_init: function () { _init: function () {
BI.ShelterEditor.superclass._init.apply(this, arguments);
var self = this, o = this.options; var self = this, o = this.options;
o.value = BI.isFunction(o.value) ? this.__watch(o.value, function (context, newValue) {
self.setValue(newValue);
}) : o.value;
BI.ShelterEditor.superclass._init.apply(this, arguments);
this.editor = BI.createWidget({ this.editor = BI.createWidget({
type: "bi.editor", type: "bi.editor",
simple: o.simple, simple: o.simple,

5
src/case/editor/editor.sign.js

@ -26,8 +26,11 @@ BI.SignEditor = BI.inherit(BI.Widget, {
}, },
_init: function () { _init: function () {
BI.SignEditor.superclass._init.apply(this, arguments);
var self = this, o = this.options; var self = this, o = this.options;
o.value = BI.isFunction(o.value) ? this.__watch(o.value, function (context, newValue) {
self.setValue(newValue);
}) : o.value;
BI.SignEditor.superclass._init.apply(this, arguments);
this.editor = BI.createWidget({ this.editor = BI.createWidget({
type: "bi.editor", type: "bi.editor",
simple: o.simple, simple: o.simple,

Loading…
Cancel
Save