From 531ae16553736507c39970c07a2c4ef3b320ef55 Mon Sep 17 00:00:00 2001 From: Cherry7 <79909910+CCherry07@users.noreply.github.com> Date: Sun, 6 Aug 2023 11:50:43 +0800 Subject: [PATCH] fix: Dropdown show (#6757) --- components/tabs/src/TabNavList/OperationNode.tsx | 1 + typings/global.d.ts | 2 ++ 2 files changed, 3 insertions(+) diff --git a/components/tabs/src/TabNavList/OperationNode.tsx b/components/tabs/src/TabNavList/OperationNode.tsx index a304ba801..727ddba97 100644 --- a/components/tabs/src/TabNavList/OperationNode.tsx +++ b/components/tabs/src/TabNavList/OperationNode.tsx @@ -142,6 +142,7 @@ export default defineComponent({ onTabClick, popupClassName, } = props; + if (!tabs.length) return null; const dropdownPrefix = `${prefixCls}-dropdown`; const dropdownAriaLabel = locale?.dropdownAriaLabel; diff --git a/typings/global.d.ts b/typings/global.d.ts index 1f787aee0..d48c8da20 100644 --- a/typings/global.d.ts +++ b/typings/global.d.ts @@ -266,6 +266,8 @@ declare module 'vue' { ABackTop: typeof import('ant-design-vue')['BackTop']; AWatermark: typeof import('ant-design-vue')['Watermark']; + + AStyleProvider: typeof import('ant-design-vue')['StyleProvider']; } } export {};