From c7e9f74aa04d1a2d2119e4284ede5e548297a44c Mon Sep 17 00:00:00 2001 From: "Jimmy.Chai" Date: Tue, 20 Jul 2021 21:09:49 +0800 Subject: [PATCH] =?UTF-8?q?BI-90563=20fix=EF=BC=9A=E4=BC=A0=E5=85=A5tipTex?= =?UTF-8?q?t=E7=9A=84=E4=B8=8D=E6=98=BE=E7=A4=BAtoolbar?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/case/layer/pane.list.js | 11 ++++++++--- src/case/list/list.select.js | 8 +++++--- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/src/case/layer/pane.list.js b/src/case/layer/pane.list.js index 9cad462cf..7370bc5b2 100644 --- a/src/case/layer/pane.list.js +++ b/src/case/layer/pane.list.js @@ -121,11 +121,16 @@ BI.ListPane = BI.inherit(BI.Pane, { }]); return; } - BI.ListPane.superclass.populate.apply(this, arguments); + var context = BI.get(arguments, [2], {}); var tipText = context.tipText || ''; - BI.isNotEmptyString(tipText) && this.setTipText(tipText); - this.button_group.populate.apply(this.button_group, arguments); + if (BI.isNotEmptyString(tipText)) { + BI.ListPane.superclass.populate.apply(this, []); + this.setTipText(tipText); + } else { + BI.ListPane.superclass.populate.apply(this, arguments); + this.button_group.populate.apply(this.button_group, arguments); + } }, empty: function () { diff --git a/src/case/list/list.select.js b/src/case/list/list.select.js index d654bb431..12f71e383 100644 --- a/src/case/list/list.select.js +++ b/src/case/list/list.select.js @@ -48,11 +48,13 @@ BI.SelectList = BI.inherit(BI.Widget, { items: o.items, itemsCreator: function (op, callback) { op.times === 1 && self.toolbar.setVisible(false); - o.itemsCreator(op, function (items) { + o.itemsCreator(op, function (items, keywords, context) { callback.apply(self, arguments); if (op.times === 1) { - self.toolbar.setVisible(items && items.length > 0); - self.toolbar.setEnable(self.isEnabled() && items && items.length > 0); + var tipText = BI.get(context, 'tipText', ''); + var visible = BI.isEmptyString(tipText) && items && items.length > 0; + self.toolbar.setVisible(visible); + self.toolbar.setEnable(self.isEnabled() && visible); } self._checkAllSelected(); });