From 8a2ad961b7182f26b0ec1a5acaf2cf3007f4a3fc Mon Sep 17 00:00:00 2001 From: windy <1374721899@qq.com> Date: Thu, 31 Dec 2020 15:57:05 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8C=89=E7=85=A7comment=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../valuechooser/combo.valuechooser.nobar.js | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/component/valuechooser/combo.valuechooser.nobar.js b/src/component/valuechooser/combo.valuechooser.nobar.js index 72c190e381..3fc381df34 100644 --- a/src/component/valuechooser/combo.valuechooser.nobar.js +++ b/src/component/valuechooser/combo.valuechooser.nobar.js @@ -5,26 +5,23 @@ */ BI.ValueChooserNoBarCombo = BI.inherit(BI.AbstractValueChooser, { - _defaultConfig: function () { - return BI.extend(BI.ValueChooserNoBarCombo.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-value-chooser-combo", - width: 200, - height: 24, - items: null, - itemsCreator: BI.emptyFn, - cache: true - }); + props: { + baseCls: "bi-value-chooser-combo", + width: 200, + height: 24, + items: null, + itemsCreator: BI.emptyFn, + cache: true }, - _init: function () { - BI.ValueChooserNoBarCombo.superclass._init.apply(this, arguments); + render: function () { var self = this, o = this.options; if (BI.isNotNull(o.items)) { this.items = o.items; } - this.combo = BI.createWidget({ + + return { type: "bi.multi_select_no_bar_combo", - element: this, allowEdit: o.allowEdit, text: o.text, value: this._assertValue(o.value), @@ -32,6 +29,9 @@ BI.ValueChooserNoBarCombo = BI.inherit(BI.AbstractValueChooser, { valueFormatter: BI.bind(this._valueFormatter, this), width: o.width, height: o.height, + ref: function(_ref) { + self.combo = _ref; + }, listeners: [{ eventName: BI.MultiSelectCombo.EVENT_FOCUS, action: function () { @@ -63,7 +63,7 @@ BI.ValueChooserNoBarCombo = BI.inherit(BI.AbstractValueChooser, { self.fireEvent(BI.ValueChooserNoBarCombo.EVENT_CONFIRM); } }] - }); + } }, setValue: function (v) {