From 1dc2d0b17b423147d825bf5b8a99425e20b02030 Mon Sep 17 00:00:00 2001 From: windy <1374721899@qq.com> Date: Fri, 21 Jun 2019 14:33:47 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-18438=20fix:=20textarea=E8=AE=BE?= =?UTF-8?q?=E7=BD=AEdisabled:=20true=E4=BB=8D=E5=8F=AF=E7=BC=96=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/base/single/editor/editor.textarea.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/base/single/editor/editor.textarea.js b/src/base/single/editor/editor.textarea.js index 1d3fd93f0..11a539c3a 100644 --- a/src/base/single/editor/editor.textarea.js +++ b/src/base/single/editor/editor.textarea.js @@ -62,11 +62,13 @@ BI.TextAreaEditor = BI.inherit(BI.Single, { BI.Widget._renderEngine.createElement(document).unbind("mousedown." + self.getName()); }); if (BI.isKey(o.value)) { - self.setValue(o.value); + this.setValue(o.value); } if (BI.isNotNull(o.style)) { - self.setStyle(o.style); + this.setStyle(o.style); } + // REPORT-18438 调用_setEnable的时候this.content还为创建, 所以这边需要主动调用下 + this.setEnable(!o.disabled); this._checkWaterMark(); }, @@ -155,6 +157,11 @@ BI.TextAreaEditor = BI.inherit(BI.Single, { BI.TextAreaEditor.superclass._setValid.apply(this, arguments); // this.content.setValid(b); // this.watermark && this.watermark.setValid(b); + }, + + _setEnable: function (b) { + BI.TextAreaEditor.superclass._setEnable.apply(this, [b]); + this.content && (this.content.element[0].disabled = !b); } }); BI.TextAreaEditor.EVENT_CHANGE = "EVENT_CHANGE";