From a0bc009bf26455b57367cf7397a76104e732ec69 Mon Sep 17 00:00:00 2001 From: windy <1374721899@qq.com> Date: Tue, 9 Mar 2021 14:42:40 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E6=97=A0JIRA=E4=BB=BB=E5=8A=A1=20=E9=BB=98?= =?UTF-8?q?=E8=AE=A4trigger=E7=9A=84populate=E8=A1=8C=E4=B8=BA=E4=B8=BA?= =?UTF-8?q?=E7=A9=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/base/single/trigger/trigger.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/base/single/trigger/trigger.js b/src/base/single/trigger/trigger.js index 1652136ea..d281290d4 100644 --- a/src/base/single/trigger/trigger.js +++ b/src/base/single/trigger/trigger.js @@ -23,5 +23,8 @@ BI.Trigger = BI.inherit(BI.Single, { getKey: function () { + }, + populate: function () { + } }); \ No newline at end of file From ad7fcee9456bdefdb26b344eab7dd5340f2c754c Mon Sep 17 00:00:00 2001 From: windy <1374721899@qq.com> Date: Tue, 9 Mar 2021 15:14:23 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E6=9B=B4=E6=94=B9widget=20reset=E6=96=B9?= =?UTF-8?q?=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/base/combination/combo.js | 2 +- src/base/single/trigger/trigger.js | 3 --- src/core/widget.js | 2 +- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/base/combination/combo.js b/src/base/combination/combo.js index e694ee8e3..543d5fed7 100644 --- a/src/base/combination/combo.js +++ b/src/base/combination/combo.js @@ -515,7 +515,7 @@ populate: function (items) { this._assertPopupView(); this.popupView.populate.apply(this.popupView, arguments); - this.combo.populate.apply(this.combo, arguments); + this.combo.populate && this.combo.populate.apply(this.combo, arguments); }, _setEnable: function (arg) { diff --git a/src/base/single/trigger/trigger.js b/src/base/single/trigger/trigger.js index d281290d4..8c881bf6f 100644 --- a/src/base/single/trigger/trigger.js +++ b/src/base/single/trigger/trigger.js @@ -24,7 +24,4 @@ BI.Trigger = BI.inherit(BI.Single, { getKey: function () { }, - populate: function () { - - } }); \ No newline at end of file diff --git a/src/core/widget.js b/src/core/widget.js index 0af5b6d90..42628f1d4 100644 --- a/src/core/widget.js +++ b/src/core/widget.js @@ -565,7 +565,7 @@ }, // 默认的populate方法就是干掉重来 - populate: function () { + reset: function () { this.purgeListeners(); this.empty(); this._initCurrent(); From 791e952ae7bb649de9152dfdc8c1f996ca11628b Mon Sep 17 00:00:00 2001 From: windy <1374721899@qq.com> Date: Tue, 9 Mar 2021 15:17:19 +0800 Subject: [PATCH 3/3] expander && switcher --- src/base/combination/expander.js | 2 +- src/base/combination/switcher.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/base/combination/expander.js b/src/base/combination/expander.js index 58c3ed70b..4e6ab7b58 100644 --- a/src/base/combination/expander.js +++ b/src/base/combination/expander.js @@ -197,7 +197,7 @@ BI.Expander = BI.inherit(BI.Widget, { populate: function (items) { // this._assertPopupView(); this.popupView && this.popupView.populate.apply(this.popupView, arguments); - this.expander.populate.apply(this.expander, arguments); + this.expander.populate && this.expander.populate.apply(this.expander, arguments); }, _setEnable: function (arg) { diff --git a/src/base/combination/switcher.js b/src/base/combination/switcher.js index e3a73bcda..cdaaf88de 100644 --- a/src/base/combination/switcher.js +++ b/src/base/combination/switcher.js @@ -194,7 +194,7 @@ BI.Switcher = BI.inherit(BI.Widget, { populate: function (items) { this._assertPopupView(); this.popupView.populate.apply(this.popupView, arguments); - this.switcher.populate.apply(this.switcher, arguments); + this.switcher.populate && this.switcher.populate.apply(this.switcher, arguments); }, _setEnable: function (arg) {