From 823b3ddd1123066d44c6a2aba067d3f08a4b9a06 Mon Sep 17 00:00:00 2001 From: tangjinzhou <415800467@qq.com> Date: Fri, 16 Jun 2023 14:09:35 +0800 Subject: [PATCH] fix: operationNodeProps ts error --- components/tabs/src/TabNavList/OperationNode.tsx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/components/tabs/src/TabNavList/OperationNode.tsx b/components/tabs/src/TabNavList/OperationNode.tsx index 54358e056..899565db5 100644 --- a/components/tabs/src/TabNavList/OperationNode.tsx +++ b/components/tabs/src/TabNavList/OperationNode.tsx @@ -14,7 +14,7 @@ import EllipsisOutlined from '@ant-design/icons-vue/EllipsisOutlined'; export const operationNodeProps = { prefixCls: { type: String }, id: { type: String }, - tabs: { type: Object as PropType<(Tab & { closeIcon?: () => any })[]> }, + tabs: { type: Array as PropType<(Tab & { closeIcon?: () => any })[]> }, rtl: { type: Boolean }, tabBarGutter: { type: Number }, activeKey: { type: [String, Number] }, @@ -124,11 +124,12 @@ export default defineComponent({ watch( () => props.tabs.length, val => { - if(!val) { + if (!val) { setOpen(false); } - }); - + }, + ); + return () => { const { prefixCls,