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 1/3] =?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"; From bed7c42503fb8e5ed3903021c4d640ae90cb286d Mon Sep 17 00:00:00 2001 From: windy <1374721899@qq.com> Date: Fri, 21 Jun 2019 14:40:26 +0800 Subject: [PATCH 2/3] update --- src/widget/singleselect/singleselect.list.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/widget/singleselect/singleselect.list.js b/src/widget/singleselect/singleselect.list.js index 681ef54f9..98340ede0 100644 --- a/src/widget/singleselect/singleselect.list.js +++ b/src/widget/singleselect/singleselect.list.js @@ -60,6 +60,7 @@ BI.SingleSelectList = BI.inherit(BI.Widget, { }, o.logic, { items: o.allowNoSelect ? BI.LogicFactory.createLogicItemsByDirection(o.direction, { type: "bi.single_select_item", + cls: "bi-list-item-active", height: 24, forceNotSelected: true, text: BI.i18nText("BI-Basic_No_Select"), From a428e74e48fae14dc4861c58a15a05bf641220a5 Mon Sep 17 00:00:00 2001 From: windy <1374721899@qq.com> Date: Fri, 21 Jun 2019 16:11:02 +0800 Subject: [PATCH 3/3] =?UTF-8?q?fix:=20=E6=8C=89=E7=85=A7comment=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/base/single/editor/editor.textarea.js | 6 ++---- .../multilayersingletree/multilayersingletree.leveltree.js | 5 ++++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/base/single/editor/editor.textarea.js b/src/base/single/editor/editor.textarea.js index 11a539c3a..9b51b63c7 100644 --- a/src/base/single/editor/editor.textarea.js +++ b/src/base/single/editor/editor.textarea.js @@ -11,8 +11,8 @@ BI.TextAreaEditor = BI.inherit(BI.Single, { value: "" }); }, - _init: function () { - BI.TextAreaEditor.superclass._init.apply(this, arguments); + + render: function() { var o = this.options, self = this; this.content = BI.createWidget({ type: "bi.layout", @@ -67,8 +67,6 @@ BI.TextAreaEditor = BI.inherit(BI.Single, { if (BI.isNotNull(o.style)) { this.setStyle(o.style); } - // REPORT-18438 调用_setEnable的时候this.content还为创建, 所以这边需要主动调用下 - this.setEnable(!o.disabled); this._checkWaterMark(); }, diff --git a/src/widget/multilayersingletree/multilayersingletree.leveltree.js b/src/widget/multilayersingletree/multilayersingletree.leveltree.js index ced457acf..8b897354e 100644 --- a/src/widget/multilayersingletree/multilayersingletree.leveltree.js +++ b/src/widget/multilayersingletree/multilayersingletree.leveltree.js @@ -18,8 +18,11 @@ BI.MultiLayerSingleLevelTree = BI.inherit(BI.Pane, { }, _init: function () { + var o = this.options; BI.MultiLayerSingleLevelTree.superclass._init.apply(this, arguments); + this.storeValue = o.value; + this.initTree(this.options.items); this.check(); @@ -106,7 +109,7 @@ BI.MultiLayerSingleLevelTree = BI.inherit(BI.Pane, { el: { type: "bi.loader", - isDefaultInit: false, + isDefaultInit: o.itemsCreator !== BI.emptyFn, chooseType: o.chooseType, el: { type: "bi.button_tree",