From 970bab66304fd4b956e76ce4b6f33fae24386fb3 Mon Sep 17 00:00:00 2001 From: snowlocked <19562649+snowlocked@users.noreply.github.com> Date: Tue, 16 Jul 2024 16:37:50 +0800 Subject: [PATCH] fix: The OperationNode will repeatedly change status between appearing and disappearing. --- src/TabNavList/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/TabNavList/index.tsx b/src/TabNavList/index.tsx index 0d377fb4..319ab30a 100644 --- a/src/TabNavList/index.tsx +++ b/src/TabNavList/index.tsx @@ -150,7 +150,7 @@ const TabNavList = React.forwardRef((props, ref const addSizeValue = getUnitValue(addSize, tabPositionTopOrBottom); const operationSizeValue = getUnitValue(operationSize, tabPositionTopOrBottom); - const needScroll = containerExcludeExtraSizeValue < tabContentSizeValue + addSizeValue; + const needScroll = Math.floor(containerExcludeExtraSizeValue) < Math.floor(tabContentSizeValue + addSizeValue); const visibleTabContentValue = needScroll ? containerExcludeExtraSizeValue - operationSizeValue : containerExcludeExtraSizeValue - addSizeValue;