From 0621bfb7ff9c451529c37ac061b937e42381fe1f Mon Sep 17 00:00:00 2001 From: xiamiao Date: Wed, 17 Jul 2024 16:29:19 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix(tabs):=20=E4=BF=AE=E5=A4=8DactiveId?= =?UTF-8?q?=E4=B8=BA=E4=B8=80=E4=B8=AA=E4=B8=8D=E5=AD=98=E5=9C=A8=E7=9A=84?= =?UTF-8?q?=E5=80=BC=E6=88=96=E7=A9=BA=E5=80=BC=EF=BC=8C=E4=B8=8B=E5=88=92?= =?UTF-8?q?=E7=BA=BF=E6=98=BE=E7=A4=BA=E4=B8=8D=E5=AF=B9=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98(#2939)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/ui/tabs/src/TabList.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/ui/tabs/src/TabList.tsx b/packages/ui/tabs/src/TabList.tsx index e867a42c8..7508770bf 100644 --- a/packages/ui/tabs/src/TabList.tsx +++ b/packages/ui/tabs/src/TabList.tsx @@ -253,7 +253,7 @@ export const TabList = forwardRef( direction={direction} /> ))} - {type === 'line' ? ( + {type === 'line' && data.some((item) => item.tabId === activeTabId) ? ( Date: Wed, 17 Jul 2024 16:30:55 +0800 Subject: [PATCH 2/2] =?UTF-8?q?chore(tabs):=20=E7=94=9F=E6=88=90=E5=8F=98?= =?UTF-8?q?=E6=9B=B4=E8=AE=B0=E5=BD=95=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .changeset/eight-poets-reply.md | 5 +++++ .changeset/sweet-garlics-shop.md | 5 +++++ 2 files changed, 10 insertions(+) create mode 100644 .changeset/eight-poets-reply.md create mode 100644 .changeset/sweet-garlics-shop.md diff --git a/.changeset/eight-poets-reply.md b/.changeset/eight-poets-reply.md new file mode 100644 index 000000000..f608a9dcf --- /dev/null +++ b/.changeset/eight-poets-reply.md @@ -0,0 +1,5 @@ +--- +"@hi-ui/hiui": patch +--- + +fix(tabs): 修复 activeId 为一个不存在的值或空值,下划线显示不对的问题 diff --git a/.changeset/sweet-garlics-shop.md b/.changeset/sweet-garlics-shop.md new file mode 100644 index 000000000..13f64c7df --- /dev/null +++ b/.changeset/sweet-garlics-shop.md @@ -0,0 +1,5 @@ +--- +"@hi-ui/tabs": patch +--- + +fix: 修复 activeId 为一个不存在的值或空值,下划线显示不对的问题