From e9b78c3cf270570e9a08abb8300eb2010b2615e3 Mon Sep 17 00:00:00 2001 From: jimmychai Date: Mon, 11 Sep 2023 20:03:04 +0800 Subject: [PATCH] =?UTF-8?q?BI-133543=20fix:=20=E6=90=9C=E7=B4=A2=E6=8A=A5?= =?UTF-8?q?=E9=94=99=E6=97=A0=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/fineui/src/case/list/list.select.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/fineui/src/case/list/list.select.js b/packages/fineui/src/case/list/list.select.js index 4301aff57..30f78ac40 100644 --- a/packages/fineui/src/case/list/list.select.js +++ b/packages/fineui/src/case/list/list.select.js @@ -71,10 +71,12 @@ export class SelectList extends Widget { itemsCreator: (op, callback) => { op.times === 1 && this.toolbar.setVisible(false); o.itemsCreator(op, (items, keywords, context, ...args) => { - callback(items, keywords, context, ...args); + const tipText = get(context, "tipText", ""); + const isEmptyTipText = isEmptyString(tipText); + // tipText 和 items 本身就是互斥的 + callback(isEmptyTipText ? items : [], keywords, context, ...args); if (op.times === 1) { - const tipText = get(context, "tipText", ""); - const visible = isEmptyString(tipText) && items && items.length > 0; + const visible = isEmptyTipText && items && items.length > 0; this.toolbar.setVisible(visible); this.toolbar.setEnable(this.isEnabled() && visible); }