From 411d8af270b0faab6c7b76e67fe96e90d2becc0e Mon Sep 17 00:00:00 2001 From: zsmj Date: Thu, 28 Jul 2022 15:10:11 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-76547=20fix:=20=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E6=98=AF=E5=90=A6=E5=BC=82=E6=AD=A5=E8=8E=B7=E5=8F=96=E6=95=B0?= =?UTF-8?q?=E6=8D=AE,=E5=92=8C=E7=BB=84=E4=BB=B6=E6=98=AF=E5=90=A6?= =?UTF-8?q?=E6=94=AF=E6=8C=81=E6=90=9C=E7=B4=A2=E5=88=86=E7=A6=BB=E5=BC=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../multilayersingletree.combo.js | 27 ++++++++++++------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/src/widget/multilayersingletree/multilayersingletree.combo.js b/src/widget/multilayersingletree/multilayersingletree.combo.js index 63f43b4f9..cea4d72da 100644 --- a/src/widget/multilayersingletree/multilayersingletree.combo.js +++ b/src/widget/multilayersingletree/multilayersingletree.combo.js @@ -36,11 +36,6 @@ BI.MultiLayerSingleTreeCombo = BI.inherit(BI.Widget, { return (o.itemsCreator === BI.emptyFn) ? this._getSyncConfig() : this._getAsyncConfig(); }, - _shouldWrapper: function () { - var o = this.options; - return !o.allowEdit && o.itemsCreator === BI.emptyFn; - }, - _getBaseConfig: function () { var self = this, o = this.options; return { @@ -99,7 +94,6 @@ BI.MultiLayerSingleTreeCombo = BI.inherit(BI.Widget, { container: o.container, allowInsertValue: o.allowInsertValue, allowSearchValue: o.allowSearchValue, - allowEdit: o.allowEdit, cls: "multilayer-single-tree-trigger", ref: function (_ref) { self.trigger = _ref; @@ -184,13 +178,28 @@ BI.MultiLayerSingleTreeCombo = BI.inherit(BI.Widget, { tipType: o.tipType, warningTitle: o.warningTitle, valueFormatter: o.valueFormatter, - } + }, }); }, _getAsyncConfig: function () { - var config = this._getBaseConfig(); - return BI.extend(config, this._getSearchConfig()); + var o = this.options, self = this; + var baseConfig = this._getBaseConfig(); + return BI.extend(baseConfig, o.allowEdit ? this._getSearchConfig() : { + el: { + type: "bi.single_tree_trigger", + ref: function (_ref) { + self.textTrigger = _ref; + }, + text: o.text, + height: o.height, + items: o.items, + value: o.value, + tipType: o.tipType, + warningTitle: o.warningTitle, + valueFormatter: o.valueFormatter, + }, + }); }, getSearcher: function () {