From 7f963990098f94090a876e359d016ac2b2b1a20d Mon Sep 17 00:00:00 2001 From: zepeng <75007029+yj-liuzepeng@users.noreply.github.com> Date: Fri, 16 Jun 2023 14:08:29 +0800 Subject: [PATCH] fix(tabs): the dropdown menu opened automatically in Customized trigger of new tab (#6655) * fix(tabs): the dropdown menu opened automatically in Customized trigger of new tab * fix(tabs): the dropdown menu opened automatically in Customized trigger of new tab --- components/tabs/src/TabNavList/OperationNode.tsx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/components/tabs/src/TabNavList/OperationNode.tsx b/components/tabs/src/TabNavList/OperationNode.tsx index b23b4d4b8..54358e056 100644 --- a/components/tabs/src/TabNavList/OperationNode.tsx +++ b/components/tabs/src/TabNavList/OperationNode.tsx @@ -121,6 +121,14 @@ export default defineComponent({ } }); + watch( + () => props.tabs.length, + val => { + if(!val) { + setOpen(false); + } + }); + return () => { const { prefixCls,