From 86b8608f1b855b2eee149f85331076f3a165ff65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E4=BC=9F=E6=9D=B0?= <674416404@qq.com> Date: Mon, 20 Jan 2025 11:19:59 +0800 Subject: [PATCH] fix(auto-complete): options is an empty array, empty is not effective --- src/auto-complete/_example/base.vue | 8 ++++++-- src/auto-complete/auto-complete.tsx | 7 +++---- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/auto-complete/_example/base.vue b/src/auto-complete/_example/base.vue index b378afe73..2bb289f5d 100644 --- a/src/auto-complete/_example/base.vue +++ b/src/auto-complete/_example/base.vue @@ -2,13 +2,17 @@ + > + + ); // 联想词列表 - const listContent = ( + const listContent = Array.isArray(this.options) && ( ); const topContent = renderTNodeJSX(this, 'panelTopContent'); const bottomContent = renderTNodeJSX(this, 'panelBottomContent'); - const panelContent = topContent || this.options?.length || bottomContent ? ( + const panelContent = topContent || listContent || bottomContent ? (
{topContent} {listContent}